Re: [libvirt] [PATCH] storage: Fix volume cloning for logical volume.

2013-04-04 Thread Ján Tomko
On 04/04/2013 07:15 AM, Atsushi Kumagai wrote: When creating a logical volume with virStorageVolCreateXMLFrom, qemu-img convert is called internally if clonevol is a file volume. Then, vol-target.format is used as output_fmt parameter but the target.format of logical volumes is always 0

[libvirt] [PATCH v5.1 02/11] conf: Add post XML parse callbacks and prepare for cleaning of virCaps

2013-04-04 Thread Peter Krempa
This patch adds instrumentation that will allow hypervisor drivers to fill and validate domain and device definitions after parsed by the XML parser. With this patch, after the XML is parsed, a callback to the driver is issued requesing to fill and validate driver specific details of the

[libvirt] [PATCH v5.1 10/11] virCaps: get rid of macPrefix field

2013-04-04 Thread Peter Krempa
Use the virDomainXMLConf structure to hold this data and tweak the code to avoid semantic change. Without configuration the KVM mac prefix is used by default. I chose it as it's in the privately administered segment so it should be usable for any purposes. --- src/conf/capabilities.c |

[libvirt] [PATCH v5.1 04/11] qemu: Record the default NIC model in the domain XML

2013-04-04 Thread Peter Krempa
This patch implements the devices post parse cllback and uses it to fill the default qemu network card model into the XML if none is specified. Libvirt assumes that the network card model for qemu is the rtl8139. Record this in the XML using the new callback to avoid user confusion. ---

[libvirt] [PATCH v5.1 09/11] virCaps: get rid of hasWideScsiBus

2013-04-04 Thread Peter Krempa
Use the virDomainXMLConf structure to hold this data. --- src/conf/capabilities.h| 1 - src/conf/domain_conf.c | 13 +++-- src/conf/domain_conf.h | 8 +++- src/esx/esx_driver.c | 11 +-- src/libvirt_vmx.syms | 1 + src/qemu/qemu_command.c| 9

[libvirt] [PATCH v5.1 08/11] virCaps: get rid of defaultDiskDriverType

2013-04-04 Thread Peter Krempa
Use the qemu specific callback to fill this data in the qemu driver as it's the only place where it was used and fix tests as the qemu test capability object didn't configure the defaults for the tests. --- src/conf/capabilities.h| 1 - src/conf/domain_conf.c

[libvirt] [PATCH v5.1 06/11] virCaps: get rid of defaultDiskDriverName

2013-04-04 Thread Peter Krempa
This patch removes the defaultDiskDriverName from the virCaps structure. This particular default value is used only in the qemu driver so this patch uses the recently added callback to fill the driver name if it's needed instead of propagating it through virCaps. --- src/conf/capabilities.h

[libvirt] [PATCH v5.1 11/11] virCaps: get rid of defaultConsoleTargetType callback

2013-04-04 Thread Peter Krempa
This patch refactors various places to allow removing of the defaultConsoleTargetType callback from the virCaps structure. A new console character device target type is introduced - VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_NONE - to mark that no type was specified in the XML. This type is at the end

[libvirt] [PATCH v5.1 05/11] virCaps: get rid of defaultInitPath value in the virCaps struct

2013-04-04 Thread Peter Krempa
This gets rid of the parameter in favor of using the new callback infrastructure to do the same stuff. This patch implements the domain adjustment callback in the openVZ driver and moves the check from the parser to a new validation method in the callback infrastructure. ---

[libvirt] [PATCH v5.2] virCaps: get rid of defaultConsoleTargetType callback

2013-04-04 Thread Peter Krempa
This patch refactors various places to allow removing of the defaultConsoleTargetType callback from the virCaps structure. A new console character device target type is introduced - VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_NONE - to mark that no type was specified in the XML. This type is at the end

[libvirt] [PATCH] conf: Allow for non-contiguous device boot orders

2013-04-04 Thread Peter Krempa
This patch adds the ability to configure non-contiguous boot orders on boot devices. This allows unplugging devices that have boot order specified without breaking migration. The new code now uses a slightly less memory efficient approach to store the boot order fields in a hashtable instead of a

[libvirt] [PATCH 01/18] Refactor RNG schema for resource tuning

2013-04-04 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Split the resource define out into multiple smaller defines, one for each type of resource tuning parameter. This makes the schema a bit clearer to read Signed-off-by: Daniel P. Berrange berra...@redhat.com --- docs/schemas/domaincommon.rng | 271

[libvirt] [PATCH 00/18] Re-arrange the way cgroups are setup

2013-04-04 Thread Daniel P. Berrange
This is a greatly expanded version of a previous series I posted https://www.redhat.com/archives/libvir-list/2013-March/msg01373.html Currently libvirt creates a cgroups hiearchy at $LOCATION-OF-LIBVIRTD/libvirt/{qemu,lxc}/$GUEST-NAME eg /sys/fs/cgroup ├── blkio │   └── libvirt │  

[libvirt] [PATCH 03/18] Introduce a virFileDeleteTree method

2013-04-04 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Introduce a method virFileDeleteTree for recursively deleting an entire directory tree Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/libvirt_private.syms | 1 + src/util/virfile.c | 78

[libvirt] [PATCH 02/18] Ensure LD_PRELOAD exists before running test case

2013-04-04 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The linker will ignore LD_PRELOAD libraries which do not exist, just printing a warning message. This is not helpful for the test suite which will be utterly fubar without the preload library present. Add an explicit test for existance of the library

[libvirt] [PATCH 18/18] Remove non-functional code for setting up non-root cgroups

2013-04-04 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The virCgroupNewDriver method had a 'bool privileged' param. If a false value was ever passed in, it would simply not work, since non-root users don't have any privileges to create new cgroups. Just delete this broken code entirely and make the QEMU

[libvirt] [PATCH 06/18] Rename virCgroupMounted to virCgroupHasController make it more robust

2013-04-04 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The virCgroupMounted method is badly named, since a controller can be mounted, but disabled in the current object. Rename the method to be virCgroupHasController. Also make it tolerant to a NULL virCgroupPtr and out-of-range controller index, to avoid

[libvirt] [PATCH 05/18] Don't create dirs in cgroup controllers we don't want to use

2013-04-04 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Currently when getting an instance of virCgroupPtr we will create the path in all cgroup controllers. Only at the virt driver layer are we attempting to filter controllers. This is bad because the mere act of creating the dirs in the controllers can

[libvirt] [PATCH 08/18] Store a virCgroupPtr instance in virLXCDomainObjPrivatePtr

2013-04-04 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Instead of calling virCgroupForDomain every time we need the virCgrouPtr instance, just do it once at Vm startup and cache a reference to the object in virLXCDomainObjPrivatePtr until shutdown of the VM. Removing the virCgroupPtr from the LXC driver

[libvirt] [PATCH 04/18] Rename virCgroupGetAppRoot to virCgroupForSelf

2013-04-04 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The virCgroupGetAppRoot is not clear in its meaning. Change to virCgroupForSelf to highlight that this returns the cgroup config for the caller's process Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/libvirt_private.syms | 2 +-

[libvirt] [PATCH 13/18] Add misc extra debugging into cgroups code

2013-04-04 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/util/vircgroup.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index c336806..d3c43a2 100644 ---

[libvirt] [PATCH 11/18] Add a test suite for cgroups functionality

2013-04-04 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Some aspects of the cgroups setup / detection code are quite subtle and easy to break. It would greatly benefit from unit testing, but this is difficult because the test suite won't have privileges to play around with cgroups. The solution is to use

[libvirt] [PATCH 17/18] Change default cgroup layout for QEMU/LXC and honour XML config

2013-04-04 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Historically QEMU/LXC guests have been placed in a cgroup layout that is $LOCATION-OF-LIBVIRTD/libvirt/{qemu,lxc}/$VMNAME This is bad for a number of reasons - The cgroup hierarchy gets very deep which seriously impacts kernel performance due

[libvirt] [PATCH 12/18] Refactor cgroups internal data structures

2013-04-04 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Currently the virCgroupPtr struct contains 3 pieces of information - path - path of the cgroup, relative to current process' cgroup placement - placement - current process' placement in each controller - mounts - mount point of each controller

[libvirt] [PATCH 14/18] Cleanup if creating cgroup directories fails

2013-04-04 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Currently if virCgroupMakeGroup fails, we can get in a situation where some controllers have been setup, but others not. Ensure we call virCgroupRemove to remove what we've done upon failure Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

[libvirt] [PATCH 09/18] Pull definition of structs out of vircgroup.c to vircgrouppriv.h

2013-04-04 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The definition of structs for cgroups are kept in vircgroup.c since they are intended to be private from users of the API. To enable effective testing, however, they need to be accessible. To address the latter issue, without compronmising the former,

[libvirt] [PATCH 16/18] Add XML config for resource partitions

2013-04-04 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Signed-off-by: Daniel P. Berrange berra...@redhat.com --- docs/formatdomain.html.in| 26 ++ docs/schemas/domaincommon.rng| 12 + src/conf/domain_conf.c | 78

Re: [libvirt] [PATCH v3 00/11] Add support for guests with TPM passthrough device

2013-04-04 Thread Corey Bryant
On 03/21/2013 11:42 AM, Stefan Berger wrote: Hello! The following set of patches adds support to libvirt for adding a TPM passthrough device to a QEMU guest. Support for this was recently accepted into QEMU. This set of patches borrows a lot from the recently added support for rng's.

[libvirt] language bindings

2013-04-04 Thread Vasiliy Tolstov
Hello. I'm newbie in libvirt world and not able to find answer for my question in google. If i want to create binding for some language (for example go) is that possible do not use libvirt C library and talk to libvirtd via some rpc protocol? For example json or internal binary.. is that possible

Re: [libvirt] language bindings

2013-04-04 Thread Eric Blake
On 04/04/2013 08:47 AM, Vasiliy Tolstov wrote: Hello. I'm newbie in libvirt world and not able to find answer for my question in google. If i want to create binding for some language (for example go) is that possible do not use libvirt C library and talk to libvirtd via some rpc protocol? For

Re: [libvirt] [PATCH v5.1 04/11] qemu: Record the default NIC model in the domain XML

2013-04-04 Thread Viktor Mihajlovski
On 04/04/2013 02:10 PM, Peter Krempa wrote: This patch implements the devices post parse cllback and uses it to fill the default qemu network card model into the XML if none is specified. Libvirt assumes that the network card model for qemu is the rtl8139. Record this in the XML using the

Re: [libvirt] language bindings

2013-04-04 Thread Daniel P. Berrange
On Thu, Apr 04, 2013 at 06:47:49PM +0400, Vasiliy Tolstov wrote: Hello. I'm newbie in libvirt world and not able to find answer for my question in google. If i want to create binding for some language (for example go) is that possible do not use libvirt C library and talk to libvirtd via some

Re: [libvirt] [Qemu-devel] attaching disk to paused guest

2013-04-04 Thread Stefan Hajnoczi
On Wed, Apr 3, 2013 at 1:05 PM, Liron Aravot lara...@redhat.com wrote: does qemu support attaching disk to a paused guest? Does it makes sense to allow this operation? Yes, it works. I tested it via libvirt: $ virsh start vm $ cat /tmp/disk.xml disk type='file' device='disk' driver

Re: [libvirt] language bindings

2013-04-04 Thread Vasiliy Tolstov
2013/4/4 Daniel P. Berrange berra...@redhat.com: We explicitly do *not* want anything other than the libvirt C library talking the RPC protocol. We consider the RPC protocol to be a *private* implementation detail for libvirt.so and libvirtd only. Nothing else should ever use it, not least

Re: [libvirt] [PATCH] v2:Support for adding a static route to a bridge

2013-04-04 Thread Laine Stump
On 04/03/2013 04:02 PM, Gene Czarcinski wrote: On 04/02/2013 03:31 PM, Laine Stump wrote: On 03/15/2013 02:10 PM, Gene Czarcinski wrote: This patch adds support for adding a static route for a network. The via specifies the gateway's IP address. Both IPv4 and IPv6 static routes are

Re: [libvirt] [PATCH] v2:Support for adding a static route to a bridge

2013-04-04 Thread Laine Stump
On 03/15/2013 02:10 PM, Gene Czarcinski wrote: diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index 296871c..c90b3d2 100644 --- a/src/util/virnetdev.c +++ b/src/util/virnetdev.c @@ -729,6 +729,7 @@ int virNetDevGetVLanID(const char *ifname ATTRIBUTE_UNUSED, * Add an IP address

[libvirt] [RFC] Per machine type qemu capability detection

2013-04-04 Thread Peter Krempa
Hi, qemu recently added a qmp/hmp command (get-cpu-max) to determine maximum number of supported CPUs for a VM. The output of this command depends on the machine type that is used when it is called. The problem here is that libvirt uses -M none while detecting capabilities and with that

Re: [libvirt] [RFC] Per machine type qemu capability detection

2013-04-04 Thread Daniel P. Berrange
On Thu, Apr 04, 2013 at 06:20:05PM +0200, Peter Krempa wrote: Hi, qemu recently added a qmp/hmp command (get-cpu-max) to determine maximum number of supported CPUs for a VM. The output of this command depends on the machine type that is used when it is called. The problem here is that

Re: [libvirt] [PATCH 00/18] Re-arrange the way cgroups are setup

2013-04-04 Thread Viktor Mihajlovski
On 04/04/2013 03:40 PM, Daniel P. Berrange wrote: /sys/fs/cgroup ├── cpu,cpuacct │ ├── libvirt │ │ ├── lxc │ │ │ └── busy │ │ └── qemu │ │ └── vm1 │ │ ├── emulator │ │ └── vcpu0 It's somehow off-topic but if you do a rework you might also

Re: [libvirt] [RFC] Per machine type qemu capability detection

2013-04-04 Thread Daniel P. Berrange
On Thu, Apr 04, 2013 at 06:30:08PM +0200, Peter Krempa wrote: On 04/04/13 18:22, Daniel P. Berrange wrote: On Thu, Apr 04, 2013 at 06:20:05PM +0200, Peter Krempa wrote: Hi, qemu recently added a qmp/hmp command (get-cpu-max) to determine maximum number of supported CPUs for a VM. The output

Re: [libvirt] [PATCH 00/18] Re-arrange the way cgroups are setup

2013-04-04 Thread Daniel P. Berrange
On Thu, Apr 04, 2013 at 06:38:29PM +0200, Viktor Mihajlovski wrote: On 04/04/2013 03:40 PM, Daniel P. Berrange wrote: /sys/fs/cgroup ├── cpu,cpuacct │ ├── libvirt │ │ ├── lxc │ │ │ └── busy │ │ └── qemu │ │ └── vm1 │ │ ├── emulator │ │

Re: [libvirt] [PATCH 00/18] Re-arrange the way cgroups are setup

2013-04-04 Thread Viktor Mihajlovski
On 04/04/2013 06:41 PM, Daniel P. Berrange wrote: The problem is that any controls you apply at the $domain/ level, will also affect the $domain/vcpuNN levels. To get controls that are guaranteed to only affect the emulator threads, you need them to be in a directory that is parallel to the

Re: [libvirt] [RFC] Per machine type qemu capability detection

2013-04-04 Thread Peter Krempa
On 04/04/13 18:22, Daniel P. Berrange wrote: On Thu, Apr 04, 2013 at 06:20:05PM +0200, Peter Krempa wrote: Hi, qemu recently added a qmp/hmp command (get-cpu-max) to determine maximum number of supported CPUs for a VM. The output of this command depends on the machine type that is used when it

Re: [libvirt] [PATCH v5.1 01/11] maint: Rename xmlconf to xmlopt and virDomainXMLConfing to virDomainXMLOption

2013-04-04 Thread Daniel P. Berrange
On Thu, Apr 04, 2013 at 02:10:11PM +0200, Peter Krempa wrote: This patch is the result of running: for i in $(git ls-files | grep -v html | grep -v \.po$ ); do sed -i -e s/virDomainXMLConf/virDomainXMLOption/g -e s/xmlconf/xmlopt/g $i done and a few manual tweaks. ---

Re: [libvirt] [PATCH v5.1 02/11] conf: Add post XML parse callbacks and prepare for cleaning of virCaps

2013-04-04 Thread Daniel P. Berrange
On Thu, Apr 04, 2013 at 02:10:12PM +0200, Peter Krempa wrote: This patch adds instrumentation that will allow hypervisor drivers to fill and validate domain and device definitions after parsed by the XML parser. With this patch, after the XML is parsed, a callback to the driver is issued

Re: [libvirt] [PATCH v5.1 03/11] conf callback: Rearrange function parameters

2013-04-04 Thread Daniel P. Berrange
On Thu, Apr 04, 2013 at 02:10:13PM +0200, Peter Krempa wrote: Move the xmlopt and caps arguments to the end of the argument list. --- src/conf/domain_conf.c | 106 +++ src/conf/domain_conf.h | 44

Re: [libvirt] [PATCH v5.1 04/11] qemu: Record the default NIC model in the domain XML

2013-04-04 Thread Daniel P. Berrange
On Thu, Apr 04, 2013 at 02:10:14PM +0200, Peter Krempa wrote: This patch implements the devices post parse cllback and uses it to fill the default qemu network card model into the XML if none is specified. Libvirt assumes that the network card model for qemu is the rtl8139. Record this in

Re: [libvirt] [PATCH v5.1 05/11] virCaps: get rid of defaultInitPath value in the virCaps struct

2013-04-04 Thread Daniel P. Berrange
On Thu, Apr 04, 2013 at 02:10:15PM +0200, Peter Krempa wrote: This gets rid of the parameter in favor of using the new callback infrastructure to do the same stuff. This patch implements the domain adjustment callback in the openVZ driver and moves the check from the parser to a new

Re: [libvirt] [PATCH v5.1 06/11] virCaps: get rid of defaultDiskDriverName

2013-04-04 Thread Daniel P. Berrange
On Thu, Apr 04, 2013 at 02:10:16PM +0200, Peter Krempa wrote: This patch removes the defaultDiskDriverName from the virCaps structure. This particular default value is used only in the qemu driver so this patch uses the recently added callback to fill the driver name if it's needed instead of

Re: [libvirt] [PATCH v5.1 07/11] virCaps: get rid of emulatorRequired

2013-04-04 Thread Daniel P. Berrange
On Thu, Apr 04, 2013 at 02:10:17PM +0200, Peter Krempa wrote: This patch removes the emulatorRequired field and associated infrastructure from the virCaps object. Instead the driver specific callbacks are used as this field isn't enforced by all drivers. This patch implements the appropriate

Re: [libvirt] [PATCH v5.1 08/11] virCaps: get rid of defaultDiskDriverType

2013-04-04 Thread Daniel P. Berrange
On Thu, Apr 04, 2013 at 02:10:18PM +0200, Peter Krempa wrote: Use the qemu specific callback to fill this data in the qemu driver as it's the only place where it was used and fix tests as the qemu test capability object didn't configure the defaults for the tests. --- src/conf/capabilities.h

Re: [libvirt] [PATCH v5.1 09/11] virCaps: get rid of hasWideScsiBus

2013-04-04 Thread Daniel P. Berrange
On Thu, Apr 04, 2013 at 02:10:19PM +0200, Peter Krempa wrote: Use the virDomainXMLConf structure to hold this data. --- src/conf/capabilities.h| 1 - src/conf/domain_conf.c | 13 +++-- src/conf/domain_conf.h | 8 +++- src/esx/esx_driver.c | 11 +--

Re: [libvirt] [PATCH v5.1 10/11] virCaps: get rid of macPrefix field

2013-04-04 Thread Daniel P. Berrange
On Thu, Apr 04, 2013 at 02:10:20PM +0200, Peter Krempa wrote: Use the virDomainXMLConf structure to hold this data and tweak the code to avoid semantic change. Without configuration the KVM mac prefix is used by default. I chose it as it's in the privately administered segment so it should

Re: [libvirt] [PATCH v5.2] virCaps: get rid of defaultConsoleTargetType callback

2013-04-04 Thread Daniel P. Berrange
On Thu, Apr 04, 2013 at 02:16:09PM +0200, Peter Krempa wrote: This patch refactors various places to allow removing of the defaultConsoleTargetType callback from the virCaps structure. A new console character device target type is introduced - VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_NONE - to

Re: [libvirt] [PATCH v5.1 02/11] conf: Add post XML parse callbacks and prepare for cleaning of virCaps

2013-04-04 Thread Eric Blake
On 04/04/2013 06:10 AM, Peter Krempa wrote: This patch adds instrumentation that will allow hypervisor drivers to fill and validate domain and device definitions after parsed by the XML parser. With this patch, after the XML is parsed, a callback to the driver is issued requesing to fill

Re: [libvirt] [PATCH v5.1 01/11] maint: Rename xmlconf to xmlopt and virDomainXMLConfing to virDomainXMLOption

2013-04-04 Thread Laine Stump
On 04/04/2013 08:10 AM, Peter Krempa wrote: This patch is the result of running: for i in $(git ls-files | grep -v html | grep -v \.po$ ); do sed -i -e s/virDomainXMLConf/virDomainXMLOption/g -e s/xmlconf/xmlopt/g $i done and a few manual tweaks. ACK. (I agree with the renaming, and

Re: [libvirt] [RFC] Per machine type qemu capability detection

2013-04-04 Thread Viktor Mihajlovski
On 04/04/2013 06:20 PM, Peter Krempa wrote: My question is: Is it worthwhile to do per machine type capability detection? It definitely isn't worth doing just for the get-cpu-max support, but it might be needed for Q35 or other stuff that may depend on the actual machine type used. I am

Re: [libvirt] [PATCH v5.1 04/11] qemu: Record the default NIC model in the domain XML

2013-04-04 Thread Eric Blake
On 04/04/2013 06:10 AM, Peter Krempa wrote: This patch implements the devices post parse cllback and uses it to fill s/cllback/callback/ the default qemu network card model into the XML if none is specified. Libvirt assumes that the network card model for qemu is the rtl8139. Record this

Re: [libvirt] [PATCH v5.1 01/11] maint: Rename xmlconf to xmlopt and virDomainXMLConfing to virDomainXMLOption

2013-04-04 Thread Laine Stump
Oops. I just noticed that you misspelled Config as Confing in the first line of the message. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 01/18] Refactor RNG schema for resource tuning

2013-04-04 Thread Eric Blake
On 04/04/2013 07:40 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Split the resource define out into multiple smaller defines, one for each type of resource tuning parameter. This makes the schema a bit clearer to read Signed-off-by: Daniel P. Berrange

Re: [libvirt] [PATCH 1/7] qemu: QEMU_PCI constant consistency

2013-04-04 Thread Laine Stump
On 04/03/2013 11:50 AM, Ján Tomko wrote: Change QEMU_PCI_ADDRESS_LAST_SLOT to the number of slots in the bus, not the maximum slot value, to match QEMU_PCI_ADDRESS_LAST_FUNCTION. --- If you want to be *really* consistent, you should rename these to VIR_QEMU_PCI_ADDRESS_SLOT_LAST and

Re: [libvirt] [PATCH 02/18] Ensure LD_PRELOAD exists before running test case

2013-04-04 Thread Eric Blake
On 04/04/2013 07:40 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The linker will ignore LD_PRELOAD libraries which do not exist, just printing a warning message. This is not helpful for the test suite which will be utterly fubar without the preload library

Re: [libvirt] [PATCH 03/18] Introduce a virFileDeleteTree method

2013-04-04 Thread Eric Blake
On 04/04/2013 07:40 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Introduce a method virFileDeleteTree for recursively deleting an entire directory tree Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/libvirt_private.syms | 1 +

Re: [libvirt] [PATCH 2/7] qemu: move PCI address check out of qemuPCIAddressAsString

2013-04-04 Thread Laine Stump
On 04/03/2013 11:50 AM, Ján Tomko wrote: Move bus and domain checks from qemuPCIAddressAsString to a separate function and add a check for function and slot so that we can switch from a hash table to an array. Remove redundant checks in qemuBuildDeviceAddressStr. ---

Re: [libvirt] [PATCH 1/7] qemu: QEMU_PCI constant consistency

2013-04-04 Thread Eric Blake
On 04/04/2013 11:25 AM, Laine Stump wrote: On 04/03/2013 11:50 AM, Ján Tomko wrote: Change QEMU_PCI_ADDRESS_LAST_SLOT to the number of slots in the bus, not the maximum slot value, to match QEMU_PCI_ADDRESS_LAST_FUNCTION. --- If you want to be *really* consistent, you should rename these to

Re: [libvirt] [PATCH 04/18] Rename virCgroupGetAppRoot to virCgroupForSelf

2013-04-04 Thread Eric Blake
On 04/04/2013 07:40 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The virCgroupGetAppRoot is not clear in its meaning. Change to virCgroupForSelf to highlight that this returns the cgroup config for the caller's process Signed-off-by: Daniel P. Berrange

[libvirt] [RFC 2/5] target-i386: Add feature-words property

2013-04-04 Thread Eduardo Habkost
This property will be useful for libvirt, as libvirt already has logic based on low-level feature bits (not feature names), so it will be really easy to convert the current libvirt logic to something using the feature-words property. The property will have two main use cases: - Checking host

[libvirt] [RFC 5/5] target-i386: Add filtered-features property to X86CPU

2013-04-04 Thread Eduardo Habkost
This property will contain all the features that were removed from the CPU because they are not supported by the host. This way, libvirt or other management tools can emulate the check/enforce behavior by checking if filtered-properties is all zeroes, before starting the guest. Example output

[libvirt] [RFC 1/5] target-i386: Add ECX information to FeatureWordInfo

2013-04-04 Thread Eduardo Habkost
FEAT_7_0_EBX uses ECX as input, so we have to take that into account when reporting feature word values. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- target-i386/cpu.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c

[libvirt] [RFC 0/5] X86CPU feature-words filtered-features properties (v2)

2013-04-04 Thread Eduardo Habkost
Changes v2: * Added filtered-features properties * Removed the non-qapi version and kept only the qapi version of the code * Moved the new types to qapi-schema.json instead of creating cpu-qapi-schema.json * Rebased on top of feature words array series Git tree:

[libvirt] [RFC 3/5] target-i386: Use FeatureWord loop on filter_features_for_kvm()

2013-04-04 Thread Eduardo Habkost
Instead of open-coding the filtering code for each feature word, change the existing code to use the feature_word_info array, that have exactly the same CPUID eax/ecx/register values for each feature word. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- target-i386/cpu.c | 24

[libvirt] [RFC 4/5] target-i386: Introduce X86CPU.filtered_features field

2013-04-04 Thread Eduardo Habkost
This field will contain the feature bits that were filtered out because of missing host support. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- target-i386/cpu-qom.h | 3 +++ target-i386/cpu.c | 9 ++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git

[libvirt] [PATCH 3/8] qemu: Translate the pool disk source when building drive string

2013-04-04 Thread Osier Yang
This adds a new helper qemuTranslateDiskSourcePool which uses the storage pool/vol APIs to tranlsate the disk source before building the drive string. Network volume is not supported yet. Disk chain for volume type disk may be supported later, but before I'm confident it doesn't break anything,

[libvirt] [PATCH 1/8] conf: New helper virDomainDiskSourceDefFormat to format the disk source

2013-04-04 Thread Osier Yang
The code to format disk source is long enough to have a helper. --- src/conf/domain_conf.c | 174 ++--- 1 file changed, 92 insertions(+), 82 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index cc26f21..8288959 100644 ---

[libvirt] [PATCH 0/8 v2] Glue domain and storage

2013-04-04 Thread Osier Yang
This is the 4th part to implement NPIV migration support [1]. Part 1 and part 2 are pushed. Part 3 (v3: pending for review): https://www.redhat.com/archives/libvir-list/2013-March/msg01440.html == This introduces new XMLs to specify the disk source with storage like disk type='volume'

[libvirt] [PATCH 4/8] Support startupPolicy for 'volume' disk

2013-04-04 Thread Osier Yang
startupPolicy is only valid for file type storage volume, otherwise it fails on starting the domain. --- docs/formatdomain.html.in| 7 --- docs/schemas/domaincommon.rng| 3 +++ src/conf/domain_conf.c

[libvirt] [PATCH 5/8] Support seclabels for volume type disk

2013-04-04 Thread Osier Yang
seclabels is only valid for 'file' or 'block' type storage volume. --- docs/formatdomain.html.in| 6 -- docs/schemas/domaincommon.rng| 3 +++ src/conf/domain_conf.c | 20 ++--

[libvirt] [PATCH 7/8] qemu: Support shareable volume type disk

2013-04-04 Thread Osier Yang
Since the source is already translated before. This just adds the checking. Move !disk-shared and !disk-src to improve the performance a bit. --- src/qemu/qemu_conf.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c

[libvirt] [PATCH 2/8] Introduce new XMLs to specify disk source using libvirt storage

2013-04-04 Thread Osier Yang
With this patch, one can specify the disk source using libvirt storage like: disk type='volume' device='disk' driver name='qemu' type='raw' cache='none'/ source pool='default' volume='fc18.img'/ target dev='vdb' bus='virtio'/ /disk seclables and startupPolicy are not supported

[libvirt] [PATCH 8/8] qemu: Support sgio setting for volume type disk

2013-04-04 Thread Osier Yang
--- src/qemu/qemu_process.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 3ac0c70..757f8b8 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -3235,9 +3235,12 @@

[libvirt] [PATCH 6/8] qemu: Translate the pool disk source earlier

2013-04-04 Thread Osier Yang
To support shareable for volume type disk, we have to translate the source before trying to add the shared disk entry. To archieve the goal, this moves the helper qemuTranslateDiskSourcePool into src/qemu/qemu_conf.c, and introduce a internal only member (voltype) for struct

Re: [libvirt] [PATCH 05/18] Don't create dirs in cgroup controllers we don't want to use

2013-04-04 Thread Eric Blake
On 04/04/2013 07:40 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Currently when getting an instance of virCgroupPtr we will create the path in all cgroup controllers. Only at the virt driver layer are we attempting to filter controllers. This is bad because the

Re: [libvirt] [PATCH 2/8] Introduce new XMLs to specify disk source using libvirt storage

2013-04-04 Thread Paolo Bonzini
Il 04/04/2013 21:37, Osier Yang ha scritto: With this patch, one can specify the disk source using libvirt storage like: disk type='volume' device='disk' driver name='qemu' type='raw' cache='none'/ source pool='default' volume='fc18.img'/ target dev='vdb' bus='virtio'/

Re: [libvirt] [PATCH 2/8] Introduce new XMLs to specify disk source using libvirt storage

2013-04-04 Thread Osier Yang
On 05/04/13 03:15, Paolo Bonzini wrote: Il 04/04/2013 21:37, Osier Yang ha scritto: With this patch, one can specify the disk source using libvirt storage like: disk type='volume' device='disk' driver name='qemu' type='raw' cache='none'/ source pool='default' volume='fc18.img'/

Re: [libvirt] [PATCH v5.1 04/11] qemu: Record the default NIC model in the domain XML

2013-04-04 Thread Peter Krempa
On 04/04/13 17:35, Viktor Mihajlovski wrote: On 04/04/2013 02:10 PM, Peter Krempa wrote: This patch implements the devices post parse cllback and uses it to fill the default qemu network card model into the XML if none is specified. Libvirt assumes that the network card model for qemu is the

Re: [libvirt] [PATCH 3/7] qemu: switch PCI address set from hash table to an array

2013-04-04 Thread Laine Stump
On 04/03/2013 11:50 AM, Ján Tomko wrote: Each bus (just one so far) is represented by an array with 32 slots where each slot is stored as an 8-bit integer where each bit represents a function. This makes operations with whole slots easier. --- src/qemu/qemu_command.c | 152

Re: [libvirt] [PATCH v5.1 00/11] Introduce driver specific XML parsing callbacks

2013-04-04 Thread Peter Krempa
On 04/04/13 14:10, Peter Krempa wrote: In this respin the renaming patch is moved to be first in the series. The argument rearrangement patch was too complicated to move. Unfortunately this rebase operation caused my git notes to be lost for the individual patches, so please see v5 for more

Re: [libvirt] [RFC] Per machine type qemu capability detection

2013-04-04 Thread Laine Stump
On 04/04/2013 01:13 PM, Viktor Mihajlovski wrote: On 04/04/2013 06:20 PM, Peter Krempa wrote: My question is: Is it worthwhile to do per machine type capability detection? It definitely isn't worth doing just for the get-cpu-max support, but it might be needed for Q35 or other stuff that may

Re: [libvirt] [PATCH 03/18] Introduce a virFileDeleteTree method

2013-04-04 Thread Daniel P. Berrange
On Thu, Apr 04, 2013 at 11:56:29AM -0600, Eric Blake wrote: On 04/04/2013 07:40 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Introduce a method virFileDeleteTree for recursively deleting an entire directory tree Signed-off-by: Daniel P. Berrange

Re: [libvirt] [RFC] Per machine type qemu capability detection

2013-04-04 Thread Daniel P. Berrange
On Thu, Apr 04, 2013 at 04:57:18PM -0400, Laine Stump wrote: On 04/04/2013 01:13 PM, Viktor Mihajlovski wrote: On 04/04/2013 06:20 PM, Peter Krempa wrote: My question is: Is it worthwhile to do per machine type capability detection? It definitely isn't worth doing just for the get-cpu-max

[libvirt] [PATCH] qemu: Remove maximum cpu limit when setting processor count using the API

2013-04-04 Thread Peter Krempa
When setting processor count for a domain using the API libvirt enforced a maximum processor count, while it isn't enforced when taking the XML path. This patch removes the check to match the API. --- src/qemu/qemu_driver.c | 24 +++- 1 file changed, 3 insertions(+), 21

[libvirt] Device backend in another domain (xen)

2013-04-04 Thread Marek Marczykowski
Hi all, Xen have (AFAIK unique) feature of having backend device in other domU (sometimes called driver domain) instead of dom0. Currently libxl support it for disk and network devices, but in general it is valid for any device (perhaps excluding PCI). Current implementation requires ID of

Re: [libvirt] [PATCH 2/2] LXC: rework mounting cgroupfs in container

2013-04-04 Thread Gao feng
On 2013/03/27 13:26, Gao feng wrote: On 2013/03/20 16:14, Gao feng wrote: There are 3 reason we need to rework the cgroupfs mounting in container. 1, Yin Olivia reported a failed to mount cgroup problem, now we given that the name of cgroup mount point is same with the subsystem type,

Re: [libvirt] [PATCH v2 2/3] Auto-add a root filesystem element to LXC containers on startup

2013-04-04 Thread Gao feng
On 2013/04/04 04:15, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Currently the LXC container code has two codepaths, depending on whether there is a filesystem element with a target path of '/'. If we automatically add a filesystem device with src=/ and dst=/, for

Re: [libvirt] [PATCH] maint: update to latest gnulib

2013-04-04 Thread Eric Blake
On 04/01/2013 12:55 PM, Eric Blake wrote: While this update doesn't address any reported problems in libvirt, doing a post-release update to latest gnulib makes it easier to stay in sync with best upstream practices. * .gnulib: Update to latest. * bootstrap: Resynchronize. --- Ping.

Re: [libvirt] [PATCHv3 6/6] rpc: Fix connection close callback race condition and memory corruption/crash

2013-04-04 Thread Eric Blake
On 03/31/2013 10:20 AM, Peter Krempa wrote: The last Viktor's effort to fix the race and memory corruption unfortunately wasn't complete in the case the close callback was not registered in an connection. At that time, the trail of event's that I'll describe later could still happend and

Re: [libvirt] [PATCH v2 05/10] utils: util functions for scsi hostdev

2013-04-04 Thread Han Cheng
On 04/03/2013 01:06 PM, Hu Tao wrote: On Mon, Apr 01, 2013 at 08:00:57PM +0800, Han Cheng wrote: +int +virSCSIDeviceListAdd(virSCSIDeviceListPtr list, + virSCSIDevicePtr dev) +{ +if (virSCSIDeviceListFind(list, dev)) { +virReportError(VIR_ERR_INTERNAL_ERROR, +

Re: [libvirt] [PATCH v2 05/10] utils: util functions for scsi hostdev

2013-04-04 Thread Han Cheng
On 04/03/2013 05:04 PM, Osier Yang wrote: On 01/04/13 20:00, Han Cheng wrote: + if (virAsprintf(tmp, SCSI_DEVFS /%s/vendor, dev-name) 0) { + virReportOOMError(); + goto out; + } + if (virFileReadAll(tmp, 1024, vendor) 0) + goto out; + VIR_FREE(tmp); + tmp = NULL; + if (virAsprintf(tmp,

Re: [libvirt] [PATCH v2 03/10] conf: Introduce scsi hostdev

2013-04-04 Thread Han Cheng
On 04/02/2013 11:19 AM, Hu Tao wrote: On Mon, Apr 01, 2013 at 08:00:55PM +0800, Han Cheng wrote: diff --git a/src/conf/domain_audit.c b/src/conf/domain_audit.c index a776058..2fb5989 100644 --- a/src/conf/domain_audit.c +++ b/src/conf/domain_audit.c @@ -398,6 +398,16 @@

Re: [libvirt] [PATCH v2 03/10] conf: Introduce scsi hostdev

2013-04-04 Thread Han Cheng
On 04/03/2013 04:32 PM, Osier Yang wrote: On 03/04/13 16:29, Osier Yang wrote: On 01/04/13 20:00, Han Cheng wrote: dtcodehostdev/code/dt ddThe codehostdev/code element is the main container for describing host devices. For usb device passthrough codemode/code is always - subsystem and

  1   2   >