Re: [libvirt] [PATCH] virsh: fix change-media bug on disk block type

2013-07-23 Thread Guannan Ren
On 07/23/2013 12:20 AM, Eric Blake wrote: On 07/22/2013 01:40 AM, Guannan Ren wrote: Resolves:https://bugzilla.redhat.com/show_bug.cgi?id=923053 When cdrom is block type, the virsh change-media failed to insert source info because virsh uses source block='/dev/sdb'/ while the correct name of

Re: [libvirt] [PATCH] Make locking more debuggable from logs

2013-07-23 Thread Martin Kletzander
On 07/22/2013 06:31 PM, Eric Blake wrote: On 07/22/2013 07:58 AM, Daniel P. Berrange wrote: I'm really inclined to say that anyone wanting todo lock debugging should just use systemtap / dtrace todo it, since it is better in every way. I tend to agree on that point, with one caveat - we

Re: [libvirt] [Xen-devel] [PATCH] libxl: Correctly initialize vcpu bitmap

2013-07-23 Thread Stefan Bader
On 22.07.2013 21:39, Konrad Rzeszutek Wilk wrote: On Mon, Jul 22, 2013 at 12:51:05PM +0200, Stefan Bader wrote: This fixes the basic setup but there is likely more to do if things like manual CPU hirarchy (nodes, cores, threads) to be working. Cross-posting to xen-devel to make sure I am

Re: [libvirt] [PATCH] Add virDBusMessage(Encode,Decode) stubs

2013-07-23 Thread Daniel P. Berrange
On Mon, Jul 22, 2013 at 02:32:49PM -0400, Roman Bogorodskiy wrote: Commit 834c9c94 introduced virDBusMessageEncode and virDBusMessageDecode functions, however corresponding stubs were not added to !WITH_DBUS section, therefore 'make check' started to fail when compiled w/out dbus support like

Re: [libvirt] [PATCH] bridge driver: use more general function names

2013-07-23 Thread Daniel P. Berrange
On Mon, Jul 22, 2013 at 02:14:22PM -0400, Roman Bogorodskiy wrote: Continue preparation for extracting platform-specific parts from bridge_driver: s/Iptables/Firewall/ for firewall related function names. --- src/network/bridge_driver.c | 70 ++---

Re: [libvirt] [PATCH] qemu:Delete sockets which act as UNIX domain socket server

2013-07-23 Thread Daniel P. Berrange
On Fri, Jul 19, 2013 at 02:12:06AM +, Wangyufei (A) wrote: When I shutdown a vm, I found sockets which act as UNIX domain socket server were not deleted. When I add the following code, it work out. Signed-off-by: WangYufei james.wangyu...@huawei.commailto:james.wangyu...@huawei.com

Re: [libvirt] [PATCH] Make locking more debuggable from logs

2013-07-23 Thread Daniel P. Berrange
On Tue, Jul 23, 2013 at 08:34:35AM +0200, Martin Kletzander wrote: On 07/22/2013 06:31 PM, Eric Blake wrote: On 07/22/2013 07:58 AM, Daniel P. Berrange wrote: I'm really inclined to say that anyone wanting todo lock debugging should just use systemtap / dtrace todo it, since it is better in

Re: [libvirt] [Qemu-devel] [Question] why x2apic's set by default without host support(on Nehalem CPU).

2013-07-23 Thread Jiri Denemark
On Tue, Jul 23, 2013 at 10:44:48 +0800, Peter Huang(Peng) wrote: libvirt's host-passthrough uses -cpu host', and it -cpu host enables every feature that can be enabled on the host. From my test results, I found that even when use host-passthrough mode, VM's cpu features are very different

Re: [libvirt] [PATCH] bridge driver: use more general function names

2013-07-23 Thread Ján Tomko
On 07/23/2013 12:15 PM, Daniel P. Berrange wrote: On Mon, Jul 22, 2013 at 02:14:22PM -0400, Roman Bogorodskiy wrote: Continue preparation for extracting platform-specific parts from bridge_driver: s/Iptables/Firewall/ for firewall related function names. --- src/network/bridge_driver.c | 70

Re: [libvirt] [PATCH] Add virDBusMessage(Encode,Decode) stubs

2013-07-23 Thread Ján Tomko
On 07/23/2013 12:15 PM, Daniel P. Berrange wrote: On Mon, Jul 22, 2013 at 02:32:49PM -0400, Roman Bogorodskiy wrote: Commit 834c9c94 introduced virDBusMessageEncode and virDBusMessageDecode functions, however corresponding stubs were not added to !WITH_DBUS section, therefore 'make check'

Re: [libvirt] [Qemu-devel] [Question] why x2apic's set by default without host support(on Nehalem CPU).

2013-07-23 Thread Peter Huang(Peng)
libvirt's host-passthrough uses -cpu host', and it -cpu host enables every feature that can be enabled on the host. From my test results, I found that even when use host-passthrough mode, VM's cpu features are very different from host, this doesn't match what host-passthrough mode's

Re: [libvirt] [PATCH v3 2/7] conf: Introduce new XML tag mode for disk source

2013-07-23 Thread Paolo Bonzini
Il 19/07/2013 14:32, John Ferlan ha scritto: There are two ways to use a iSCSI LUN as disk source for qemu. * The LUN's path as it shows up on host, e.g. /dev/disk/by-path/ip-$ip:3260-iscsi-$iqn-fc18:iscsi.iscsi0-lun-1 * The libiscsi URI from the storage pool source element host

Re: [libvirt] [PATCH v3 4/7] qemu: Translate the iscsi pool/volume disk source

2013-07-23 Thread Paolo Bonzini
Il 22/07/2013 12:30, Osier Yang ha scritto: +def-srcpool-pooltype = pooldef-type; +if (pooldef-type == VIR_STORAGE_POOL_ISCSI) { +/* Default to use the LUN's path on host */ +if (!def-srcpool-mode) +def-srcpool-mode =

Re: [libvirt] [PATCH v3 4/7] qemu: Translate the iscsi pool/volume disk source

2013-07-23 Thread Daniel P. Berrange
On Tue, Jul 23, 2013 at 03:22:54PM +0200, Paolo Bonzini wrote: Il 22/07/2013 12:30, Osier Yang ha scritto: +def-srcpool-pooltype = pooldef-type; +if (pooldef-type == VIR_STORAGE_POOL_ISCSI) { +/* Default to use the LUN's path on host */ +if

Re: [libvirt] [PATCH v5 4/5] storage: Support chap authentication for iscsi pool

2013-07-23 Thread Paolo Bonzini
Il 22/07/2013 22:31, John Ferlan ha scritto: Although the XML for CHAP authentication with plain password was introduced long ago, the function was never implemented. This patch replaces the login/password mechanism by following the 'ceph' (or RBD) model of using a 'username' with a 'secret'

Re: [libvirt] [PATCH v3 4/7] qemu: Translate the iscsi pool/volume disk source

2013-07-23 Thread Paolo Bonzini
Il 23/07/2013 15:26, Daniel P. Berrange ha scritto: Ok, this answers my question. :) I think the default mode should be direct, because otherwise things such as persistent reservations do not work. No, the default has to be host mode, because that is the only mode that is guaranteed

Re: [libvirt] [PATCH v3 4/7] qemu: Translate the iscsi pool/volume disk source

2013-07-23 Thread Daniel P. Berrange
On Tue, Jul 23, 2013 at 03:29:40PM +0200, Paolo Bonzini wrote: Il 23/07/2013 15:26, Daniel P. Berrange ha scritto: Ok, this answers my question. :) I think the default mode should be direct, because otherwise things such as persistent reservations do not work. No, the default

[libvirt] [PATCH] build: fix make rpm failure

2013-07-23 Thread Laine Stump
util/virdbuspriv.h needed to be added to UTIL_SOURCES in the makefile. --- Pushed under build breaker rule. src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index 0eb3cb5..84372cb 100644 --- a/src/Makefile.am +++

[libvirt] [PATCH] Fix handling of DBus errors emitted by the bus itself

2013-07-23 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Current code for handling dbus errors only works for errors received from the remote application itself. We must also handle errors emitted by the bus itself, for example, when it fails to spawn the target service. Signed-off-by: Daniel P. Berrange

[libvirt] [PATCH] Add logic for handling systemd-machined non-existance

2013-07-23 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com If systemd machine does not exist, return -2 instead of -1, so that applications don't need to repeat the tedious error checking code Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/util/virsystemd.c | 13 ++-

Re: [libvirt] [PATCH v3 4/7] qemu: Translate the iscsi pool/volume disk source

2013-07-23 Thread Paolo Bonzini
Il 23/07/2013 15:36, Daniel P. Berrange ha scritto: On Tue, Jul 23, 2013 at 03:29:40PM +0200, Paolo Bonzini wrote: Il 23/07/2013 15:26, Daniel P. Berrange ha scritto: Ok, this answers my question. :) I think the default mode should be direct, because otherwise things such as persistent

Re: [libvirt] [PATCH v3 4/7] qemu: Translate the iscsi pool/volume disk source

2013-07-23 Thread Daniel P. Berrange
On Tue, Jul 23, 2013 at 03:52:56PM +0200, Paolo Bonzini wrote: Il 23/07/2013 15:36, Daniel P. Berrange ha scritto: On Tue, Jul 23, 2013 at 03:29:40PM +0200, Paolo Bonzini wrote: Il 23/07/2013 15:26, Daniel P. Berrange ha scritto: Ok, this answers my question. :) I think the default

Re: [libvirt] [PATCH v5 1/5] qemu: Add source pool auth info to virDomainDiskDef for iSCSI

2013-07-23 Thread Ján Tomko
On 07/22/2013 10:31 PM, John Ferlan wrote: During qemuTranslateDiskSourcePool() execution, if the srcpool has been defined with authentication information, then for iSCSI pools copy the authentication and host information to virDomainDiskDef. --- src/qemu/qemu_conf.c | 55

Re: [libvirt] [PATCH v5 3/5] qemu_common: Create qemuBuildVolumeString() to process storage pool

2013-07-23 Thread Ján Tomko
On 07/22/2013 10:31 PM, John Ferlan wrote: Split out into its own separate routine --- src/qemu/qemu_command.c | 108 1 file changed, 64 insertions(+), 44 deletions(-) ACK, just code movement. Jan -- libvir-list mailing list

Re: [libvirt] [PATCH v5 2/5] qemu: Create a common qemuGetSecretString

2013-07-23 Thread Ján Tomko
On 07/22/2013 10:31 PM, John Ferlan wrote: Make the secret fetching code common for qemuBuildRBDString() and qemuBuildDriveURIString() using the virDomainDiskDef. --- src/qemu/qemu_command.c | 157 +--- 1 file changed, 81 insertions(+), 76

Re: [libvirt] [PATCH v5 4/5] storage: Support chap authentication for iscsi pool

2013-07-23 Thread Ján Tomko
On 07/22/2013 10:31 PM, John Ferlan wrote: --- src/storage/storage_backend_iscsi.c | 111 +++- 1 file changed, 110 insertions(+), 1 deletion(-) I can confirm this works, but it's a shame it doesn't work on autostart. ACK if you clarify the error. Jan --

Re: [libvirt] [PATCH v5 5/5] Adjust 'ceph' authentication secret usage for rbd pool.

2013-07-23 Thread Ján Tomko
On 07/22/2013 10:31 PM, John Ferlan wrote: Update virStorageBackendRBDOpenRADOSConn() to use the internal API to the secret driver in order to get the secret value instead of the external virSecretGetValue() path. Without the flag VIR_SECRET_GET_VALUE_INTERNAL_CALL there is no way to get the

[libvirt] [PATCH] qemu: Take error path if acquiring of job fails in qemuDomainSaveInternal

2013-07-23 Thread Peter Krempa
Due to a goto statement missed when refactoring in 2771f8b74c1bf50d1fa when acquiring of a domain job failed the error path was not taken. This resulted into a crash afterwards as a extra reference was removed from a domain object leading to it being freed. An attempt to list the domains

Re: [libvirt] [PATCH] qemu: Take error path if acquiring of job fails in qemuDomainSaveInternal

2013-07-23 Thread Jiri Denemark
On Tue, Jul 23, 2013 at 16:21:10 +0200, Peter Krempa wrote: Due to a goto statement missed when refactoring in 2771f8b74c1bf50d1fa when acquiring of a domain job failed the error path was not taken. This resulted into a crash afterwards as a extra reference was removed from a s/as a/as an/

Re: [libvirt] [PATCH] qemu: Take error path if acquiring of job fails in qemuDomainSaveInternal

2013-07-23 Thread Peter Krempa
On 07/23/13 16:26, Jiri Denemark wrote: On Tue, Jul 23, 2013 at 16:21:10 +0200, Peter Krempa wrote: Due to a goto statement missed when refactoring in 2771f8b74c1bf50d1fa when acquiring of a domain job failed the error path was not taken. This resulted into a crash afterwards as a extra

[libvirt] [PATCH 3/5] qemu: make QEMU_PCI_ADDRESS_(SLOT|FUNCTION)_LAST less misleading

2013-07-23 Thread Laine Stump
Although these two enums are named ..._LAST, they really had the value of ..._SIZE. This patch changes their values so that, e.g., QEMU_PCI_ADDRESS_SLOT_LAST really is the slot number of the last slot on a PCI bus. --- src/qemu/qemu_command.c | 18 +- 1 file changed, 9

[libvirt] [PATCH 1/5] qemu: turn qemuDomainPCIAddressBus into a struct

2013-07-23 Thread Laine Stump
qemuDomainPCIAddressBus was an array of QEMU_PCI_ADDRESS_SLOT_LAST uint8_t's, which worked fine as long as every PCI bus was identical. In the future, some PCI busses will allow connecting PCI devices, and some will allow PCIe devices; also some will only allow connection of a single device, while

[libvirt] [PATCH 0/5] Support for pcie-root / Q35 machine type

2013-07-23 Thread Laine Stump
This is *almost* usable. I still need to add support for a dmi-to-pci-bridge before the q35 machine type can be used. 1/5 and 3/5 are just cleaning up some things that bothered me while writing patch 4/5. 2/5 should help out other machine types (e.g. arm) just a bit, by eliminating the extra

[libvirt] [PATCH 5/5] conf: add pcie-root controller

2013-07-23 Thread Laine Stump
This controller is implicit on q35 machinetypes. It provides 31 PCIe (*not* PCI) slots as controller 0. Currently there are no devices that can connect to pcie-root. For a usable q35 system, we still need to add a dmi-to-pci-bridge pci controller, which can connect to pcie-root, and provides pci

Re: [libvirt] [PATCH v5 4/5] storage: Support chap authentication for iscsi pool

2013-07-23 Thread John Ferlan
On 07/23/2013 10:18 AM, Ján Tomko wrote: On 07/22/2013 10:31 PM, John Ferlan wrote: --- src/storage/storage_backend_iscsi.c | 111 +++- 1 file changed, 110 insertions(+), 1 deletion(-) I can confirm this works, but it's a shame it doesn't work on

[libvirt] [PATCH 4/5] qemu: set/validate slot/connection type when assigning slots for PCI devices

2013-07-23 Thread Laine Stump
Since PCI bridges, PCIe bridges, PCIe switches, and PCIe root ports all share the same namespace, they are all defined as controllers of type='pci' in libvirt (but with a differing model attribute). Each of these controllers has a certain connection type upstream, allows certain connection types

[libvirt] KVM Forum 2013 Call for Participation - Extended to August 4th

2013-07-23 Thread Anthony Liguori
We have received numerous requests to extend the CFP deadline and so we are happy to announce that the CFP deadline has been moved by two weeks to August 4th. = KVM Forum 2013: Call For Participation October 21-23, 2013 - Edinburgh

Re: [libvirt] [PATCH v5 4/5] storage: Support chap authentication for iscsi pool

2013-07-23 Thread Daniel P. Berrange
On Tue, Jul 23, 2013 at 10:47:46AM -0400, John Ferlan wrote: On 07/23/2013 10:18 AM, Ján Tomko wrote: On 07/22/2013 10:31 PM, John Ferlan wrote: --- src/storage/storage_backend_iscsi.c | 111 +++- 1 file changed, 110 insertions(+), 1 deletion(-)

Re: [libvirt] [PATCH v5 0/5] Support CHAP authentication for iscsi pool

2013-07-23 Thread John Ferlan
On 07/22/2013 04:31 PM, John Ferlan wrote: This is a reworking and reposting of the authentication patches originally posted as part of my v3 reworking of Osier's original patches, see: ...snip... John Ferlan (5): qemu: Add source pool auth info to virDomainDiskDef for iSCSI qemu: Create

[libvirt] [PATCH 2/7] util: add virGetGroupList

2013-07-23 Thread Eric Blake
https://bugzilla.redhat.com/show_bug.cgi?id=964358 Since neither getpwuid_r() nor initgroups() are safe to call in between fork and exec (they obtain a mutex, but if some other thread in the parent also held the mutex at the time of the fork, the child will deadlock), we have to split out the

[libvirt] [PATCH 5/7] security: framework for driver PreFork handler

2013-07-23 Thread Eric Blake
https://bugzilla.redhat.com/show_bug.cgi?id=964358 A future patch wants the DAC security manager to be able to safely get the supplemental group list for a given uid, but at the time of a fork rather than during initialization so as to pick up on live changes to the system's group database. This

[libvirt] [PATCH 1/7] util: improve user lookup helper

2013-07-23 Thread Eric Blake
https://bugzilla.redhat.com/show_bug.cgi?id=964358 A future patch needs to look up pw_gid; but it is wasteful to crawl through getpwuid_r twice for two separate pieces of information, and annoying to copy that much boilerplate code for doing the crawl. The current internal-only virGetUserEnt is

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

2013-07-23 Thread Eric Blake
From: Daniel P. Berrange berra...@redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=964358 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 refactoring there are 2 potential flaws

[libvirt] [PATCH 3/7] util: make virSetUIDGID async-signal-safe

2013-07-23 Thread Eric Blake
https://bugzilla.redhat.com/show_bug.cgi?id=964358 POSIX states that multi-threaded apps should not use functions that are not async-signal-safe between fork and exec, yet we were using getpwuid_r and initgroups. Although rare, it is possible to hit deadlock in the child, when it tries to grab a

[libvirt] [PATCH 7/7] security: fix deadlock with prefork

2013-07-23 Thread Eric Blake
https://bugzilla.redhat.com/show_bug.cgi?id=964358 Attempts to start a domain with both SELinux and DAC security modules loaded will deadlock; latent problem introduced in commit fdb3bde and exposed in commit 29fe5d7. Basically, when recursing into the security manager for other driver's

[libvirt] [PATCH 0/7] backport of getGroupList to v0.10.2-maint

2013-07-23 Thread Eric Blake
https://bugzilla.redhat.com/show_bug.cgi?id=964358 Since it was on Fedora 18 that I first noticed the deadlock possible when a child process calls getpwuid_r while the parent owned the lock in a different thread, I'm interested in backporting my recent work on virGetGroupList to v0.10.2-maint.

Re: [libvirt] [PATCH v3 4/7] qemu: Translate the iscsi pool/volume disk source

2013-07-23 Thread Paolo Bonzini
Il 23/07/2013 16:14, Daniel P. Berrange ha scritto: On Tue, Jul 23, 2013 at 03:52:56PM +0200, Paolo Bonzini wrote: Il 23/07/2013 15:36, Daniel P. Berrange ha scritto: On Tue, Jul 23, 2013 at 03:29:40PM +0200, Paolo Bonzini wrote: Il 23/07/2013 15:26, Daniel P. Berrange ha scritto: Ok, this

Re: [libvirt] [PATCH 5/5] conf: add pcie-root controller

2013-07-23 Thread Daniel P. Berrange
On Tue, Jul 23, 2013 at 10:44:55AM -0400, Laine Stump wrote: This controller is implicit on q35 machinetypes. It provides 31 PCIe (*not* PCI) slots as controller 0. Currently there are no devices that can connect to pcie-root. For a usable q35 system, we still need to add a dmi-to-pci-bridge

[libvirt] [PATCH 08/13] Create + setup cgroups atomically for LXC process

2013-07-23 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Currently the LXC driver creates the VM's cgroup prior to forking, and then libvirt_lxc moves the child process into the cgroup. This won't work with systemd whose APIs do the creation of cgroups + attachment of processes atomically. Fortunately we

[libvirt] [PATCH 01/13] Fix handling of DBus errors emitted by the bus itself

2013-07-23 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Current code for handling dbus errors only works for errors received from the remote application itself. We must also handle errors emitted by the bus itself, for example, when it fails to spawn the target service. Signed-off-by: Daniel P. Berrange

Re: [libvirt] [PATCH 1/5] qemu: turn qemuDomainPCIAddressBus into a struct

2013-07-23 Thread Daniel P. Berrange
On Tue, Jul 23, 2013 at 10:44:51AM -0400, Laine Stump wrote: qemuDomainPCIAddressBus was an array of QEMU_PCI_ADDRESS_SLOT_LAST uint8_t's, which worked fine as long as every PCI bus was identical. In the future, some PCI busses will allow connecting PCI devices, and some will allow PCIe

[libvirt] [PATCH 03/13] Add a virCgroupNewDetect API for finding cgroup placement

2013-07-23 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Add a virCgroupNewDetect API which is used to initialize a cgroup object with the placement of an arbitrary process. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/libvirt_private.syms | 1 + src/util/vircgroup.c | 81

[libvirt] [PATCH 00/13] Support use of systemd-machined for cgroups

2013-07-23 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com This is a patch series which adds support for using systemd-machined for creating cgroups. The first 12 patches are all really just cleanups and refactoring. The actual systemd code is the last patch, but at time of posting it doesn't quite work

[libvirt] [PATCH 09/13] New cgroups API for atomically creating machine cgroups

2013-07-23 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Instead of requiring one API call to create a cgroup and another to add a task to it, introduce a new API virCgroupNewMachine which does both jobs at once. This will facilitate the later code to talk to systemd to achieve this job which is also atomic.

[libvirt] [PATCH 12/13] Protection against doing bad stuff to the root group

2013-07-23 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Add protection such that the virCgroupRemove and virCgroupKill* do not do anything to the root cgroup. Killing all PIDs in the root cgroup does not end well. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/util/vircgroup.c | 12

[libvirt] [PATCH 02/13] Add logic for handling systemd-machined non-existance

2013-07-23 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com If systemd machine does not exist, return -2 instead of -1, so that applications don't need to repeat the tedious error checking code Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/util/virsystemd.c | 13 ++-

[libvirt] [PATCH 10/13] Convert QEMU driver to use virCgroupNewMachine

2013-07-23 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Convert the QEMU driver code to use the new atomic API for setup of cgroups Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/qemu/qemu_cgroup.c | 29 +++-- 1 file changed, 11 insertions(+), 18 deletions(-) diff

[libvirt] [PATCH 05/13] Auto-detect existing cgroup placement

2013-07-23 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Use the new virCgroupNewDetect function to determine cgroup placement of existing running VMs. This will allow the legacy cgroups creation APIs to be removed entirely Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/lxc/lxc_cgroup.c|

[libvirt] [PATCH 04/13] Add API for checking if a cgroup is valid for a domain

2013-07-23 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Add virCgroupIsValidMachine API to check whether a auto detected cgroup is valid for a machine. This lets us check if a VM has just been placed into some generic shared cgroup, or worse, the root cgroup Signed-off-by: Daniel P. Berrange

[libvirt] [PATCH 07/13] Create + setup cgroups atomically for QEMU process

2013-07-23 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Currently the QEMU driver creates the VM's cgroup prior to forking, and then uses a virCommand hook to move the child into the cgroup. This won't work with systemd whose APIs do the creation of cgroups + attachment of processes atomically. Fortunately

[libvirt] [PATCH 11/13] Convert LXC driver to use virCgroupNewMachine

2013-07-23 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Convert the LXC driver code to use the new atomic API for setup of cgroups Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/lxc/lxc_cgroup.c | 53 +++- src/lxc/lxc_controller.c | 2 +- 2

[libvirt] [PATCH 13/13] Enable support for systemd-machined in cgroups creation

2013-07-23 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Make the virCgroupNewMachine method try to use systemd-machined first. If that fails, then fallback to using the traditional cgroup setup code path. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/util/vircgroup.c | 115

Re: [libvirt] [PATCH 2/5] qemu: only check for PIIX3-specific device addrs on pc-* machinetypes

2013-07-23 Thread Daniel P. Berrange
On Tue, Jul 23, 2013 at 10:44:52AM -0400, Laine Stump wrote: The implicit IDE, USB, and video controllers provided by the PIIX3 chipset in the pc-* machinetypes are not present on other machinetypes, so we shouldn't be doing the special checking for them. The diffs for this patch look hairy,

Re: [libvirt] [PATCH 3/5] qemu: make QEMU_PCI_ADDRESS_(SLOT|FUNCTION)_LAST less misleading

2013-07-23 Thread Daniel P. Berrange
On Tue, Jul 23, 2013 at 10:44:53AM -0400, Laine Stump wrote: Although these two enums are named ..._LAST, they really had the value of ..._SIZE. This patch changes their values so that, e.g., QEMU_PCI_ADDRESS_SLOT_LAST really is the slot number of the last slot on a PCI bus. ---

[libvirt] [PATCH 06/13] Remove obsolete cgroups creation apis

2013-07-23 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The virCgroupNewDomainDriver and virCgroupNewDriver methods are obsolete now that we can auto-detect existing cgroup placement. Delete them to reduce code bloat. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/libvirt_private.syms | 2

Re: [libvirt] [PATCH 4/5] qemu: set/validate slot/connection type when assigning slots for PCI devices

2013-07-23 Thread Daniel P. Berrange
On Tue, Jul 23, 2013 at 10:44:54AM -0400, Laine Stump wrote: diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 059aa6a..64787b6 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1412,7 +1412,15 @@ cleanup: #define QEMU_PCI_ADDRESS_FUNCTION_LAST 7

Re: [libvirt] [PATCH 5/5] conf: add pcie-root controller

2013-07-23 Thread Daniel P. Berrange
On Tue, Jul 23, 2013 at 10:44:55AM -0400, Laine Stump wrote: This controller is implicit on q35 machinetypes. It provides 31 PCIe (*not* PCI) slots as controller 0. Currently there are no devices that can connect to pcie-root. For a usable q35 system, we still need to add a dmi-to-pci-bridge

Re: [libvirt] [PATCH v3 4/7] qemu: Translate the iscsi pool/volume disk source

2013-07-23 Thread Paolo Bonzini
Il 23/07/2013 16:14, Daniel P. Berrange ha scritto: Perhaps the default could be specified in a configuration file (and the default should be the safe one). No, that is even worse because now the default is not predictable.. We simply default to host mode and if applications want to use

Re: [libvirt] [PATCH v5 4/5] storage: Support chap authentication for iscsi pool

2013-07-23 Thread John Ferlan
On 07/23/2013 10:56 AM, Daniel P. Berrange wrote: ...snip... +++ b/src/storage/storage_backend_iscsi.c @@ -714,7 +714,8 @@ virStorageBackendISCSISetAuth(const char *portal, if (!conn) { virReportError(VIR_ERR_INTERNAL_ERROR, %s, - _(iscsi 'chap'

[libvirt] [PATCH 2/3] domain_event: Resolve memory leak found by Valgrind

2013-07-23 Thread John Ferlan
Commit id '4421e257' strdup'd devAlias, but didn't free Running qemuhotplugtest under valgrind resulted in the following: ==7375== 9 bytes in 1 blocks are definitely lost in loss record 11 of 70 ==7375==at 0x4A0887C: malloc (vg_replace_malloc.c:270) ==7375==by 0x37C1085D71: strdup

[libvirt] [PATCH 1/3] lxc: Resolve Coverity warning

2013-07-23 Thread John Ferlan
Commit 'c8695053' resulted in the following: Coverity error seen in the output: ERROR: REVERSE_INULL FUNCTION: lxcProcessAutoDestroy Due to the 'dom' being checked before 'dom-persistent' since 'dom' is already dereferenced prior to that. --- src/lxc/lxc_process.c | 2 +- 1 file

[libvirt] [PATCH 0/3] Miscellaneous Coverity Valgrind changes

2013-07-23 Thread John Ferlan
These patches resolve a Coverity warning and a found Valgrind leak. Added more patterns to the .valgrind.supp file to suppress the commandtests and seclabeltest output. This will thus result in a mostly clean valgrind run. All that remains is a hotplugtest failure, which some patches were posted:

Re: [libvirt] [PATCH v3 4/7] qemu: Translate the iscsi pool/volume disk source

2013-07-23 Thread Daniel P. Berrange
On Tue, Jul 23, 2013 at 05:35:57PM +0200, Paolo Bonzini wrote: Il 23/07/2013 16:14, Daniel P. Berrange ha scritto: Perhaps the default could be specified in a configuration file (and the default should be the safe one). No, that is even worse because now the default is not predictable..

Re: [libvirt] [PATCH 2/3] domain_event: Resolve memory leak found by Valgrind

2013-07-23 Thread Peter Krempa
On 07/23/13 17:59, John Ferlan wrote: Commit id '4421e257' strdup'd devAlias, but didn't free Running qemuhotplugtest under valgrind resulted in the following: ==7375== 9 bytes in 1 blocks are definitely lost in loss record 11 of 70 ==7375==at 0x4A0887C: malloc (vg_replace_malloc.c:270)

Re: [libvirt] [PATCH v5 4/5] storage: Support chap authentication for iscsi pool

2013-07-23 Thread Daniel P. Berrange
On Tue, Jul 23, 2013 at 11:50:57AM -0400, John Ferlan wrote: On 07/23/2013 10:56 AM, Daniel P. Berrange wrote: ...snip... +++ b/src/storage/storage_backend_iscsi.c @@ -714,7 +714,8 @@ virStorageBackendISCSISetAuth(const char *portal, if (!conn) {

Re: [libvirt] [PATCH 1/3] lxc: Resolve Coverity warning

2013-07-23 Thread Peter Krempa
On 07/23/13 17:59, John Ferlan wrote: Commit 'c8695053' resulted in the following: Coverity error seen in the output: ERROR: REVERSE_INULL FUNCTION: lxcProcessAutoDestroy Due to the 'dom' being checked before 'dom-persistent' since 'dom' is already dereferenced prior to that. ---

[libvirt] [PATCH 0/7] Probe QEMU binary for host CPU and use it for computations

2013-07-23 Thread Jiri Denemark
Since QEMU and kvm may filter some host CPU features or add efficiently emulated features, asking QEMU binary for host CPU data provides better results when we later use the data for building guest CPUs. Jiri Denemark (7): cpu: Add support for loading and storing CPU data cpu: Export few

[libvirt] [PATCH 6/7] qemu: Probe QEMU binary for host CPU

2013-07-23 Thread Jiri Denemark
Since QEMU and kvm may filter some host CPU features or add efficiently emulated features, asking QEMU binary for host CPU data provides better results when we later use the data for building guest CPUs. --- src/qemu/qemu_capabilities.c | 44 +++-

[libvirt] [PATCH 1/7] cpu: Add support for loading and storing CPU data

2013-07-23 Thread Jiri Denemark
--- src/cpu/cpu.c| 41 ++ src/cpu/cpu.h| 13 + src/cpu/cpu_x86.c| 135 +++ src/libvirt_private.syms | 2 + 4 files changed, 170 insertions(+), 21 deletions(-) diff --git a/src/cpu/cpu.c

[libvirt] [PATCH 4/7] qemu: Add monitor APIs to fetch CPUID data from QEMU

2013-07-23 Thread Jiri Denemark
--- src/qemu/qemu_monitor.c| 21 +++ src/qemu/qemu_monitor.h| 3 + src/qemu/qemu_monitor_json.c | 162 + src/qemu/qemu_monitor_json.h | 6 + tests/Makefile.am

[libvirt] [PATCH 5/7] qemu: Make QMP probing process reusable

2013-07-23 Thread Jiri Denemark
--- src/qemu/qemu_capabilities.c | 192 +++ 1 file changed, 120 insertions(+), 72 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 5dc3c9e..9440396 100644 --- a/src/qemu/qemu_capabilities.c +++

[libvirt] [PATCH 2/7] cpu: Export few x86-specific APIs

2013-07-23 Thread Jiri Denemark
--- src/cpu/cpu_x86.c| 21 ++--- src/cpu/cpu_x86.h| 10 ++ src/libvirt_private.syms | 7 +++ 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 560a2a9..dbbcfd2 100644 --- a/src/cpu/cpu_x86.c +++

[libvirt] [PATCH 7/7] qemu: Use host CPU from QEMU for computations

2013-07-23 Thread Jiri Denemark
Use the host CPU data probed by the current emulator when updating a guest CPU according to a host CPU or when checking whether they are compatible. --- src/qemu/qemu_command.c | 32 ++-- src/qemu/qemu_domain.c | 21 +++-- 2 files changed, 41

[libvirt] [PATCH 3/7] x86: Ignore CPUID functions greater than 10

2013-07-23 Thread Jiri Denemark
We don't need to store any CPUID data for function we know nothing about. However, this limit may need to be increased in the future when libvirt learns features described by a CPUID function greater than 10. The comparison is done after subtracting high-bits prefix, so currently functions

Re: [libvirt] [PATCH 6/7] qemu: Probe QEMU binary for host CPU

2013-07-23 Thread Daniel P. Berrange
On Tue, Jul 23, 2013 at 06:11:35PM +0200, Jiri Denemark wrote: Since QEMU and kvm may filter some host CPU features or add efficiently emulated features, asking QEMU binary for host CPU data provides better results when we later use the data for building guest CPUs. ---

Re: [libvirt] [PATCH v3 4/7] qemu: Translate the iscsi pool/volume disk source

2013-07-23 Thread Paolo Bonzini
Il 23/07/2013 18:01, Daniel P. Berrange ha scritto: On Tue, Jul 23, 2013 at 05:35:57PM +0200, Paolo Bonzini wrote: Il 23/07/2013 16:14, Daniel P. Berrange ha scritto: Perhaps the default could be specified in a configuration file (and the default should be the safe one). No, that is even

Re: [libvirt] [PATCH 5/7] qemu: Make QMP probing process reusable

2013-07-23 Thread Daniel P. Berrange
On Tue, Jul 23, 2013 at 06:11:34PM +0200, Jiri Denemark wrote: Could really do with a commit message describing what is being changed here what the need is --- src/qemu/qemu_capabilities.c | 192 +++ 1 file changed, 120 insertions(+), 72

Re: [libvirt] [PATCH 6/7] qemu: Probe QEMU binary for host CPU

2013-07-23 Thread Eric Blake
[adding qemu] On 07/23/2013 10:19 AM, Daniel P. Berrange wrote: On Tue, Jul 23, 2013 at 06:11:35PM +0200, Jiri Denemark wrote: Since QEMU and kvm may filter some host CPU features or add efficiently emulated features, asking QEMU binary for host CPU data provides better results when we later

Re: [libvirt] [PATCH 1/7] cpu: Add support for loading and storing CPU data

2013-07-23 Thread Daniel P. Berrange
On Tue, Jul 23, 2013 at 06:11:30PM +0200, Jiri Denemark wrote: Could use a more verbose commit message. Looking at later patches, I see cpuDataFormat used in the test suite, but I don't see cpuDataParse used anywhere ? If these are only for the test suite, then perhaps adding them to a cpupriv.h

Re: [libvirt] [PATCH 3/7] x86: Ignore CPUID functions greater than 10

2013-07-23 Thread Daniel P. Berrange
On Tue, Jul 23, 2013 at 06:11:32PM +0200, Jiri Denemark wrote: We don't need to store any CPUID data for function we know nothing about. However, this limit may need to be increased in the future when libvirt learns features described by a CPUID function greater than 10. The comparison is done

Re: [libvirt] [PATCH 2/7] cpu: Export few x86-specific APIs

2013-07-23 Thread Daniel P. Berrange
On Tue, Jul 23, 2013 at 06:11:31PM +0200, Jiri Denemark wrote: This is adding a new function as well as exporting some existing functions, so should probably be split in two. --- src/cpu/cpu_x86.c| 21 ++--- src/cpu/cpu_x86.h| 10 ++

Re: [libvirt] [PATCH 3/3] valgrind.supp: Add more valgrind suppression paths

2013-07-23 Thread Peter Krempa
On 07/23/13 17:59, John Ferlan wrote: Update based on recent run/failures seen --- tests/.valgrind.supp | 60 1 file changed, 60 insertions(+) diff --git a/tests/.valgrind.supp b/tests/.valgrind.supp index 10cc3c0..f04912d 100644 ---

Re: [libvirt] [PATCH 6/7] qemu: Probe QEMU binary for host CPU

2013-07-23 Thread Jiri Denemark
On Tue, Jul 23, 2013 at 17:19:03 +0100, Daniel Berrange wrote: On Tue, Jul 23, 2013 at 06:11:35PM +0200, Jiri Denemark wrote: Since QEMU and kvm may filter some host CPU features or add efficiently emulated features, asking QEMU binary for host CPU data provides better results when we later

Re: [libvirt] [PATCH 03/13] Add a virCgroupNewDetect API for finding cgroup placement

2013-07-23 Thread Eric Blake
On 07/23/2013 09:21 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Add a virCgroupNewDetect API which is used to initialize a cgroup object with the placement of an arbitrary process. Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

Re: [libvirt] [PATCH 3/3] valgrind.supp: Add more valgrind suppression paths

2013-07-23 Thread Eric Blake
On 07/23/2013 09:59 AM, John Ferlan wrote: Update based on recent run/failures seen --- tests/.valgrind.supp | 60 1 file changed, 60 insertions(+) diff --git a/tests/.valgrind.supp b/tests/.valgrind.supp index 10cc3c0..f04912d 100644

Re: [libvirt] [PATCH v3 4/7] qemu: Translate the iscsi pool/volume disk source

2013-07-23 Thread John Ferlan
On 07/23/2013 12:18 PM, Paolo Bonzini wrote: Il 23/07/2013 18:01, Daniel P. Berrange ha scritto: On Tue, Jul 23, 2013 at 05:35:57PM +0200, Paolo Bonzini wrote: Il 23/07/2013 16:14, Daniel P. Berrange ha scritto: Perhaps the default could be specified in a configuration file (and the default

Re: [libvirt] [PATCH 1/7] cpu: Add support for loading and storing CPU data

2013-07-23 Thread Jiri Denemark
On Tue, Jul 23, 2013 at 17:27:41 +0100, Daniel Berrange wrote: On Tue, Jul 23, 2013 at 06:11:30PM +0200, Jiri Denemark wrote: Could use a more verbose commit message. Looking at later patches, I see cpuDataFormat used in the test suite, but I don't see cpuDataParse used anywhere ? If

Re: [libvirt] [PATCH v3 4/7] qemu: Translate the iscsi pool/volume disk source

2013-07-23 Thread Paolo Bonzini
Il 23/07/2013 18:47, John Ferlan ha scritto: On 07/23/2013 12:18 PM, Paolo Bonzini wrote: Il 23/07/2013 18:01, Daniel P. Berrange ha scritto: On Tue, Jul 23, 2013 at 05:35:57PM +0200, Paolo Bonzini wrote: Il 23/07/2013 16:14, Daniel P. Berrange ha scritto: Perhaps the default could be

Re: [libvirt] [PATCH v5 4/5] storage: Support chap authentication for iscsi pool

2013-07-23 Thread John Ferlan
On 07/23/2013 12:03 PM, Daniel P. Berrange wrote: On Tue, Jul 23, 2013 at 11:50:57AM -0400, John Ferlan wrote: On 07/23/2013 10:56 AM, Daniel P. Berrange wrote: ...snip... +++ b/src/storage/storage_backend_iscsi.c @@ -714,7 +714,8 @@ virStorageBackendISCSISetAuth(const char *portal,

Re: [libvirt] [PATCH 4/7] qemu: Add monitor APIs to fetch CPUID data from QEMU

2013-07-23 Thread Daniel P. Berrange
On Tue, Jul 23, 2013 at 06:11:33PM +0200, Jiri Denemark wrote: --- src/qemu/qemu_monitor.c| 21 +++ src/qemu/qemu_monitor.h| 3 + src/qemu/qemu_monitor_json.c | 162 +

  1   2   >