[libvirt] [PATCH v3 0/6] Add mdev reporting capability to the nodedev driver
by Erik Skultety
since v1:
- dropped the <description> element from the parent device nested capability
- added missing RNG schema and tests
- updated the documentation to describe the MDEV elements in both the parent
and the child
since v2:
- I further split our PCI sub-capability parser into more blocks as suggested
- instead of one capability 'mdev' for both mdev device and physical parent I
introduced 2, so we can do virsh nodedev-list --cap 'mdev_types' | 'mdev' to
see either parent devices or the mediated devices themselves
- other minor adjustments pointed out during review.
Erik
Erik Skultety (6):
mdev: Pass a uuidstr rather than an mdev object to some util functions
nodedev: conf: Split PCI sub-capability parsing to separate methods
nodedev: Introduce new mdev_types and mdev nodedev capabilities
nodedev: Introduce the mdev capability to a PCI parent device
nodedev: Introduce mdev capability for mediated devices
docs: Document the mediated devices within the nodedev driver
docs/drvnodedev.html.in | 164 +++++++++++-
docs/schemas/nodedev.rng | 43 ++++
include/libvirt/libvirt-nodedev.h | 2 +
src/conf/node_device_conf.c | 279 +++++++++++++++++----
src/conf/node_device_conf.h | 29 ++-
src/conf/virnodedeviceobj.c | 11 +-
src/libvirt-nodedev.c | 2 +
src/libvirt_private.syms | 1 +
src/node_device/node_device_driver.c | 2 +
src/node_device/node_device_udev.c | 165 +++++++++++-
src/qemu/qemu_domain.c | 8 +-
src/security/security_apparmor.c | 10 +-
src/security/security_dac.c | 20 +-
src/security/security_selinux.c | 20 +-
src/util/virmdev.c | 21 +-
src/util/virmdev.h | 4 +-
.../mdev_3627463d_b7f0_4fea_b468_f1da537d301b.xml | 8 +
.../pci_0000_02_10_7_mdev_types.xml | 32 +++
tests/nodedevxml2xmltest.c | 2 +
tools/virsh-nodedev.c | 6 +
20 files changed, 712 insertions(+), 117 deletions(-)
create mode 100644 tests/nodedevschemadata/mdev_3627463d_b7f0_4fea_b468_f1da537d301b.xml
create mode 100644 tests/nodedevschemadata/pci_0000_02_10_7_mdev_types.xml
--
2.12.2
7 years, 7 months
[libvirt] [PATCH] qemu: change the name of tap device for a tap and bridge network
by ZhiPeng Lu
Creating tap device and adding the device to bridge are not atomic operation.
Similarly deleting tap device and removing it from bridge are not atomic operation.
The Problem occurs when two vms start and shutdown. When one vm with the nic
named "vnet0" stopping, it deleted tap device but not removing port from bridge.
At this time, another vm created the tap device named "vnet0" and added port to the
same bridge. Then, the first vm deleted the tap device from the same bridge.
Finally, the tap device of the second vm don't attached to the bridge.
So, we can add domid to vm's nic name. For example, the vm's domid is 1 and vnet0
is renamed to vnet1.0.
Signed-off-by: ZhiPeng Lu <lu.zhipeng(a)zte.com.cn>
---
src/qemu/qemu_interface.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_interface.c b/src/qemu/qemu_interface.c
index d0850c0..17d40a7 100644
--- a/src/qemu/qemu_interface.c
+++ b/src/qemu/qemu_interface.c
@@ -512,6 +512,7 @@ qemuInterfaceBridgeConnect(virDomainDefPtr def,
bool template_ifname = false;
virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
const char *tunpath = "/dev/net/tun";
+ char *domIdPlusIndex = NULL;
if (net->backend.tap) {
tunpath = net->backend.tap;
@@ -531,8 +532,13 @@ qemuInterfaceBridgeConnect(virDomainDefPtr def,
STRPREFIX(net->ifname, VIR_NET_GENERATED_PREFIX) ||
strchr(net->ifname, '%')) {
VIR_FREE(net->ifname);
- if (VIR_STRDUP(net->ifname, VIR_NET_GENERATED_PREFIX "%d") < 0)
+ if (virAsprintf(&domIdPlusIndex, "%s%d.%s",
+ VIR_NET_GENERATED_PREFIX, def->id, "%d") < 0) {
+ goto cleanup;
+ }
+ if (VIR_STRDUP(net->ifname, domIdPlusIndex) < 0) {
goto cleanup;
+ }
/* avoid exposing vnet%d in getXMLDesc or error outputs */
template_ifname = true;
}
@@ -594,6 +600,7 @@ qemuInterfaceBridgeConnect(virDomainDefPtr def,
ret = 0;
cleanup:
+ VIR_FREE(domIdPlusIndex);
if (ret < 0) {
size_t i;
for (i = 0; i < *tapfdSize && tapfd[i] >= 0; i++)
--
1.8.3.1
7 years, 7 months
[libvirt] [PATCH] libxl: add default controllers for USB devices
by Jim Fehlig
Attempting to start a domain with USB hostdevs but no USB controllers
fails with the rather cryptic error
libxl: error: libxl_qmp.c:287:qmp_handle_error_response: received an
error message from QMP server: Bus 'xenusb-0.0' not found
This can be fixed by creating default USB controllers. When no USB
controllers are defined, create the number of 8 port controllers
necessary to accommodate the number of defined USB devices.
Note that USB controllers are already created as needed in the
domainAttachDevice code path. E.g. a USB controller will be created,
if necessary, when attaching a USB device with
'virsh attach-device dom usbdev.xml'.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
src/libxl/libxl_conf.c | 80 +++++++++++++++++++++++++++++++++++++++++++-------
1 file changed, 69 insertions(+), 11 deletions(-)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 4bab651b3..ed36dd1ff 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -1786,34 +1786,92 @@ libxlMakeUSBController(virDomainControllerDefPtr controller,
}
static int
+libxlMakeDefaultUSBControllers(virDomainDefPtr def,
+ libxl_domain_config *d_config)
+{
+ virDomainControllerDefPtr l_controller = NULL;
+ libxl_device_usbctrl *x_controllers = NULL;
+ size_t nusbdevs = 0;
+ size_t ncontrollers;
+ size_t i;
+
+ for (i = 0; i < def->nhostdevs; i++) {
+ if (def->hostdevs[i]->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS &&
+ def->hostdevs[i]->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB)
+ nusbdevs++;
+ }
+
+ /* No controllers needed if there are no USB devs */
+ if (nusbdevs == 0)
+ return 0;
+
+ /* Create USB controllers with 8 ports */
+ ncontrollers = VIR_DIV_UP(nusbdevs, 8);
+ if (VIR_ALLOC_N(x_controllers, ncontrollers) < 0)
+ return -1;
+
+ for (i = 0; i < ncontrollers; i++) {
+ if (!(l_controller = virDomainControllerDefNew(VIR_DOMAIN_CONTROLLER_TYPE_USB)))
+ goto error;
+
+ l_controller->model = VIR_DOMAIN_CONTROLLER_MODEL_USB_QUSB2;
+ l_controller->idx = i;
+ l_controller->opts.usbopts.ports = 8;
+
+ libxl_device_usbctrl_init(&x_controllers[i]);
+
+ if (libxlMakeUSBController(l_controller, &x_controllers[i]) < 0)
+ goto error;
+
+ virDomainControllerInsertPreAlloced(def, l_controller);
+ l_controller = NULL;
+ }
+
+ d_config->usbctrls = x_controllers;
+ d_config->num_usbctrls = ncontrollers;
+ return 0;
+
+ error:
+ virDomainControllerDefFree(l_controller);
+ for (i = 0; i < ncontrollers; i++)
+ libxl_device_usbctrl_dispose(&x_controllers[i]);
+ VIR_FREE(x_controllers);
+ return -1;
+}
+
+static int
libxlMakeUSBControllerList(virDomainDefPtr def, libxl_domain_config *d_config)
{
virDomainControllerDefPtr *l_controllers = def->controllers;
size_t ncontrollers = def->ncontrollers;
size_t nusbctrls = 0;
libxl_device_usbctrl *x_usbctrls;
- size_t i;
-
- if (ncontrollers == 0)
- return 0;
-
- if (VIR_ALLOC_N(x_usbctrls, ncontrollers) < 0)
- return -1;
+ size_t i, j;
for (i = 0; i < ncontrollers; i++) {
+ if (l_controllers[i]->type == VIR_DOMAIN_CONTROLLER_TYPE_USB)
+ nusbctrls++;
+ }
+
+ if (nusbctrls == 0)
+ return libxlMakeDefaultUSBControllers(def, d_config);
+
+ if (VIR_ALLOC_N(x_usbctrls, nusbctrls) < 0)
+ return -1;
+
+ for (i = 0, j = 0; i < ncontrollers && j < nusbctrls; i++) {
if (l_controllers[i]->type != VIR_DOMAIN_CONTROLLER_TYPE_USB)
continue;
- libxl_device_usbctrl_init(&x_usbctrls[nusbctrls]);
+ libxl_device_usbctrl_init(&x_usbctrls[j]);
if (libxlMakeUSBController(l_controllers[i],
- &x_usbctrls[nusbctrls]) < 0)
+ &x_usbctrls[j]) < 0)
goto error;
- nusbctrls++;
+ j++;
}
- VIR_SHRINK_N(x_usbctrls, ncontrollers, ncontrollers - nusbctrls);
d_config->usbctrls = x_usbctrls;
d_config->num_usbctrls = nusbctrls;
--
2.11.0
7 years, 7 months
[libvirt] [PATCH go-xml] remove superfluous state & omitempty entries
by Ryan Goodfellow
This commit removes the superfluous state and omit entries from my last
commit. It factors the 'state' data member into a DomainFeatureState
struct and only uses that struct where necessary e.g. HyperV features
as well as a few top level features such as PMU, HAP etc. The HyperV
suffix has also been added to features that are specific to
HyperV.
---
domain.go | 62 +++++++++++++++++++++++++++++-----------------------------
domain_test.go | 26 +++++++++++++-----------
2 files changed, 46 insertions(+), 42 deletions(-)
diff --git a/domain.go b/domain.go
index c9ffaef..b4b2256 100644
--- a/domain.go
+++ b/domain.go
@@ -372,61 +372,61 @@ type DomainCPU struct {
}
type DomainFeature struct {
+}
+
+type DomainFeatureState struct {
State string `xml:"state,attr,omitempty"`
}
type DomainFeatureAPIC struct {
- DomainFeature
EOI string `xml:"eio,attr,omitempty"`
}
-type DomainFeatureVendorId struct {
- DomainFeature
+type DomainFeatureHyperVVendorId struct {
+ DomainFeatureState
Value string `xml:"value,attr,omitempty"`
}
-type DomainFeatureSpinlocks struct {
- DomainFeature
+type DomainFeatureHyperVSpinlocks struct {
+ DomainFeatureState
Retries uint `xml:"retries,attr,omitempty"`
}
type DomainFeatureHyperV struct {
DomainFeature
- Relaxed *DomainFeature `xml:"relaxed,omitempty"`
- VAPIC *DomainFeature `xml:"vapic,omitempty"`
- Spinlocks *DomainFeatureSpinlocks `xml:"spinlocks,omitempty"`
- VPIndex *DomainFeature `xml:"vpindex,omitempty"`
- Runtime *DomainFeature `xml:"runtime,omitempty"`
- Synic *DomainFeature `xml:"synic,omitempty"`
- STimer *DomainFeature `xml:"stimer,omitempty"`
- Reset *DomainFeature `xml:"reset,omitempty"`
- VendorId *DomainFeatureVendorId `xml:"vendor_id,omitempty"`
+ Relaxed *DomainFeatureState `xml:"relaxed"`
+ VAPIC *DomainFeatureState `xml:"vapic"`
+ Spinlocks *DomainFeatureHyperVSpinlocks `xml:"spinlocks"`
+ VPIndex *DomainFeatureState `xml:"vpindex"`
+ Runtime *DomainFeatureState `xml:"runtime"`
+ Synic *DomainFeatureState `xml:"synic"`
+ STimer *DomainFeatureState `xml:"stimer"`
+ Reset *DomainFeatureState `xml:"reset"`
+ VendorId *DomainFeatureHyperVVendorId `xml:"vendor_id"`
}
type DomainFeatureKVM struct {
- DomainFeature
- Hidden *DomainFeature `xml:"hidden,omitempty"`
+ Hidden *DomainFeatureState `xml:"hidden"`
}
type DomainFeatureGIC struct {
- DomainFeature
Version string `xml:"version,attr,omitempty"`
}
type DomainFeatureList struct {
- PAE *DomainFeature `xml:"pae,omitempty"`
- ACPI *DomainFeature `xml:"acpi,omitempty"`
- APIC *DomainFeatureAPIC `xml:"apic,omitempty"`
- HAP *DomainFeature `xml:"hap,omitempty"`
- Viridian *DomainFeature `xml:"viridian,omitempty"`
- PrivNet *DomainFeature `xml:"privnet,omitempty"`
- HyperV *DomainFeatureHyperV `xml:"hyperv,omitempty"`
- KVM *DomainFeatureKVM `xml:"kvm,omitempty"`
- PVSpinlock *DomainFeature `xml:"pvspinlock,omitempty"`
- PMU *DomainFeature `xml:"pmu,omitempty"`
- VMPort *DomainFeature `xml:"vmport,omitempty"`
- GIC *DomainFeatureGIC `xml:"gic,omitempty"`
- SMM *DomainFeature `xml:"smm,omitempty"`
+ PAE *DomainFeature `xml:"pae"`
+ ACPI *DomainFeature `xml:"acpi"`
+ APIC *DomainFeatureAPIC `xml:"apic"`
+ HAP *DomainFeatureState `xml:"hap"`
+ Viridian *DomainFeature `xml:"viridian"`
+ PrivNet *DomainFeature `xml:"privnet"`
+ HyperV *DomainFeatureHyperV `xml:"hyperv"`
+ KVM *DomainFeatureKVM `xml:"kvm"`
+ PVSpinlock *DomainFeatureState `xml:"pvspinlock"`
+ PMU *DomainFeatureState `xml:"pmu"`
+ VMPort *DomainFeatureState `xml:"vmport"`
+ GIC *DomainFeatureGIC `xml:"gic"`
+ SMM *DomainFeatureState `xml:"smm"`
}
type Domain struct {
@@ -446,7 +446,7 @@ type Domain struct {
OnPoweroff string `xml:"on_poweroff,omitempty"`
OnReboot string `xml:"on_reboot,omitempty"`
OnCrash string `xml:"on_crash,omitempty"`
- Features *DomainFeatureList `xml:"features,omitempty"`
+ Features *DomainFeatureList `xml:"features"`
}
func (d *Domain) Unmarshal(doc string) error {
diff --git a/domain_test.go b/domain_test.go
index e25007e..11156c1 100644
--- a/domain_test.go
+++ b/domain_test.go
@@ -753,22 +753,26 @@ var domainTestData = []struct {
PAE: &DomainFeature{},
ACPI: &DomainFeature{},
APIC: &DomainFeatureAPIC{},
- HAP: &DomainFeature{},
+ HAP: &DomainFeatureState{},
PrivNet: &DomainFeature{},
HyperV: &DomainFeatureHyperV{
- Relaxed: &DomainFeature{State: "on"},
- VAPIC: &DomainFeature{State: "on"},
- Spinlocks: &DomainFeatureSpinlocks{DomainFeature{State: "on"}, 4096},
- VPIndex: &DomainFeature{State: "on"},
- Runtime: &DomainFeature{State: "on"},
- Synic: &DomainFeature{State: "on"},
- Reset: &DomainFeature{State: "on"},
- VendorId: &DomainFeatureVendorId{DomainFeature{State: "on"}, "KVM Hv"},
+ Relaxed: &DomainFeatureState{State: "on"},
+ VAPIC: &DomainFeatureState{State: "on"},
+ Spinlocks: &DomainFeatureHyperVSpinlocks{
+ DomainFeatureState{State: "on"}, 4096,
+ },
+ VPIndex: &DomainFeatureState{State: "on"},
+ Runtime: &DomainFeatureState{State: "on"},
+ Synic: &DomainFeatureState{State: "on"},
+ Reset: &DomainFeatureState{State: "on"},
+ VendorId: &DomainFeatureHyperVVendorId{
+ DomainFeatureState{State: "on"}, "KVM Hv",
+ },
},
KVM: &DomainFeatureKVM{
- Hidden: &DomainFeature{State: "on"},
+ Hidden: &DomainFeatureState{State: "on"},
},
- PVSpinlock: &DomainFeature{State: "on"},
+ PVSpinlock: &DomainFeatureState{State: "on"},
GIC: &DomainFeatureGIC{Version: "2"},
},
},
--
2.11.0
7 years, 7 months
[libvirt] [PATCH go-xml] add support for domain features
by Ryan Goodfellow
This commit adds support for domain features. It does so by introducing
a new family of types DomainFeature*. The aggregate type
DomainFeatureList has been added to the Domain type to plumb in the new
type family. Testing has also been added in domain_test.go
---
domain.go | 91 +++++++++++++++++++++++++++++++++++++++++++++++-----------
domain_test.go | 55 +++++++++++++++++++++++++++++++++++
2 files changed, 130 insertions(+), 16 deletions(-)
diff --git a/domain.go b/domain.go
index cccd9a6..c9ffaef 100644
--- a/domain.go
+++ b/domain.go
@@ -371,23 +371,82 @@ type DomainCPU struct {
Features []DomainCPUFeature `xml:"feature"`
}
+type DomainFeature struct {
+ State string `xml:"state,attr,omitempty"`
+}
+
+type DomainFeatureAPIC struct {
+ DomainFeature
+ EOI string `xml:"eio,attr,omitempty"`
+}
+
+type DomainFeatureVendorId struct {
+ DomainFeature
+ Value string `xml:"value,attr,omitempty"`
+}
+
+type DomainFeatureSpinlocks struct {
+ DomainFeature
+ Retries uint `xml:"retries,attr,omitempty"`
+}
+
+type DomainFeatureHyperV struct {
+ DomainFeature
+ Relaxed *DomainFeature `xml:"relaxed,omitempty"`
+ VAPIC *DomainFeature `xml:"vapic,omitempty"`
+ Spinlocks *DomainFeatureSpinlocks `xml:"spinlocks,omitempty"`
+ VPIndex *DomainFeature `xml:"vpindex,omitempty"`
+ Runtime *DomainFeature `xml:"runtime,omitempty"`
+ Synic *DomainFeature `xml:"synic,omitempty"`
+ STimer *DomainFeature `xml:"stimer,omitempty"`
+ Reset *DomainFeature `xml:"reset,omitempty"`
+ VendorId *DomainFeatureVendorId `xml:"vendor_id,omitempty"`
+}
+
+type DomainFeatureKVM struct {
+ DomainFeature
+ Hidden *DomainFeature `xml:"hidden,omitempty"`
+}
+
+type DomainFeatureGIC struct {
+ DomainFeature
+ Version string `xml:"version,attr,omitempty"`
+}
+
+type DomainFeatureList struct {
+ PAE *DomainFeature `xml:"pae,omitempty"`
+ ACPI *DomainFeature `xml:"acpi,omitempty"`
+ APIC *DomainFeatureAPIC `xml:"apic,omitempty"`
+ HAP *DomainFeature `xml:"hap,omitempty"`
+ Viridian *DomainFeature `xml:"viridian,omitempty"`
+ PrivNet *DomainFeature `xml:"privnet,omitempty"`
+ HyperV *DomainFeatureHyperV `xml:"hyperv,omitempty"`
+ KVM *DomainFeatureKVM `xml:"kvm,omitempty"`
+ PVSpinlock *DomainFeature `xml:"pvspinlock,omitempty"`
+ PMU *DomainFeature `xml:"pmu,omitempty"`
+ VMPort *DomainFeature `xml:"vmport,omitempty"`
+ GIC *DomainFeatureGIC `xml:"gic,omitempty"`
+ SMM *DomainFeature `xml:"smm,omitempty"`
+}
+
type Domain struct {
- XMLName xml.Name `xml:"domain"`
- Type string `xml:"type,attr,omitempty"`
- Name string `xml:"name"`
- UUID string `xml:"uuid,omitempty"`
- Memory *DomainMemory `xml:"memory"`
- CurrentMemory *DomainMemory `xml:"currentMemory"`
- MaximumMemory *DomainMaxMemory `xml:"maxMemory"`
- VCPU *DomainVCPU `xml:"vcpu"`
- CPU *DomainCPU `xml:"cpu"`
- Resource *DomainResource `xml:"resource"`
- Devices *DomainDeviceList `xml:"devices"`
- OS *DomainOS `xml:"os"`
- SysInfo *DomainSysInfo `xml:"sysinfo"`
- OnPoweroff string `xml:"on_poweroff,omitempty"`
- OnReboot string `xml:"on_reboot,omitempty"`
- OnCrash string `xml:"on_crash,omitempty"`
+ XMLName xml.Name `xml:"domain"`
+ Type string `xml:"type,attr,omitempty"`
+ Name string `xml:"name"`
+ UUID string `xml:"uuid,omitempty"`
+ Memory *DomainMemory `xml:"memory"`
+ CurrentMemory *DomainMemory `xml:"currentMemory"`
+ MaximumMemory *DomainMaxMemory `xml:"maxMemory"`
+ VCPU *DomainVCPU `xml:"vcpu"`
+ CPU *DomainCPU `xml:"cpu"`
+ Resource *DomainResource `xml:"resource"`
+ Devices *DomainDeviceList `xml:"devices"`
+ OS *DomainOS `xml:"os"`
+ SysInfo *DomainSysInfo `xml:"sysinfo"`
+ OnPoweroff string `xml:"on_poweroff,omitempty"`
+ OnReboot string `xml:"on_reboot,omitempty"`
+ OnCrash string `xml:"on_crash,omitempty"`
+ Features *DomainFeatureList `xml:"features,omitempty"`
}
func (d *Domain) Unmarshal(doc string) error {
diff --git a/domain_test.go b/domain_test.go
index 06d585c..e25007e 100644
--- a/domain_test.go
+++ b/domain_test.go
@@ -745,6 +745,61 @@ var domainTestData = []struct {
`</domain>`,
},
},
+ {
+ Object: &Domain{
+ Type: "kvm",
+ Name: "test",
+ Features: &DomainFeatureList{
+ PAE: &DomainFeature{},
+ ACPI: &DomainFeature{},
+ APIC: &DomainFeatureAPIC{},
+ HAP: &DomainFeature{},
+ PrivNet: &DomainFeature{},
+ HyperV: &DomainFeatureHyperV{
+ Relaxed: &DomainFeature{State: "on"},
+ VAPIC: &DomainFeature{State: "on"},
+ Spinlocks: &DomainFeatureSpinlocks{DomainFeature{State: "on"}, 4096},
+ VPIndex: &DomainFeature{State: "on"},
+ Runtime: &DomainFeature{State: "on"},
+ Synic: &DomainFeature{State: "on"},
+ Reset: &DomainFeature{State: "on"},
+ VendorId: &DomainFeatureVendorId{DomainFeature{State: "on"}, "KVM Hv"},
+ },
+ KVM: &DomainFeatureKVM{
+ Hidden: &DomainFeature{State: "on"},
+ },
+ PVSpinlock: &DomainFeature{State: "on"},
+ GIC: &DomainFeatureGIC{Version: "2"},
+ },
+ },
+ Expected: []string{
+ `<domain type="kvm">`,
+ ` <name>test</name>`,
+ ` <features>`,
+ ` <pae></pae>`,
+ ` <acpi></acpi>`,
+ ` <apic></apic>`,
+ ` <hap></hap>`,
+ ` <privnet></privnet>`,
+ ` <hyperv>`,
+ ` <relaxed state="on"></relaxed>`,
+ ` <vapic state="on"></vapic>`,
+ ` <spinlocks state="on" retries="4096"></spinlocks>`,
+ ` <vpindex state="on"></vpindex>`,
+ ` <runtime state="on"></runtime>`,
+ ` <synic state="on"></synic>`,
+ ` <reset state="on"></reset>`,
+ ` <vendor_id state="on" value="KVM Hv"></vendor_id>`,
+ ` </hyperv>`,
+ ` <kvm>`,
+ ` <hidden state="on"></hidden>`,
+ ` </kvm>`,
+ ` <pvspinlock state="on"></pvspinlock>`,
+ ` <gic version="2"></gic>`,
+ ` </features>`,
+ `</domain>`,
+ },
+ },
}
func TestDomain(t *testing.T) {
--
2.11.0
7 years, 7 months
[libvirt] [PATCH v2 0/4] qemu: Allow setting sslverify option
by Peter Krempa
This is a rebased version now that the <cookie> support was postponed.
Peter Krempa (4):
qemu: capabilities: Add capability for the sslverify curl driver
option
conf: Use only one temporary string in virDomainDiskSourceParse
conf: Add support for modifying ssl validation for https/ftps disks
qemu: command: Implement ssl verification configuration
docs/formatdomain.html.in | 9 ++++
docs/schemas/domaincommon.rng | 47 ++++++++++++++++++-
src/conf/domain_conf.c | 34 +++++++++++---
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 22 +++++++--
src/util/virstoragefile.h | 1 +
.../generic-disk-network-http.xml | 9 ++++
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 1 +
.../qemuxml2argv-disk-drive-network-http.args | 37 +++++++++++++++
.../qemuxml2argv-disk-drive-network-http.xml | 52 ++++++++++++++++++++++
11 files changed, 202 insertions(+), 13 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-http.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-http.xml
--
2.12.2
7 years, 7 months
[libvirt] [PATCH 0/5] qemu: Couple of namespace fixes
by Michal Privoznik
It was brought to my attention on IRC by Cedric that there's a bug in our
namespace code. Namely, if a disk has say /dev/shm/blah source. For more
detailed description see the first patch. The rest is just subsequent fixes.
Michal Privoznik (5):
qemuDomainBuildNamespace: Move /dev/* mountpoints later
qemuDomainCreateDeviceRecursive: pass a structure instead of bare path
qemuDomainCreateDeviceRecursive: Don't try to create devices under
preserved mount points
qemuDomainAttachDeviceMknodRecursive: Don't try to create devices
under preserved mount points
qemuDomainDetachDeviceUnlink: Don't unlink files we haven't created
src/qemu/qemu_domain.c | 373 ++++++++++++++++++++++++++++++++++++-------------
1 file changed, 275 insertions(+), 98 deletions(-)
--
2.10.2
7 years, 7 months