Re: [libvirt] [PATCH 5/7] conf: spice: Do more automation if autoport is requested

2013-04-24 Thread Daniel P. Berrange
On Tue, Apr 23, 2013 at 08:57:10PM +0200, Peter Krempa wrote: On 04/23/13 18:21, Daniel P. Berrange wrote: On Tue, Apr 23, 2013 at 03:46:12PM +0200, Peter Krempa wrote: With autoport enabled, both ports were alocated. With enabling defaultMode or setting separate channel modes one of the ports

Re: [libvirt] Using leases with virtlockd

2013-04-24 Thread Daniel P. Berrange
On Tue, Apr 23, 2013 at 10:05:18PM -0600, Jim Fehlig wrote: Nearly a question for the users list, but I might be encountering a bug too. I'm using virtlockd with 'auto_disk_leases = 0' and struggle with the correct configuration for a lease in the domXML. Using lease

Re: [libvirt] [PATCH] qemu: Generate agent socket path if missing

2013-04-24 Thread Michal Privoznik
On 23.04.2013 17:40, Jiri Denemark wrote: On Tue, Apr 09, 2013 at 19:05:28 +0200, Michal Privoznik wrote: It's not desired to force users imagine path for a socket they are not even supposed to connect to. On the other hand, we already have a release where the qemu agent socket path is

[libvirt] [PATCH] Change the tag name num_queues into queues

2013-04-24 Thread Osier Yang
Instead of making a choice between the underscore and camelCase, this simply changes num_queues into queues, which is also consistent with Michal's multiple queue support for interface. --- docs/formatdomain.html.in | 2 +- docs/schemas/domaincommon.rng

Re: [libvirt] [PATCH 5/7] conf: spice: Do more automation if autoport is requested

2013-04-24 Thread Peter Krempa
On 04/24/13 10:19, Daniel P. Berrange wrote: On Tue, Apr 23, 2013 at 08:57:10PM +0200, Peter Krempa wrote: On 04/23/13 18:21, Daniel P. Berrange wrote: On Tue, Apr 23, 2013 at 03:46:12PM +0200, Peter Krempa wrote: With autoport enabled, both ports were alocated. With enabling defaultMode or

[libvirt] [PATCH] Introduce a sub-element driver for controller

2013-04-24 Thread Osier Yang
Like what we did for disk, filesystem and interface, this introduces sub-element driver for controller, and put the queues into it. --- docs/formatdomain.html.in | 26 ++ docs/schemas/domaincommon.rng | 14 ++

Re: [libvirt] [PATCH] util: Error out if the numa nodeset is out of range

2013-04-24 Thread Osier Yang
ping. On 22/04/13 15:14, Osier Yang wrote: Instead of a silent warning, it's better to error out if the numa nodeset is out of range. Just like for numa node larger than NUMA_NUM_NODES. --- src/util/virnuma.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git

Re: [libvirt] [PATCH 5/7] conf: spice: Do more automation if autoport is requested

2013-04-24 Thread Daniel P. Berrange
On Wed, Apr 24, 2013 at 10:38:26AM +0200, Peter Krempa wrote: On 04/24/13 10:19, Daniel P. Berrange wrote: On Tue, Apr 23, 2013 at 08:57:10PM +0200, Peter Krempa wrote: On 04/23/13 18:21, Daniel P. Berrange wrote: On Tue, Apr 23, 2013 at 03:46:12PM +0200, Peter Krempa wrote: With autoport

Re: [libvirt] [PATCH 5/7] conf: spice: Do more automation if autoport is requested

2013-04-24 Thread Peter Krempa
On 04/24/13 10:42, Daniel P. Berrange wrote: On Wed, Apr 24, 2013 at 10:38:26AM +0200, Peter Krempa wrote: On 04/24/13 10:19, Daniel P. Berrange wrote: On Tue, Apr 23, 2013 at 08:57:10PM +0200, Peter Krempa wrote: On 04/23/13 18:21, Daniel P. Berrange wrote: On Tue, Apr 23, 2013 at

Re: [libvirt] [PATCH 1/6] Cleanup command line options in gendispatch.pl

2013-04-24 Thread Daniel P. Berrange
On Tue, Apr 23, 2013 at 10:59:53AM -0600, Eric Blake wrote: On 04/23/2013 04:26 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com There are many declared options in gendispatch.pl that were no longer used. Those which were used were obsecure '-b', '-k'

Re: [libvirt] [PATCH 8/6] Make driver method names consistent with public APIs

2013-04-24 Thread Daniel P. Berrange
On Tue, Apr 23, 2013 at 03:08:23PM -0600, Eric Blake wrote: On 04/23/2013 09:57 AM, Daniel P. Berrange wrote: diff --git a/src/Makefile.am b/src/Makefile.am index 02fb2ab..1f6a245 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -435,6 +435,52 @@ check-drivername:

[libvirt] [ocaml PATCH 4/4] Add a simple example to show how to receive event callbacks

2013-04-24 Thread David Scott
Signed-off-by: David Scott dave.sc...@eu.citrix.com --- .gitignore| 1 + Makefile.in | 1 + examples/Makefile.in | 13 - examples/domain_events.ml | 145 ++ 4 files changed, 159 insertions(+), 1 deletion(-)

[libvirt] [ocaml] event registration APis v3

2013-04-24 Thread David Scott
Hi, Here are my latest patches which add OCaml bindings for the libvirt event API. I'm pretty happy with them now: my test programs have been running for long periods of time without incident. Changes from the previous submission (sent 2013-04-17) * added a patch which removes the backwards

[libvirt] [ocaml PATCH 2/4] Add binding for virConnectSetKeepAlive

2013-04-24 Thread David Scott
This one is a 'one-off' but it ought to be possible to use the generator to create the function (it has signature 'conn, int, int : int') This function first appeared in libvirt version 0.9.8. Signed-off-by: David Scott dave.sc...@eu.citrix.com --- libvirt/libvirt.ml | 2 ++

[libvirt] [ocaml PATCH 3/4] Add event callback implementation based on virConnectDomainEventRegisterAny

2013-04-24 Thread David Scott
A client may register a callback as follows: E.register_default_impl (); let conn = C.connect_readonly ?name () in let id = E.register_any conn (E.Lifecycle (fun dom e - printd dom Lifecycle %s (E.Lifecycle.to_string e) )) in Internally this will: 1. generate a unique

Re: [libvirt] [PATCH] virsh: don't shorten incorrect arguments

2013-04-24 Thread Ján Tomko
On 04/23/2013 06:05 PM, Eric Blake wrote: On 04/23/2013 08:08 AM, Ján Tomko wrote: https://bugzilla.redhat.com/show_bug.cgi?id=949373 Print the whole incorrect argument as specified by the user instead of the short option. case 'd': if (virStrToLong_i(optarg, NULL,

[libvirt] [PATCH 2/4] Adjust comments to describe on_poweroff and on_reboot action

2013-04-24 Thread John Ferlan
--- src/libvirt.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index c236152..4bd6c9a 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -3184,9 +3184,11 @@ error: * virDomainShutdown: * @domain: a domain object * - *

[libvirt] [PATCH 4/4] docs: Update formatdomain for lifecycle events

2013-04-24 Thread John Ferlan
--- docs/formatdomain.html.in | 30 ++ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 888c005..2c876ed 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -957,7 +957,13

[libvirt] [PATCH 3/4] Handle the domain event 'on_reboot' and 'on_poweroff' settings

2013-04-24 Thread John Ferlan
--- src/qemu/qemu_driver.c | 26 ++ 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index ba5600d..084412f 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -1697,6 +1697,8 @@ static int

[libvirt] [PATCH 1/4] Adjust usage of qemu -no-reboot and -no-shutdown options

2013-04-24 Thread John Ferlan
During building of the qemu command line determine whether to add/use the '-no-reboot' option only if each of the 'on' events want to to destroy the domain; otherwise, use the '-no-shutdown' option. Prior to this change both could be on the command line, which while allowed could be construed as

[libvirt] [PATCH 0/4] Fix issues with guest lifecycle event action settings

2013-04-24 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=916052 Domain lifecycle events on_reboot and on_poweroff translate into QEMU command options no-reboot and no-shutdown at startup time. The existing code only checked the on_reboot setting to determine whether to add the no-reboot option even though

Re: [libvirt] [PATCH v5 1/2] Add NVRAM device

2013-04-24 Thread Osier Yang
On 19/04/13 16:37, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com For pSeries guest in QEMU, NVRAM is one kind of spapr-vio device. Users are allowed to specify spapr-vio devices'address. But NVRAM is not supported in libvirt. So this patch is to add NVRAM device to allow users to

Re: [libvirt] [PATCH v5 2/2] qemu: Add command line builder and parser for NVRAM.

2013-04-24 Thread Osier Yang
On 19/04/13 16:37, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com This patch is to add command line builder and parser for NVRAM device, and add test cases. Signed-off-by: Li Zhang zhlci...@linux.vnet.ibm.com --- v5 - v4: * Fix one memory leakage suggested by Eric Blake *

[libvirt] [PATCH] qemuBuildCommandLine: Don't overwrite errors with NWFilter's one

2013-04-24 Thread Michal Privoznik
Currently, if there has been an error in building command line process after virtual interfaces has been created, the flow jumps to 'error' label, where virDomainConfNWFilterTeardown() is called. This may report an error as well, but should not overwrite the original cause why we jumped to 'error'

Re: [libvirt] [PATCH v5 1/2] Add NVRAM device

2013-04-24 Thread Osier Yang
On 24/04/13 19:58, Osier Yang wrote: On 19/04/13 16:37, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com For pSeries guest in QEMU, NVRAM is one kind of spapr-vio device. Users are allowed to specify spapr-vio devices'address. But NVRAM is not supported in libvirt. So this patch is

[libvirt] [PATCH] selinux: Don't mask errors of virSecuritySELinuxGenNewContext

2013-04-24 Thread Peter Krempa
virSecuritySELinuxGenNewContext() reports sensible errors but at virSecuritySELinuxGenSecurityLabel() the error is masked with a non-specific one. --- src/security/security_selinux.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/security/security_selinux.c

Re: [libvirt] [PATCH] qemuBuildCommandLine: Don't overwrite errors with NWFilter's one

2013-04-24 Thread Osier Yang
On 24/04/13 20:35, Michal Privoznik wrote: Currently, if there has been an error in building command line process after virtual interfaces has been created, the flow jumps to 'error' label, where virDomainConfNWFilterTeardown() is called. This may report an error as well, but should not

Re: [libvirt] [PATCH v5 2/2] qemu: Add command line builder and parser for NVRAM.

2013-04-24 Thread Osier Yang
On 24/04/13 20:17, Osier Yang wrote: On 19/04/13 16:37, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com This patch is to add command line builder and parser for NVRAM device, and add test cases. Signed-off-by: Li Zhang zhlci...@linux.vnet.ibm.com --- v5 - v4: * Fix one memory

Re: [libvirt] [PATCH] selinux: Don't mask errors of virSecuritySELinuxGenNewContext

2013-04-24 Thread Osier Yang
On 24/04/13 20:43, Peter Krempa wrote: virSecuritySELinuxGenNewContext() reports sensible errors but at virSecuritySELinuxGenSecurityLabel() the error is masked with a non-specific one. --- src/security/security_selinux.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff

[libvirt] [PATCH 1/1] Fuse file system mounted at /proc/meminfo needs correct label.

2013-04-24 Thread dwalsh
From: Dan Walsh dwa...@redhat.com Currently the /proc/meminfo is labeled fusefs_t rather then proc_t. SELinux blocks openshift instances from reading fusefs_t, this patch sets the file to the default label of /proc/meminfo --- src/lxc/lxc_container.c | 24 1 file

[libvirt] [PATCH] doc: Clarify usage of SELinux baselabel

2013-04-24 Thread Peter Krempa
State what fields are used when generating SELinux labels from a baselabel. --- docs/formatdomain.html.in | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 888c005..9118ff0 100644 ---

[libvirt] [libvirt-java] [PATCH] Fix wrapping of native size_t data type

2013-04-24 Thread Claudio Bley
Libvirt function parameters having type (pointer to) size_t were wrapped via JNA using int, long or even NativeLong. Alas, none of these is actually correct as the size of size_t may be the same as the size of either (unsigned) int, long or even long long on different platforms. JNA provides the

Re: [libvirt] [PATCH 7/7] qemu: Improve handling of channels when generating SPICE command line

2013-04-24 Thread Peter Krempa
On 04/24/13 01:10, Eric Blake wrote: On 04/23/2013 07:46 AM, Peter Krempa wrote: Improve error reporting and generating of SPICE command line arguments according to the need to enable TLS. If TLS is disabled, there's no need to pass the certificate dir to qemu. This patch resolves:

Re: [libvirt] [PATCH 6/7] qemu: Do sensible auto allocation of SPICE port numbers

2013-04-24 Thread Peter Krempa
On 04/24/13 01:07, Eric Blake wrote: On 04/23/2013 07:46 AM, Peter Krempa wrote: With this patch, if the autoport attribute is used, the code will sensibly auto allocate the ports only if needed. --- src/qemu/qemu_process.c | 66 ++--- 1 file

[libvirt] Fuse file system mounted at /proc/meminfo needs correct label.

2013-04-24 Thread dwalsh
Second Pass... [PATCH 1/1] Fuse file system mounted at /proc/meminfo needs correct -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCHv2] selinux: Don't mask errors of virSecuritySELinuxGenNewContext

2013-04-24 Thread Peter Krempa
Since cbe67ff9b0a5a94911afd4d12388bf182bcca86c virSecuritySELinuxGenNewContext reports good error messages. Fix callers that mask the errors by generic error message. --- src/security/security_selinux.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git

Re: [libvirt] virNodeDevice APIs and VFIO

2013-04-24 Thread Laine Stump
On 04/23/2013 12:34 PM, Laine Stump wrote: On 04/23/2013 11:46 AM, Daniel P. Berrange wrote: On Tue, Apr 23, 2013 at 10:52:09AM -0400, Laine Stump wrote: Yesterday for the first time I consciously noticed the virNodeDeviceDettach and virNodeDeviceReAttach APIs, and found that they are

Re: [libvirt] [PATCHv2] selinux: Don't mask errors of virSecuritySELinuxGenNewContext

2013-04-24 Thread Osier Yang
On 24/04/13 21:11, Peter Krempa wrote: Since cbe67ff9b0a5a94911afd4d12388bf182bcca86c virSecuritySELinuxGenNewContext reports good error messages. Fix callers that mask the errors by generic error message. --- src/security/security_selinux.c | 14 -- 1 file changed, 4

Re: [libvirt] virNodeDevice APIs and VFIO

2013-04-24 Thread Daniel P. Berrange
On Wed, Apr 24, 2013 at 09:56:34AM -0400, Laine Stump wrote: On 04/23/2013 12:34 PM, Laine Stump wrote: On 04/23/2013 11:46 AM, Daniel P. Berrange wrote: On Tue, Apr 23, 2013 at 10:52:09AM -0400, Laine Stump wrote: Yesterday for the first time I consciously noticed the

Re: [libvirt] [PATCHv2] selinux: Don't mask errors of virSecuritySELinuxGenNewContext

2013-04-24 Thread Peter Krempa
On 04/24/13 15:59, Osier Yang wrote: On 24/04/13 21:11, Peter Krempa wrote: Since cbe67ff9b0a5a94911afd4d12388bf182bcca86c virSecuritySELinuxGenNewContext reports good error messages. Fix callers that mask the errors by generic error message. --- src/security/security_selinux.c | 14

Re: [libvirt] [PATCH] util: Error out if the numa nodeset is out of range

2013-04-24 Thread Eric Blake
On 04/22/2013 01:14 AM, Osier Yang wrote: Instead of a silent warning, it's better to error out if the numa nodeset is out of range. Just like for numa node larger than NUMA_NUM_NODES. --- src/util/virnuma.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) ACK.

Re: [libvirt] [PATCH] Change the tag name num_queues into queues

2013-04-24 Thread Eric Blake
On 04/24/2013 03:24 AM, Osier Yang wrote: Instead of making a choice between the underscore and camelCase, this simply changes num_queues into queues, which is also consistent with Michal's multiple queue support for interface. --- docs/formatdomain.html.in |

Re: [libvirt] [PATCH] Change the tag name num_queues into queues

2013-04-24 Thread Osier Yang
On 24/04/13 23:20, Eric Blake wrote: On 04/24/2013 03:24 AM, Osier Yang wrote: Instead of making a choice between the underscore and camelCase, this simply changes num_queues into queues, which is also consistent with Michal's multiple queue support for interface. ---

Re: [libvirt] [PATCH] util: Error out if the numa nodeset is out of range

2013-04-24 Thread Osier Yang
On 24/04/13 23:17, Eric Blake wrote: On 04/22/2013 01:14 AM, Osier Yang wrote: Instead of a silent warning, it's better to error out if the numa nodeset is out of range. Just like for numa node larger than NUMA_NUM_NODES. --- src/util/virnuma.c | 12 1 file changed, 4

Re: [libvirt] virNodeDevice APIs and VFIO

2013-04-24 Thread Laine Stump
On 04/24/2013 10:01 AM, Daniel P. Berrange wrote: On Wed, Apr 24, 2013 at 09:56:34AM -0400, Laine Stump wrote: On 04/23/2013 12:34 PM, Laine Stump wrote: On 04/23/2013 11:46 AM, Daniel P. Berrange wrote: On Tue, Apr 23, 2013 at 10:52:09AM -0400, Laine Stump wrote: Yesterday for the first time

Re: [libvirt] [PATCH] Introduce a sub-element driver for controller

2013-04-24 Thread Eric Blake
On 04/24/2013 03:24 AM, Osier Yang wrote: Like what we did for disk, filesystem and interface, this introduces sub-element driver for controller, and put the queues into it. --- docs/formatdomain.html.in | 26 ++ docs/schemas/domaincommon.rng

Re: [libvirt] [PATCH] Change the tag name num_queues into queues

2013-04-24 Thread Osier Yang
On 24/04/13 23:20, Eric Blake wrote: On 04/24/2013 03:24 AM, Osier Yang wrote: Instead of making a choice between the underscore and camelCase, this simply changes num_queues into queues, which is also consistent with Michal's multiple queue support for interface. ---

Re: [libvirt] [PATCH] Introduce a sub-element driver for controller

2013-04-24 Thread Osier Yang
On 24/04/13 23:27, Eric Blake wrote: On 04/24/2013 03:24 AM, Osier Yang wrote: Like what we did for disk, filesystem and interface, this introduces sub-element driver for controller, and put the queues into it. --- docs/formatdomain.html.in | 26 ++

Re: [libvirt] [PATCH] Introduce a sub-element driver for controller

2013-04-24 Thread Laine Stump
On 04/24/2013 05:24 AM, Osier Yang wrote: Like what we did for disk, filesystem and interface, this introduces sub-element driver for controller, and put the queues into it. --- docs/formatdomain.html.in | 26 ++ docs/schemas/domaincommon.rng

Re: [libvirt] [PATCH] virsh: don't shorten incorrect arguments

2013-04-24 Thread Eric Blake
On 04/24/2013 05:28 AM, Ján Tomko wrote: On 04/23/2013 06:05 PM, Eric Blake wrote: On 04/23/2013 08:08 AM, Ján Tomko wrote: https://bugzilla.redhat.com/show_bug.cgi?id=949373 Print the whole incorrect argument as specified by the user instead of the short option. case 'd':

Re: [libvirt] [PATCH] doc: Clarify usage of SELinux baselabel

2013-04-24 Thread Eric Blake
On 04/24/2013 07:30 AM, Peter Krempa wrote: State what fields are used when generating SELinux labels from a baselabel. --- docs/formatdomain.html.in | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index

Re: [libvirt] [PATCH] doc: Clarify usage of SELinux baselabel

2013-04-24 Thread Peter Krempa
On 04/24/13 17:57, Eric Blake wrote: On 04/24/2013 07:30 AM, Peter Krempa wrote: State what fields are used when generating SELinux labels from a baselabel. --- docs/formatdomain.html.in | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/formatdomain.html.in

[libvirt] [PATCHv2] doc: Clarify usage of SELinux baselabel

2013-04-24 Thread Peter Krempa
State what fields are used when generating SELinux labels from a baselabel. --- Notes: Version 2: - add reference to example docs/formatdomain.html.in | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in

Re: [libvirt] [PATCH] qemu: Don't require a block or file when looking for an alias.

2013-04-24 Thread Wido den Hollander
Did this one get lost or forgotten? Thanks, Wido On 04/05/2013 06:07 PM, Wido den Hollander wrote: This for example prohibits you to use iotune for Ceph or Sheepdog devices. Signed-off-by: Wido den Hollander w...@widodh.nl --- src/qemu/qemu_driver.c |4 1 file changed, 4

[libvirt] [PATCH 0/7] VFIO support part 2

2013-04-24 Thread Laine Stump
More patches to go on top of the 3 patches yesterday. These patches add a new API that I just learned was necessary - virNodeDeviceDetachFlags() (explanation in patches), implement it for xen and qemu, and use it in virsh. Laine Stump (7): pci: keep a stubDriver in each virPCIDevice qemu:

[libvirt] [PATCH 1/7] pci: keep a stubDriver in each virPCIDevice

2013-04-24 Thread Laine Stump
This can be set when the virPCIDevice is created and placed on a list, then used later when traversing the list to determine which stub driver to bind/unbind for managed devices. The existing Detach and Attach functions' signatures haven't been changed (they still accept a stub driver name in the

[libvirt] [PATCH 3/7] hypervisor api: new virNodeDeviceDetachFlags

2013-04-24 Thread Laine Stump
The existing virNodeDeviceDettach() assumes that there is only a single PCI device assignment backend driver appropriate for any hypervisor. This is no longer true, as the qemu driver is getting support for PCI device assigment via VFIO. The new API virNodeDeviceDetachFlags adds a driverName arg

[libvirt] [PATCH 7/7] virsh: use new virNodeDeviceDetachFlags

2013-04-24 Thread Laine Stump
The virsh nodedev-detach command has a new --driver option. If it's given virsh will attempt to use the new virNodeDeviceDetachFlags API instead of virNodeDeviceDettach. Validation of the driver name string is left to the hypervisor (qemu accepts kvm or vfio. The only other hypervisor that

[libvirt] [PATCH 5/7] qemu: implement virNodeDeviceDetachFlags backend

2013-04-24 Thread Laine Stump
The differences from virNodeDeviceDettach are very minor: 1) Check that the flags are 0. 2) Set the virPCIDevice's stubDriver according to the driverName that is passed in. 3) Call virPCIDeviceDetach with a NULL stubDriver, indicating it should get the name of the stub driver from the

[libvirt] [PATCH 2/7] qemu: bind/unbind stub driver according to config driver name='x'/

2013-04-24 Thread Laine Stump
If the config for a device has specified driver name='vfio'/, backend in the pci part of the hostdev object will be set to ..._VFIO. In this case, when creating a virPCIDevice set the stubDriver to vfio-pci, otherwise set it to pci-stub. We will rely on the lower levels to report an error if the

[libvirt] [PATCH 4/7] hypervisor api: implement RPC calls for virNodeDeviceDetachFlags

2013-04-24 Thread Laine Stump
This requires a custom function for remoteNodeDeviceDetachFlags, because it is named *NodeDevice, but it goes through the hypervisor driver rather than nodedevice driver, and so it uses privateData instead of nodeDevicePrivateData. (It has to go through the hypervisor driver, because that is the

Re: [libvirt] [PATCHv2] doc: Clarify usage of SELinux baselabel

2013-04-24 Thread Eric Blake
On 04/24/2013 12:02 PM, Peter Krempa wrote: State what fields are used when generating SELinux labels from a baselabel. --- Notes: Version 2: - add reference to example docs/formatdomain.html.in | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) ACK. --

Re: [libvirt] [PATCH] qemu: Don't require a block or file when looking for an alias.

2013-04-24 Thread Eric Blake
On 04/24/2013 01:07 PM, Wido den Hollander wrote: Did this one get lost or forgotten? Yep, so thanks for the ping. Thanks, Wido On 04/05/2013 06:07 PM, Wido den Hollander wrote: This for example prohibits you to use iotune for Ceph or Sheepdog devices. Signed-off-by: Wido den

Re: [libvirt] [PATCHv4 5/5] qemu: auto-add bridges and allow using them

2013-04-24 Thread Eric Blake
On 04/23/2013 06:47 AM, Ján Tomko wrote: Add a dry run address allocation to figure out how many bridges will be needed for all the devices without explicit addresses. Auto-add just enough bridges to put all the devices on, or up to the bridge with the largest specified index. --- v4:

Re: [libvirt] [PATCHv4 6/5] conf: reject controllers with duplicate indexes

2013-04-24 Thread Eric Blake
On 04/23/2013 06:47 AM, Ján Tomko wrote: Reject multiple controllers with the same index, except for USB controllers. Multi-function USB controllers can have the same index. --- src/conf/domain_conf.c | 64 ++ 1 file changed, 64

Re: [libvirt] [PATCH 1/7] pci: keep a stubDriver in each virPCIDevice

2013-04-24 Thread Eric Blake
On 04/24/2013 01:26 PM, Laine Stump wrote: This can be set when the virPCIDevice is created and placed on a list, then used later when traversing the list to determine which stub driver to bind/unbind for managed devices. The existing Detach and Attach functions' signatures haven't been

Re: [libvirt] [PATCH 2/7] qemu: bind/unbind stub driver according to config driver name='x'/

2013-04-24 Thread Eric Blake
On 04/24/2013 01:26 PM, Laine Stump wrote: If the config for a device has specified driver name='vfio'/, backend in the pci part of the hostdev object will be set to ..._VFIO. In this case, when creating a virPCIDevice set the stubDriver to vfio-pci, otherwise set it to pci-stub. We will rely

Re: [libvirt] [PATCH 3/7] hypervisor api: new virNodeDeviceDetachFlags

2013-04-24 Thread Eric Blake
On 04/24/2013 01:26 PM, Laine Stump wrote: The existing virNodeDeviceDettach() assumes that there is only a single PCI device assignment backend driver appropriate for any hypervisor. This is no longer true, as the qemu driver is getting support for PCI device assigment via VFIO. The new API

Re: [libvirt] [PATCH 6/7] xen: implement virNodeDeviceDetachFlags backend

2013-04-24 Thread Jim Fehlig
Laine Stump wrote: This was the only hypervisor driver other than qemu that implemented virNodeDeviceDettach. It doesn't currently support multiple pci device assignment driver backends, but it is simple to plug in this new API, which will make it easier for Xen people to fill it in later when

Re: [libvirt] [PATCH 4/7] hypervisor api: implement RPC calls for virNodeDeviceDetachFlags

2013-04-24 Thread Eric Blake
On 04/24/2013 01:26 PM, Laine Stump wrote: This requires a custom function for remoteNodeDeviceDetachFlags, because it is named *NodeDevice, but it goes through the hypervisor driver rather than nodedevice driver, and so it uses privateData instead of nodeDevicePrivateData. (It has to go

Re: [libvirt] [PATCH 5/7] qemu: implement virNodeDeviceDetachFlags backend

2013-04-24 Thread Eric Blake
On 04/24/2013 01:26 PM, Laine Stump wrote: The differences from virNodeDeviceDettach are very minor: 1) Check that the flags are 0. 2) Set the virPCIDevice's stubDriver according to the driverName that is passed in. 3) Call virPCIDeviceDetach with a NULL stubDriver, indicating it

Re: [libvirt] [PATCH 7/7] virsh: use new virNodeDeviceDetachFlags

2013-04-24 Thread Eric Blake
On 04/24/2013 01:26 PM, Laine Stump wrote: The virsh nodedev-detach command has a new --driver option. If it's given virsh will attempt to use the new virNodeDeviceDetachFlags API instead of virNodeDeviceDettach. Validation of the driver name string is left to the hypervisor (qemu accepts kvm

Re: [libvirt] [PATCH v5 1/2] Add NVRAM device

2013-04-24 Thread Li Zhang
On 2013年04月24日 19:58, Osier Yang wrote: On 19/04/13 16:37, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com For pSeries guest in QEMU, NVRAM is one kind of spapr-vio device. Users are allowed to specify spapr-vio devices'address. But NVRAM is not supported in libvirt. So this patch

Re: [libvirt] [PATCH v5 2/2] qemu: Add command line builder and parser for NVRAM.

2013-04-24 Thread Li Zhang
On 2013年04月24日 20:41, Osier Yang wrote: On 24/04/13 20:17, Osier Yang wrote: On 19/04/13 16:37, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com This patch is to add command line builder and parser for NVRAM device, and add test cases. Signed-off-by: Li Zhang

Re: [libvirt] [PATCH v5 1/2] Add NVRAM device

2013-04-24 Thread Osier Yang
On 25/04/13 10:13, Li Zhang wrote: On 2013年04月24日 19:58, Osier Yang wrote: On 19/04/13 16:37, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com For pSeries guest in QEMU, NVRAM is one kind of spapr-vio device. Users are allowed to specify spapr-vio devices'address. But NVRAM is not

Re: [libvirt] [PATCH v5 1/2] Add NVRAM device

2013-04-24 Thread Li Zhang
On 2013年04月25日 10:42, Osier Yang wrote: On 25/04/13 10:13, Li Zhang wrote: On 2013年04月24日 19:58, Osier Yang wrote: On 19/04/13 16:37, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com For pSeries guest in QEMU, NVRAM is one kind of spapr-vio device. Users are allowed to specify

[libvirt] how to control usb read write perm

2013-04-24 Thread yue
hi,all i have 2 questions. both is related to spice usb redirect. 1. if i can control RW perm of usb device which is producted via spice ? in order to control user's rw operation in guestVM . 2.if user have several usbs, and plug them at the same time when using spice client. if i can

Re: [libvirt] [PATCH v5 1/2] Add NVRAM device

2013-04-24 Thread Osier Yang
On 25/04/13 11:07, Li Zhang wrote: On 2013年04月25日 10:42, Osier Yang wrote: On 25/04/13 10:13, Li Zhang wrote: On 2013年04月24日 19:58, Osier Yang wrote: On 19/04/13 16:37, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com For pSeries guest in QEMU, NVRAM is one kind of spapr-vio

Re: [libvirt] [PATCH v5 1/2] Add NVRAM device

2013-04-24 Thread Li Zhang
On 2013年04月25日 11:19, Osier Yang wrote: On 25/04/13 11:07, Li Zhang wrote: On 2013年04月25日 10:42, Osier Yang wrote: On 25/04/13 10:13, Li Zhang wrote: On 2013年04月24日 19:58, Osier Yang wrote: On 19/04/13 16:37, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com For pSeries guest in

Re: [libvirt] [PATCH] Introduce a sub-element driver for controller

2013-04-24 Thread Osier Yang
On 24/04/13 23:43, Laine Stump wrote: On 04/24/2013 05:24 AM, Osier Yang wrote: Like what we did for disk, filesystem and interface, this introduces sub-element driver for controller, and put the queues into it. --- docs/formatdomain.html.in | 26 ++

[libvirt] [libvirt-tck PATCH 1/2] New test for metadata

2013-04-24 Thread Zhe Peng
new script for testing get/set metadata include API: dom-get_metadata dom-set_metadata --- scripts/domain/310-set-get-metadata.t | 68 + 1 files changed, 68 insertions(+), 0 deletions(-) create mode 100644 scripts/domain/310-set-get-metadata.t diff --git

[libvirt] [libvirt-tck PATCH 2/2] Add script for managed save

2013-04-24 Thread Zhe Peng
new script for testing managed save include API: dom-has_managed_save_image dom-managed_save_remove --- scripts/domain/320-managed_save_lifecycle.t | 74 +++ 1 files changed, 74 insertions(+), 0 deletions(-) create mode 100644 scripts/domain/320-managed_save_lifecycle.t