Re: [libvirt] libvirt and Parallels Cloud Storage

2013-02-11 Thread Daniel P. Berrange
On Sun, Feb 10, 2013 at 02:20:02AM +0400, Alexander Gordeev wrote: В Thu, 7 Feb 2013 16:09:31 + Daniel P. Berrange berra...@redhat.com пишет: It's not a POSIX FS but there is a FUSE client for it that can be used to access and manipulate images. It's quite high speed but only when

Re: [libvirt] [PATCH 1/5] Public API to allow defining new domain using OVA file

2013-02-11 Thread Daniel P. Berrange
On Fri, Feb 08, 2013 at 05:26:24PM -0800, Ata Bohra wrote: NACK, as I said with previous postings, this does not belong in libvirt APIs, it should be built as a layer above. [AB]: Thanks for reviewing this Daniel. I completly understand the concern of not making it part of libvirt

Re: [libvirt] libvirt and Parallels Cloud Storage

2013-02-11 Thread Alexander Gordeev
В Mon, 11 Feb 2013 09:57:05 + Daniel P. Berrange berra...@redhat.com пишет: On Sun, Feb 10, 2013 at 02:20:02AM +0400, Alexander Gordeev wrote: В Thu, 7 Feb 2013 16:09:31 + Daniel P. Berrange berra...@redhat.com пишет: It's not a POSIX FS but there is a FUSE client for it that

Re: [libvirt] [PATCH 1/4] qemu: Add checking in helpers for sgio setting

2013-02-11 Thread Osier Yang
On 2013年02月09日 04:21, John Ferlan wrote: On 02/08/2013 08:07 AM, Osier Yang wrote: This moves the checking into the helpers, to avoid the callers missing the checking. --- src/qemu/qemu_conf.c| 20 src/qemu/qemu_conf.h|4 ++-- src/qemu/qemu_driver.c |

Re: [libvirt] [PATCH 1/4] qemu: Add checking in helpers for sgio setting

2013-02-11 Thread Daniel P. Berrange
On Mon, Feb 11, 2013 at 06:35:42PM +0800, Osier Yang wrote: On 2013年02月09日 04:21, John Ferlan wrote: On 02/08/2013 08:07 AM, Osier Yang wrote: This moves the checking into the helpers, to avoid the callers missing the checking. --- src/qemu/qemu_conf.c| 20

Re: [libvirt] [PATCH 2/4] qemu: Merge qemuCheckSharedDisk into qemuAddSharedDisk

2013-02-11 Thread Osier Yang
On 2013年02月09日 04:46, John Ferlan wrote: On 02/08/2013 08:08 AM, Osier Yang wrote: Based on moving various checking into qemuAddSharedDisk, this avoids the caller using it in wrong ways. --- src/qemu/qemu_conf.c| 50 src/qemu/qemu_driver.c

Re: [libvirt] [PATCH 4/4] qemu: Move shared disk entry adding and unpriv_sgio seting

2013-02-11 Thread Daniel P. Berrange
On Fri, Feb 08, 2013 at 09:08:02PM +0800, Osier Yang wrote: The disk def could be free'ed by qemuDomainChangeEjectableMedia for cdrom or floppy disk. This moves the adding and setting before the attaching takes place. And for cdrom floppy disk, if the change is ejecting, removing the existed

Re: [libvirt] [PATCH 3/4] qemu: Don't remove hash entry of other domains

2013-02-11 Thread Daniel P. Berrange
On Fri, Feb 08, 2013 at 09:08:01PM +0800, Osier Yang wrote: qemuProcessStart invokes qemuProcessStop when fails, to avoid removing hash entry which belongs to other domain(s), this introduces a new virBitmapPtr argument for qemuProcessStop. And qemuProcessStart sets the bit for the disk only

Re: [libvirt] [PATCH 1/4] qemu: Add checking in helpers for sgio setting

2013-02-11 Thread Osier Yang
On 2013年02月11日 18:48, Daniel P. Berrange wrote: On Mon, Feb 11, 2013 at 06:35:42PM +0800, Osier Yang wrote: On 2013年02月09日 04:21, John Ferlan wrote: On 02/08/2013 08:07 AM, Osier Yang wrote: This moves the checking into the helpers, to avoid the callers missing the checking. ---

Re: [libvirt] [PATCH 1/4] qemu: Add checking in helpers for sgio setting

2013-02-11 Thread Daniel P. Berrange
On Mon, Feb 11, 2013 at 07:09:29PM +0800, Osier Yang wrote: On 2013年02月11日 18:48, Daniel P. Berrange wrote: On Mon, Feb 11, 2013 at 06:35:42PM +0800, Osier Yang wrote: On 2013年02月09日 04:21, John Ferlan wrote: On 02/08/2013 08:07 AM, Osier Yang wrote: This moves the checking into the helpers,

Re: [libvirt] [PATCH 1/4] qemu: Add checking in helpers for sgio setting

2013-02-11 Thread Osier Yang
On 2013年02月11日 19:14, Daniel P. Berrange wrote: On Mon, Feb 11, 2013 at 07:09:29PM +0800, Osier Yang wrote: On 2013年02月11日 18:48, Daniel P. Berrange wrote: On Mon, Feb 11, 2013 at 06:35:42PM +0800, Osier Yang wrote: On 2013年02月09日 04:21, John Ferlan wrote: On 02/08/2013 08:07 AM, Osier Yang

Re: [libvirt] [PATCH 3/4] qemu: Don't remove hash entry of other domains

2013-02-11 Thread Osier Yang
On 2013年02月09日 05:09, John Ferlan wrote: On 02/08/2013 08:08 AM, Osier Yang wrote: qemuProcessStart invokes qemuProcessStop when fails, to avoid removing hash entry which belongs to other domain(s), this introduces a new virBitmapPtr argument for qemuProcessStop. And qemuProcessStart sets the

Re: [libvirt] [PATCH 4/4] qemu: Move shared disk entry adding and unpriv_sgio seting

2013-02-11 Thread Osier Yang
On 2013年02月11日 18:55, Daniel P. Berrange wrote: On Fri, Feb 08, 2013 at 09:08:02PM +0800, Osier Yang wrote: The disk def could be free'ed by qemuDomainChangeEjectableMedia for cdrom or floppy disk. This moves the adding and setting before the attaching takes place. And for cdrom floppy disk, if

Re: [libvirt] [PATCH 3/4] qemu: Don't remove hash entry of other domains

2013-02-11 Thread Osier Yang
On 2013年02月11日 18:59, Daniel P. Berrange wrote: On Fri, Feb 08, 2013 at 09:08:01PM +0800, Osier Yang wrote: qemuProcessStart invokes qemuProcessStop when fails, to avoid removing hash entry which belongs to other domain(s), this introduces a new virBitmapPtr argument for qemuProcessStop. And

Re: [libvirt] [PATCH 4/4] Remove qemuDriverLock from almost everywhere

2013-02-11 Thread Daniel P. Berrange
On Thu, Feb 07, 2013 at 05:46:38PM +, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com With the majority of fields in the virQEMUDriverPtr struct now immutable or self-locking, there is no need for practically any methods to be using the QEMU driver lock. Only a

Re: [libvirt] Adding new standalone API

2013-02-11 Thread Osier Yang
On 2013年02月11日 14:27, Bilal Ahmad wrote: Hi all, I am learning to hack libvirt and so far for basic things, I am able to get things done. For the advanced things like adding a completely new API, I will need some help from you people. For starters, I have decided to add a custom network API

Re: [libvirt] [PATCH V4 1/3] Add a class for file descriptor sets

2013-02-11 Thread Daniel P. Berrange
On Thu, Feb 07, 2013 at 10:35:14PM -0500, Stefan Berger wrote: Rather than passing the next-to-use file descriptor set Id and the hash table for rembering the mappings of aliases to file descriptor sets around, encapsulate the two in a class. Signed-off-by: Stefan Berger

Re: [libvirt] [PATCH V4 2/3] Introduce file descriptor set for QEMU domains

2013-02-11 Thread Daniel P. Berrange
On Thu, Feb 07, 2013 at 10:35:15PM -0500, Stefan Berger wrote: Extend the QEMU private domain structure with virFdset. Persist the virFdset using XML and parse its XML. Reset the fdset upon domain stop. Stefan Berger stef...@linux.vnet.ibm.com --- src/qemu/qemu_domain.c | 10

Re: [libvirt] [PATCH V4 3/3] Add support for file descriptor sets

2013-02-11 Thread Daniel P. Berrange
On Thu, Feb 07, 2013 at 10:35:16PM -0500, Stefan Berger wrote: Add support for file descriptor sets by converting some of the command line parameters to use /dev/fdset/%d if -add-fd is found to be supported by QEMU. For those devices libvirt now open()s the device to obtain the file

Re: [libvirt] [PATCH] qemu: Fix potential crash when attaching/detaching cdrom or floppy

2013-02-11 Thread Osier Yang
On 2013年02月09日 06:23, Eric Blake wrote: On 02/07/2013 06:21 AM, Osier Yang wrote: The crash could happen if the disk source is empty for cdrom or floppy disk. --- src/qemu/qemu_driver.c |7 +-- src/qemu/qemu_process.c |3 +++ 2 files changed, 8 insertions(+), 2 deletions(-)

[libvirt] [PATCH 1/2] virsh-snapshot: Refactor some details in virsh snapshot-create-as

2013-02-11 Thread Peter Krempa
This patch simplifies the creation of XML, some error paths and adds correct approach to check for virBuffer errors. --- tools/virsh-snapshot.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c index

[libvirt] [PATCH 0/2] virsh: Two small fixes for snapshot-create-as

2013-02-11 Thread Peter Krempa
Peter Krempa (2): virsh-snapshot: Refactor some details in virsh snapshot-create-as virsh-snapshot: Reject --no-metadata together with --print-xml tools/virsh-snapshot.c | 27 +++ 1 file changed, 15 insertions(+), 12 deletions(-) -- 1.8.1.1 -- libvir-list mailing

[libvirt] [PATCH 2/2] virsh-snapshot: Reject --no-metadata together with --print-xml

2013-02-11 Thread Peter Krempa
Manual for virsh snapshot-create-as states that --no-metadata and --print-xml are incompatible. Honor this detail in the code. --- tools/virsh-snapshot.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c index

Re: [libvirt] [PATCH 4/4 v5] virsh: Use virNodeDeviceLookupSCSIHostByWWN

2013-02-11 Thread Osier Yang
On 2013年02月07日 23:09, Daniel P. Berrange wrote: On Mon, Feb 04, 2013 at 10:16:44PM +0800, Osier Yang wrote: Only nodedev-destroy and nodedev-dumpxml can benifit from the new API, other commands like nodedev-detach only works for PCI devices, WWN makes no sense for them. Is that really correct

Re: [libvirt] [PATCH 4/4 v5] virsh: Use virNodeDeviceLookupSCSIHostByWWN

2013-02-11 Thread Daniel P. Berrange
On Mon, Feb 11, 2013 at 09:16:32PM +0800, Osier Yang wrote: On 2013年02月07日 23:09, Daniel P. Berrange wrote: On Mon, Feb 04, 2013 at 10:16:44PM +0800, Osier Yang wrote: Only nodedev-destroy and nodedev-dumpxml can benifit from the new API, other commands like nodedev-detach only works for PCI

Re: [libvirt] [PATCH 4/4 v5] virsh: Use virNodeDeviceLookupSCSIHostByWWN

2013-02-11 Thread Osier Yang
On 2013年02月11日 21:18, Daniel P. Berrange wrote: On Mon, Feb 11, 2013 at 09:16:32PM +0800, Osier Yang wrote: On 2013年02月07日 23:09, Daniel P. Berrange wrote: On Mon, Feb 04, 2013 at 10:16:44PM +0800, Osier Yang wrote: Only nodedev-destroy and nodedev-dumpxml can benifit from the new API, other

Re: [libvirt] [PATCH 4/4 v5] virsh: Use virNodeDeviceLookupSCSIHostByWWN

2013-02-11 Thread Daniel P. Berrange
On Mon, Feb 04, 2013 at 10:16:44PM +0800, Osier Yang wrote: Only nodedev-destroy and nodedev-dumpxml can benifit from the new API, other commands like nodedev-detach only works for PCI devices, WWN makes no sense for them. --- Rebased on Peter's virsh cleanup patches. ---

Re: [libvirt] [PATCH 1/2] virsh-snapshot: Refactor some details in virsh snapshot-create-as

2013-02-11 Thread Osier Yang
On 2013年02月11日 21:10, Peter Krempa wrote: This patch simplifies the creation of XML, some error paths and adds correct approach to check for virBuffer errors. --- tools/virsh-snapshot.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git

Re: [libvirt] libvirt and Parallels Cloud Storage

2013-02-11 Thread Alexander Gordeev
В Mon, 11 Feb 2013 09:57:05 + Daniel P. Berrange berra...@redhat.com пишет: On Sun, Feb 10, 2013 at 02:20:02AM +0400, Alexander Gordeev wrote: В Thu, 7 Feb 2013 16:09:31 + Daniel P. Berrange berra...@redhat.com пишет: It's not a POSIX FS but there is a FUSE client for it that

Re: [libvirt] [PATCH 2/2] virsh-snapshot: Reject --no-metadata together with --print-xml

2013-02-11 Thread Osier Yang
On 2013年02月11日 21:10, Peter Krempa wrote: Manual for virsh snapshot-create-as states that --no-metadata and --print-xml are incompatible. Honor this detail in the code. --- tools/virsh-snapshot.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/virsh-snapshot.c

[libvirt] libvirtd (from git) no longer responds to 'kill'

2013-02-11 Thread Richard W.M. Jones
It used to be that you could kill a session libvirtd using eg: killall libvirtd lt-libvirtd However with upstream libvirt from git today, this no longer appears to work: $ ps ax | grep libvirtd 4240 ?Ssl0:05 /usr/sbin/libvirtd 18492 ?Sl 0:00

[libvirt] [PATCH v3 0/2] net: support set public ip for forward mode nat

2013-02-11 Thread Natanael Copa
Rebased patch[1]. Changes v3: - remove support for nat address='1.2.3.4'/ format, the 2/4 patch[2]. [1] http://www.redhat.com/archives/libvir-list/2013-February/msg00088.html [2] http://www.redhat.com/archives/libvir-list/2013-February/msg00090.html Natanael Copa (2): net: support set public

[libvirt] [PATCH v3 1/2] net: support set public ip range for forward mode nat

2013-02-11 Thread Natanael Copa
Support setting which public ip to use for NAT via attribute address in subelement nat in forward: ... forward mode='nat' address start='1.2.3.4' end='1.2.3.10'/ /forward ... This will construct an iptables line using: '-j SNAT --to-source start-end' instead of: '-j MASQUERADE'

Re: [libvirt] libvirtd (from git) no longer responds to 'kill'

2013-02-11 Thread Richard W.M. Jones
This seems to be some sort of deadlock, easily reproduced by running the libguestfs test suite, or even just 'libguestfs-test-tool'. Here is a stack trace: (gdb) t a a bt Thread 11 (Thread 0x7fe6505d7700 (LWP 20021)): #0 pthread_cond_wait@@GLIBC_2.3.2 () at

[libvirt] [PATCH v3 2/2] net: add support for specifying port range for forward mode nat

2013-02-11 Thread Natanael Copa
Let users set the port range to be used for forward mode NAT: ... forward mode='nat' nat port start='1024' end='65535'/ /nat /forward ... Signed-off-by: Natanael Copa nc...@alpinelinux.org --- docs/formatnetwork.html.in | 21 ++--- src/conf/network_conf.c | 57

Re: [libvirt] [PATCH v2 2/4] net: support set public ip for forward mode nat

2013-02-11 Thread Natanael Copa
On Fri, 8 Feb 2013 17:25:11 + Daniel P. Berrange berra...@redhat.com wrote: On Mon, Feb 04, 2013 at 10:45:24AM +0100, Natanael Copa wrote: Support setting which public ip to use for NAT via attribute address in subelement nat in forward: ... forward mode='nat' nat

[libvirt] [PATCH] Remove re-entrant API call in SELinux/AppArmor security managers

2013-02-11 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The security manager drivers are not allowed to call back out to top level security manager APIs, since that results in recursive mutex acquisition and thus deadlock. Remove calls to virSecurityManagerGetModel from SELinux / AppArmor drivers

Re: [libvirt] libvirtd (from git) no longer responds to 'kill'

2013-02-11 Thread Daniel P. Berrange
On Mon, Feb 11, 2013 at 02:02:21PM +, Richard W.M. Jones wrote: This seems to be some sort of deadlock, easily reproduced by running the libguestfs test suite, or even just 'libguestfs-test-tool'. Here is a stack trace: (gdb) t a a bt Thread 8 (Thread 0x7fe64edd4700 (LWP 20024)):

Re: [libvirt] [PATCH] Remove re-entrant API call in SELinux/AppArmor security managers

2013-02-11 Thread Richard W.M. Jones
On Mon, Feb 11, 2013 at 02:26:15PM +, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The security manager drivers are not allowed to call back out to top level security manager APIs, since that results in recursive mutex acquisition and thus deadlock. Remove

Re: [libvirt] [PATCH 4/4 v5] virsh: Use virNodeDeviceLookupSCSIHostByWWN

2013-02-11 Thread Osier Yang
On 2013年02月11日 21:33, Daniel P. Berrange wrote: On Mon, Feb 04, 2013 at 10:16:44PM +0800, Osier Yang wrote: Only nodedev-destroy and nodedev-dumpxml can benifit from the new API, other commands like nodedev-detach only works for PCI devices, WWN makes no sense for them. --- Rebased on Peter's

[libvirt] [PATCH v4 0/2] net: support set source address(es) and ports for NAT

2013-02-11 Thread Natanael Copa
Changes v4: - barf if 'end' attribute is missing in address - update doc to tell how to properly set single address Natanael Copa (2): net: support set public ip range for forward mode nat net: add support for specifying port range for forward mode nat docs/formatnetwork.html.in | 33

[libvirt] [PATCH v4 1/2] net: support set public ip range for forward mode nat

2013-02-11 Thread Natanael Copa
Support setting which public ip to use for NAT via attribute address in subelement nat in forward: ... forward mode='nat' address start='1.2.3.4' end='1.2.3.10'/ /forward ... This will construct an iptables line using: '-j SNAT --to-source start-end' instead of: '-j MASQUERADE'

[libvirt] [PATCH v4 2/2] net: add support for specifying port range for forward mode nat

2013-02-11 Thread Natanael Copa
Let users set the port range to be used for forward mode NAT: ... forward mode='nat' nat port start='1024' end='65535'/ /nat /forward ... Signed-off-by: Natanael Copa nc...@alpinelinux.org --- docs/formatnetwork.html.in | 21 ++--- src/conf/network_conf.c | 57

Re: [libvirt] [PATCH 4/4 v5] virsh: Use virNodeDeviceLookupSCSIHostByWWN

2013-02-11 Thread Osier Yang
On 2013年02月11日 22:51, Osier Yang wrote: On 2013年02月11日 21:33, Daniel P. Berrange wrote: On Mon, Feb 04, 2013 at 10:16:44PM +0800, Osier Yang wrote: Only nodedev-destroy and nodedev-dumpxml can benifit from the new API, other commands like nodedev-detach only works for PCI devices, WWN makes no

Re: [libvirt] [PATCH 00/11] Revisit xen driver Coverity cleanup changes

2013-02-11 Thread John Ferlan
Thanks for the reviews - this is now pushed John -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCHv2 1/5] S390: Documentation for CCW address type

2013-02-11 Thread Daniel P. Berrange
On Fri, Feb 08, 2013 at 06:32:20PM +0100, Viktor Mihajlovski wrote: The native bus for s390 I/O is called CCW (channel command word). As QEMU has added basic support for the CCW bus, i.e. the ability to assign CCW devnos (bus addresses) to devices. Domains with the new machine type

Re: [libvirt] [PATCHv2 2/5] S390: domain_conf support for CCW

2013-02-11 Thread Daniel P. Berrange
On Fri, Feb 08, 2013 at 06:32:21PM +0100, Viktor Mihajlovski wrote: Add necessary handling code for the new s390 CCW address type to virDomainDeviceInfo. Further, introduce memory management, XML parsing, output formatting and range validation for the new virDomainDeviceCCWAddress type.

Re: [libvirt] [PATCHv2 3/5] S390: QEMU driver support for CCW addresses

2013-02-11 Thread Daniel P. Berrange
On Fri, Feb 08, 2013 at 06:32:22PM +0100, Viktor Mihajlovski wrote: This commit adds the QEMU driver support for CCW addresses. The current QEMU only allows virtio devices to be attached to the CCW bus. We named the new capability indicating that support QEMU_CAPS_VIRTIO_CCW accordingly.

Re: [libvirt] [PATCH] Remove re-entrant API call in SELinux/AppArmor security managers

2013-02-11 Thread Eric Blake
On 02/11/2013 07:50 AM, Richard W.M. Jones wrote: On Mon, Feb 11, 2013 at 02:26:15PM +, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The security manager drivers are not allowed to call back out to top level security manager APIs, since that results in recursive

[libvirt] [PATCH] hypervisor: Restore pm initialization

2013-02-11 Thread John Ferlan
Adjustment for 'c059cdeaf' due to older compiler complaint about pm not being initialized even though the j7 == 0 does the trick. --- src/xen/xen_hypervisor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c index

[libvirt] [PATCH] Fix potential deadlock across fork() in QEMU driver

2013-02-11 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The hook scripts used by virCommand must be careful wrt accessing any mutexes that may have been held by other threads in the parent process. With the recent refactorigng there are 2 potential flaws lurking, which will become real deadlock bugs once

[libvirt] [PATCH V5 3/3] Add support for file descriptor sets

2013-02-11 Thread Stefan Berger
Add support for file descriptor sets by converting some of the command line parameters to use /dev/fdset/%d if -add-fd is found to be supported by QEMU. For those devices libvirt now open()s the device to obtain the file descriptor and 'transfers' the fd using virCommand. For the following

[libvirt] [PATCH] Check if classes are derived from object

2013-02-11 Thread Guido Günther
This makes sure we don't regress to old style classes --- Just a minor addition that came up while verifying if the corresponding Debian bug is fixed. python/sanitytest.py | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/python/sanitytest.py

[libvirt] [PATCH V5 1/3] Add a class for file descriptor sets

2013-02-11 Thread Stefan Berger
Rather than passing the next-to-use file descriptor set Id and the hash table for rembering the mappings of aliases to file descriptor sets around, encapsulate the two in a class. Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- v4-v5: - followed Daniel Berrange's comments -

[libvirt] [PATCH V5 0/3] Add support for QEMU file descriptor sets

2013-02-11 Thread Stefan Berger
The following patch series adds initial support for QEMU file descriptor sets implementing support for creating the proper command line. Some devices are using the sets now. Regards, Stefan -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] Check if classes are derived from object

2013-02-11 Thread Daniel P. Berrange
On Mon, Feb 11, 2013 at 05:20:31PM +0100, Guido Günther wrote: This makes sure we don't regress to old style classes --- Just a minor addition that came up while verifying if the corresponding Debian bug is fixed. python/sanitytest.py | 27 --- 1 file changed, 16

[libvirt] [PATCH V5 2/3] Introduce file descriptor set for QEMU domains

2013-02-11 Thread Stefan Berger
Extend the QEMU private domain structure with virFdSet. Persist the virFdSet using XML and parse its XML. Reset the FdSet upon domain stop. Stefan Berger stef...@linux.vnet.ibm.com --- src/qemu/qemu_domain.c | 13 + src/qemu/qemu_domain.h |3 +++ src/qemu/qemu_process.c |

Re: [libvirt] [PATCH] hypervisor: Restore pm initialization

2013-02-11 Thread Osier Yang
On 2013年02月12日 00:03, John Ferlan wrote: Adjustment for 'c059cdeaf' due to older compiler complaint about pm not being initialized even though the j7 == 0 does the trick. --- src/xen/xen_hypervisor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xen/xen_hypervisor.c

Re: [libvirt] [PATCH] hypervisor: Restore pm initialization

2013-02-11 Thread Osier Yang
On 2013年02月12日 00:27, Osier Yang wrote: On 2013年02月12日 00:03, John Ferlan wrote: Adjustment for 'c059cdeaf' due to older compiler complaint about pm not being initialized even though the j7 == 0 does the trick. --- src/xen/xen_hypervisor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[libvirt] [PATCH] Release VM lock before acquiring virDomainObjListPtr lock

2013-02-11 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com When removing a VM from the virDomainObjListPtr, we must not be holding the VM lock while acquiring the list lock. Re-order code to ensure that we can release the VM lock early. --- src/conf/domain_conf.c | 3 +-- 1 file changed, 1 insertion(+), 2

Re: [libvirt] [PATCH] Release VM lock before acquiring virDomainObjListPtr lock

2013-02-11 Thread Osier Yang
On 2013年02月12日 00:46, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com When removing a VM from the virDomainObjListPtr, we must not be holding the VM lock while acquiring the list lock. Re-order code to ensure that we can release the VM lock early. ---

Re: [libvirt] [PATCH v2] Remove qemuDriverLock from almost everywhere

2013-02-11 Thread Daniel P. Berrange
On Mon, Feb 11, 2013 at 04:47:29PM +, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com With the majority of fields in the virQEMUDriverPtr struct now immutable or self-locking, there is no need for practically any methods to be using the QEMU driver lock. Only a

Re: [libvirt] [PATCH v2] Remove qemuDriverLock from almost everywhere

2013-02-11 Thread Daniel P. Berrange
On Mon, Feb 11, 2013 at 04:59:24PM +, Daniel P. Berrange wrote: On Mon, Feb 11, 2013 at 04:47:29PM +, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com With the majority of fields in the virQEMUDriverPtr struct now immutable or self-locking, there is no need

Re: [libvirt] [PATCH 11/11] hypervisor: Revisit Coverity issues regarding cpumap

2013-02-11 Thread Eric Blake
On 01/30/2013 11:51 AM, John Ferlan wrote: Turns out the issue regarding ptr_arith and sign_exension weren't false positives. When shifting an 'unsigned char' as a target, it gets promoted to an 'int'; however, that 'int' cannot be shifted 32 bits which was how the algorithm was written. For

Re: [libvirt] [PATCHv2 3/5] S390: QEMU driver support for CCW addresses

2013-02-11 Thread Viktor Mihajlovski
On 02/11/2013 04:40 PM, Daniel P. Berrange wrote: I'm not a fan of this approach. The capabilities data is reflecting what the QEMU binary is capable of supporting, *regardless* of what guest config is chosen. not convinced this is the best possible definition ... we would have seen more

Re: [libvirt] [PATCHv2 3/5] S390: QEMU driver support for CCW addresses

2013-02-11 Thread Daniel P. Berrange
To clarify my earlier reply - my point is that in the following method: On Fri, Feb 08, 2013 at 06:32:22PM +0100, Viktor Mihajlovski wrote: +/* + * Three steps populating CCW devnos + * 1. Allocate empty address set + * 2. Gather addresses with explicit devno + * 3. Assign defaults to the

Re: [libvirt] [PATCH 3/4] qemu: Don't remove hash entry of other domains

2013-02-11 Thread Daniel P. Berrange
On Mon, Feb 11, 2013 at 07:37:14PM +0800, Osier Yang wrote: On 2013年02月11日 18:59, Daniel P. Berrange wrote: On Fri, Feb 08, 2013 at 09:08:01PM +0800, Osier Yang wrote: qemuProcessStart invokes qemuProcessStop when fails, to avoid removing hash entry which belongs to other domain(s), this

Re: [libvirt] [PATCHv2 3/5] S390: QEMU driver support for CCW addresses

2013-02-11 Thread Viktor Mihajlovski
On 02/11/2013 06:41 PM, Daniel P. Berrange wrote: To clarify my earlier reply - my point is that in the following method: Thanks Daniel ... no clarification needed here. :-) -- Mit freundlichen Grüßen/Kind Regards Viktor Mihajlovski IBM Deutschland Research Development GmbH

Re: [libvirt] [PATCH] Fix potential deadlock across fork() in QEMU driver

2013-02-11 Thread Eric Blake
On 02/11/2013 09:12 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The hook scripts used by virCommand must be careful wrt accessing any mutexes that may have been held by other threads in the parent process. With the recent refactorigng

Re: [libvirt] [PATCH] Fix potential deadlock across fork() in QEMU driver

2013-02-11 Thread Osier Yang
On 2013年02月12日 00:12, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com The hook scripts used by virCommand must be careful wrt accessing any mutexes that may have been held by other threads in the parent process. With the recent refactorigng s/refactorigng/refactoring/,

Re: [libvirt] [PATCH 3/4] qemu: Don't remove hash entry of other domains

2013-02-11 Thread Osier Yang
On 2013年02月12日 01:44, Daniel P. Berrange wrote: On Mon, Feb 11, 2013 at 07:37:14PM +0800, Osier Yang wrote: On 2013年02月11日 18:59, Daniel P. Berrange wrote: On Fri, Feb 08, 2013 at 09:08:01PM +0800, Osier Yang wrote: qemuProcessStart invokes qemuProcessStop when fails, to avoid removing hash

Re: [libvirt] [PATCH] Check if classes are derived from object

2013-02-11 Thread Guido Günther
On Mon, Feb 11, 2013 at 04:24:15PM +, Daniel P. Berrange wrote: On Mon, Feb 11, 2013 at 05:20:31PM +0100, Guido Günther wrote: This makes sure we don't regress to old style classes --- Just a minor addition that came up while verifying if the corresponding Debian bug is fixed.

[libvirt] [PATCH] Avoid cast to unit64_t on 32bit platform

2013-02-11 Thread Guido Günther
Fixes compilation on 32bit platforms: xen/xen_hypervisor.c: In function 'virXen_setvcpumap': xen/xen_hypervisor.c:1785:35: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] xen/xen_hypervisor.c:1785:22: error: cast to pointer from integer of different size

Re: [libvirt] [PATCH] Avoid cast to unit64_t on 32bit platform

2013-02-11 Thread Eric Blake
On 02/11/2013 12:40 PM, Guido Günther wrote: Fixes compilation on 32bit platforms: xen/xen_hypervisor.c: In function 'virXen_setvcpumap': xen/xen_hypervisor.c:1785:35: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] xen/xen_hypervisor.c:1785:22: error:

[libvirt] [PATCH] build: fix make check of remote_protocol-structs

2013-02-11 Thread Laine Stump
Broken by incorrect formatting / spelling of remote_nonnull in commit 39758e7567b766f1df3948ea671d6ccb93daf7a9 --- Pushed under build breaker rule src/remote_protocol-structs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/remote_protocol-structs

Re: [libvirt] Google Summer of Code 2013 ideas wiki open

2013-02-11 Thread Stefan Hajnoczi
On Thu, Feb 7, 2013 at 4:19 PM, Stefan Hajnoczi stefa...@gmail.com wrote: I believe Google will announce GSoC again this year (there is no guarantee though) and I have created the wiki page so we can begin organizing project ideas that students can choose from. Google Summer of Code 2013 has

[libvirt] [PATCH] regex: gnulib guarantees that we have regex support

2013-02-11 Thread Eric Blake
No need to use HAVE_REGEX_H - our use of gnulib guarantees that the header exists and works, regardless of platform. Similarly, we can unconditionally assume a compiling sys/wait.h (although the mingw version of this header is not full-featured). * src/storage/storage_backend.c: Drop useless

[libvirt] [PATCH] build: fix VPATH testsuite

2013-02-11 Thread Eric Blake
'make check' has been failing on VPATH builds since commit 907a39e7. The tests already had magic for munging path names, but were munging to the wrong location, thus working only on an in-tree build. * tests/securityselinuxlabeltest.c (testSELinuxMungePath): Munge to correct path. --- Pushing

[libvirt] [PATCHv3 0/3] S390: Finish support for native CCW bus

2013-02-11 Thread Viktor Mihajlovski
Originally, QEMU did not implement a native I/O bus for s390. The initial implementation had a machine type 's390-virtio' featuring a fully paravirtualized I/O system with an artificial bus type 'virtio-s390'. This bus had a number of short-comings, like the need for a non-standard device

[libvirt] [PATCHv3 3/3] S390: Testcases for virtio-ccw machines

2013-02-11 Thread Viktor Mihajlovski
This adds and corrects testcases for virtio devices on s390 guests. Signed-off-by: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com --- V2 Changes - adapt the testcase XML files to use the new attributes - use different variations for the values: hex, decimal, leading zeroes... V3 Changes - add

[libvirt] [PATCHv3 2/3] S390: Add hotplug support for s390 virtio devices

2013-02-11 Thread Viktor Mihajlovski
From: J.B. Joret j...@linux.vnet.ibm.com We didn't yet expose the virtio device attach and detach functionality for s390 domains as the device hotplug was very limited with the old virtio-s390 bus. With the CCW bus there's full hotplug support for virtio devices in QEMU, so we are adding this to

[libvirt] [PATCHv3 1/3] S390: QEMU driver support for CCW addresses

2013-02-11 Thread Viktor Mihajlovski
This commit adds the QEMU driver support for CCW addresses. The current QEMU only allows virtio devices to be attached to the CCW bus. We named the new capability indicating that support QEMU_CAPS_VIRTIO_CCW accordingly. The fact that CCW devices can only be assigned to domains with a machine

Re: [libvirt] [PATCHv2 2/5] S390: domain_conf support for CCW

2013-02-11 Thread Eric Blake
On 02/11/2013 08:36 AM, Daniel P. Berrange wrote: On Fri, Feb 08, 2013 at 06:32:21PM +0100, Viktor Mihajlovski wrote: Add necessary handling code for the new s390 CCW address type to virDomainDeviceInfo. Further, introduce memory management, XML parsing, output formatting and range validation

Re: [libvirt] [PATCH 11/11] hypervisor: Revisit Coverity issues regarding cpumap

2013-02-11 Thread Eric Blake
On 02/11/2013 10:24 AM, Eric Blake wrote: On 01/30/2013 11:51 AM, John Ferlan wrote: Turns out the issue regarding ptr_arith and sign_exension weren't false positives. When shifting an 'unsigned char' as a target, it gets promoted to an 'int'; however, that 'int' cannot be shifted 32 bits

[libvirt] [PATCH 1/3] util: add virendian.h macros

2013-02-11 Thread Eric Blake
We have several cases where we need to read endian-dependent data regardless of host endianness; rather than open-coding these call sites, it will be nicer to funnel things through a macro. The virendian.h file can be expanded to add writer functions, and/or 16-bit access patterns, if needed.

[libvirt] [PATCH 0/3] add virendian.h, and use it to kill xen cpumap issue

2013-02-11 Thread Eric Blake
Not only does this solve the compiler warning on 32-bit machines, but it completely gets rid of what looks like bogus pointer aliasing, all while reducing the number of lines in xen_hypervisor.c. Eric Blake (3): util: add virendian.h macros util: use new virendian.h macros xen: clean up the

[libvirt] [PATCH 2/3] util: use new virendian.h macros

2013-02-11 Thread Eric Blake
This makes code easier to read, by avoiding lines longer than 80 columns and removing the repetition from the callers. * src/util/virstoragefile.c (qedGetHeaderUL, qedGetHeaderULL): Delete in favor of more generic macros. (qcow2GetBackingStoreFormat, qcowXGetBackingStore) (qedGetBackingStore,

[libvirt] [PATCH 3/3] xen: clean up the mess with cpumap

2013-02-11 Thread Eric Blake
Commit 8b55992f added some Coverity comments to silence what was a real bug in the code. Since then, we've had a miserable run of trying to fix the underlying problem (commits c059cde and ba5193c), and still have a problem on 32-bit machines. This fixes the problem for once and for all, by

[libvirt] [PATCH] build: fix compilation of selinux on RHEL 5

2013-02-11 Thread Eric Blake
On RHEL 5, I got: security/security_selinux.c: In function 'getContext': security/security_selinux.c:971: warning: unused parameter 'mgr' [-Wunused-parameter] * src/security/security_selinux.c (getContext): Mark potentially unused parameter. --- Pushing under the build-breaker rule.

Re: [libvirt] [PATCH 1/3] util: add virendian.h macros

2013-02-11 Thread John Ferlan
On 02/11/2013 07:07 PM, Eric Blake wrote: We have several cases where we need to read endian-dependent data regardless of host endianness; rather than open-coding these call sites, it will be nicer to funnel things through a macro. The virendian.h file can be expanded to add writer

Re: [libvirt] [PATCH 2/3] util: use new virendian.h macros

2013-02-11 Thread John Ferlan
On 02/11/2013 07:07 PM, Eric Blake wrote: This makes code easier to read, by avoiding lines longer than 80 columns and removing the repetition from the callers. * src/util/virstoragefile.c (qedGetHeaderUL, qedGetHeaderULL): Delete in favor of more generic macros.

Re: [libvirt] [PATCH 3/3] xen: clean up the mess with cpumap

2013-02-11 Thread John Ferlan
On 02/11/2013 07:07 PM, Eric Blake wrote: Commit 8b55992f added some Coverity comments to silence what was a real bug in the code. Since then, we've had a miserable run of trying to fix the underlying problem (commits c059cde and ba5193c), and still have a problem on 32-bit machines. This