[libvirt] [PATCH go-xml] Add support for Node Device with basic testing.
by Vladik Romanovsky
---
node_device.go | 168 ++++++++++++++++++++++++++++++++++++++++++++++++++++
node_device_test.go | 128 +++++++++++++++++++++++++++++++++++++++
2 files changed, 296 insertions(+)
create mode 100644 node_device.go
create mode 100644 node_device_test.go
diff --git a/node_device.go b/node_device.go
new file mode 100644
index 0000000..d7850e9
--- /dev/null
+++ b/node_device.go
@@ -0,0 +1,168 @@
+/*
+ * This file is part of the libvirt-go-xml project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ * Copyright (C) 2017 Red Hat, Inc.
+ *
+ */
+
+package libvirtxml
+
+import (
+ "encoding/xml"
+)
+
+type NodeDevice struct {
+ Name string `xml:"name"`
+ Path string `xml:"path,omitempty"`
+ Parent string `xml:"parent,omitempty"`
+ Driver string `xml:"driver>name,omitempty"`
+ Capability []NodeDeviceCapability `xml:"capability"`
+}
+
+type NodeDeviceCapability struct {
+ Domain int `xml:"domain,omitempty"`
+ Bus int `xml:"bus,omitempty"`
+ Slot int `xml:"slot,omitempty"`
+ Function int `xml:"function,omitempty"`
+ IommuGroup *NodeDeviceIOMMUGroup `xml:"iommuGroup,omitempty"`
+ Numa *NodeDeviceNUMA `xml:"numa,omitempty"`
+ PciExpress *NodeDevicePciExpress `xml:"pci-express,omitempty"`
+ Hardware *NodeDeviceSystemHardware `xml:"hardware"`
+ Firmware *NodeDeviceSystemFirmware `xml:"firmware"`
+ Device int `xml:"device"`
+ Number int `xml:"number"`
+ Class int `xml:"class"`
+ Subclass int `xml:"subclass"`
+ Protocol int `xml:"protocol"`
+ Description string `xml:"description,omitempty"`
+ Interface string `xml:"interface"`
+ Address string `xml:"address"`
+ Link *NodeDeviceNetLink `xml:"link"`
+ Features []NodeDeviceNetOffloadFeatures `xml:"feature,omitempty"`
+ UniqueID int `xml:"unique_id"`
+ Target int `xml:"target"`
+ Lun int `xml:"lun"`
+ Block string `xml:"block"`
+ DriverType string `xml:"drive_type"`
+ Model string `xml:"model"`
+ Serial string `xml:"serial"`
+ Size int `xml:"size"`
+ Host int `xml:"host"`
+ Type string `xml:"type"`
+ Product *NodeDeviceProduct `xml:"product,omitempty"`
+ Vendor *NodeDeviceVendor `xml:"vendor,omitempty"`
+ Capability []NodeDeviceNestedCapabilities `xml:"capability,omitempty"`
+}
+
+type NodeDeviceVendor struct {
+ ID string `xml:"id,attr,omitempty"`
+ Name string `xml:",chardata"`
+}
+type NodeDeviceProduct struct {
+ ID string `xml:"id,attr,omitempty"`
+ Name string `xml:",chardata"`
+}
+
+type NodeDeviceNestedCapabilities struct {
+ Type string `xml:"type,attr"`
+ Address []NodeDevicePCIAddress `xml:"address,omitempty"`
+ MaxCount int `xml:"maxCount,attr,omitempty"`
+ VportsOPS *NodeDeviceSCSIVportsOPS `xml:"vports_ops,omitempty"`
+ FCHost *NodeDeviceSCSIFCHost `xml:"fc_host,omitempty"`
+ MediaAvailable int `xml:"media_available,omitempty"`
+ MediaSize int `xml:"media_size,omitempty"`
+ MediaLable int `xml:"media_label,omitempty"`
+}
+
+type NodeDevicePciExpress struct {
+ Links []NodeDevicePciExpressLink `xml:"link"`
+}
+
+type NodeDevicePciExpressLink struct {
+ Validity string `xml:"validity,attr,omitempty"`
+ Speed float64 `xml:"speed,attr,omitempty"`
+ Port int `xml:"port,attr,omitempty"`
+ Width int `xml:"width,attr,omitempty"`
+}
+
+type NodeDeviceIOMMUGroup struct {
+ Number int `xml:"number,attr"`
+}
+
+type NodeDeviceNUMA struct {
+ Node int `xml:"node,attr"`
+}
+
+type NodeDevicePCIAddress struct {
+ Domain string `xml:"domain,attr"`
+ Bus string `xml:"bus,attr"`
+ Slot string `xml:"slot,attr"`
+ Function string `xml:"function,attr"`
+}
+
+type NodeDeviceSystemHardware struct {
+ Vendor string `xml:"vendor"`
+ Version string `xml:"version"`
+ Serial string `xml:"serial"`
+ UUID string `xml:"uuid"`
+}
+
+type NodeDeviceSystemFirmware struct {
+ Vendor string `xml:"vendor"`
+ Version string `xml:"version"`
+ ReleaseData string `xml:"release_date"`
+}
+
+type NodeDeviceNetOffloadFeatures struct {
+ Name string `xml:"number"`
+}
+
+type NodeDeviceNetLink struct {
+ State string `xml:"state,attr"`
+ Speed string `xml:"speed,attr,omitempty"`
+}
+
+type NetCapability struct {
+ Type string `xml:"type,attr"`
+}
+
+type NodeDeviceSCSIVportsOPS struct {
+ Vports int `xml:"vports,omitempty"`
+ MaxVports int `xml:"maxvports,,omitempty"`
+}
+
+type NodeDeviceSCSIFCHost struct {
+ WWNN string `xml:"wwnn,omitempty"`
+ WWPN string `xml:"wwpn,omitempty"`
+ FabricWWN string `xml:"fabric_wwn,omitempty"`
+}
+
+func (c *NodeDevice) Unmarshal(doc string) error {
+ return xml.Unmarshal([]byte(doc), c)
+}
+
+func (c *NodeDevice) Marshal() (string, error) {
+ doc, err := xml.MarshalIndent(c, "", " ")
+ if err != nil {
+ return "", err
+ }
+ return string(doc), nil
+}
diff --git a/node_device_test.go b/node_device_test.go
new file mode 100644
index 0000000..bae15f3
--- /dev/null
+++ b/node_device_test.go
@@ -0,0 +1,128 @@
+/*
+ * This file is part of the libvirt-go-xml project
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ * Copyright (C) 2017 Red Hat, Inc.
+ *
+ */
+
+package libvirtxml
+
+import (
+ "reflect"
+ "strings"
+ "testing"
+)
+
+var NodeDeviceTestData = []struct {
+ Object *NodeDevice
+ XML []string
+}{
+ {
+ Object: &NodeDevice{
+ Name: "pci_0000_81_00_0",
+ Parent: "pci_0000_80_01_0",
+ Driver: "ixgbe",
+ Capability: []NodeDeviceCapability{
+ NodeDeviceCapability{
+ Domain: 1,
+ Bus: 21,
+ Slot: 10,
+ Function: 50,
+ Product: &NodeDeviceProduct{
+ ID: "0x1528",
+ Name: "Ethernet Controller 10-Gigabit X540-AT2",
+ },
+ Vendor: &NodeDeviceVendor{
+ ID: "0x8086",
+ Name: "Intel Corporation",
+ },
+ IommuGroup: &NodeDeviceIOMMUGroup{
+ Number: 3,
+ },
+ Numa: &NodeDeviceNUMA{
+ Node: 1,
+ },
+ Capability: []NodeDeviceNestedCapabilities{
+ NodeDeviceNestedCapabilities{
+ Type: "virt_functions",
+ Address: []NodeDevicePCIAddress{
+ NodeDevicePCIAddress{
+ Domain: "0x0000",
+ Bus: "0x81",
+ Slot: "0x10",
+ Function: "0x1",
+ },
+ NodeDevicePCIAddress{
+ Domain: "0x0000",
+ Bus: "0x81",
+ Slot: "0x10",
+ Function: "0x3",
+ },
+ },
+ MaxCount: 63,
+ },
+ },
+ },
+ },
+ },
+ XML: []string{
+ `<device>`,
+ ` <name>pci_0000_81_00_0</name>`,
+ ` <parent>pci_0000_80_01_0</parent>`,
+ ` <driver>`,
+ ` <name>ixgbe</name>`,
+ ` </driver>`,
+ ` <capability type='pci'>`,
+ ` <domain>1</domain>`,
+ ` <bus>21</bus>`,
+ ` <slot>10</slot>`,
+ ` <function>50</function>`,
+ ` <product id='0x1528'>Ethernet Controller 10-Gigabit X540-AT2</product>`,
+ ` <vendor id='0x8086'>Intel Corporation</vendor>`,
+ ` <capability type='virt_functions' maxCount='63'>`,
+ ` <address domain='0x0000' bus='0x81' slot='0x10' function='0x1'/>`,
+ ` <address domain='0x0000' bus='0x81' slot='0x10' function='0x3'/>`,
+ ` </capability>`,
+ ` <iommuGroup number='3'>`,
+ ` <address domain='0x0000' bus='0x15' slot='0x00' function='0x4'/>`,
+ ` </iommuGroup>`,
+ ` <numa node='1'/>`,
+ ` </capability>`,
+ `</device>`,
+ },
+ },
+}
+
+func TestNodeDevice(t *testing.T) {
+ for _, test := range NodeDeviceTestData {
+ xmlDoc := strings.Join(test.XML, "\n")
+ nodeDevice := NodeDevice{}
+ err := nodeDevice.Unmarshal(xmlDoc)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ res := reflect.DeepEqual(&nodeDevice, test.Object)
+ if !res {
+ t.Fatal("Bad NodeDevice object creation.")
+ }
+ }
+}
--
2.9.4
7 years, 5 months
[libvirt] [PATCH] virsh: ignore readline -Wstrict-prototypes warning
by Roman Bogorodskiy
When building with clang 4.0.0, virsh build fails like this:
gmake[3]: Entering directory '/usr/home/novel/code/libvirt/tools'
CC virsh-virsh.o
In file included from virsh.c:45:
In file included from /usr/local/include/readline/readline.h:31:
/usr/local/include/readline/rltypedefs.h:35:22: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
typedef int Function () __attribute__ ((deprecated));
^
void
/usr/local/include/readline/rltypedefs.h:36:24: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
typedef void VFunction () __attribute__ ((deprecated));
^
void
/usr/local/include/readline/rltypedefs.h:37:26: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
typedef char *CPFunction () __attribute__ ((deprecated));
^
void
/usr/local/include/readline/rltypedefs.h:38:28: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
typedef char **CPPFunction () __attribute__ ((deprecated));
^
void
In file included from virsh.c:45:
/usr/local/include/readline/readline.h:385:23: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
extern int rl_message ();
^
void
5 errors generated.
gmake[3]: *** [Makefile:2823: virsh-virsh.o] Error 1
Fix that by adding VIR_WARNINGS_NO_STRICT_PROTOTYPES macro that uses
"GCC diagnostic push" to ignore -Wstrict-prototypes and wrapping
readline includes with it and VIR_WARNINGS_RESET.
Bug report on the readline mailing list:
http://lists.gnu.org/archive/html/bug-readline/2017-05/msg00004.html
---
src/internal.h | 4 ++++
tools/virsh.c | 2 ++
tools/virt-admin.c | 2 ++
3 files changed, 8 insertions(+)
diff --git a/src/internal.h b/src/internal.h
index 03a973ccd..57b6da7ff 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -266,6 +266,10 @@
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
+# define VIR_WARNINGS_NO_STRICT_PROTOTYPES \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wstrict-prototypes\"")
+
# if HAVE_SUGGEST_ATTRIBUTE_FORMAT
# define VIR_WARNINGS_NO_PRINTF \
_Pragma ("GCC diagnostic push") \
diff --git a/tools/virsh.c b/tools/virsh.c
index 1f5c2b11c..1a28a2620 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -41,8 +41,10 @@
#include <signal.h>
#if WITH_READLINE
+VIR_WARNINGS_NO_STRICT_PROTOTYPES
# include <readline/readline.h>
# include <readline/history.h>
+VIR_WARNINGS_RESET
#endif
#include "internal.h"
diff --git a/tools/virt-admin.c b/tools/virt-admin.c
index 0fa1c000c..7ad4c29e1 100644
--- a/tools/virt-admin.c
+++ b/tools/virt-admin.c
@@ -27,8 +27,10 @@
#include <getopt.h>
#if WITH_READLINE
+VIR_WARNINGS_NO_STRICT_PROTOTYPES
# include <readline/readline.h>
# include <readline/history.h>
+VIR_WARNINGS_RESET
#endif
#include "internal.h"
--
2.13.0
7 years, 5 months
[libvirt] [PATCH] qemu: Don't special case mdevs when assigning PCI addresses
by Andrea Bolognani
We can treat mdevs the same as all other PCI hostdevs
and figure out whether they are PCI Express or legacy PCI
by checking the size of their config space.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
src/qemu/qemu_domain_address.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
index 2106b34..3277d18 100644
--- a/src/qemu/qemu_domain_address.c
+++ b/src/qemu/qemu_domain_address.c
@@ -645,9 +645,6 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDefPtr dev,
return pcieFlags;
}
- if (hostdev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_MDEV)
- return pcieFlags;
-
if (!(pciDev = virPCIDeviceNew(hostAddr->domain,
hostAddr->bus,
hostAddr->slot,
--
2.7.4
7 years, 5 months
[libvirt] [PATCH v4 0/3] Loadparm support
by Farhan Ali
This patch series introduces the support for new s390x 'loadparm'
feature. The 'loadparm' can be used to select the boot entry to
boot from, for a boot device.
Here is a link to the QEMU patches:
https://lists.nongnu.org/archive/html/qemu-devel/2017-05/msg00192.html
ChangeLog
---------
v3 -> v4
- Break news and documentation updates to a
separate patch (patch 3)
- Merge test cases with qemu patch (patch 2)
- Add xml2xml test case (patch 2)
- Add qemucapabilities test (patch 2)
- Rebased the patch series on master commit
5970b13 udev: Fix build on older platforms
v2 -> v3:
- Updated news.xml and formatdomain.html.in with a more architectural
description of loadparm (patch 1)
v1 -> v2:
- Rebased the patch series on the latest master, commit
2f69dd3 virfiletest: include linux/falloc.h
Thanks
Farhan Ali
Farhan Ali (3):
conf : Add loadparm boot option for a boot device
qemu : Add loadparm to qemu command line string
news: Update news and libvirt documentation
docs/formatdomain.html.in | 9 +-
docs/news.xml | 11 +
docs/schemas/domaincommon.rng | 7 +
src/conf/device_conf.h | 1 +
src/conf/domain_conf.c | 69 +-
src/qemu/qemu_capabilities.c | 3 +
src/qemu/qemu_capabilities.h | 3 +
src/qemu/qemu_command.c | 33 +
.../qemucapabilitiesdata/caps_2.9.50.s390x.replies | 14587 +++++++++++++++++++
tests/qemucapabilitiesdata/caps_2.9.50.s390x.xml | 302 +
...-machine-loadparm-multiple-disks-nets-s390.args | 28 +
...v-machine-loadparm-multiple-disks-nets-s390.xml | 43 +
.../qemuxml2argv-machine-loadparm-net-s390.args | 20 +
.../qemuxml2argv-machine-loadparm-net-s390.xml | 26 +
...xml2argv-machine-loadparm-s390-char-invalid.xml | 26 +
...uxml2argv-machine-loadparm-s390-len-invalid.xml | 26 +
.../qemuxml2argv-machine-loadparm-s390.args | 20 +
.../qemuxml2argv-machine-loadparm-s390.xml | 26 +
tests/qemuxml2argvtest.c | 19 +
...t-machine-loadparm-multiple-disks-nets-s390.xml | 44 +
tests/qemuxml2xmltest.c | 4 +
21 files changed, 15303 insertions(+), 4 deletions(-)
create mode 100644 tests/qemucapabilitiesdata/caps_2.9.50.s390x.replies
create mode 100644 tests/qemucapabilitiesdata/caps_2.9.50.s390x.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-machine-loadparm-multiple-disks-nets-s390.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-machine-loadparm-multiple-disks-nets-s390.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-machine-loadparm-net-s390.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-machine-loadparm-net-s390.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-machine-loadparm-s390-char-invalid.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-machine-loadparm-s390-len-invalid.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-machine-loadparm-s390.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-machine-loadparm-s390.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-machine-loadparm-multiple-disks-nets-s390.xml
--
1.9.1
7 years, 5 months
[libvirt] [PATCH 0/2] Two simple sparse streams fixes
by Michal Privoznik
I've been experimenting with sparse streams and found a bug. If you try to
download a volume which doesn't support sparseness here's what happens:
# virsh vol-download --sparse /dev/disk/by-path/ip-XX.XX.XX.XX:3260-iscsi-iqn.2017-03.com.blah:server-lun-0 /mnt/floppy/blah.raw
# echo $?
0
# ls -lhs /mnt/floppy/bla.raw
0 -rw-r--r-- 1 root root 0 May 30 12:40 /mnt/floppy/bla.raw
That's not good. iSCSI doesn't know anything about sparseness so an error is
expected here. Fortunately, the fix is fairly simple:
# virsh vol-download --sparse /dev/disk/by-path/ip-XX.XX.XX.XX:3260-iscsi-iqn.2017-03.com.blah:server-lun-0 /mnt/floppy/bla.raw
error: cannot close volume /dev/disk/by-path/ip-XX.XX.XX.XX:3260-iscsi-iqn.2017-03.com.blah:server-lun-0
error: Unable to seek to data: Invalid argument
Michal Privoznik (2):
virfdstream: Check for thread error more frequently
fdstream: Report error from the I/O thread
daemon/stream.c | 18 ++++++++++++------
src/util/virfdstream.c | 22 ++++++++++++++++++++--
2 files changed, 32 insertions(+), 8 deletions(-)
--
2.13.0
7 years, 5 months
[libvirt] [PATCH] qemu: Fix serial stub console allocation
by Erik Skultety
When adding the aliased serial stub console, the structure wasn't
properly allocated (VIR_ALLOC instead of virDomainChrDefNew) which then
resulted in SIGSEGV in virDomainChrSourceIsEqual during a serial device
coldplug.
https://bugzilla.redhat.com/show_bug.cgi?id=1434278
Signed-off-by: Erik Skultety <eskultet(a)redhat.com>
---
src/qemu/qemu_hotplug.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 4a7d99725..34ddb95f8 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1810,7 +1810,7 @@ qemuDomainChrPreInsert(virDomainDefPtr vmdef,
if (!vmdef->consoles && VIR_ALLOC(vmdef->consoles) < 0)
return -1;
- if (VIR_ALLOC(vmdef->consoles[0]) < 0) {
+ if (!(vmdef->consoles[0] = virDomainChrDefNew(NULL))) {
VIR_FREE(vmdef->consoles);
return -1;
}
@@ -1841,7 +1841,7 @@ qemuDomainChrInsertPreAllocCleanup(virDomainDefPtr vmdef,
/* Remove the stub console added by qemuDomainChrPreInsert */
if (vmdef->nserials == 0 && vmdef->nconsoles == 1 &&
chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL) {
- VIR_FREE(vmdef->consoles[0]);
+ virDomainChrDefFree(vmdef->consoles[0]);
VIR_FREE(vmdef->consoles);
vmdef->nconsoles = 0;
}
--
2.13.0
7 years, 5 months
[libvirt] [PATCH v3 0/2] Check for <memoryBacking/>
by Michal Privoznik
v3 of:
https://www.redhat.com/archives/libvir-list/2017-May/msg00939.html
diff to v2:
- moved xmlopt argument further the argument list in virDomainSnapshotRedefinePrep
- drop couple of checks in qemuDomainABIStabilityCheck
Patch 1/2 has been ACKed. But just conditionally. So I'm sending it again to
see if I haven't missed anything.
Michal Privoznik (2):
virDomainXMLOption: Introduce virDomainABIStabilityDomain
virQEMUDriverDomainABIStability: Check for memoryBacking
src/conf/domain_conf.c | 19 ++++++++++++++++---
src/conf/domain_conf.h | 16 ++++++++++++++--
src/conf/snapshot_conf.c | 3 ++-
src/conf/snapshot_conf.h | 1 +
src/libvirt_private.syms | 2 ++
src/libxl/libxl_conf.c | 2 +-
src/libxl/libxl_domain.c | 4 +++-
src/lxc/lxc_conf.c | 3 ++-
src/openvz/openvz_driver.c | 2 +-
src/phyp/phyp_driver.c | 2 +-
src/qemu/qemu_capabilities.c | 2 +-
src/qemu/qemu_conf.c | 3 ++-
src/qemu/qemu_domain.c | 23 +++++++++++++++++++++++
src/qemu/qemu_domain.h | 1 +
src/qemu/qemu_driver.c | 5 +++--
src/security/virt-aa-helper.c | 2 +-
src/test/test_driver.c | 6 ++++--
src/uml/uml_driver.c | 2 +-
src/vbox/vbox_common.c | 2 +-
src/vmware/vmware_driver.c | 2 +-
src/vmx/vmx.c | 2 +-
src/vz/vz_driver.c | 2 +-
src/xen/xen_driver.c | 2 +-
src/xenapi/xenapi_driver.c | 2 +-
tests/bhyveargv2xmltest.c | 3 ++-
tests/qemuargv2xmltest.c | 2 +-
tests/qemuxml2argvtest.c | 2 +-
tests/sexpr2xmltest.c | 2 +-
tests/testutils.c | 4 ++--
tests/vmx2xmltest.c | 2 +-
tests/xlconfigtest.c | 2 +-
tests/xmconfigtest.c | 2 +-
tests/xml2sexprtest.c | 2 +-
tests/xml2vmxtest.c | 2 +-
34 files changed, 97 insertions(+), 36 deletions(-)
--
2.13.0
7 years, 5 months
[libvirt] [PATCH] Add some news items for the 3.4.0 release
by Martin Kletzander
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
I could not be bothered to split the patches. Also, please review
whatever you know about as this is just a compilation of stuff from
the git log.
docs/news.xml | 166 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 165 insertions(+), 1 deletion(-)
diff --git a/docs/news.xml b/docs/news.xml
index 649350a904d3..d34e8beae4c0 100644
--- a/docs/news.xml
+++ b/docs/news.xml
@@ -45,6 +45,38 @@
sparseness.
</description>
</change>
+ <change>
+ <summary>
+ I/O APIC type can be specified for QEMU/KVM domains
+ </summary>
+ <description>
+ The <code>ioapic</code> tag was added to domain
+ <code>features</code>, so the type of the I/O APIC can now
+ be specified (e.g. putting it in userspace for KVM domains).
+ </description>
+ </change>
+ <change>
+ <summary>
+ Repository now has new README.md file
+ </summary>
+ <description>
+ The new file uses markdown syntax, so it looks better on
+ github and possibly other web pages, but it has also more
+ useful information. The old README is now symlink to the
+ new file.
+ </description>
+ </change>
+ <change>
+ <summary>
+ The reason for VM shutdown is reported, if known
+ </summary>
+ <description>
+ QEMU 2.10 will be able to report the reason for shutting
+ down (whether that was caused by the guest or not), and
+ libvirt is prepared for that and reports that information in
+ its shutdown event as well, if it is known.
+ </description>
+ </change>
</section>
<section title="Improvements">
<change>
@@ -67,10 +99,142 @@
is for CCW devices, most common on the S390 architecture. The second
is for fibre channel-backed SCSI devices and exposes the
fc_remote_port sub-capability to SCSI target devices.
- </description>
+ </description>
+ </change>
+ <change>
+ <summary>
+ Node devices now report Mediated device capabilities
+ </summary>
+ <description>
+ Endpoint devices support new <code>mdev</code> capability
+ and their parents now report the supported types in new
+ <code>mdev_types</mdev> capability.
+ </description>
+ </change>
+ <change>
+ <summary>
+ Capabilities now report information about host caches
+ </summary>
+ <description>
+ If supported in the kernel, host capabilities will now list
+ L3 caches. The code for other levels was added as well, but
+ only L3 caches are reported currently.
+ </description>
+ </change>
+ <change>
+ <summary>
+ POWER9 CPU model was added
+ </summary>
+ <description>
+ It is now properly reported in host capabilities.
+ </description>
+ </change>
+ <change>
+ <summary>
+ libxl: NUMA sibling distances are now reported in host capabilities
+ </summary>
+ </change>
+ <change>
+ <summary>
+ Support for VMDK files with version 3
+ </summary>
+ <description>
+ VMDK version 3 files are now properly detected.
+ </description>
+ </change>
+ <change>
+ <summary>
+ Interrupt remapping and Extended interrupt mode for IOMMU devices
+ </summary>
+ <description>
+ These two new features can now be controlled with new
+ <code><driver intremap='on/off' eim='on/off'/></code>
+ tag for <code>iommu</code> devices.
+ </description>
+ </change>
+ <change>
+ <summary>
+ Graphics in libxl domains now have default addresses
+ </summary>
+ <description>
+ Even though there were default addresses before this change,
+ they were not saved in the XML. It is now possible to see
+ and control the listen addresses properly.
+ </description>
+ </change>
+ <change>
+ <summary>
+ Default USB controllers are now added for devices in libxl domains
+ </summary>
+ <description>
+ Even though they were added automatically when USB device
+ was attached, they could've been missing in some other
+ cases. The logic is now fixed so there are always USB
+ controllers, even if there was none of them in the specified
+ XML.
+ </description>
+ </change>
+ <change>
+ <summary>
+ Limits for RPC messages were increased
+ </summary>
+ <description>
+ Hitting the RPC limits we have is easier every day, so they
+ were increased once again and some guessing logic was
+ improved as well. It is now possible to get more stats than
+ ever using the <code>virConnectGetAllDomainStats()</code>
+ call and push through even bigger requests and replies for
+ all APIs.
+ </description>
</change>
</section>
<section title="Bug fixes">
+ <change>
+ <summary>
+ PCIe 4.0 cards now report proper link speeds
+ </summary>
+ <description>
+ It could happen that the link speed for PCIe devices was not
+ properly reported or the nodedev-dumpxml just failed. That
+ was due to mistake in the field width, but should now work
+ properly.
+ </description>
+ </change>
+ <change>
+ <summary>
+ qemu: Do not report errors on shutdown
+ </summary>
+ <description>
+ For some users, in some rare cases, it could happen that
+ there was an error message "internal error: End of file from
+ qemu monitor" in the logs even though no problem happened.
+ The detection of these false positives was improved and such
+ errors should not show any more.
+ </description>
+ </change>
+ <change>
+ <summary>
+ User-specified UNIX socket paths for virtio channels should not be reset
+ </summary>
+ <description>
+ It could happen, in some cases, that libvirt would mistake a
+ user-specified path for its own generated one and thus
+ remove it from the XML. The detection of such addresses was
+ improved now.
+ </description>
+ </change>
+ <change>
+ <summary>
+ Fix address reservation during RNG hot-plug
+ </summary>
+ <description>
+ When error occurred in a specific point in time during the
+ hot-plug of an RNG device, it could happen that an address
+ was released even though another device was already using
+ it, making it possible to hot-plug another device with that
+ address, effectively having duplicated addresses in the XML.
+ </description>
+ </change>
</section>
</release>
<release version="v3.3.0" date="2017-05-05">
--
2.13.0
7 years, 5 months
[libvirt] [PATCH V3] CI: also run tests using updated distro(s)
by claudioandre.br@gmail.com
From: Claudio André <claudioandre.br(a)gmail.com>
It is possible to test libvirt using other distros in Travis via Docker;
including (but not limited to) Fedora and Ubuntu.
---
https://travis-ci.org/claudioandre/libvirt/builds/237995646
.travis.yml | 19 ++++++-------
tests/travis-ci.sh | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 89 insertions(+), 10 deletions(-)
create mode 100755 tests/travis-ci.sh
diff --git a/.travis.yml b/.travis.yml
index 5a3e765..e4d4888 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,8 +1,6 @@
sudo: false
language: c
dist: precise
-compiler:
- - gcc
cache: ccache
addons:
apt:
@@ -62,15 +60,14 @@ git:
before_install:
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update && brew install gnutls libgcrypt yajl gettext rpcgen ; fi
-# the custom PATH is just to pick up OS-X homebrew & its harmless on Linux
-before_script:
- - PATH="/usr/local/opt/gettext/bin:/usr/local/opt/rpcgen/bin:$PATH" ./autogen.sh
script:
- - VIR_TEST_DEBUG=1 make -j3 && make -j3 syntax-check && make -j3 check
+ - tests/travis-ci.sh
# Environments here are run in addition to the main environment defined above
matrix:
include:
+ - compiler: gcc
+ dist: precise
- compiler: clang
dist: precise
- compiler: clang
@@ -79,10 +76,12 @@ matrix:
dist: trusty
- compiler: clang
os: osx
- script:
- # many unit tests fail & so does syntax-check, so skip for now
- # one day we must fix it though....
- - make -j3
+ - services: docker
+ env: IMAGE=ubuntu:17.04 CC=gcc
+ dist: trusty
+ - services: docker
+ env: IMAGE=ubuntu:17.04 CC=clang
+ dist: trusty
after_failure:
- echo '============================================================================'
diff --git a/tests/travis-ci.sh b/tests/travis-ci.sh
new file mode 100755
index 0000000..e63d509
--- /dev/null
+++ b/tests/travis-ci.sh
@@ -0,0 +1,80 @@
+#!/bin/bash -e
+
+function do_Install_Dependencies(){
+ echo
+ echo '-- Installing Dependencies --'
+
+ if [[ $DISTRO = "ubuntu:17.04" ]]; then
+ apt-get update -qq
+ apt-get -y -qq install \
+ build-essential git clang autoconf libtool libcmpicppimpl0 gettext \
+ xsltproc autopoint libxml2-dev libncurses5-dev libreadline-dev \
+ zlib1g-dev libgnutls28-dev libgcrypt11-dev libavahi-client-dev libsasl2-dev \
+ libxen-dev lvm2 libgcrypt11-dev libparted0-dev libdevmapper-dev uuid-dev \
+ libudev-dev libpciaccess-dev libcap-ng-dev libnl-3-dev libnl-route-3-dev \
+ libyajl-dev libpcap0.8-dev libnuma-dev libnetcf-dev libaudit-dev \
+ libxml2-utils libapparmor-dev dnsmasq-base librbd-dev w3c-markup-validator kmod > /dev/null
+ else
+ echo "Please, change 'tests/travis-ci.sh' to add the needed dependencies for $DISTRO."
+ exit 1
+ fi
+}
+
+
+function do_Show_Info(){
+ echo
+ echo '-- Environment --'
+ echo "Running on Docker: $DISTRO"
+ id
+ uname -a
+
+ if [[ -n $CC ]]; then
+ echo
+ echo '-- Compiler in use --'
+ "$CC" --version
+ fi
+
+ echo -en 'travis_fold:start:printenv\r'
+ echo '-- Environment Variables --'
+ printenv
+ echo -en 'travis_fold:end:printenv\r'
+}
+
+
+# ----------- Build and Test libvirt -----------
+
+if [[ -n $IMAGE ]]; then
+ # Run docker using the selected image; then build and test
+ docker run --privileged --cap-add=ALL -v /lib/modules:/lib/modules \
+ -v "$(pwd)":/cwd -e CC=$CC -e DISTRO=$IMAGE "$IMAGE" sh -e -c " \
+ cd /cwd; \
+ tests/travis-ci.sh"
+ exit $?
+fi
+
+if [[ -n $DISTRO ]]; then
+ do_Install_Dependencies
+ do_Show_Info
+fi
+
+# Build and test
+if [[ "$TRAVIS_OS_NAME" = "osx" ]]; then
+ echo -en 'travis_fold:start:autogen\r'
+ echo '-- Running ./autogen.sh --'
+ # The custom PATH is just to pick up OS-X homebrew
+ PATH="/usr/local/opt/gettext/bin:/usr/local/opt/rpcgen/bin:$PATH" ./autogen.sh
+ echo -en 'travis_fold:end:autogen\r'
+
+ # many unit tests fail & so does syntax-check, so skip for now
+ # one day we must fix it though....
+ make -j3
+else
+ echo -en 'travis_fold:start:autogen\r'
+ echo '-- Running ./autogen.sh --'
+ ./autogen.sh
+ echo -en 'travis_fold:end:autogen\r'
+
+ VIR_TEST_DEBUG=1 make -j3 && make -j3 syntax-check && make -j3 check
+fi
+
+exit $?
--
2.11.0
7 years, 5 months