[libvirt] [PATCH] qemu: assume virtio-memballon without an address to be PCI

2013-04-26 Thread Ján Tomko
When doing XML-to-native conversion, addresses are not assigned. The code building memballon device string assumed they are and returned an error without reporting any error message, leading to: error: An error occurred, but the cause is unknown Assume that address type none means it's a PCI

Re: [libvirt] [PATCH] virsh: suppress aliases in group help

2013-04-26 Thread Ján Tomko
On 04/26/2013 12:42 PM, Eric Blake wrote: 'virsh help | grep nodedev-det' shows only nodedev-detach, but 'virsh help nodedev | grep nodedev-det' also shows the older alias that we intentionally hid in commit af3f9aab. See also commit 787f4fe and this bug report:

Re: [libvirt] Entering freeze for libvirt-1.0.5

2013-04-26 Thread Ján Tomko
[removed libvirt-announce from the cc] On 04/26/2013 04:11 PM, Daniel Veillard wrote: On Fri, Apr 26, 2013 at 04:02:51PM +0200, Viktor Mihajlovski wrote: On 04/26/2013 10:09 AM, Daniel Veillard wrote: So as discussed earlier this week, I have tagged the release candidate 1 of libvirt-1.0.5

Re: [libvirt] Entering freeze for libvirt-1.0.5

2013-04-26 Thread Ján Tomko
On 04/26/2013 04:35 PM, Ján Tomko wrote: Are you able to start it after you delete the PCI address from the USB controller in the XML? (in this case, qemuAssignDevicePCISlots will just assign it without checking if there's a PCI bus available) Disregard that, it would get added

[libvirt] [PATCH] qemu: don't assign a PCI address to 'none' USB controller

2013-04-26 Thread Ján Tomko
--- src/qemu/qemu_command.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 9737609..126cced 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1925,6 +1925,11 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,

[libvirt] [PATCH 2/3] qemu: prevent invalid reads in qemuAssignDevicePCISlots

2013-04-26 Thread Ján Tomko
Don't reserve slot 2 for video if the machine has no PCI buses. Error out when the user specifies a video device without a PCI address when there are no PCI buses. (This wouldn't work on a machine with no PCI bus anyway since we do add PCI addresses for video devices to the command line) ---

[libvirt] [PATCH 3/3] conf: add missing error on OOM

2013-04-26 Thread Ján Tomko
I removed it in 5c3d5b2 by accident. --- src/conf/domain_conf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3c6d260..88e3d93 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -9924,6 +9924,7 @@

[libvirt] [PATCH 0/3] PCI mess fixes

2013-04-26 Thread Ján Tomko
1/3 should allow domains without a PCI bus to start 2/3 prevents invalid memory access when the domain has no PCI bus 3/3 fixes a mising error message on OOM Ján Tomko (3): qemu: don't always reserve PCI addresses for implicit controllers qemu: prevent invalid reads

[libvirt] [PATCH 1/3] qemu: don't always reserve PCI addresses for implicit controllers

2013-04-26 Thread Ján Tomko
In the past we automatically added a USB controller and assigned it a PCI address (0:0:1.2) even on machines without a PCI bus. This didn't break machines with no PCI bus because the command line for it is just '-usb', with no mention of the PCI bus. The implicit IDE controller (reserved address

[libvirt] [PATCH v2] qemu: don't always reserve PCI addresses for implicit controllers

2013-04-26 Thread Ján Tomko
In the past we automatically added a USB controller and assigned it a PCI address (0:0:1.2) even on machines without a PCI bus. This didn't break machines with no PCI bus because the command line for it is just '-usb', with no mention of the PCI bus. The implicit IDE controller (reserved address

[libvirt] [PATCH v2] qemu: don't assign a PCI address to 'none' USB controller

2013-04-26 Thread Ján Tomko
Adjust the usb-none test, since it gives the membaloon a lower PCI slot now. Add a test for 'none' controller on s390, which doesn't have PCI buses. --- Diff to v1: Fixed the tests and added a new one. src/qemu/qemu_command.c| 5

Re: [libvirt] [PATCH v2] qemu: don't assign a PCI address to 'none' USB controller

2013-04-26 Thread Ján Tomko
On 04/26/2013 08:00 PM, Eric Blake wrote: n 04/26/2013 11:52 AM, Ján Tomko wrote: Adjust the usb-none test, since it gives the membaloon a lower PCI slot now. s/membaloon/memballoon/ (yes, it's a funky word to type with a doubled-double-letter, just ask any bookkeeper about it) :) Add

Re: [libvirt] Entering freeze for libvirt-1.0.5

2013-04-26 Thread Ján Tomko
On 04/26/2013 04:47 PM, Viktor Mihajlovski wrote: On 04/26/2013 04:35 PM, Ján Tomko wrote: The big switch down there lists the architectures/machines that do have a PCI bus and we disallow adding PCI devices if they don't. I thought that any device that qemuAssignDevicePCISlots assigns a PCI

Re: [libvirt] [PATCH 0/3] PCI mess fixes

2013-04-27 Thread Ján Tomko
On 04/26/2013 06:31 PM, Ján Tomko wrote: 1/3 should allow domains without a PCI bus to start 2/3 prevents invalid memory access when the domain has no PCI bus 3/3 fixes a mising error message on OOM Ján Tomko (3): qemu: don't always reserve PCI addresses for implicit controllers qemu

[libvirt] [PATCH] qemu: honor allowDiskFormatProbing when parsing command line

2013-04-29 Thread Ján Tomko
My commit 024e9af broke this. --- src/qemu/qemu_command.c | 3 --- tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml| 2 +- tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.xml | 4 ++--

[libvirt] [PATCH v2] virsh: fix incorrect argument errors for long options

2013-04-29 Thread Ján Tomko
For long options, print: * the option as specified by the user if it's unknown * the cannoncial long option if its argument is not a number (and should be) And for missing arguments, print both the short and the long option name. (Doing only one of those would require either parsing argv

Re: [libvirt] [PATCH] qemu: honor allowDiskFormatProbing when parsing command line

2013-04-29 Thread Ján Tomko
On 04/29/2013 06:16 PM, Eric Blake wrote: On 04/29/2013 07:56 AM, Ján Tomko wrote: My commit 024e9af broke this. --- src/qemu/qemu_command.c | 3 --- ... ACK. Using VIR_STORAGE_FILE_AUTO would be a security hole if it contradicts the user's

[libvirt] [PATCH v2 0/2] qemu: xml-native memballoon fixes

2013-04-29 Thread Ján Tomko
v1: https://www.redhat.com/archives/libvir-list/2013-April/msg01910.html v2: Instead of assuming 'pci' as the default memballoon device, assign the addresses when doing xml-native conversion and add an error message for the wrong address type. Ján Tomko (2): qemu: assign addresses when

[libvirt] [PATCH v2 1/2] qemu: assign addresses when converting xml to native

2013-04-29 Thread Ján Tomko
This adds addresses to domxml-to-native output and chooses the correct virtio devices for ccw and s390 machines. https://bugzilla.redhat.com/show_bug.cgi?id=957077 --- src/qemu/qemu_driver.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c

[libvirt] [PATCH v2 2/2] qemu: report an error if memballoon has wrong address type

2013-04-29 Thread Ján Tomko
qemuBuildMemballoonDevStr returns NULL if memballoon doesn't have the right address type, but it doesn't report an error, leading to: error: An error occurred, but the cause is unknown Report a helpful error message instead, e.g.: error: XML error: memballoon unsupported with address type 'usb'

Re: [libvirt] [PATCH v2] virsh: fix incorrect argument errors for long options

2013-04-30 Thread Ján Tomko
On 04/29/2013 10:48 PM, Eric Blake wrote: On 04/29/2013 11:27 AM, Ján Tomko wrote: For long options, print: * the option as specified by the user if it's unknown * the cannoncial long option if its argument is not s/cannonical/canonical/ ... a number (and should be) And for missing

Re: [libvirt] [PATCH v2 2/2] qemu: report an error if memballoon has wrong address type

2013-04-30 Thread Ján Tomko
On 04/30/2013 12:14 AM, Eric Blake wrote: On 04/29/2013 12:20 PM, Ján Tomko wrote: qemuBuildMemballoonDevStr returns NULL if memballoon doesn't have the right address type, but it doesn't report an error, leading to: error: An error occurred, but the cause is unknown Report a helpful error

[libvirt] [PATCH] libvirt-guests: status: return non-zero when stopped

2013-04-30 Thread Ján Tomko
Return 3 when the service is stopped, whether there are saved guests or not. --- tools/libvirt-guests.sh.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/libvirt-guests.sh.in b/tools/libvirt-guests.sh.in index 4f2e203..261c488 100644 --- a/tools/libvirt-guests.sh.in

[libvirt] [PATCH] virsh: clarify vol-{down,up}load description

2013-04-30 Thread Ján Tomko
Mention file/volume contents instead of just 'file'/'volume'. Also change Download-download in vol-download help, to be consistent with other volume commands. https://bugzilla.redhat.com/show_bug.cgi?id=955537 --- tools/virsh-volume.c | 8 1 file changed, 4 insertions(+), 4

Re: [libvirt] [PATCH] virsh: clarify vol-{down,up}load description

2013-04-30 Thread Ján Tomko
On 04/30/2013 02:35 PM, Peter Krempa wrote: On 04/30/13 14:32, Ján Tomko wrote: Mention file/volume contents instead of just 'file'/'volume'. Also change Download-download in vol-download help, to be consistent with other volume commands. https://bugzilla.redhat.com/show_bug.cgi?id=955537

Re: [libvirt] [PATCH] libvirt-guests: status: return non-zero when stopped

2013-04-30 Thread Ján Tomko
On 04/30/2013 04:55 PM, Eric Blake wrote: On 04/30/2013 05:55 AM, Ján Tomko wrote: Return 3 when the service is stopped, whether there are saved guests or not. Please mention http://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html in the commit message

[libvirt] [PATCH 0/2] qemu: support new HyperV-related features

2013-05-02 Thread Ján Tomko
1/2 prevents memory leaks and hair loss in qemuParseCommandLineCPU 2/2 adds support for the new cpu flags https://bugzilla.redhat.com/show_bug.cgi?id=784836 Ján Tomko (2): qemu: use strsep for CPU command line parsing qemu: add hv_vapic and hv_spinlocks support docs/formatdomain.html.in

[libvirt] [PATCH 2/2] qemu: add hv_vapic and hv_spinlocks support

2013-05-02 Thread Ján Tomko
Add new CPU flags for HyperV: hv_vapic for virtual APIC support hv_spinlocks for spinlock support XML: features hyperv vapic state='on'/ spinlocks0x/spinlocks /hyperv /features results in the following QEMU command line: qemu -cpu cpu_model,hv_vapic,hv_spinlocks=0x

[libvirt] [PATCH v2 0/2] qemu: support new HyperV-related features

2013-05-02 Thread Ján Tomko
1/2 prevents memory leaks and hair loss in qemuParseCommandLineCPU 2/2 adds support for the new cpu flags v1: https://www.redhat.com/archives/libvir-list/2013-May/msg00173.html v2: uses virStringSplit instead of strsep added a missing break to virDomainDefParseXML Ján Tomko (2): qemu

[libvirt] [PATCH v2 1/2] qemu: simplify CPU command line parsing

2013-05-02 Thread Ján Tomko
Use virStringSplit. Change the 'error' label to 'cleanup' to prevent memory leaks on error. --- src/qemu/qemu_command.c | 128 +++- 1 file changed, 51 insertions(+), 77 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index

[libvirt] [PATCH v2 2/2] qemu: add hv_vapic and hv_spinlocks support

2013-05-02 Thread Ján Tomko
Add new CPU flags for HyperV: hv_vapic for virtual APIC support hv_spinlocks for spinlock support XML: features hyperv vapic state='on'/ spinlocks0x/spinlocks /hyperv /features results in the following QEMU command line: qemu -cpu cpu_model,hv_vapic,hv_spinlocks=0x

Re: [libvirt] [PATCH 2/2] virsh: Resolve Coverity 'MISSING_BREAK'

2013-05-02 Thread Ján Tomko
On 05/01/2013 05:53 PM, John Ferlan wrote: Recent commit '53531e16' resulted in a new Coverity warning regarding a missing break in the ':' options processing. Adjust the commit to avoid the issue. --- tools/virsh.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff

[libvirt] [PATCH] docs: fix 'since' for socket path generation

2013-05-03 Thread Ján Tomko
Commit 297c99a says it works from 1.0.5 but it only got pushed after the 1.0.5 release. --- Pushed under the trivial rule. docs/formatdomain.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 8d4edfb..3570bbc

Re: [libvirt] [PATCH 01/11] Fix possible undefined value in check-symsorting.pl

2013-05-03 Thread Ján Tomko
On 05/02/2013 02:03 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com It is possible for $line to be undefined at first used, if the symfile doesn't have a section prefix (which is the case for auto-generated symfiles). Signed-off-by: Daniel P. Berrange

Re: [libvirt] [PATCH 04/11] Separate virGetHostname() API contract from driver APIs

2013-05-03 Thread Ján Tomko
On 05/02/2013 02:03 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Currently the virGetHostname() API has a bogus virConnectPtr parameter. This is because virtualization drivers directly reference this API in their virDriverPtr tables, tieing its API design to

Re: [libvirt] [PATCH 11/11] Delete udevFreeIfaceDef function in udev interface driver

2013-05-03 Thread Ján Tomko
On 05/02/2013 02:03 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The udevFreeIfaceDef function in the udev interface driver just duplicates code from virInterfaceDefFree. Delete it and call the standard API instead. Signed-off-by: Daniel P. Berrange

Re: [libvirt] [PATCH 06/11] Separate internal node suspend APIs from public API

2013-05-03 Thread Ján Tomko
On 05/02/2013 02:03 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The individual hypervisor drivers were directly referencing APIs in virnodesuspend.c in their virDriverPtr struct. Separate these methods, so there is always a wrapper in the hypervisor driver.

Re: [libvirt] [PATCH 02/11] Rename security context to selinux context

2013-05-03 Thread Ján Tomko
On 05/02/2013 02:03 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The there various methods named virSecurityContext, which are specific to SELinux. Rename them all to virSELinuxContext. They will still raise errors at runtime if SELinux is not compiled

Re: [libvirt] [PATCH 05/11] Separate internal node device APIs from public API

2013-05-03 Thread Ján Tomko
On 05/02/2013 02:03 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The individual hypervisor drivers were directly referencing APIs in src/nodeinfo.c in their virDriverPtr struct. Separate these methods, so there is always a wrapper in the hypervisor driver. This

Re: [libvirt] [PATCH 07/11] Fix naming of some node device APIs

2013-05-03 Thread Ján Tomko
On 05/02/2013 02:03 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com In renaming driver API implementations to match the public API naming scheme, a few cases in the node device driver were missed. Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

[libvirt] IPv6 iscsi targets

2013-05-06 Thread Ján Tomko
Hello. Before running iscsiadm, libvirt translates the source host to an IP address for the --portal option. However, it only resolves to IPv4 and only uses the first address. iscsiadm allows a hostname to be specified [1][2], but specifying a hostname instead of the address doesn't work if the

Re: [libvirt] [PATCH 1/3] qemu: new vnc display sharing policy caps flag

2013-05-07 Thread Ján Tomko
On 05/06/2013 03:19 PM, Guannan Ren wrote: QEMU_CAPS_VNC_DISPLAY_POLICY (qemu = v1.10) --- docs/formatdomain.html.in | 13 +++-- docs/schemas/domaincommon.rng | 9 + src/qemu/qemu_capabilities.c | 12 src/qemu/qemu_capabilities.h | 1 +

Re: [libvirt] [PATCH 2/3] conf: add 'policy' attribute to graphics element for vnc

2013-05-07 Thread Ján Tomko
On 05/06/2013 03:19 PM, Guannan Ren wrote: -vnc :5900,share=allow-exclusive allows clients to ask for exclusive access which is implemented by dropping other connections Connecting multiple clients in parallel requires all clients asking for a shared session (vncviewer: -shared switch)

Re: [libvirt] [PATCH 3/3] qemu: support share attribute and its values to -vnc option

2013-05-07 Thread Ján Tomko
On 05/06/2013 03:19 PM, Guannan Ren wrote: --- src/qemu/qemu_command.c| 13 .../qemuxml2argv-graphics-vnc-policy.args | 4 +++ .../qemuxml2argv-graphics-vnc-policy.xml | 35 ++ tests/qemuxml2argvtest.c

[libvirt] [PATCH] iscsi: don't leak portal string when starting a pool

2013-05-07 Thread Ján Tomko
--- src/storage/storage_backend_iscsi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/storage/storage_backend_iscsi.c b/src/storage/storage_backend_iscsi.c index cf25919..3b48f44 100644 --- a/src/storage/storage_backend_iscsi.c +++ b/src/storage/storage_backend_iscsi.c @@ -772,6 +772,7

[libvirt] [PATCH] get rid of virBufferAsprintf where possible

2013-05-07 Thread Ján Tomko
Use virBufferAddLit or virBufferAddChar instead. --- src/conf/domain_conf.c | 14 +++--- src/conf/network_conf.c | 4 ++-- src/conf/storage_conf.c | 6 +++--- src/nwfilter/nwfilter_learnipaddr.c | 2 +- src/phyp/phyp_driver.c | 28

[libvirt] [PATCH] syntax-check: forbid virBufferAsprintf with string literals

2013-05-07 Thread Ján Tomko
--- cfg.mk | 5 + 1 file changed, 5 insertions(+) diff --git a/cfg.mk b/cfg.mk index 1d63bbd..06f89d1 100644 --- a/cfg.mk +++ b/cfg.mk @@ -490,6 +490,11 @@ sc_prohibit_virBufferAdd_with_string_literal: halt='use virBufferAddLit, not virBufferAdd, with a string literal' \

Re: [libvirt] [PATCH 02/25] qemu: New cap flags for scsi-generic

2013-05-07 Thread Ján Tomko
On 05/03/2013 08:07 PM, Osier Yang wrote: From: Han Cheng hanc.f...@cn.fujitsu.com Adding two cap flags for scsi-generic: QEMU_CAPS_SCSI_GENERIC QEMU_CAPS_SCSI_GENERIC_BOOTINDEX Signed-off-by: Han Cheng hanc.f...@cn.fujitsu.com Signed-off-by: Osier Yang hanc.f...@cn.fujitsu.com

Re: [libvirt] [PATCH] get rid of virBufferAsprintf where possible

2013-05-07 Thread Ján Tomko
On 05/07/2013 12:58 PM, Michal Privoznik wrote: On 07.05.2013 12:37, Ján Tomko wrote: Use virBufferAddLit or virBufferAddChar instead. --- src/conf/domain_conf.c | 14 +++--- src/conf/network_conf.c | 4 ++-- src/conf/storage_conf.c | 6

Re: [libvirt] [PATCH] syntax-check: forbid virBufferAsprintf with string literals

2013-05-07 Thread Ján Tomko
On 05/07/2013 04:32 PM, Eric Blake wrote: On 05/07/2013 05:46 AM, Ján Tomko wrote: --- cfg.mk | 5 + 1 file changed, 5 insertions(+) diff --git a/cfg.mk b/cfg.mk index 1d63bbd..06f89d1 100644 --- a/cfg.mk +++ b/cfg.mk @@ -490,6 +490,11 @@ sc_prohibit_virBufferAdd_with_string_literal

[libvirt] [PATCH] don't mention disk controllers in generic controller errors

2013-05-09 Thread Ján Tomko
The controller element supports non-disk controller types too. https://bugzilla.redhat.com/show_bug.cgi?id=960958 --- src/conf/domain_conf.c | 2 +- src/qemu/qemu_driver.c | 4 ++-- src/qemu/qemu_hotplug.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git

[libvirt] [PATCH] conf: don't crash on a tpm device with no backends

2013-05-09 Thread Ján Tomko
Print an error instead of crashing when a TPM device without a backend is specified. https://bugzilla.redhat.com/show_bug.cgi?id=961252 --- src/conf/domain_conf.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d55ce6b..eb579c6

[libvirt] [PATCH v2 0/2] don't crash on a tpm device with no backends

2013-05-09 Thread Ján Tomko
v2: added tests v1: https://www.redhat.com/archives/libvir-list/2013-May/msg00651.html Ján Tomko (2): tests: files named '.*-invalid.xml' should fail validation conf: don't crash on a tpm device with no backends src/conf/domain_conf.c | 6 + .../qemuxml2argv

[libvirt] [PATCH v2 1/2] tests: files named '.*-invalid.xml' should fail validation

2013-05-09 Thread Ján Tomko
Currently, using an invalid XML in tests fails, because the schema test expects all of them to be valid. Treat files with -invalid.xml suffix as invalid and expect them to fail validation. --- tests/schematestutils.sh | 12 1 file changed, 12 insertions(+) diff --git

[libvirt] [PATCH v2 2/2] conf: don't crash on a tpm device with no backends

2013-05-09 Thread Ján Tomko
Print an error instead of crashing when a TPM device without a backend is specified. Add a test for tpm device with no backend, which should fail with a parse error. https://bugzilla.redhat.com/show_bug.cgi?id=961252 --- src/conf/domain_conf.c | 6 +

Re: [libvirt] [PATCH v2 2/2] conf: don't crash on a tpm device with no backends

2013-05-09 Thread Ján Tomko
On 05/09/2013 02:20 PM, Daniel P. Berrange wrote: On Thu, May 09, 2013 at 02:18:13PM +0200, Ján Tomko wrote: Print an error instead of crashing when a TPM device without a backend is specified. Add a test for tpm device with no backend, which should fail with a parse error. https

Re: [libvirt] [PATCH] iscsi: don't leak portal string when starting a pool

2013-05-09 Thread Ján Tomko
On 05/08/2013 09:31 PM, Eric Blake wrote: On 05/07/2013 02:02 AM, Ján Tomko wrote: --- src/storage/storage_backend_iscsi.c | 1 + 1 file changed, 1 insertion(+) ACK. Thanks, I've pushed it now. Jan -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman

Re: [libvirt] [PATCH] don't mention disk controllers in generic controller errors

2013-05-09 Thread Ján Tomko
On 05/09/2013 12:25 PM, Osier Yang wrote: On 09/05/13 18:08, Ján Tomko wrote: The controller element supports non-disk controller types too. https://bugzilla.redhat.com/show_bug.cgi?id=960958 ACK Thank you, it's pushed now. Jan -- libvir-list mailing list libvir-list@redhat.com https

Re: [libvirt] [PATCH v2 2/2] conf: don't crash on a tpm device with no backends

2013-05-10 Thread Ján Tomko
On 05/09/2013 07:22 PM, Eric Blake wrote: On 05/09/2013 06:18 AM, Ján Tomko wrote: Print an error instead of crashing when a TPM device without a backend is specified. Add a test for tpm device with no backend, which should fail with a parse error. https://bugzilla.redhat.com/show_bug.cgi

Re: [libvirt] [PATCH v3 33/34] Adapt to VIR_STRDUP and VIR_STRNDUP in src/*

2013-05-10 Thread Ján Tomko
On 05/03/2013 04:53 PM, Michal Privoznik wrote: --- src/datatypes.c | 76 +++-- src/libvirt.c | 14 +++ src/nodeinfo.c | 5 +--- 3 files changed, 41 insertions(+), 54 deletions(-) @@ -297,15 +297,15 @@

Re: [libvirt] [PATCH v3 32/34] Adapt to VIR_STRDUP and VIR_STRNDUP in tests/*

2013-05-10 Thread Ján Tomko
On 05/03/2013 04:53 PM, Michal Privoznik wrote: --- tests/commandhelper.c | 10 -- tests/commandtest.c| 2 +- tests/openvzutilstest.c| 6 -- tests/qemumonitortestutils.c | 15 +++ tests/qemuxml2argvtest.c |

Re: [libvirt] [PATCH v3 22/34] Adapt to VIR_STRDUP and VIR_STRNDUP in src/storage/*

2013-05-10 Thread Ján Tomko
On 05/03/2013 04:53 PM, Michal Privoznik wrote: --- src/storage/parthelper.c | 5 ++--- src/storage/storage_backend.c | 22 ++ src/storage/storage_backend_disk.c | 26 +++--- src/storage/storage_backend_fs.c | 34

Re: [libvirt] [PATCH v3 23/34] Adapt to VIR_STRDUP and VIR_STRNDUP in src/test/*

2013-05-10 Thread Ján Tomko
On 05/03/2013 04:53 PM, Michal Privoznik wrote: --- src/test/test_driver.c | 144 ++--- 1 file changed, 52 insertions(+), 92 deletions(-) @@ -2060,9 +2057,9 @@ cleanup: } static char *testDomainGetOSType(virDomainPtr dom ATTRIBUTE_UNUSED)

Re: [libvirt] [PATCH v3 26/34] Adapt to VIR_STRDUP and VIR_STRNDUP in src/vbox/*

2013-05-10 Thread Ján Tomko
On 05/03/2013 04:53 PM, Michal Privoznik wrote: --- src/vbox/vbox_XPCOMCGlue.c | 6 +- src/vbox/vbox_tmpl.c | 278 +++-- 2 files changed, 117 insertions(+), 167 deletions(-) diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index

Re: [libvirt] [PATCH v3 25/34] Adapt to VIR_STRDUP and VIR_STRNDUP in src/util/*

2013-05-10 Thread Ján Tomko
On 05/03/2013 04:53 PM, Michal Privoznik wrote: --- src/util/virauth.c | 17 +-- src/util/virauthconfig.c | 8 +- src/util/virbitmap.c | 9 +- src/util/vircgroup.c | 36 ++--- src/util/vircommand.c| 33 ++---

[libvirt] [PATCH] .gitignore: add fchosttest

2013-05-13 Thread Ján Tomko
--- Pushed under the trivial rule. .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index f181f89..3d874a9 100644 --- a/.gitignore +++ b/.gitignore @@ -144,6 +144,7 @@ /tests/domainsnapshotxml2xmltest /tests/esxutilstest /tests/eventtest

Re: [libvirt] [libvirt PATCH] conf: Fix the bug of disk-copy_on_read formating

2013-05-14 Thread Ján Tomko
On 05/14/2013 11:03 AM, Osier Yang wrote: The reason for it's not exposed for such long time is that there is no xml2xml test for it. This fixes the bug and adds test. It was not exposed, because virDomainVirtioEventIdx and virDomainDiskCopyOnRead enums are the same. Maybe we should use enum

Re: [libvirt] [PATCH 3/2] string: test VIR_STRDUP

2013-05-14 Thread Ján Tomko
On 05/07/2013 11:42 PM, Eric Blake wrote: The surest way to avoid regressions is to test documented behavior :) * tests/virstringtest.c (testStrdup): New test case. Signed-off-by: Eric Blake ebl...@redhat.com --- tests/virstringtest.c | 49

[libvirt] [PATCH 0/8] Add qcow2 extensions support

2013-05-16 Thread Ján Tomko
://www.redhat.com/archives/libvir-list/2013-February/msg00212.html qcow2 vs. qcow3 discussion: https://www.redhat.com/archives/libvir-list/2013-March/msg00094.html Ján Tomko (8): storage: rework qemu-img command line generation tests: don't overwrite error in storage xml-to-argv test util: add support

[libvirt] [PATCH 1/8] storage: rework qemu-img command line generation

2013-05-16 Thread Ján Tomko
Split out option string generation to make adding new options easier and simplify the code. --- src/storage/storage_backend.c | 111 ++ 1 file changed, 59 insertions(+), 52 deletions(-) diff --git a/src/storage/storage_backend.c

[libvirt] [PATCH 7/8] Add qcow2 features support to snapshots

2013-05-16 Thread Ján Tomko
--- docs/schemas/domainsnapshot.rng | 7 +++ src/conf/snapshot_conf.c | 74 src/conf/snapshot_conf.h | 2 + tests/domainsnapshotxml2xmlin/disk_snapshot.xml | 5 ++

[libvirt] [PATCH 4/8] conf: add features to volume target XML

2013-05-16 Thread Ján Tomko
Add features and compat elements to volume target XML. compat is a string which for qcow2 represents the QEMU version it should be compatible with. Valid values are 0.10 and 1.1. 1.1 is implicit if the features element is present, otherwise qemu-img default is used. 0.10 can be specified to

[libvirt] [PATCH 2/8] tests: don't overwrite error in storage xml-to-argv test

2013-05-16 Thread Ján Tomko
When cmd is NULL, virCommandToString reports an OOM error, overwriting the error reported by virStorageBackendCreateQemuImgCmd. --- tests/storagevolxml2argvtest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/storagevolxml2argvtest.c

[libvirt] [PATCH 8/8] qemu: add qcow2 extension support to inactive external snapshots

2013-05-16 Thread Ján Tomko
For live external snapshots, the image creation is done by QEMU and we can't pass the needed options. --- docs/formatsnapshot.html.in | 5 src/qemu/qemu_driver.c | 72 +++-- 2 files changed, 62 insertions(+), 15 deletions(-) diff --git

[libvirt] [PATCH 6/8] conf: split out snapshot disk XML formatting

2013-05-16 Thread Ján Tomko
Just to reduce the indentation levels. Remove the unneeded NULL check for disk-file, as virBufferEscapeString doesn't print anything with NULL arguments. --- src/conf/snapshot_conf.c | 53 ++-- 1 file changed, 29 insertions(+), 24 deletions(-) diff

[libvirt] [PATCH 3/8] util: add support for qcow2v3 image detection

2013-05-16 Thread Ján Tomko
Detect qcow2 images with version 3 in the image header as VIR_STORAGE_FILE_QCOW2. These images have a feature bitfield, with just one feature supported so far: lazy_refcounts. The header length changed too, moving the location of the backing format name. --- src/util/virstoragefile.c | 164

[libvirt] [PATCH 5/8] storage: add support for creating qcow2 images with extensions

2013-05-16 Thread Ján Tomko
Add -o compat= and -o lazy_refcounts options for qemu-img. --- src/storage/storage_backend.c | 36 +++-- tests/storagevolxml2argvdata/qcow2-1.1.argv | 1 + tests/storagevolxml2argvdata/qcow2-lazy.argv| 1 +

[libvirt] [PATCH] daemon: fix leak after listing all volumes

2013-05-16 Thread Ján Tomko
CVE-2013-1962 remoteDispatchStoragePoolListAllVolumes wasn't freeing the pool. The pool also held a reference to the connection, preventing it from getting freed and closing the netcf interface driver, which held two sockets open. --- daemon/remote.c | 2 ++ 1 file changed, 2 insertions(+) diff

Re: [libvirt] [PATCH] daemon: fix leak after listing all volumes

2013-05-16 Thread Ján Tomko
On 05/16/2013 04:06 PM, Eric Blake wrote: On 05/16/2013 08:03 AM, Ján Tomko wrote: CVE-2013-1962 remoteDispatchStoragePoolListAllVolumes wasn't freeing the pool. The pool also held a reference to the connection, preventing it from getting freed and closing the netcf interface driver, which

[libvirt] [PATCH] datatypes: fix virGetStoragePool's comment

2013-05-16 Thread Ján Tomko
--- Pushed under the trivial rule. src/datatypes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/datatypes.c b/src/datatypes.c index 884eb3e..940d968 100644 --- a/src/datatypes.c +++ b/src/datatypes.c @@ -421,7 +421,7 @@ virInterfaceDispose(void *obj) * and register

[libvirt] [PATCH 1/2] schema: require target path in storage pool xml

2013-05-16 Thread Ján Tomko
Make target path mandatory for pool types that require target, since we refuse to parse a target without a path. https://bugzilla.redhat.com/show_bug.cgi?id=893273 --- docs/schemas/storagepool.rng | 8 +++- tests/Makefile.am

[libvirt] [PATCH 2/2] schema: make source optional in volume XML

2013-05-16 Thread Ján Tomko
We don't parse it anyway. https://bugzilla.redhat.com/show_bug.cgi?id=893273 --- docs/schemas/storagevol.rng| 4 +++- tests/Makefile.am | 3 ++- tests/storagevolschemadata/qcow2-no-source.xml | 29 ++

[libvirt] [PATCH 0/2] Fix storage schema issues

2013-05-16 Thread Ján Tomko
Fix https://bugzilla.redhat.com/show_bug.cgi?id=893273 Ján Tomko (2): schema: require target path in storage pool xml schema: make source optional in volume XML docs/schemas/storagepool.rng | 8 +++--- docs/schemas/storagevol.rng| 4 ++- tests

Re: [libvirt] [libvirt PATCH] conf: Fix the bug of disk-copy_on_read formating

2013-05-16 Thread Ján Tomko
On 05/14/2013 02:56 PM, Osier Yang wrote: On 14/05/13 17:29, Ján Tomko wrote: On 05/14/2013 11:03 AM, Osier Yang wrote: The reason for it's not exposed for such long time is that there is no xml2xml test for it. This fixes the bug and adds test. It was not exposed, because

Re: [libvirt] [PATCH 2/2] schema: make source optional in volume XML

2013-05-17 Thread Ján Tomko
On 05/16/2013 09:48 PM, Eric Blake wrote: On 05/16/2013 08:39 AM, Ján Tomko wrote: We don't parse it anyway. https://bugzilla.redhat.com/show_bug.cgi?id=893273 --- docs/schemas/storagevol.rng| 4 +++- tests/Makefile.am | 3 ++- tests

Re: [libvirt] [PATCH] openvzDomainSetNetwork: use virCommand

2013-05-20 Thread Ján Tomko
On 05/19/2013 11:52 AM, Michal Privoznik wrote: Currently, the openvzDomainSetNetwork function constructs an array of strings representing a command line for VZCTL binary. This is a overkill since our virCommand APIs can cover all the functionality. --- src/openvz/openvz_driver.c | 56

[libvirt] [PATCH] vbox: fix VIR_STRDUP value check

2013-05-20 Thread Ján Tomko
In my review of 31532ca I missed the fact that VIR_STRDUP now returns 1 on success, and 0 if the source was NULL. (This still doesn't add proper OOM error handling.) --- src/vbox/vbox_tmpl.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vbox/vbox_tmpl.c

Re: [libvirt] [PATCH v3 25/34] Adapt to VIR_STRDUP and VIR_STRNDUP in src/util/*

2013-05-20 Thread Ján Tomko
On 05/03/2013 04:53 PM, Michal Privoznik wrote: 32 files changed, 356 insertions(+), 567 deletions(-) These functions returned 0 on success before and will need to be adjusted since VIR_STRDUP returns 1 on a successful copy now. diff --git a/src/util/viridentity.c b/src/util/viridentity.c

Re: [libvirt] [PATCH v3 25/34] Adapt to VIR_STRDUP and VIR_STRNDUP in src/util/*

2013-05-20 Thread Ján Tomko
On 05/20/2013 01:40 PM, Michal Privoznik wrote: On 20.05.2013 13:07, Ján Tomko wrote: On 05/03/2013 04:53 PM, Michal Privoznik wrote: 32 files changed, 356 insertions(+), 567 deletions(-) These functions returned 0 on success before and will need to be adjusted since VIR_STRDUP returns 1

Re: [libvirt] [PATCH v2] openvzDomainSetNetwork: use virCommand

2013-05-20 Thread Ján Tomko
On 05/20/2013 03:49 PM, Michal Privoznik wrote: On 20.05.2013 15:47, Michal Privoznik wrote: Currently, the openvzDomainSetNetwork function constructs an array of strings representing a command line for VZCTL binary. This is a overkill since our virCommand APIs can cover all the

Re: [libvirt] two hostdev devices problem

2013-05-21 Thread Ján Tomko
On 05/21/2013 09:32 AM, Dominik Mostowiec wrote: hi, I try to add 2 VF by hostdev. Networks (vnet0, vnet1) with: forward mode='hostdev' managed='yes' pf dev='eth1'/ . Domain: interface type=network source network=vnet0/ interface

Re: [libvirt] [PATCH] vbox: fix VIR_STRDUP value check

2013-05-21 Thread Ján Tomko
On 05/20/2013 05:55 PM, Eric Blake wrote: On 05/20/2013 03:59 AM, Ján Tomko wrote: In my review of 31532ca I missed the fact that VIR_STRDUP now returns 1 on success, and 0 if the source was NULL. (This still doesn't add proper OOM error handling.) --- src/vbox/vbox_tmpl.c | 12

[libvirt] [PATCH] docs: formatdomain: fix links in the table of contents

2013-05-21 Thread Ján Tomko
--- Pushed under the trivial rule. docs/formatdomain.html.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 9284534..d9814dd 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -2350,7

Re: [libvirt] two hostdev devices problem

2013-05-21 Thread Ján Tomko
On 05/21/2013 01:37 PM, Laine Stump wrote: On 05/21/2013 04:03 AM, Ján Tomko wrote: On 05/21/2013 09:32 AM, Dominik Mostowiec wrote: hi, I try to add 2 VF by hostdev. Networks (vnet0, vnet1) with: forward mode='hostdev' managed='yes' pf dev='eth1'/ . Domain

Re: [libvirt] [PATCH 3/3 v3] qemu: add ', share=policy' to qemu commandline

2013-05-21 Thread Ján Tomko
On 05/16/2013 03:00 PM, Guannan Ren wrote: example: qemu ${otherargs} \ -vnc 127.0.0.1:0,share=allow-exclusive --- src/qemu/qemu_command.c | 36 tests/qemuargv2xmltest.c | 1 + tests/qemuxml2argvtest.c | 1 + You forgot to add the .args

Re: [libvirt] [PATCH 30/31] nwfitler: Change the comment style

2013-05-21 Thread Ján Tomko
s/nwfitler/nwfilter/ in the subject Jan -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 0/3 v4] add 'sharePolicy' attribute for qemu vnc sharing policy

2013-05-21 Thread Ján Tomko
On 05/21/2013 04:31 PM, Guannan Ren wrote: v3-v4 add missing .args, .xml files (I raw it in git Untracked files this morning and thought about it for a while, then git-cleaned them...) rebase work. v2-v3 rebase work. v1-v2: changed attribute name from 'policy' to

Re: [libvirt] [PATCH] vbox: fix VIR_STRDUP value check

2013-05-22 Thread Ján Tomko
On 05/20/2013 05:08 PM, Michal Privoznik wrote: On 20.05.2013 11:59, Ján Tomko wrote: In my review of 31532ca I missed the fact that VIR_STRDUP now returns 1 on success, and 0 if the source was NULL. (This still doesn't add proper OOM error handling.) --- src/vbox/vbox_tmpl.c | 12

[libvirt] [PATCH] conf: fix use after free in virChrdevOpen

2013-05-22 Thread Ján Tomko
Don't free the stream on error if we've successfully added it to the hash table, since it will be freed by virChrdevHashEntryFree callback. Preserve the error message before calling virStreamFree, since it resets the error. Reported by Sergey Fionov on libvir-list. --- src/conf/virchrdev.c | 15

Re: [libvirt] [PATCH v4 10/13] Adapt to VIR_STRDUP and VIR_STRNDUP in src/xen/*

2013-05-23 Thread Ján Tomko
On 05/20/2013 07:55 PM, Michal Privoznik wrote: --- src/xen/block_stats.c| 16 ++-- src/xen/xen_driver.c | 9 +++ src/xen/xen_hypervisor.c | 19 -- src/xen/xen_inotify.c| 15 +++ src/xen/xend_internal.c | 68

<    1   2   3   4   5   6   7   8   9   10   >