[libvirt] [PATCH] qemu: domain: Don't treat unknown storage type as not having backing chain
by Peter Krempa
qemuDomainCheckDiskPresence has short-circuit code to skip the
determination of the disk backing chain for storage formats that can't
have backing volumes. The code treats VIR_STORAGE_FILE_NONE as not
having backing chain and skips the call to qemuDomainDetermineDiskChain.
This is wrong as qemuDomainDetermineDiskChain is responsible for storage
format detection and has logic to determine the default type if format
detection is disabled.
This allows to storage passed via <disk type="volume"> to circumvent the
enforcement to have correct storage format or that we shall default to
format='raw', since we don't set the default type via the post parse
callback for "volume" backed disks as the translation code could come up
with a better guess.
This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1328003
---
src/qemu/qemu_domain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index cae356c..78a717a 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -3817,7 +3817,7 @@ qemuDomainCheckDiskPresence(virQEMUDriverPtr driver,
* without backing support, the fact that the file exists is
* more than enough */
if (virStorageSourceIsLocalStorage(disk->src) &&
- format >= VIR_STORAGE_FILE_NONE &&
+ format > VIR_STORAGE_FILE_NONE &&
format < VIR_STORAGE_FILE_BACKING &&
virFileExists(virDomainDiskGetSource(disk)))
continue;
--
2.8.2
8 years, 6 months
[libvirt] [PATCH] cpu: add ABM to Haswell* and Broadwell* CPU models
by Eli Qiao
Corresponding QEMU commits:
becb66673ec30cb604926d247ab9449a60ad8b11
Signed-off-by: Eli Qiao <liyong.qiao(a)intel.com>
---
src/cpu/cpu_map.xml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml
index 0b6d424..d9eb729 100644
--- a/src/cpu/cpu_map.xml
+++ b/src/cpu/cpu_map.xml
@@ -919,6 +919,7 @@
<model name='Haswell-noTSX'>
<vendor name='Intel'/>
+ <feature name='abm'/>
<feature name='aes'/>
<feature name='apic'/>
<feature name='avx'/>
@@ -971,6 +972,7 @@
<model name='Haswell'>
<vendor name='Intel'/>
+ <feature name='abm'/>
<feature name='aes'/>
<feature name='apic'/>
<feature name='avx'/>
@@ -1026,6 +1028,7 @@
<model name='Broadwell-noTSX'>
<vendor name='Intel'/>
<feature name='3dnowprefetch'/>
+ <feature name='abm'/>
<feature name='adx'/>
<feature name='aes'/>
<feature name='apic'/>
@@ -1082,6 +1085,7 @@
<model name='Broadwell'>
<vendor name='Intel'/>
<feature name='3dnowprefetch'/>
+ <feature name='abm'/>
<feature name='adx'/>
<feature name='aes'/>
<feature name='apic'/>
--
1.9.1
8 years, 6 months
[libvirt] [PATCH 0/3] Couple of patches to resolve recent Coverity issues
by John Ferlan
Recent changes have tripped my Coverity checker.
John Ferlan (3):
Use virGetLastErrorMessage to avoid Coverity message
admin: Clean up error path in adminServerListClients
conf: Fix error path in virNodeDevPCICapabilityParseXML
daemon/admin_server.c | 3 +--
src/conf/node_device_conf.c | 5 ++++-
src/network/bridge_driver.c | 3 +--
src/node_device/node_device_hal.c | 3 +--
4 files changed, 7 insertions(+), 7 deletions(-)
--
2.5.5
8 years, 6 months
[libvirt] [PATCH 00/17] improve graphics listen configuration
by Pavel Hrdina
This patch series improves the way how different listen types can be specified
and also introduce a new listen types for graphics devices.
First improvement is to move ports auto of graphics element into listen element
with type address or network. This is a first step to make the code
listen-driven.
Second step is to create a new listen type socket to improve the current vnc
configuration and to print only socket path witout any other listen types. With
the new socket type now we can add support also to spice graphics.
The last improvement is to introduce new listen type none for spice graphics to
specify that the spice graphics shouldn't listen anywhere by default.
In case of spice graphics the new listen types socket or none are required to
start a guest with OpenGL support.
Pavel Hrdina (17):
graphics: use enums instead of int
qemu_process: move listen code out of qemuProcessSetupGraphics
qemu_process: handle port allocation for VNC the same way as for Spice
graphics: generate fake ports also for tests
qemu_hotplug: cleanup qemuDomainChangeGraphics
genericxml2xml: add several graphics tests
qemu_hotplug: fix checking graphics ports
graphics: don't parse listens if socket attribute is present
domain_conf: parse listen attr from graphics while parsing listen
elements
graphics: make address attribute for listen type='address' optional
domain_conf: cleanup virDomainGraphicsListenDefParseXML
graphics: move port definition to listen element
qemu.conf: remove vnc_auto_unix_socket
vnc: use listen type=socket instead of socket attribute
qemu_capabilites: add QEMU_CAPS_SPICE_UNIX
spice: add support for listen type socket
spice: introduce listen type none
docs/formatdomain.html.in | 138 +++--
docs/schemas/domaincommon.rng | 63 ++-
src/conf/domain_conf.c | 604 ++++++++++++++-------
src/conf/domain_conf.h | 45 +-
src/libvirt_private.syms | 1 +
src/libxl/libxl_conf.c | 61 ++-
src/libxl/libxl_domain.c | 17 +-
src/qemu/libvirtd_qemu.aug | 1 -
src/qemu/qemu.conf | 10 -
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 239 ++++----
src/qemu/qemu_conf.c | 1 -
src/qemu/qemu_conf.h | 1 -
src/qemu/qemu_domain.c | 19 +-
src/qemu/qemu_driver.c | 12 -
src/qemu/qemu_hotplug.c | 76 +--
src/qemu/qemu_migration.c | 41 +-
src/qemu/qemu_parse_command.c | 41 +-
src/qemu/qemu_process.c | 386 ++++++++-----
src/qemu/qemu_process.h | 3 +
src/qemu/test_libvirtd_qemu.aug.in | 1 -
src/security/virt-aa-helper.c | 15 +-
src/vbox/vbox_common.c | 30 +-
src/vbox/vbox_tmpl.c | 34 +-
src/vbox/vbox_uniformed_api.h | 4 +-
src/vmx/vmx.c | 54 +-
src/vz/vz_sdk.c | 30 +-
src/xenconfig/xen_common.c | 74 +--
src/xenconfig/xen_sxpr.c | 71 +--
src/xenconfig/xen_xl.c | 45 +-
.../generic-graphics-listen-back-compat-ports.xml | 30 +
.../generic-graphics-vnc-listen-attr-only.xml | 28 +
...generic-graphics-vnc-listen-element-minimal.xml | 30 +
...aphics-vnc-listen-element-with-address-port.xml | 30 +
...ic-graphics-vnc-listen-element-with-address.xml | 30 +
.../generic-graphics-vnc-manual-port.xml | 28 +
.../generic-graphics-vnc-minimal.xml | 28 +
.../generic-graphics-vnc-socket-listen.xml | 30 +
.../generic-graphics-vnc-socket.xml | 28 +
.../generic-graphics-listen-back-compat-ports.xml | 30 +
.../generic-graphics-listen-back-compat.xml | 2 +-
.../generic-graphics-vnc-listen-attr-only.xml | 30 +
...generic-graphics-vnc-listen-element-minimal.xml | 30 +
...aphics-vnc-listen-element-with-address-port.xml | 30 +
...ic-graphics-vnc-listen-element-with-address.xml | 30 +
.../generic-graphics-vnc-manual-port.xml | 30 +
.../generic-graphics-vnc-minimal.xml | 30 +
.../generic-graphics-vnc-socket-listen.xml | 30 +
.../generic-graphics-vnc-socket.xml | 30 +
tests/genericxml2xmltest.c | 10 +
.../qemuargv2xml-graphics-vnc-policy.xml | 2 +-
.../qemuargv2xml-graphics-vnc-sasl.xml | 2 +-
.../qemuargv2xml-graphics-vnc-socket.xml | 4 +-
.../qemuargv2xml-graphics-vnc-tls.xml | 2 +-
.../qemuargv2xml-graphics-vnc-websocket.xml | 2 +-
.../qemuargv2xmldata/qemuargv2xml-graphics-vnc.xml | 2 +-
...qemuhotplug-console-compat-2+console-virtio.xml | 2 +-
.../qemuhotplug-graphics-spice-listen-network.xml | 2 +-
.../qemuxml2argv-console-compat-2.xml | 2 +-
.../qemuxml2argv-controller-order.args | 2 +-
...muxml2argv-graphics-spice-auto-unix-socket.args | 21 +
...emuxml2argv-graphics-spice-auto-unix-socket.xml | 30 +
.../qemuxml2argv-graphics-spice-unix-socket.args | 20 +
.../qemuxml2argv-graphics-spice-unix-socket.xml | 30 +
...qemuxml2argv-graphics-vnc-auto-unix-socket.args | 20 +
.../qemuxml2argv-graphics-vnc-auto-unix-socket.xml | 30 +
.../qemuxml2argv-graphics-vnc-autosocket.args | 22 -
.../qemuxml2argv-graphics-vnc-autosocket.xml | 34 --
.../qemuxml2argv-graphics-vnc-unix-socket.args | 20 +
.../qemuxml2argv-graphics-vnc-unix-socket.xml | 30 +
.../qemuxml2argv-hugepages-numa.args | 2 +-
.../qemuxml2argv-video-device-pciaddr-default.args | 2 +-
.../qemuxml2argv-video-virtio-gpu-spice-gl.args | 2 +-
tests/qemuxml2argvtest.c | 8 +
.../qemuxml2xmlout-graphics-listen-network.xml | 2 +-
.../qemuxml2xmlout-graphics-listen-network2.xml | 4 +-
...uxml2xmlout-graphics-spice-auto-unix-socket.xml | 35 ++
.../qemuxml2xmlout-graphics-spice-compression.xml | 2 +-
.../qemuxml2xmlout-graphics-spice-qxl-vga.xml | 2 +-
.../qemuxml2xmlout-graphics-spice-timeout.xml | 4 +-
.../qemuxml2xmlout-graphics-spice-unix-socket.xml | 35 ++
.../qemuxml2xmlout-graphics-spice.xml | 2 +-
...emuxml2xmlout-graphics-vnc-auto-unix-socket.xml | 35 ++
.../qemuxml2xmlout-graphics-vnc-autosocket.xml | 39 --
.../qemuxml2xmlout-graphics-vnc-no-listen-attr.xml | 2 +-
.../qemuxml2xmlout-graphics-vnc-sasl.xml | 2 +-
.../qemuxml2xmlout-graphics-vnc-tls.xml | 2 +-
.../qemuxml2xmlout-graphics-vnc-unix-socket.xml | 35 ++
.../qemuxml2xmlout-graphics-vnc-websocket.xml | 2 +-
.../qemuxml2xmlout-graphics-vnc.xml | 2 +-
.../qemuxml2xmlout-interface-server.xml | 4 +-
.../qemuxml2xmlout-net-bandwidth.xml | 4 +-
.../qemuxml2xmlout-net-bandwidth2.xml | 4 +-
.../qemuxml2xmlout-pci-bridge.xml | 2 +-
...emuxml2xmlout-seclabel-dynamic-none-relabel.xml | 2 +-
.../qemuxml2xmlout-serial-spiceport.xml | 2 +-
.../qemuxml2xmlout-video-virtio-gpu-spice-gl.xml | 3 +-
tests/qemuxml2xmltest.c | 11 +-
tests/sexpr2xmldata/sexpr2xml-curmem.xml | 4 +-
tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml | 4 +-
tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml | 4 +-
tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml | 4 +-
tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml | 4 +-
tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml | 4 +-
tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml | 4 +-
tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml | 4 +-
.../sexpr2xml-fv-serial-dev-2-ports.xml | 4 +-
.../sexpr2xml-fv-serial-dev-2nd-port.xml | 4 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml | 4 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml | 4 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml | 4 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml | 4 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml | 4 +-
.../sexpr2xml-fv-serial-tcp-telnet.xml | 4 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml | 4 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml | 4 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml | 4 +-
tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml | 4 +-
tests/sexpr2xmldata/sexpr2xml-fv-sound.xml | 4 +-
tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml | 4 +-
tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml | 4 +-
tests/sexpr2xmldata/sexpr2xml-fv-utc.xml | 4 +-
tests/sexpr2xmldata/sexpr2xml-fv-v2.xml | 4 +-
tests/sexpr2xmldata/sexpr2xml-fv.xml | 4 +-
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml | 4 +-
.../sexpr2xml-pv-vfb-new-vncdisplay.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml | 2 +-
.../sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml | 4 +-
tests/sexpr2xmldata/sexpr2xml-vif-rate.xml | 4 +-
tests/vmx2xmldata/vmx2xml-graphics-vnc.xml | 4 +-
.../test-disk-positional-parms-full.xml | 2 +-
.../test-disk-positional-parms-partial.xml | 2 +-
...est-fullvirt-direct-kernel-boot-bogus-extra.xml | 2 +-
.../test-fullvirt-direct-kernel-boot-extra.xml | 2 +-
.../test-fullvirt-direct-kernel-boot.xml | 2 +-
tests/xlconfigdata/test-fullvirt-multiusb.xml | 2 +-
tests/xlconfigdata/test-fullvirt-nohap.xml | 2 +-
tests/xlconfigdata/test-new-disk.xml | 2 +-
tests/xlconfigdata/test-rbd-multihost-noauth.xml | 2 +-
tests/xlconfigdata/test-spice-features.xml | 2 +-
tests/xlconfigdata/test-spice.xml | 2 +-
tests/xlconfigdata/test-vif-rate.xml | 2 +-
tests/xmconfigdata/test-escape-paths.xml | 2 +-
.../xmconfigdata/test-fullvirt-default-feature.xml | 2 +-
tests/xmconfigdata/test-fullvirt-force-hpet.xml | 2 +-
tests/xmconfigdata/test-fullvirt-force-nohpet.xml | 2 +-
tests/xmconfigdata/test-fullvirt-localtime.xml | 2 +-
tests/xmconfigdata/test-fullvirt-net-netfront.xml | 2 +-
tests/xmconfigdata/test-fullvirt-new-cdrom.xml | 2 +-
tests/xmconfigdata/test-fullvirt-nohap.xml | 2 +-
tests/xmconfigdata/test-fullvirt-parallel-tcp.xml | 2 +-
.../test-fullvirt-serial-dev-2-ports.xml | 2 +-
.../test-fullvirt-serial-dev-2nd-port.xml | 2 +-
tests/xmconfigdata/test-fullvirt-serial-file.xml | 2 +-
tests/xmconfigdata/test-fullvirt-serial-null.xml | 2 +-
tests/xmconfigdata/test-fullvirt-serial-pipe.xml | 2 +-
tests/xmconfigdata/test-fullvirt-serial-pty.xml | 2 +-
tests/xmconfigdata/test-fullvirt-serial-stdio.xml | 2 +-
.../test-fullvirt-serial-tcp-telnet.xml | 2 +-
tests/xmconfigdata/test-fullvirt-serial-tcp.xml | 2 +-
tests/xmconfigdata/test-fullvirt-serial-udp.xml | 2 +-
tests/xmconfigdata/test-fullvirt-serial-unix.xml | 2 +-
tests/xmconfigdata/test-fullvirt-sound.xml | 2 +-
tests/xmconfigdata/test-fullvirt-usbmouse.xml | 2 +-
tests/xmconfigdata/test-fullvirt-usbtablet.xml | 2 +-
tests/xmconfigdata/test-fullvirt-utc.xml | 2 +-
tests/xmconfigdata/test-no-source-cdrom.xml | 4 +-
tests/xmconfigdata/test-paravirt-net-e1000.xml | 2 +-
tests/xmconfigdata/test-paravirt-net-vifname.xml | 2 +-
.../test-paravirt-new-pvfb-vncdisplay.xml | 2 +-
tests/xmconfigdata/test-paravirt-new-pvfb.xml | 2 +-
tests/xmconfigdata/test-pci-devs.xml | 4 +-
173 files changed, 2392 insertions(+), 1014 deletions(-)
create mode 100644 tests/genericxml2xmlindata/generic-graphics-listen-back-compat-ports.xml
create mode 100644 tests/genericxml2xmlindata/generic-graphics-vnc-listen-attr-only.xml
create mode 100644 tests/genericxml2xmlindata/generic-graphics-vnc-listen-element-minimal.xml
create mode 100644 tests/genericxml2xmlindata/generic-graphics-vnc-listen-element-with-address-port.xml
create mode 100644 tests/genericxml2xmlindata/generic-graphics-vnc-listen-element-with-address.xml
create mode 100644 tests/genericxml2xmlindata/generic-graphics-vnc-manual-port.xml
create mode 100644 tests/genericxml2xmlindata/generic-graphics-vnc-minimal.xml
create mode 100644 tests/genericxml2xmlindata/generic-graphics-vnc-socket-listen.xml
create mode 100644 tests/genericxml2xmlindata/generic-graphics-vnc-socket.xml
create mode 100644 tests/genericxml2xmloutdata/generic-graphics-listen-back-compat-ports.xml
create mode 100644 tests/genericxml2xmloutdata/generic-graphics-vnc-listen-attr-only.xml
create mode 100644 tests/genericxml2xmloutdata/generic-graphics-vnc-listen-element-minimal.xml
create mode 100644 tests/genericxml2xmloutdata/generic-graphics-vnc-listen-element-with-address-port.xml
create mode 100644 tests/genericxml2xmloutdata/generic-graphics-vnc-listen-element-with-address.xml
create mode 100644 tests/genericxml2xmloutdata/generic-graphics-vnc-manual-port.xml
create mode 100644 tests/genericxml2xmloutdata/generic-graphics-vnc-minimal.xml
create mode 100644 tests/genericxml2xmloutdata/generic-graphics-vnc-socket-listen.xml
create mode 100644 tests/genericxml2xmloutdata/generic-graphics-vnc-socket.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-auto-unix-socket.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-auto-unix-socket.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-unix-socket.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-unix-socket.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-auto-unix-socket.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-auto-unix-socket.xml
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-autosocket.args
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-autosocket.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-unix-socket.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-unix-socket.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-auto-unix-socket.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-unix-socket.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc-auto-unix-socket.xml
delete mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc-autosocket.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc-unix-socket.xml
--
2.8.2
8 years, 6 months
[libvirt] [PATCH v2 0/4] qemu: handle ',' and '=' in VM name
by Cole Robinson
This series adds qemu cli comma escaping to several places that
are dependent on the VM name, to enable names with embedded commas.
Patch 4 makes use of qemu -name guest=X value to allow names with
'=' in them.
https://bugzilla.redhat.com/show_bug.cgi?id=639926
https://bugzilla.redhat.com/show_bug.cgi?id=1276485
Note: There's likely other places that are VM name dependent that need
comma escaping too, but this hits the mandatory ones. I've listed some
more on the BiteSizedTasks page:
http://wiki.libvirt.org/page/BiteSizedTasks#qemu:_Use_comma_escaping_for_...
v2:
Rebase to master
Cole Robinson (4):
qemu: command: escape commas in VM name
qemu: command: escape commas in secret master path
qemu: command: escape commas in chardev socket path
qemu: command: Use -name guest= if available
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 22 ++++++++++++--------
tests/qemucapabilitiesdata/caps_2.1.1-1.caps | 1 +
tests/qemucapabilitiesdata/caps_2.4.0-1.caps | 1 +
tests/qemucapabilitiesdata/caps_2.5.0-1.caps | 1 +
tests/qemucapabilitiesdata/caps_2.6.0-1.caps | 1 +
.../qemuxml2argvdata/qemuxml2argv-name-escape.args | 24 ++++++++++++++++++++++
.../qemuxml2argvdata/qemuxml2argv-name-escape.xml | 18 ++++++++++++++++
tests/qemuxml2argvtest.c | 2 ++
10 files changed, 65 insertions(+), 8 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-name-escape.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-name-escape.xml
--
2.7.4
8 years, 6 months
[libvirt] [PATCH] domain_conf: fix migration/managedsave with usb keyboad
by Pavel Hrdina
Commint 36785c7e refactored the code for input devices but introduced a
bug that we removed all keyboard from migratable XML. We have to remove
only implicit keyboards like PS2 or XEN.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/conf/domain_conf.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 2c97bc1..b90c2b6 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -21193,8 +21193,10 @@ virDomainInputDefFormat(virBufferPtr buf,
const char *bus = virDomainInputBusTypeToString(def->bus);
/* don't format keyboard into migratable XML for backward compatibility */
- if (def->type == VIR_DOMAIN_INPUT_TYPE_KBD &&
- flags & VIR_DOMAIN_DEF_FORMAT_MIGRATABLE)
+ if (flags & VIR_DOMAIN_DEF_FORMAT_MIGRATABLE &&
+ def->type == VIR_DOMAIN_INPUT_TYPE_KBD &&
+ (def->bus == VIR_DOMAIN_INPUT_BUS_PS2 ||
+ def->bus == VIR_DOMAIN_INPUT_BUS_XEN))
return 0;
if (!type) {
--
2.8.2
8 years, 6 months
[libvirt] [PATCH] virCgroupValidateMachineGroup: Reflect change in CGroup struct naming
by Michal Privoznik
Fron c3bd0019c0e on instead of creating the following path for
cgroups:
/sys/fs/cgroupX/$name.libvirt-$driver
we generate rather more verbose one:
/sys/fs/cgroupX/$driver-$id-$name.libvirt-$driver
where $name is optional and included iff contains allowed chars.
See original commit for more reasoning. Now, problem with the
original commit is that we are unable to start any LXC domain
after it. Because when starting LXC container, the CGroup layout
is created by our lxc_controller process and then detected and
validated by libvirtd. The validation is done by trying to match
detected layout against all the possible patterns for cgroup
paths that we've ever had. And the commit in question forgot to
update this part of the code.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
I am really surprised how long this bug went unnoticed. Is
anybody using LXC? When pushed, it should be backported to
1.3.2+.
src/util/vircgroup.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index da5ccff..add6c5f 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -261,12 +261,17 @@ virCgroupValidateMachineGroup(virCgroupPtr group,
char *scopename_new = NULL;
char *machinename = virSystemdMakeMachineName(drivername, id,
name, privileged);
+ char *partmachinename = NULL;
if (virAsprintf(&partname, "%s.libvirt-%s",
- name, drivername) < 0)
+ name, drivername) < 0 ||
+ (machinename &&
+ virAsprintf(&partmachinename, "%s.libvirt-%s",
+ machinename, drivername) < 0))
goto cleanup;
- if (virCgroupPartitionEscape(&partname) < 0)
+ if (virCgroupPartitionEscape(&partname) < 0 ||
+ (machinename && virCgroupPartitionEscape(&partmachinename) < 0))
goto cleanup;
if (!(scopename_old = virSystemdMakeScopeName(name, drivername, true)))
@@ -315,6 +320,7 @@ virCgroupValidateMachineGroup(virCgroupPtr group,
if (STRNEQ(tmp, name) &&
STRNEQ_NULLABLE(tmp, machinename) &&
STRNEQ(tmp, partname) &&
+ STRNEQ_NULLABLE(tmp, partmachinename) &&
STRNEQ(tmp, scopename_old) &&
STRNEQ_NULLABLE(tmp, scopename_new)) {
VIR_DEBUG("Name '%s' for controller '%s' does not match "
@@ -329,6 +335,7 @@ virCgroupValidateMachineGroup(virCgroupPtr group,
valid = true;
cleanup:
+ VIR_FREE(partmachinename);
VIR_FREE(partname);
VIR_FREE(scopename_old);
VIR_FREE(scopename_new);
--
2.8.1
8 years, 6 months
[libvirt] [PATCH 00/12] Enhance QEMU/domain capabilities tests
by Jiri Denemark
Jiri Denemark (12):
tests: Refactor domaincapstest
qemucapabilitiestest: Prepare for testing non-x86_64 archs
qemu: Separate formatting from saving into caps cache
qemu: Export caps cache APIs for tests
qemucapabilitiestest: Uses consistent names
qemucapabilitiestest: Reindent *.caps files
qemucapabilitiestest: Reorder flags in caps files
qemucapabilitiestest: Test all capabilities
qemucapabilitiestest: Rename *.caps to *.xml
domaincapstest: Use default machine type
qemucapabilitiestest: Add tests for aarch64 and ppc64le
domaincapstest: Add tests for QEMU 2.6
src/qemu/qemu_capabilities.c | 34 +-
src/qemu/qemu_capspriv.h | 9 +
.../domaincaps-qemu_1.6.50-1.xml | 3 +-
.../domaincaps-qemu_2.6.0-1.xml | 63 +
.../domaincaps-qemu_2.6.0-2.xml | 63 +
.../domaincaps-qemu_2.6.0-3.xml | 67 +
.../domaincaps-qemu_2.6.0-4.xml | 67 +
.../domaincaps-qemu_2.6.0-5.xml | 61 +
tests/domaincapstest.c | 209 +-
tests/qemucapabilitiesdata/caps_1.2.2-1.caps | 117 -
...1.2.2-1.replies => caps_1.2.2-1.x86_64.replies} | 0
tests/qemucapabilitiesdata/caps_1.2.2-1.x86_64.xml | 159 +
tests/qemucapabilitiesdata/caps_1.3.1-1.caps | 133 -
...1.3.1-1.replies => caps_1.3.1-1.x86_64.replies} | 0
tests/qemucapabilitiesdata/caps_1.3.1-1.x86_64.xml | 179 +
tests/qemucapabilitiesdata/caps_1.4.2-1.caps | 134 -
...1.4.2-1.replies => caps_1.4.2-1.x86_64.replies} | 0
tests/qemucapabilitiesdata/caps_1.4.2-1.x86_64.xml | 181 +
tests/qemucapabilitiesdata/caps_1.5.3-1.caps | 143 -
...1.5.3-1.replies => caps_1.5.3-1.x86_64.replies} | 0
tests/qemucapabilitiesdata/caps_1.5.3-1.x86_64.xml | 190 +
tests/qemucapabilitiesdata/caps_1.6.0-1.caps | 149 -
...1.6.0-1.replies => caps_1.6.0-1.x86_64.replies} | 0
tests/qemucapabilitiesdata/caps_1.6.0-1.x86_64.xml | 200 +
tests/qemucapabilitiesdata/caps_1.6.50-1.caps | 149 -
...6.50-1.replies => caps_1.6.50-1.x86_64.replies} | 0
.../qemucapabilitiesdata/caps_1.6.50-1.x86_64.xml | 202 +
tests/qemucapabilitiesdata/caps_2.1.1-1.caps | 167 -
...2.1.1-1.replies => caps_2.1.1-1.x86_64.replies} | 0
tests/qemucapabilitiesdata/caps_2.1.1-1.x86_64.xml | 225 +
tests/qemucapabilitiesdata/caps_2.4.0-1.caps | 180 -
...2.4.0-1.replies => caps_2.4.0-1.x86_64.replies} | 0
tests/qemucapabilitiesdata/caps_2.4.0-1.x86_64.xml | 245 +
tests/qemucapabilitiesdata/caps_2.5.0-1.caps | 181 -
...2.5.0-1.replies => caps_2.5.0-1.x86_64.replies} | 0
tests/qemucapabilitiesdata/caps_2.5.0-1.x86_64.xml | 246 +
.../caps_2.6.0-1.aarch64.replies | 4940 ++++++++++++++++
.../qemucapabilitiesdata/caps_2.6.0-1.aarch64.xml | 238 +
tests/qemucapabilitiesdata/caps_2.6.0-1.caps | 186 -
.../caps_2.6.0-1.ppc64le.replies | 6163 ++++++++++++++++++++
.../qemucapabilitiesdata/caps_2.6.0-1.ppc64le.xml | 604 ++
...2.6.0-1.replies => caps_2.6.0-1.x86_64.replies} | 0
tests/qemucapabilitiesdata/caps_2.6.0-1.x86_64.xml | 251 +
.../caps_2.6.0-2.aarch64.replies | 4940 ++++++++++++++++
.../qemucapabilitiesdata/caps_2.6.0-2.aarch64.xml | 238 +
tests/qemucapabilitiestest.c | 92 +-
tests/testutilsqemu.c | 41 +-
47 files changed, 19740 insertions(+), 1709 deletions(-)
create mode 100644 tests/domaincapsschemadata/domaincaps-qemu_2.6.0-1.xml
create mode 100644 tests/domaincapsschemadata/domaincaps-qemu_2.6.0-2.xml
create mode 100644 tests/domaincapsschemadata/domaincaps-qemu_2.6.0-3.xml
create mode 100644 tests/domaincapsschemadata/domaincaps-qemu_2.6.0-4.xml
create mode 100644 tests/domaincapsschemadata/domaincaps-qemu_2.6.0-5.xml
delete mode 100644 tests/qemucapabilitiesdata/caps_1.2.2-1.caps
rename tests/qemucapabilitiesdata/{caps_1.2.2-1.replies => caps_1.2.2-1.x86_64.replies} (100%)
create mode 100644 tests/qemucapabilitiesdata/caps_1.2.2-1.x86_64.xml
delete mode 100644 tests/qemucapabilitiesdata/caps_1.3.1-1.caps
rename tests/qemucapabilitiesdata/{caps_1.3.1-1.replies => caps_1.3.1-1.x86_64.replies} (100%)
create mode 100644 tests/qemucapabilitiesdata/caps_1.3.1-1.x86_64.xml
delete mode 100644 tests/qemucapabilitiesdata/caps_1.4.2-1.caps
rename tests/qemucapabilitiesdata/{caps_1.4.2-1.replies => caps_1.4.2-1.x86_64.replies} (100%)
create mode 100644 tests/qemucapabilitiesdata/caps_1.4.2-1.x86_64.xml
delete mode 100644 tests/qemucapabilitiesdata/caps_1.5.3-1.caps
rename tests/qemucapabilitiesdata/{caps_1.5.3-1.replies => caps_1.5.3-1.x86_64.replies} (100%)
create mode 100644 tests/qemucapabilitiesdata/caps_1.5.3-1.x86_64.xml
delete mode 100644 tests/qemucapabilitiesdata/caps_1.6.0-1.caps
rename tests/qemucapabilitiesdata/{caps_1.6.0-1.replies => caps_1.6.0-1.x86_64.replies} (100%)
create mode 100644 tests/qemucapabilitiesdata/caps_1.6.0-1.x86_64.xml
delete mode 100644 tests/qemucapabilitiesdata/caps_1.6.50-1.caps
rename tests/qemucapabilitiesdata/{caps_1.6.50-1.replies => caps_1.6.50-1.x86_64.replies} (100%)
create mode 100644 tests/qemucapabilitiesdata/caps_1.6.50-1.x86_64.xml
delete mode 100644 tests/qemucapabilitiesdata/caps_2.1.1-1.caps
rename tests/qemucapabilitiesdata/{caps_2.1.1-1.replies => caps_2.1.1-1.x86_64.replies} (100%)
create mode 100644 tests/qemucapabilitiesdata/caps_2.1.1-1.x86_64.xml
delete mode 100644 tests/qemucapabilitiesdata/caps_2.4.0-1.caps
rename tests/qemucapabilitiesdata/{caps_2.4.0-1.replies => caps_2.4.0-1.x86_64.replies} (100%)
create mode 100644 tests/qemucapabilitiesdata/caps_2.4.0-1.x86_64.xml
delete mode 100644 tests/qemucapabilitiesdata/caps_2.5.0-1.caps
rename tests/qemucapabilitiesdata/{caps_2.5.0-1.replies => caps_2.5.0-1.x86_64.replies} (100%)
create mode 100644 tests/qemucapabilitiesdata/caps_2.5.0-1.x86_64.xml
create mode 100644 tests/qemucapabilitiesdata/caps_2.6.0-1.aarch64.replies
create mode 100644 tests/qemucapabilitiesdata/caps_2.6.0-1.aarch64.xml
delete mode 100644 tests/qemucapabilitiesdata/caps_2.6.0-1.caps
create mode 100644 tests/qemucapabilitiesdata/caps_2.6.0-1.ppc64le.replies
create mode 100644 tests/qemucapabilitiesdata/caps_2.6.0-1.ppc64le.xml
rename tests/qemucapabilitiesdata/{caps_2.6.0-1.replies => caps_2.6.0-1.x86_64.replies} (100%)
create mode 100644 tests/qemucapabilitiesdata/caps_2.6.0-1.x86_64.xml
create mode 100644 tests/qemucapabilitiesdata/caps_2.6.0-2.aarch64.replies
create mode 100644 tests/qemucapabilitiesdata/caps_2.6.0-2.aarch64.xml
--
2.8.2
8 years, 6 months
[libvirt] [PATCH] conf: Skip generating random MAC in DetachDevice xml
by Kothapally Madhu Pavan
When we try to detach a network device without specifying
the mac address, random mac address is generated. As the
generated mac address will not be available in the running
vm, detaching device will fail erroring out "error:
operation failed: no device matching mac address
xx:xx:xx:xx:xx:xx found".
Signed-off-by: Kothapally Madhu Pavan <kmp(a)linux.vnet.ibm.com>
---
src/conf/domain_conf.c | 4 ++++
src/conf/domain_conf.h | 3 +++
src/libxl/libxl_driver.c | 12 ++++++------
src/lxc/lxc_driver.c | 7 ++++---
src/qemu/qemu_driver.c | 2 ++
src/uml/uml_driver.c | 6 ++++--
src/vbox/vbox_common.c | 6 ++++--
src/vz/vz_driver.c | 4 +++-
src/xen/xend_internal.c | 6 ++++--
src/xen/xm_internal.c | 8 ++++----
10 files changed, 38 insertions(+), 20 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 28248c8..512d877 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -8784,6 +8784,10 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
(const char *)macaddr);
goto error;
}
+ } else if (flags & VIR_DOMAIN_DEF_PARSE_SKIP_GENERATE_MACADDR) {
+ virReportError(VIR_ERR_XML_ERROR, "%s",
+ _("mac address not specified in the device xml"));
+ goto error;
} else {
virDomainNetGenerateMAC(xmlopt, &def->mac);
}
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 1986f53..74692f1 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -2679,6 +2679,9 @@ typedef enum {
VIR_DOMAIN_DEF_PARSE_SKIP_OSTYPE_CHECKS = 1 << 8,
/* allow updates in post parse callback that would break ABI otherwise */
VIR_DOMAIN_DEF_PARSE_ABI_UPDATE = 1 << 9,
+ /* don't generate random mac address when a network device without mac address
+ * is detached */
+ VIR_DOMAIN_DEF_PARSE_SKIP_GENERATE_MACADDR = 1 << 10,
} virDomainDefParseFlags;
typedef enum {
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index bf97c9c..507edcf 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -3726,6 +3726,8 @@ libxlDomainDetachDeviceFlags(virDomainPtr dom, const char *xml,
virDomainDefPtr vmdef = NULL;
virDomainDeviceDefPtr dev = NULL;
int ret = -1;
+ unsigned int parse_flags = VIR_DOMAIN_DEF_PARSE_INACTIVE |
+ VIR_DOMAIN_DEF_PARSE_SKIP_GENERATE_MACADDR;
virCheckFlags(VIR_DOMAIN_DEVICE_MODIFY_LIVE |
VIR_DOMAIN_DEVICE_MODIFY_CONFIG, -1);
@@ -3743,9 +3745,8 @@ libxlDomainDetachDeviceFlags(virDomainPtr dom, const char *xml,
goto endjob;
if (flags & VIR_DOMAIN_DEVICE_MODIFY_CONFIG) {
- if (!(dev = virDomainDeviceDefParse(xml, vm->def,
- cfg->caps, driver->xmlopt,
- VIR_DOMAIN_DEF_PARSE_INACTIVE)))
+ if (!(dev = virDomainDeviceDefParse(xml, vm->def, cfg->caps,
+ driver->xmlopt, parse_flags)))
goto endjob;
/* Make a copy for updated domain. */
@@ -3760,9 +3761,8 @@ libxlDomainDetachDeviceFlags(virDomainPtr dom, const char *xml,
if (flags & VIR_DOMAIN_DEVICE_MODIFY_LIVE) {
/* If dev exists it was created to modify the domain config. Free it. */
virDomainDeviceDefFree(dev);
- if (!(dev = virDomainDeviceDefParse(xml, vm->def,
- cfg->caps, driver->xmlopt,
- VIR_DOMAIN_DEF_PARSE_INACTIVE)))
+ if (!(dev = virDomainDeviceDefParse(xml, vm->def, cfg->caps,
+ driver->xmlopt, parse_flags)))
goto endjob;
if (libxlDomainDetachDeviceLive(driver, vm, dev) < 0)
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index ef48812..23f0d80 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -5196,6 +5196,8 @@ static int lxcDomainDetachDeviceFlags(virDomainPtr dom,
virDomainDefPtr vmdef = NULL;
virDomainDeviceDefPtr dev = NULL, dev_copy = NULL;
int ret = -1;
+ unsigned int parse_flags = VIR_DOMAIN_DEF_PARSE_INACTIVE |
+ VIR_DOMAIN_DEF_PARSE_SKIP_GENERATE_MACADDR;
virLXCDriverConfigPtr cfg = virLXCDriverGetConfig(driver);
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
@@ -5213,9 +5215,8 @@ static int lxcDomainDetachDeviceFlags(virDomainPtr dom,
if (!(caps = virLXCDriverGetCapabilities(driver, false)))
goto cleanup;
- dev = dev_copy = virDomainDeviceDefParse(xml, vm->def,
- caps, driver->xmlopt,
- VIR_DOMAIN_DEF_PARSE_INACTIVE);
+ dev = dev_copy = virDomainDeviceDefParse(xml, vm->def, caps,
+ driver->xmlopt, parse_flags);
if (dev == NULL)
goto cleanup;
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 862c44c..df85fd5 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -8486,6 +8486,8 @@ static int qemuDomainDetachDeviceFlags(virDomainPtr dom, const char *xml,
!(flags & VIR_DOMAIN_AFFECT_LIVE))
parse_flags |= VIR_DOMAIN_DEF_PARSE_INACTIVE;
+ parse_flags |= VIR_DOMAIN_DEF_PARSE_SKIP_GENERATE_MACADDR;
+
dev = dev_copy = virDomainDeviceDefParse(xml, vm->def,
caps, driver->xmlopt,
parse_flags);
diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
index 84e1df8..c232435 100644
--- a/src/uml/uml_driver.c
+++ b/src/uml/uml_driver.c
@@ -2346,6 +2346,8 @@ static int umlDomainDetachDevice(virDomainPtr dom, const char *xml)
virDomainObjPtr vm;
virDomainDeviceDefPtr dev = NULL;
int ret = -1;
+ unsigned int parse_flags = VIR_DOMAIN_DEF_PARSE_INACTIVE |
+ VIR_DOMAIN_DEF_PARSE_SKIP_GENERATE_MACADDR;
umlDriverLock(driver);
vm = virDomainObjListFindByUUID(driver->domains, dom->uuid);
@@ -2366,8 +2368,8 @@ static int umlDomainDetachDevice(virDomainPtr dom, const char *xml)
goto cleanup;
}
- dev = virDomainDeviceDefParse(xml, vm->def, driver->caps, driver->xmlopt,
- VIR_DOMAIN_DEF_PARSE_INACTIVE);
+ dev = virDomainDeviceDefParse(xml, vm->def, driver->caps,
+ driver->xmlopt, parse_flags);
if (dev == NULL)
goto cleanup;
diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index 0cead10..4c539ef 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -4228,6 +4228,8 @@ static int vboxDomainDetachDevice(virDomainPtr dom, const char *xml)
virDomainDeviceDefPtr dev = NULL;
nsresult rc;
int ret = -1;
+ unsigned int parse_flags = VIR_DOMAIN_DEF_PARSE_INACTIVE |
+ VIR_DOMAIN_DEF_PARSE_SKIP_GENERATE_MACADDR;
if (!data->vboxObj)
return ret;
@@ -4238,8 +4240,8 @@ static int vboxDomainDetachDevice(virDomainPtr dom, const char *xml)
def->os.type = VIR_DOMAIN_OSTYPE_HVM;
- dev = virDomainDeviceDefParse(xml, def, data->caps, data->xmlopt,
- VIR_DOMAIN_DEF_PARSE_INACTIVE);
+ dev = virDomainDeviceDefParse(xml, def, data->caps,
+ data->xmlopt, parse_flags);
if (dev == NULL)
goto cleanup;
diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
index ffa6f45..f5f5395 100644
--- a/src/vz/vz_driver.c
+++ b/src/vz/vz_driver.c
@@ -1172,6 +1172,8 @@ static int vzDomainDetachDeviceFlags(virDomainPtr dom, const char *xml,
vzConnPtr privconn = dom->conn->privateData;
virDomainDeviceDefPtr dev = NULL;
virDomainObjPtr privdom = NULL;
+ unsigned int parse_flags = VIR_DOMAIN_XML_INACTIVE |
+ VIR_DOMAIN_DEF_PARSE_SKIP_GENERATE_MACADDR;
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
VIR_DOMAIN_AFFECT_CONFIG, -1);
@@ -1184,7 +1186,7 @@ static int vzDomainDetachDeviceFlags(virDomainPtr dom, const char *xml,
goto cleanup;
dev = virDomainDeviceDefParse(xml, privdom->def, privconn->driver->caps,
- privconn->driver->xmlopt, VIR_DOMAIN_XML_INACTIVE);
+ privconn->driver->xmlopt, parse_flags);
if (dev == NULL)
goto cleanup;
diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c
index cf7cdd0..216c4f4 100644
--- a/src/xen/xend_internal.c
+++ b/src/xen/xend_internal.c
@@ -2327,6 +2327,8 @@ xenDaemonDetachDeviceFlags(virConnectPtr conn,
int ret = -1;
char *xendev = NULL;
virBuffer buf = VIR_BUFFER_INITIALIZER;
+ unsigned int parse_flags = VIR_DOMAIN_DEF_PARSE_INACTIVE |
+ VIR_DOMAIN_DEF_PARSE_SKIP_GENERATE_MACADDR;
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG, -1);
@@ -2354,8 +2356,8 @@ xenDaemonDetachDeviceFlags(virConnectPtr conn,
NULL)))
goto cleanup;
- if (!(dev = virDomainDeviceDefParse(xml, def, priv->caps, priv->xmlopt,
- VIR_DOMAIN_DEF_PARSE_INACTIVE)))
+ if (!(dev = virDomainDeviceDefParse(xml, def, priv->caps,
+ priv->xmlopt, parse_flags);
goto cleanup;
if (virDomainXMLDevID(conn, minidef, dev, class, ref, sizeof(ref)))
diff --git a/src/xen/xm_internal.c b/src/xen/xm_internal.c
index ef1a460..ae142a3 100644
--- a/src/xen/xm_internal.c
+++ b/src/xen/xm_internal.c
@@ -1322,6 +1322,8 @@ xenXMDomainDetachDeviceFlags(virConnectPtr conn,
int ret = -1;
size_t i;
xenUnifiedPrivatePtr priv = conn->privateData;
+ unsigned int parse_flags = VIR_DOMAIN_DEF_PARSE_INACTIVE |
+ VIR_DOMAIN_DEF_PARSE_SKIP_GENERATE_MACADDR;
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG, -1);
@@ -1340,10 +1342,8 @@ xenXMDomainDetachDeviceFlags(virConnectPtr conn,
goto cleanup;
def = entry->def;
- if (!(dev = virDomainDeviceDefParse(xml, entry->def,
- priv->caps,
- priv->xmlopt,
- VIR_DOMAIN_DEF_PARSE_INACTIVE)))
+ if (!(dev = virDomainDeviceDefParse(xml, entry->def, priv->caps,
+ priv->xmlopt, parse_flags)))
goto cleanup;
switch (dev->type) {
8 years, 6 months
[libvirt] [PATCH 0/4] rpc: Fix fd leak and potential crash
by Cole Robinson
Patch 1 was already sent, I'd like to get it in for the release,
it should be quite safe.
Remaining patches centralize some cleanup code and fix a potential
crasher, but since it should be rare I'd like to wait till after
the release.
Previous thread: http://www.redhat.com/archives/libvir-list/2016-April/msg01618.html
Ben Gray (1):
rpc: Don't leak fd via CreateXMLWithFiles
Cole Robinson (3):
rpc: Add virNetMessageClearPayload
rpc: Clear more in virNetMessageClearPayload
rpc: use virNetMessageClearPayload in client
src/libvirt_remote.syms | 1 +
src/rpc/virnetclient.c | 5 +----
src/rpc/virnetmessage.c | 28 +++++++++++++++++++---------
src/rpc/virnetmessage.h | 2 ++
4 files changed, 23 insertions(+), 13 deletions(-)
--
2.7.4
8 years, 6 months