[libvirt] Entering freeze for libvirt-1.0.5

2013-04-26 Thread Daniel Veillard
So as discussed earlier this week, I have tagged the release candidate 1 of libvirt-1.0.5 in git and pushed the tarball and associated rpms to the FTP at: ftp://libvirt.org/libvirt/ We may still push some of the patches needed by Laine to finish the serie started yesterday, but at this point

Re: [libvirt] Entering freeze for libvirt-1.0.5

2013-04-26 Thread Ruben Kerkhof
On Fri, Apr 26, 2013 at 10:09 AM, Daniel Veillard veill...@redhat.comwrote: This passed my own small usage tests, but please give it a try. As usual some feedback on portability issues are really welcome too :-) It compiles on OSX 10.8 make check: 1 of 202 tests failed (10 tests were not

Re: [libvirt] [PATCH v2 0/5] Support NBD volumes with LXC containers

2013-04-26 Thread Daniel P. Berrange
On Mon, Apr 22, 2013 at 03:06:13PM +0100, Daniel P. Berrange wrote: A second version of: https://www.redhat.com/archives/libvir-list/2013-March/msg00941.html Aside from the addressing the previous round of feedbac, this adds use of the new '--format' flag to qemu-nbd. This is introduced

Re: [libvirt] [PATCH 1/4] util: new virCommandSetMax(MemLock|Processes|Files)

2013-04-26 Thread Daniel P. Berrange
On Thu, Apr 25, 2013 at 09:44:30PM -0400, Laine Stump wrote: This patch adds two sets of functions: 1) lower level virProcessSet*() functions that will immediately set the RLIMIT_MEMLOCK. RLIMIT_NPROC, or RLIMIT_NOFILE of either the current process (using setrlimit()) or any other process

Re: [libvirt] [PATCH 2/4] qemu: use new virCommandSetMax(Processes|Files)

2013-04-26 Thread Daniel P. Berrange
On Thu, Apr 25, 2013 at 09:44:31PM -0400, Laine Stump wrote: These were previously being set in a custom hook function, but now that virCommand directly supports setting them, we can eliminate that part of the hook and call the APIs directly. --- src/qemu/qemu_process.c | 38

Re: [libvirt] [PATCH 3/4] qemu: set qemu process' RLIMIT_MEMLOCK when VFIO is used

2013-04-26 Thread Daniel P. Berrange
On Thu, Apr 25, 2013 at 09:44:32PM -0400, Laine Stump wrote: VFIO requires all of the guest's memory and IO space to be lockable in RAM. The domain's max_balloon is the maximum amount of memory the domain can have (in KiB). We add a generous 1GiB to that for IO space (still much better than

Re: [libvirt] [PATCH 4/4] qemu: add VFIO devices to cgroup ACL

2013-04-26 Thread Daniel P. Berrange
On Thu, Apr 25, 2013 at 09:44:33PM -0400, Laine Stump wrote: We don't know exactly the names of the VFIO devices that will be needed (and due to hotplug, we can't ever assume we won't need them at all), so we just add an ACL to allow any vfio device - they all have the major number 244

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

2013-04-26 Thread Eric Blake
'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: https://bugzilla.redhat.com/show_bug.cgi?id=956966 * tools/virsh.c

[libvirt] [PATCH 1/3] Change VM cgroup suffix from '{lxc, qemu}.libvirt' to 'libvirt-{lxc, qemu}'

2013-04-26 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Recently we changed to create VM cgroups with the naming pattern $VMNAME.$DRIVER.libvirt. Following discussions with the systemd community it was decided that only having a single '.' in the names is preferrable. So this changes the naming scheme to be

[libvirt] [PATCH 0/3] Honour standards for cgroup naming/escaping

2013-04-26 Thread Daniel P. Berrange
In discussions with the systemd team, we deciced we needed some clearer rules on cgroup naming / escaping, to ensure there are never clashes with filenames owned by the kernel. This series makes the changes required to libvirt -- libvir-list mailing list libvir-list@redhat.com

[libvirt] [PATCH 3/3] Do proper escaping of cgroup resource partitions

2013-04-26 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com If a user cgroup name begins with cgroup., _ or with any of the controllers from /proc/cgroups followed by a dot, then they need to be prefixed with a single underscore. eg if there is an object cpu.service, then this would end up as _cpu.service in

[libvirt] [PATCH 2/3] Ensure all cgroup partitions have a suffix of .partition

2013-04-26 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com If the partition named passed in the XML does not already have a suffix, ensure it gets a '.partition' added to each component. The exceptions are /machine, /user and /system which do not need to have a suffix, since they are fixed partitions at the

Re: [libvirt] Entering freeze for libvirt-1.0.5

2013-04-26 Thread Daniel Veillard
On Fri, Apr 26, 2013 at 10:33:47AM +0200, Ruben Kerkhof wrote: On Fri, Apr 26, 2013 at 10:09 AM, Daniel Veillard veill...@redhat.comwrote: This passed my own small usage tests, but please give it a try. As usual some feedback on portability issues are really welcome too :-) It compiles

Re: [libvirt] [PATCH 1/3] Change VM cgroup suffix from '{lxc, qemu}.libvirt' to 'libvirt-{lxc, qemu}'

2013-04-26 Thread Eric Blake
On 04/26/2013 04:45 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Recently we changed to create VM cgroups with the naming pattern $VMNAME.$DRIVER.libvirt. Following discussions with the systemd community it was decided that only having a single '.' in the names

[libvirt] getgroups failure [was: Entering freeze for libvirt-1.0.5]

2013-04-26 Thread Eric Blake
[adding bug-gnulib] On 04/26/2013 02:33 AM, Ruben Kerkhof wrote: On Fri, Apr 26, 2013 at 10:09 AM, Daniel Veillard veill...@redhat.comwrote: This passed my own small usage tests, but please give it a try. As usual some feedback on portability issues are really welcome too :-) It compiles

Re: [libvirt] [PATCH 2/3] Ensure all cgroup partitions have a suffix of .partition

2013-04-26 Thread Eric Blake
On 04/26/2013 04:45 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com If the partition named passed in the XML does not already have a suffix, ensure it gets a '.partition' added to each component. The exceptions are /machine, /user and /system which do not need to

[libvirt] [PATCH v2] test: Add JSON test for query-tpm-types

2013-04-26 Thread Stefan Berger
Add a test case for query-tpm-models QMP command. Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- tests/qemumonitorjsontest.c | 55 + 1 file changed, 55 insertions(+) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c

Re: [libvirt] [PATCH 3/3] Do proper escaping of cgroup resource partitions

2013-04-26 Thread Eric Blake
On 04/26/2013 04:45 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com If a user cgroup name begins with cgroup., _ or with any of the controllers from /proc/cgroups followed by a dot, then they need to be prefixed with a single underscore. eg if there is an object

Re: [libvirt] [PATCH 3/3] Do proper escaping of cgroup resource partitions

2013-04-26 Thread Eric Blake
On 04/26/2013 05:37 AM, Eric Blake wrote: On 04/26/2013 04:45 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com If a user cgroup name begins with cgroup., _ or with any of the controllers from /proc/cgroups followed by a dot, then they need to be prefixed with a

Re: [libvirt] [PATCH 3/3] Do proper escaping of cgroup resource partitions

2013-04-26 Thread Daniel P. Berrange
On Fri, Apr 26, 2013 at 05:37:24AM -0600, Eric Blake wrote: On 04/26/2013 04:45 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com If a user cgroup name begins with cgroup., _ or with any of the controllers from /proc/cgroups followed by a dot, then they need to

Re: [libvirt] [PATCH 2/3] Ensure all cgroup partitions have a suffix of .partition

2013-04-26 Thread Daniel P. Berrange
On Fri, Apr 26, 2013 at 05:23:40AM -0600, Eric Blake wrote: On 04/26/2013 04:45 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com If the partition named passed in the XML does not already have a suffix, ensure it gets a '.partition' added to each component. The

Re: [libvirt] [PATCH v2] test: Add JSON test for query-tpm-types

2013-04-26 Thread Eric Blake
On 04/26/2013 05:25 AM, Stefan Berger wrote: Add a test case for query-tpm-models QMP command. Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- tests/qemumonitorjsontest.c | 55 + 1 file changed, 55 insertions(+) ACK. -- Eric

[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] [PATCH] virsh: suppress aliases in group help

2013-04-26 Thread Eric Blake
On 04/26/2013 05:54 AM, Ján Tomko wrote: 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

[libvirt] [PATCHv2] rpc: message related sizes enlarged

2013-04-26 Thread Viktor Mihajlovski
From: Daniel Hansel daniel.han...@linux.vnet.ibm.com We have seen an issue on s390x platform where domain XMLs larger than 1MB were used. The define command was finished successfully. The dumpxml command was not successful (i.e. could not encode message payload). Enlarged message related sizes

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

2013-04-26 Thread Eric Blake
On 04/26/2013 05:51 AM, Ján Tomko wrote: When doing XML-to-native conversion, addresses are not assigned. The code building memballon device string assumed they are and s/memballon/memballoon/ returned an error without reporting any error message, leading to: error: An error occurred,

Re: [libvirt] [PATCH 3/3] Do proper escaping of cgroup resource partitions

2013-04-26 Thread Daniel P. Berrange
On Fri, Apr 26, 2013 at 05:37:24AM -0600, Eric Blake wrote: On 04/26/2013 04:45 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com If a user cgroup name begins with cgroup., _ or with any of the controllers from /proc/cgroups followed by a dot, then they need to

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

2013-04-26 Thread Daniel P. Berrange
On Fri, Apr 26, 2013 at 01:51:51PM +0200, Ján Tomko wrote: 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

Re: [libvirt] getgroups failure [was: Entering freeze for libvirt-1.0.5]

2013-04-26 Thread Ruben Kerkhof
Hi Eric, On Fri, Apr 26, 2013 at 1:03 PM, Eric Blake ebl...@redhat.com wrote: Oh, you did narrow in on the test. I haven't seen any recent bug-gnulib traffic that mentions this test failing on OSX, nor do I have easy access to a machine to verify and clean it up myself. Can you help debug

Re: [libvirt] [PATCH-v4 2/2] Support for static routes on a virtual bridge

2013-04-26 Thread Gene Czarcinski
On 04/25/2013 04:37 PM, Laine Stump wrote: On 04/25/2013 04:13 PM, Gene Czarcinski wrote: On 04/25/2013 03:13 PM, Gene Czarcinski wrote: On 04/22/2013 11:59 AM, Laine Stump wrote: address should be optional unless prefix or netmask is non-0, although I've now noticed that won't be handled

Re: [libvirt] [PATCH v2] test: Add JSON test for query-tpm-types

2013-04-26 Thread Stefan Berger
On 04/26/2013 07:42 AM, Eric Blake wrote: On 04/26/2013 05:25 AM, Stefan Berger wrote: Add a test case for query-tpm-models QMP command. Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- tests/qemumonitorjsontest.c | 55 + 1 file

Re: [libvirt] Entering freeze for libvirt-1.0.5

2013-04-26 Thread Viktor Mihajlovski
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 in git and pushed the tarball and associated rpms to the FTP at: ftp://libvirt.org/libvirt/ We may still push some of the patches needed by Laine to

Re: [libvirt] Entering freeze for libvirt-1.0.5

2013-04-26 Thread Daniel Veillard
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 in git and pushed the tarball and associated rpms to the FTP at:

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 there

Re: [libvirt] Entering freeze for libvirt-1.0.5

2013-04-26 Thread Viktor Mihajlovski
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 address to would fail at QEMU level with a message

[libvirt] [PATCH] fix segfault during virsh save in pv guest

2013-04-26 Thread Bamvor Jian Zhang
this patch fix the wrong sequence for fd and timeout register. the sequence was right in dfa1e1dd for fd register, but it changed in e0622ca2. in this patch, set priv, xl_priv in info and increase info-priv ref count before virEventAddHandle. if do this after virEventAddHandle, the fd callback or

[libvirt] [PATCH] S390: Add fake PCI root

2013-04-26 Thread Viktor Mihajlovski
For the time being add a PCI root for s390 to avoid getting issues later on with PCI address checking. I don't want to unconditionally switch off PCI for s390. Signed-off-by: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com --- src/qemu/qemu_domain.c |2 ++ 1 file changed, 2 insertions(+)

Re: [libvirt] Entering freeze for libvirt-1.0.5

2013-04-26 Thread Viktor Mihajlovski
On 04/26/2013 04:44 PM, Ján Tomko wrote: 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)

Re: [libvirt] [PATCH] S390: Add fake PCI root

2013-04-26 Thread Eric Blake
On 04/26/2013 08:52 AM, Viktor Mihajlovski wrote: For the time being add a PCI root for s390 to avoid getting issues later on with PCI address checking. I don't want to unconditionally switch off PCI for s390. Signed-off-by: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com ---

Re: [libvirt] [PATCH] S390: Add fake PCI root

2013-04-26 Thread Daniel P. Berrange
On Fri, Apr 26, 2013 at 04:52:36PM +0200, Viktor Mihajlovski wrote: For the time being add a PCI root for s390 to avoid getting issues later on with PCI address checking. I don't want to unconditionally switch off PCI for s390. NACK. If the s390 machine does not currently have a PCI root,

Re: [libvirt] [PATCH] S390: Add fake PCI root

2013-04-26 Thread Eric Blake
On 04/26/2013 08:57 AM, Eric Blake wrote: On 04/26/2013 08:52 AM, Viktor Mihajlovski wrote: For the time being add a PCI root for s390 to avoid getting issues later on with PCI address checking. I don't want to unconditionally switch off PCI for s390. Signed-off-by: Viktor Mihajlovski

Re: [libvirt] [PATCH] S390: Add fake PCI root

2013-04-26 Thread Viktor Mihajlovski
On 04/26/2013 04:57 PM, Eric Blake wrote: +case VIR_ARCH_S390X: ACK - this is a sane workaround while trying to get a better fix. Will push soon. Thanks! -- Mit freundlichen Grüßen/Kind Regards Viktor Mihajlovski IBM Deutschland Research Development GmbH Vorsitzender des

Re: [libvirt] Entering freeze for libvirt-1.0.5

2013-04-26 Thread Daniel P. Berrange
On Fri, Apr 26, 2013 at 04:56:01PM +0200, Viktor Mihajlovski wrote: On 04/26/2013 04:44 PM, Ján Tomko wrote: 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

Re: [libvirt] [PATCH 0/4] Remaining patches from VFIO series

2013-04-26 Thread Laine Stump
On 04/25/2013 09:44 PM, Laine Stump wrote: I've pushed everything else from all 3 VFIO series. Patch 1/4 in this series had questions from Eric about whether it is the right way to go, or if we want to do something more limited:

[libvirt] ALERT Virtualization Automatic Builder

2013-04-26 Thread berrange
Overall status: failed Start date: Fri Apr 26 2013 Start time: 12:45:58 UTC / 13:45:58 BST Build counter: 1366980358 Build timestamp: 1366980358 URL: http://dhcp74-229.virt.bos.redhat.com/index.html Module: libvirt Status: failed URL: http://dhcp74-229.virt.bos.redhat.com/module-libvirt.html

Re: [libvirt] [PATCH 4/4] qemu: add VFIO devices to cgroup ACL

2013-04-26 Thread Laine Stump
On 04/26/2013 04:52 AM, Daniel P. Berrange wrote: On Thu, Apr 25, 2013 at 09:44:33PM -0400, Laine Stump wrote: We don't know exactly the names of the VFIO devices that will be needed (and due to hotplug, we can't ever assume we won't need them at all), so we just add an ACL to allow any vfio

Re: [libvirt] [PATCH 4/4] qemu: add VFIO devices to cgroup ACL

2013-04-26 Thread Daniel P. Berrange
On Fri, Apr 26, 2013 at 11:16:14AM -0400, Laine Stump wrote: On 04/26/2013 04:52 AM, Daniel P. Berrange wrote: On Thu, Apr 25, 2013 at 09:44:33PM -0400, Laine Stump wrote: We don't know exactly the names of the VFIO devices that will be needed (and due to hotplug, we can't ever assume we

Re: [libvirt] ALERT Virtualization Automatic Builder

2013-04-26 Thread Daniel P. Berrange
On Fri, Apr 26, 2013 at 11:14:48AM -0400, berra...@redhat.com wrote: Overall status: failed Start date: Fri Apr 26 2013 Start time: 12:45:58 UTC / 13:45:58 BST Build counter: 1366980358 Build timestamp: 1366980358 URL: http://dhcp74-229.virt.bos.redhat.com/index.html Module: libvirt

Re: [libvirt] [PATCH 4/4] qemu: add VFIO devices to cgroup ACL

2013-04-26 Thread Laine Stump
On 04/26/2013 11:42 AM, Daniel P. Berrange wrote: On Fri, Apr 26, 2013 at 11:16:14AM -0400, Laine Stump wrote: On 04/26/2013 04:52 AM, Daniel P. Berrange wrote: On Thu, Apr 25, 2013 at 09:44:33PM -0400, Laine Stump wrote: We don't know exactly the names of the VFIO devices that will be needed

Re: [libvirt] [PATCH 4/4] qemu: add VFIO devices to cgroup ACL

2013-04-26 Thread Eric Blake
On 04/26/2013 09:55 AM, Laine Stump wrote: We manage perfectly well to configure ACLs for individual disks that a VM is given without having to wildcard allow every single /dev/sdN disk. That fact that you were able to make the security drivers label the /dev/vfio/n devices correctly, shows

Re: [libvirt] [PATCH] fix segfault during virsh save in pv guest

2013-04-26 Thread Jim Fehlig
Bamvor Jian Zhang wrote: this patch fix the wrong sequence for fd and timeout register. the sequence was right in dfa1e1dd for fd register, but it changed in e0622ca2. in this patch, set priv, xl_priv in info and increase info-priv ref count before virEventAddHandle. if do this after

[libvirt] KVM Forum 2013 Save the Date

2013-04-26 Thread KVM-Forum-2013-PC
KVM is an industry leading open source hypervisor that provides an ideal platform for datacenter virtualization, virtual desktop infrastructure, and cloud computing. Once again, it's time to bring together the community of developers and users that define the KVM ecosystem for our annual

[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,

Re: [libvirt] libvirtd segfault

2013-04-26 Thread Jim Fehlig
AL13N wrote: AL13N wrote: Op woensdag 20 maart 2013 08:42:52 schreef Jim Fehlig: AL13N wrote: Thread 1 (Thread 0x7fdef683b800 (LWP 20522)): #0 0x in ?? () #1 0x7fdee9a72dc7 in libxl_osevent_occurred_timeout (ctx=optimized out,

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

2013-04-26 Thread Eric Blake
On 04/26/2013 11:04 AM, Ján Tomko wrote: --- 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 @@

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

2013-04-26 Thread Daniel P. Berrange
On Fri, Apr 26, 2013 at 07:04:58PM +0200, Ján Tomko wrote: --- 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 @@

[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 in

[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 Eric Blake
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 a test for 'none' controller on s390, which doesn't

Re: [libvirt] [Libvirt-announce] Entering freeze for libvirt-1.0.5

2013-04-26 Thread Justin Clift
On 26/04/2013, at 9:09 AM, Daniel Veillard wrote: So as discussed earlier this week, I have tagged the release candidate 1 of libvirt-1.0.5 in git and pushed the tarball and associated rpms to the FTP at: ftp://libvirt.org/libvirt/ Compiles ok on OSX. Haven't tried anything in more depth

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 a

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

[libvirt] [PATCH 06/10] qemu: Allow the scsi-generic device in cgroup

2013-04-26 Thread Osier Yang
From: Han Cheng hanc.f...@cn.fujitsu.com This adds the scsi-generic device into the device controller's whitelist, so that it's allowed to used by the qemu process. Signed-off-by: Han Cheng hanc.f...@cn.fujitsu.com --- v2.5 - v3: * Only rebasing, and small changes on coding style ---

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

2013-04-26 Thread Osier Yang
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 --- src/qemu/qemu_capabilities.c | 14 -- src/qemu/qemu_capabilities.h

[libvirt] [PATCH 00/10 v3] Support scsi device passthrough via scsi-generic

2013-04-26 Thread Osier Yang
This adds the support for qemu's scsi-generic device, which can be used to passthrough scsi host device. An example of the XML: hostdev mode='subsystem' type='scsi' managed='no' source adapter name='scsi_host7'/ address bus='0' target='0' unit='0'/ /source address

[libvirt] [PATCH 03/10] utils: util functions for scsi hostdev

2013-04-26 Thread Osier Yang
From: Han Cheng hanc.f...@cn.fujitsu.com This patch adds util functions for scsi hostdev. Signed-off-by: Han Cheng hanc.f...@cn.fujitsu.com Signed-off-by: Osier Yang jy...@redhat.com --- v2.5 - v3: * A couple char * to const char * * s/unsigned int readonly/bool readonly/ * Use

[libvirt] [PATCH 08/10] qemu: Refactor helpers for USB device attachment

2013-04-26 Thread Osier Yang
It's better to put the usb related codes into qemuDomainAttachHostUsbDevice instead of qemuDomainAttachHostDevice. And in the old qemuDomainAttachHostDevice, just stealing the usb from driver-activeUsbHostdevs leaks the memory. Though the usb can be reused for virUSBDeviceFileIterate to set up

[libvirt] [PATCH 04/10] qemu: Build qemu command line for scsi host device

2013-04-26 Thread Osier Yang
From: Han Cheng hanc.f...@cn.fujitsu.com Except the scsi host device's controller is lsilogic, mapping between the libvirt attributes and scsi-generic properties is: libvirt qemu - controller bus ($libvirt_controller.0) bus channel

[libvirt] [PATCH 01/10] conf: Introduce XMLs for scsi hostdev

2013-04-26 Thread Osier Yang
From: Han Cheng hanc.f...@cn.fujitsu.com An example of the scsi hostdev XML: hostdev mode='subsystem' type='scsi' source adapter name='scsi_host0'/ address bus='0' target='0' unit='0'/ /source address type='drive' controller='0' bus='0' target='0' unit='7'/

[libvirt] [PATCH 07/10] security: Manage the security label for scsi host device

2013-04-26 Thread Osier Yang
To not introduce more redundant code, helpers are added for both selinux, dac, and apparmor backends. Signed-off-by: Han Cheng hanc.f...@cn.fujitsu.com Signed-off-by: Osier Yang jyang@redhat v2.5 - v3: * Splitted from 8/10 of v2.5 * Don't forget the other backends (DAC, and apparmor) ---

[libvirt] [PATCH 09/10] qemu: Add hotplug support for scsi host device

2013-04-26 Thread Osier Yang
From: Han Cheng hanc.f...@cn.fujitsu.com This adds both attachment and detachment support for scsi host device. Signed-off-by: Han Cheng hanc.f...@cn.fujitsu.com Signed-off-by: Osier Yang jyang@redhat --- v2.5 - v3: * Rebase and small changes. --- src/qemu/qemu_hotplug.c | 146

[libvirt] [PATCH 05/10] qemu: Introduce activeScsiHostdevs list for scsi host devices

2013-04-26 Thread Osier Yang
From: Han Cheng hanc.f...@cn.fujitsu.com Although virtio-scsi supports SCSI PR, the device on host may do not support it. To avoid losing data, we only allow one scsi hostdev to be passthroughed to one live guest, Just like what we do for PCI and USB devices. Signed-off-by: Han Cheng

[libvirt] [PATCH 10/10] conf: Generate address for scsi host device automatically

2013-04-26 Thread Osier Yang
With unknown good reasons, the attribute bus of scsi device address is always set to 0, same for attribute target. (See virDomainDiskDefAssignAddress). Though we might need to change the algrithom to honor bus and target too, it's another story. The address generator for scsi host device in this

Re: [libvirt] [PATCH-v4 2/2] Support for static routes on a virtual bridge

2013-04-26 Thread Gene Czarcinski
On 04/26/2013 09:16 AM, Gene Czarcinski wrote: On 04/25/2013 04:37 PM, Laine Stump wrote: On 04/25/2013 04:13 PM, Gene Czarcinski wrote: On 04/25/2013 03:13 PM, Gene Czarcinski wrote: On 04/22/2013 11:59 AM, Laine Stump wrote: address should be optional unless prefix or netmask is non-0,

[libvirt] [PATCH 1/4] json: support removing a value from an object

2013-04-26 Thread Eric Blake
In an upcoming patch, I need the way to safely transfer a nested virJSON object out of its parent container for independent use, even after the parent is freed. * src/util/virjson.h (virJSONValueObjectRemoveKey): New function. (_virJSONObject, _virJSONArray): Use correct type. *

[libvirt] [PATCH 4/4] qemu: query command line options in QMP

2013-04-26 Thread Eric Blake
Ever since the conversion to using only QMP for probing features of qemu 1.2 and newer, we have been unable to detect features that are added only by additional command line options. For example, we'd like to know if '-machine mem-merge=on' (added in qemu 1.5) is present. To do this, we will

[libvirt] [PATCH 0/4] prepare for qemu 1.5 command-line probing via QMP

2013-04-26 Thread Eric Blake
This series sets up the groundwork to make it easy to add a capability bit in qemu_capabilities based on whether a particular qemu command-line option has a given parameter. Future patches, such as Osier's work to use '-machine mem-merge' when it exists, will benefit from this new probing

[libvirt] [PATCH 3/4] qemu: simplify string cleanup

2013-04-26 Thread Eric Blake
No need to open code a string list cleanup, if we are nice to the caller by guaranteeing a NULL-terminated result. * src/qemu/qemu_monitor_json.c (qemuMonitorJSONGetCPUDefinitions) (qemuMonitorJSONGetCommands, qemuMonitorJSONGetEvents) (qemuMonitorJSONGetObjectTypes,

[libvirt] [PATCH 2/4] qemu: use bool in monitor struct

2013-04-26 Thread Eric Blake
Follows on the heels of other bool cleanups, such as commit 93002b98. * src/qemu/qemu_monitor.h (qemuMonitorOpen, qemuMonitorOpenFD): Update json parameter type. * src/qemu/qemu_monitor.c (qemuMonitorOpen, qemuMonitorOpenFD): Likewise. (_qemuMonitor): Adjust field type. * src/qemu/qemu_domain.h

Re: [libvirt] [PATCH RESENT 01/12] libxl: allow script for any network interface, not only bridge

2013-04-26 Thread Jim Fehlig
Jim Fehlig wrote: Laine Stump wrote: On 04/10/2013 05:10 AM, Daniel P. Berrange wrote: On Wed, Apr 10, 2013 at 04:44:43AM +0200, Marek Marczykowski wrote: This can be useful for route or NAT networks, or any other custom network setup. Especially configuration

Re: [libvirt] [PATCH v2 0/2] qemu: invoke qemu-bridge-helper from libvirtd

2013-04-26 Thread Paolo Bonzini
Il 20/04/2013 11:11, Paolo Bonzini ha scritto: The interface type='bridge' is working mostly because of a peculiar design decision in Linux. Ideally, QEMU would run with an empty capability bounding set and would not be able to do any privileged operation (not even by running a helper

Re: [libvirt] [PATCH 04/10] qemu: Build qemu command line for scsi host device

2013-04-26 Thread Paolo Bonzini
Il 26/04/2013 22:15, Osier Yang ha scritto: --- v2.5 - v3: * Add support for all other controllers, but not only virtio-scsi * Add checking for bus == 0 Don't check for bus == 0, ibmvscsi for example supports buses up to 3. Paolo * Add checking for target == 0 unit = 7 for scsi host

Re: [libvirt] [PATCH v2 0/2] qemu: invoke qemu-bridge-helper from libvirtd

2013-04-26 Thread Eric Blake
On 04/26/2013 03:32 PM, Paolo Bonzini wrote: Il 20/04/2013 11:11, Paolo Bonzini ha scritto: The interface type='bridge' is working mostly because of a peculiar design decision in Linux. Ideally, QEMU would run with an empty capability bounding set and would not be able to do any privileged

Re: [libvirt] [PATCH 05/10] qemu: Introduce activeScsiHostdevs list for scsi host devices

2013-04-26 Thread Paolo Bonzini
Il 26/04/2013 22:15, Osier Yang ha scritto: From: Han Cheng hanc.f...@cn.fujitsu.com Although virtio-scsi supports SCSI PR, the device on host may do not support it. To avoid losing data, we only allow one scsi hostdev to be passthroughed to one live guest, Just like what we do for PCI and

Re: [libvirt] [PATCH 10/10] conf: Generate address for scsi host device automatically

2013-04-26 Thread Paolo Bonzini
Il 26/04/2013 22:15, Osier Yang ha scritto: With unknown good reasons, the attribute bus of scsi device address is always set to 0, same for attribute target. (See virDomainDiskDefAssignAddress). The target is not always equal to zero... Though we might need to change the algrithom to honor

Re: [libvirt] Entering freeze for libvirt-1.0.5

2013-04-26 Thread Paolo Bonzini
Il 26/04/2013 10:09, Daniel Veillard ha scritto: So as discussed earlier this week, I have tagged the release candidate 1 of libvirt-1.0.5 in git and pushed the tarball and associated rpms to the FTP at: ftp://libvirt.org/libvirt/ We may still push some of the patches needed by Laine

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

2013-04-26 Thread Eric Blake
On 04/26/2013 11:50 AM, Ján Tomko wrote: 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.

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

2013-04-26 Thread Eric Blake
On 04/26/2013 10:31 AM, Ján Tomko wrote: 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

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

2013-04-26 Thread Eric Blake
On 04/26/2013 10:31 AM, Ján Tomko wrote: 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 +++

[libvirt] [PATCH 0/2] VFIO bugfix and naming tweak

2013-04-26 Thread Laine Stump
Laine Stump (2): network: support driver name='vfio'/ in network definitions conf: remove extraneous _TYPE from driver backend enums src/conf/domain_conf.c | 6 +++--- src/conf/domain_conf.h | 6 +++--- src/conf/network_conf.c| 39

[libvirt] [PATCH 2/2] conf: remove extraneous _TYPE from driver backend enums

2013-04-26 Thread Laine Stump
This isn't strictly speaking a bugfix, but I realized I'd gotten a bit too verbose when I chose the names for VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_*. This shortens them all a bit. --- src/conf/domain_conf.c | 6 +++--- src/conf/domain_conf.h | 6 +++---

[libvirt] [PATCH 1/2] network: support driver name='vfio'/ in network definitions

2013-04-26 Thread Laine Stump
I remembered to document this bit, but somehow forgot to implement it. This adds driver name='kvm|vfio'/ as a subelement to the forward element of a network (this puts it parallel to the match between mode='hostdev' attribute in a network and type='hostdev' in an interface). Since it's already

Re: [libvirt] [PATCH 1/2] network: support driver name='vfio'/ in network definitions

2013-04-26 Thread Eric Blake
On 04/26/2013 04:35 PM, Laine Stump wrote: I remembered to document this bit, but somehow forgot to implement it. Worth including on 1.0.5, to avoid an incomplete feature introduction. This adds driver name='kvm|vfio'/ as a subelement to the forward element of a network (this puts it

Re: [libvirt] [PATCH 2/2] conf: remove extraneous _TYPE from driver backend enums

2013-04-26 Thread Eric Blake
On 04/26/2013 04:35 PM, Laine Stump wrote: This isn't strictly speaking a bugfix, but I realized I'd gotten a bit too verbose when I chose the names for VIR_DOMAIN_HOSTDEV_PCI_BACKEND_TYPE_*. This shortens them all a bit. --- src/conf/domain_conf.c | 6 +++---

  1   2   >