Re: [libvirt] [PATCH v2 09/10] qemu: hotplug support for scsi hostdev

2013-04-05 Thread Han Cheng
On 04/03/2013 06:20 PM, Osier Yang wrote: On 01/04/13 20:01, Han Cheng wrote: And user should hotplug a virtio-scsi controller if doesn't exist. I'm wondering if it could be implicitly added. As I know, adding controller implicitly is for back compatibility. New codes don't need to do

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

2013-04-05 Thread Paolo Bonzini
Il 04/04/2013 21:40, Osier Yang ha scritto: Depending on the pool type, this should be treated as file or block. You do this correctly in patch 8, but I think it is not complete. For example, will your patches allow SCSI passthrough of a volume inside an iSCSI pool? No, it will be another

[libvirt] [PATCH 1/2] Update structure and XML definitions to support hostdev caps=net.

2013-04-05 Thread Bogdan Purcareata
Signed-off-by: Bogdan Purcareata bogdan.purcare...@freescale.com --- docs/formatdomain.html.in | 15 +-- docs/schemas/domaincommon.rng | 14 ++ src/conf/domain_conf.c| 28 +++- src/conf/domain_conf.h| 4 4 files changed, 58

[libvirt] libvirt_lxc: implement hostdev caps=net device isolation in containers

2013-04-05 Thread Bogdan Purcareata
From Bogdan Purcareata bogdan.purcare...@freescale.com # This line is ignored. From: Bogdan Purcareata bogdan.purcare...@freescale.com Subject: libvirt_lxc: implement hostdev caps=net device isolation in containers In-Reply-To: -- libvir-list mailing list libvir-list@redhat.com

[libvirt] [PATCH 2/2] Implement support for hostdev caps=net. This allows a container-type domain to have exclusive access to one of the host's NICs.

2013-04-05 Thread Bogdan Purcareata
Signed-off-by: Bogdan Purcareata bogdan.purcare...@freescale.com --- src/lxc/lxc_container.c | 4 +++- src/lxc/lxc_controller.c | 19 +++ src/lxc/lxc_hostdev.c| 1 + 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/lxc/lxc_container.c

[libvirt] [PATCH 2/2] Implement support for hostdev caps=net

2013-04-05 Thread Bogdan Purcareata
This allows a container-type domain to have exclusive access to one of the host's NICs. Wire hostdev caps=net with the lxc_controller - when moving the newly created veth devices into a new namespace, also look for any hostdev devices that should be moved. Note: once the container domain has been

[libvirt] [PATCH 1/2] Update structure XML definitions to support hostdev caps=net.

2013-04-05 Thread Bogdan Purcareata
This updates the definitions and supporting structures in the XML schema and domain configuration files. Signed-off-by: Bogdan Purcareata bogdan.purcare...@freescale.com --- docs/formatdomain.html.in | 15 +-- docs/schemas/domaincommon.rng | 14 ++

[libvirt] libvirt_lxc: implement hostdev caps=net device isolation in containers

2013-04-05 Thread Bogdan Purcareata
This set of patches implements hostdev caps=net interface isolation in containers, thus allowing an interface NIC to be assigned exclusively to a container-domain. This is done like moving veth devices in container namespaces, only this time it is actual host devices. -- libvir-list mailing list

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

2013-04-05 Thread Viktor Mihajlovski
On 04/04/2013 09:50 PM, Peter Krempa wrote: I don't know if the realtek card works on the s390 qemu too, but if it doesn't I don't mind changing it to virtio. In case it does work, we need to consider if we aren't regressing here. commit 539d73d intercepts this global defaulting but relies

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

2013-04-05 Thread Daniel P. Berrange
On Fri, Apr 05, 2013 at 12:11:31AM +0200, Peter Krempa wrote: 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. Do you mean s/API/XML/ here ?

Re: [libvirt] Device backend in another domain (xen)

2013-04-05 Thread Daniel P. Berrange
On Fri, Apr 05, 2013 at 01:23:15AM +0200, Marek Marczykowski wrote: 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

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

2013-04-05 Thread Peter Krempa
On 04/05/13 04:50, Eric Blake wrote: 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

Re: [libvirt] [PATCH v2 10/10] tests: tests for scsi hostdev

2013-04-05 Thread Han Cheng
On 04/03/2013 06:26 PM, Osier Yang wrote: On 01/04/13 20:01, Han Cheng wrote: diff --git a/tests/qemuhelpdata/qemu-1.0-device b/tests/qemuhelpdata/qemu-1.0-device index 0bdfbbd..d557f0e 100644 --- a/tests/qemuhelpdata/qemu-1.0-device +++ b/tests/qemuhelpdata/qemu-1.0-device @@ -136,3 +136,13

Re: [libvirt] [PATCH v2 01/10] conf: Introduce readonly to hostdev and change helper function

2013-04-05 Thread Han Cheng
On 04/02/2013 10:15 AM, Hu Tao wrote: On Mon, Apr 01, 2013 at 08:00:53PM +0800, Han Cheng wrote: diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index edddf25..f8e3973 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -439,6 +439,8 @@ struct _virDomainHostdevDef {

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

2013-04-05 Thread Peter Krempa
On 04/05/13 10:37, Daniel P. Berrange wrote: On Fri, Apr 05, 2013 at 12:11:31AM +0200, Peter Krempa wrote: 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

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

2013-04-05 Thread Daniel P. Berrange
On Fri, Apr 05, 2013 at 11:13:17AM +0200, Peter Krempa wrote: On 04/05/13 10:37, Daniel P. Berrange wrote: On Fri, Apr 05, 2013 at 12:11:31AM +0200, Peter Krempa wrote: When setting processor count for a domain using the API libvirt enforced a maximum processor count, while it isn't enforced

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

2013-04-05 Thread Daniel P. Berrange
On Fri, Apr 05, 2013 at 01:00:00PM +0800, Han Cheng wrote: 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 +++

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

2013-04-05 Thread Daniel P. Berrange
On Thu, Apr 04, 2013 at 08:33:16PM -0600, Eric Blake wrote: 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. *

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

2013-04-05 Thread Peter Krempa
On 04/05/13 09:37, Viktor Mihajlovski wrote: On 04/04/2013 09:50 PM, Peter Krempa wrote: I don't know if the realtek card works on the s390 qemu too, but if it doesn't I don't mind changing it to virtio. In case it does work, we need to consider if we aren't regressing here. commit 539d73d

[libvirt] [PATCH 2/3] qemu: Clean up network device CLI generator

2013-04-05 Thread Peter Krempa
With the default model assigned in the parse callback, this code is now obsolete. --- src/qemu/qemu_command.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 493e5f8..8a76fba 100644 ---

[libvirt] [PATCH 3/3] qemu: Remove now obsolete assignment of default netwokr card model for s390 hosts

2013-04-05 Thread Peter Krempa
This effectively reverts commit 539d73dbf64cb35558ffd3992f82e0b482cd0e70 as the changes aren't needed after introduction of the XML post parse callbacks. --- src/qemu/qemu_command.c | 5 - 1 file changed, 5 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index

[libvirt] [PATCH 1/3] qemu: Use correct default model on s390

2013-04-05 Thread Peter Krempa
From: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com Commit a68d6726679323823ee5be47f0144e9ccffa0757 breaks networking on s390 as it changes the default network card model. --- I assigned the authorship to Viktor as I just took his suggested patch from the mail thread regarding the close

[libvirt] [PATCH 0/3] Un-break s390 default network model and clean up obsolete

2013-04-05 Thread Peter Krempa
This series fixes the default network model for s390 that was broken by the recent addition of post parse close callbacks and cleans up code obsoleted by that addition. Peter Krempa (2): qemu: Clean up network device CLI generator qemu: Remove now obsolete assignment of default netwokr card

Re: [libvirt] [PATCH 1/3] qemu: Use correct default model on s390

2013-04-05 Thread Viktor Mihajlovski
On 04/05/2013 12:12 PM, Peter Krempa wrote: @@ -688,9 +688,15 @@ qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev, if (dev-type == VIR_DOMAIN_DEVICE_NET dev-data.net-type != VIR_DOMAIN_NET_TYPE_HOSTDEV) { +const char *model = NULL; Now that I see what I wrote:

Re: [libvirt] [sandbox PATCH 01/15] virt-sandbox-service-util needs to free allocated memory.

2013-04-05 Thread Daniel P. Berrange
On Wed, Apr 03, 2013 at 07:17:19PM -0400, Dan Walsh wrote: Coverity found that we could be leaking memory with virt-sandbox-service-util -e --- bin/virt-sandbox-service-util.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/virt-sandbox-service-util.c

Re: [libvirt] [sandbox PATCH 02/15] Add support for InteractiveContainers to virt-sandbox-service-util

2013-04-05 Thread Daniel P. Berrange
On Wed, Apr 03, 2013 at 07:17:20PM -0400, Dan Walsh wrote: We need to add support for interactive sandbox/containers for OpenShift. This patch will create the correct container type based off the /etc/libvirt-sandbox/service/* --- bin/virt-sandbox-service-util.c | 31

Re: [libvirt] [PATCH 2/3] qemu: Clean up network device CLI generator

2013-04-05 Thread Viktor Mihajlovski
On 04/05/2013 12:12 PM, Peter Krempa wrote: With the default model assigned in the parse callback, this code is now obsolete. --- src/qemu/qemu_command.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) [Unauthoritative] ACK. -- Mit freundlichen Grüßen/Kind

Re: [libvirt] [sandbox PATCH 05/15] Change virt-sandbox-service-create.pod to use correct command --copy

2013-04-05 Thread Daniel P. Berrange
On Wed, Apr 03, 2013 at 07:17:23PM -0400, Dan Walsh wrote: Current the documentation says that you use --clone while the code uses --copy when you are createing a sandbox service container. Signed-off-by: Dan Walsh dwa...@redhat.com --- bin/virt-sandbox-service-create.pod | 6 +++--- 1

Re: [libvirt] [sandbox PATCH 03/15] Move virt-sandbox-service bash completion script to default directory.

2013-04-05 Thread Daniel P. Berrange
On Wed, Apr 03, 2013 at 07:17:21PM -0400, Dan Walsh wrote: bash_completion scripts have added a new way to do completions, where you place you scripts in /usr/share/bash_completion/completions rather then /etc/bash_completions.d. We should follow the new standard, and this patch moves our

Re: [libvirt] [sandbox PATCH 07/15] Remove distinction from Internal vs External Functions.

2013-04-05 Thread Daniel P. Berrange
On Wed, Apr 03, 2013 at 07:17:25PM -0400, Dan Walsh wrote: This patch removes all __METHOD and _METHOD functions calls. Since it is not intended that virt-sandbox-service will be imported into another python module, there is limited value to using the internal indicators. Signed-off-by:

Re: [libvirt] [PATCH 3/3] qemu: Remove now obsolete assignment of default netwokr card model for s390 hosts

2013-04-05 Thread Viktor Mihajlovski
On 04/05/2013 12:12 PM, Peter Krempa wrote: This effectively reverts commit 539d73dbf64cb35558ffd3992f82e0b482cd0e70 as the changes aren't needed after introduction of the XML post parse callbacks. --- src/qemu/qemu_command.c | 5 - 1 file changed, 5 deletions(-) diff --git

Re: [libvirt] [sandbox PATCH 08/15] Make CONFIG_PATH external to the Container Class

2013-04-05 Thread Daniel P. Berrange
On Wed, Apr 03, 2013 at 07:17:26PM -0400, Dan Walsh wrote: This patch moves CONFIG_PATH external from the Container Class. This will eliminate the need to create a container to get this constant. Signed-off-by: Dan Walsh dwa...@redhat.com --- bin/virt-sandbox-service | 13 +

Re: [libvirt] [sandbox PATCH 09/15] Add exception handler GlibGerror to virt-sandbox-service

2013-04-05 Thread Daniel P. Berrange
On Wed, Apr 03, 2013 at 07:17:27PM -0400, Dan Walsh wrote: GlibGerror can be raised by virt-sandbox-service, this patch will catch the exception and write the error to stderr. Signed-off-by: Dan Walsh dwa...@redhat.com --- bin/virt-sandbox-service | 4 1 file changed, 4 insertions(+)

Re: [libvirt] [sandbox PATCH 10/15] Change variable config to config_path to avoid confusion.

2013-04-05 Thread Daniel P. Berrange
On Wed, Apr 03, 2013 at 07:17:28PM -0400, Dan Walsh wrote: save_config uses an internal variable to indicate the path to the virt-sandbox configuration file, this path renames this variable to prevent confusion. Signed-off-by: Dan Walsh dwa...@redhat.com --- bin/virt-sandbox-service | 12

Re: [libvirt] [sandbox PATCH 11/15] Refactor Container class into Container and ServiceContainer Class.

2013-04-05 Thread Daniel P. Berrange
On Wed, Apr 03, 2013 at 07:17:29PM -0400, Dan Walsh wrote: This way we can share common methods between the ServiceContainer and the InteractiveContainer (Patch to be added) --- bin/virt-sandbox-service | 754 --- 1 file changed, 385

Re: [libvirt] [sandbox PATCH 12/15] Add support for InteractiveContainer

2013-04-05 Thread Daniel P. Berrange
On Wed, Apr 03, 2013 at 07:17:30PM -0400, Dan Walsh wrote: First use case will be OpenShift Differentiate on create based on whether one or more unit files specified (ServiceContainer), or a command is specified (Interactive Container). Signed-off-by: Dan Walsh dwa...@redhat.com ---

Re: [libvirt] [sandbox PATCH 13/15] Use args.uri rather then hard coding lxc:///

2013-04-05 Thread Daniel P. Berrange
On Wed, Apr 03, 2013 at 07:17:31PM -0400, Dan Walsh wrote: Signed-off-by: Dan Walsh dwa...@redhat.com --- bin/virt-sandbox-service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service index 8571374..8c9ea76 100755 ---

Re: [libvirt] [sandbox PATCH 14/15] Check for LXC if virt-sandbox-service execute command specified

2013-04-05 Thread Daniel P. Berrange
On Wed, Apr 03, 2013 at 07:17:32PM -0400, Dan Walsh wrote: virt-sandbox-service execute is not supported on qemu sandboxes. Signed-off-by: Dan Walsh dwa...@redhat.com --- bin/virt-sandbox-service | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) ACK Daniel -- |:

Re: [libvirt] [sandbox PATCH 15/15] Create new /etc/rc.d directory to bind mount over system.

2013-04-05 Thread Daniel P. Berrange
On Wed, Apr 03, 2013 at 07:17:33PM -0400, Dan Walsh wrote: We need to prevent SYSVInit scripts from running by default in the ServiceContainer. The so we recreate all of the directories under /etc/rc.d and copy the functions file over. Signed-off-by: Dan Walsh dwa...@redhat.com ---

Re: [libvirt] [PATCH 3/3] qemu: Remove now obsolete assignment of default netwokr card model for s390 hosts

2013-04-05 Thread Viktor Mihajlovski
Oops: typo in the subject line s/netwokr/network/ -- Mit freundlichen Grüßen/Kind Regards Viktor Mihajlovski IBM Deutschland Research Development GmbH Vorsitzender des Aufsichtsrats: Martina Köderitz Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen Registergericht:

Re: [libvirt] [PATCH v2 01/10] conf: Introduce readonly to hostdev and change helper function

2013-04-05 Thread Paolo Bonzini
Il 03/04/2013 05:37, Osier Yang ha scritto: codereadonly/code ddIndicates the device is readonly, only valid for SCSI device. span class=sinceSince 1.0.5/span. /dd dtcodeboot/code/dt ddSpecifies that the device is bootable. The codeorder/code attribute determines

Re: [libvirt] [PATCH 1/2] Update structure XML definitions to support hostdev caps=net.

2013-04-05 Thread Daniel P. Berrange
On Fri, Apr 05, 2013 at 03:28:07AM -0400, Bogdan Purcareata wrote: This updates the definitions and supporting structures in the XML schema and domain configuration files. Signed-off-by: Bogdan Purcareata bogdan.purcare...@freescale.com --- docs/formatdomain.html.in | 15

Re: [libvirt] [PATCH 2/2] Implement support for hostdev caps=net

2013-04-05 Thread Daniel P. Berrange
On Fri, Apr 05, 2013 at 03:28:08AM -0400, Bogdan Purcareata wrote: This allows a container-type domain to have exclusive access to one of the host's NICs. Wire hostdev caps=net with the lxc_controller - when moving the newly created veth devices into a new namespace, also look for any

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

2013-04-05 Thread Daniel P. Berrange
On Fri, Apr 05, 2013 at 10:16:43AM +0800, Gao feng wrote: 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

Re: [libvirt] [PATCH 1/3] qemu: Use correct default model on s390

2013-04-05 Thread Peter Krempa
On 04/05/13 13:02, Viktor Mihajlovski wrote: On 04/05/2013 12:12 PM, Peter Krempa wrote: @@ -688,9 +688,15 @@ qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev, if (dev-type == VIR_DOMAIN_DEVICE_NET dev-data.net-type != VIR_DOMAIN_NET_TYPE_HOSTDEV) { +const char

[libvirt] [PATCH v2 2/2] Implement support for hostdev caps=net

2013-04-05 Thread Bogdan Purcareata
This allows a container-type domain to have exclusive access to one of the host's NICs. Wire hostdev caps=net with the lxc_controller - when moving the newly created veth devices into a new namespace, also look for any hostdev devices that should be moved. Note: once the container domain has been

[libvirt] [PATCH v2 0/2] libvirt_lxc: implement hostdev caps=net device isolation in containers

2013-04-05 Thread Bogdan Purcareata
This set of patches implements hostdev caps=net interface isolation in containers, thus allowing an interface NIC to be assigned exclusively to a container-domain. This is done like moving veth devices in container namespaces, only this time it is actual host devices. -- libvir-list mailing list

[libvirt] [PATCH v2 2/2] Implement support for hostdev caps=net

2013-04-05 Thread Bogdan Purcareata
This allows a container-type domain to have exclusive access to one of the host's NICs. Wire hostdev caps=net with the lxc_controller - when moving the newly created veth devices into a new namespace, also look for any hostdev devices that should be moved. Note: once the container domain has been

Re: [libvirt] [PATCH 0/7] Fix multiple compiler warnings on ARMv7

2013-04-05 Thread Michal Privoznik
On 03.04.2013 17:06, Daniel P. Berrange wrote: The ARMv7 builds of libvirt generate a number of warnings, mostly about cast alignment http://arm.koji.fedoraproject.org/packages/libvirt/1.0.4/1.fc19/data/logs/armv7hl/build.log this patch series fixes as many as possible, and then disables

[libvirt] [PATCHv2] qemu: Use correct default model on s390

2013-04-05 Thread Peter Krempa
From: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com Commit a68d6726679323823ee5be47f0144e9ccffa0757 breaks networking on s390 as it changes the default network card model. --- src/qemu/qemu_domain.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git

Re: [libvirt] [PATCH 1/7] Rewrite keycode map to avoid a struct

2013-04-05 Thread Michal Privoznik
On 03.04.2013 17:06, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Playing games with field offsets in a struct causes all sorts of alignment warnings on ARM platforms util/virkeycode.c: In function '__virKeycodeValueFromString': util/virkeycode.c:26:7: warning:

Re: [libvirt] [PATCH 6/7] Disable of unused sysinfotest functions

2013-04-05 Thread Michal Privoznik
On 03.04.2013 17:06, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Certain functions in the sysinfotest.c are not used unless a whitelisted architecture is being built. Disable those functions unless required to avoid warnings about unused functions.

Re: [libvirt] [PATCH 3/5] virstring: Introduce virVasprintfNOOM and make virVasprintf report OOM

2013-04-05 Thread Michal Privoznik
On 05.04.2013 12:45, Daniel P. Berrange wrote: On Tue, Apr 02, 2013 at 04:22:56PM +0200, Michal Privoznik wrote: --- src/libvirt_private.syms | 1 + src/qemu/qemu_domain.c | 4 +--- src/util/viraudit.c | 2 +- src/util/vircommand.c| 4 ++-- src/util/virerror.c | 2 +-

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

2013-04-05 Thread Peter Krempa
On 04/05/13 11:21, Daniel P. Berrange wrote: On Fri, Apr 05, 2013 at 11:13:17AM +0200, Peter Krempa wrote: On 04/05/13 10:37, Daniel P. Berrange wrote: On Fri, Apr 05, 2013 at 12:11:31AM +0200, Peter Krempa wrote: When setting processor count for a domain using the API libvirt enforced a

Re: [libvirt] [PATCHv2] qemu: Use correct default model on s390

2013-04-05 Thread Viktor Mihajlovski
On 04/05/2013 03:16 PM, Peter Krempa wrote: From: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com Commit a68d6726679323823ee5be47f0144e9ccffa0757 breaks networking on s390 as it changes the default network card model. --- src/qemu/qemu_domain.c | 16 +++- 1 file changed, 11

[libvirt] [PATCH v4 00/11] Add support for guests with TPM passthrough device

2013-04-05 Thread Stefan Berger
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. Regards, Stefan --- v3-v4: - followed tree to

[libvirt] [PATCH v4 06/11] Convert QMP strings into QEMU capability bits

2013-04-05 Thread Stefan Berger
Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com Reviewed-by: Corey Bryant cor...@linux.vnet.ibm.com Tested-by: Corey Bryant cor...@linux.vnet.ibm.com --- src/qemu/qemu_capabilities.c | 56 +++ 1 file changed, 56 insertions(+) Index:

[libvirt] [PATCH v4 08/11] Audit the starting of a guest using TPM passthrough

2013-04-05 Thread Stefan Berger
When a VM with a TPM passthrough device is started, the audit daemon logs the following type of message: type=VIRT_RESOURCE msg=audit(1365170222.460:3378): pid=16382 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:virtd_t:s0-s0:c0.c1023 msg='virt=kvm resrc=dev reason=start vm=TPM-PT

[libvirt] [PATCH v4 04/11] Helper functions for host TPM support

2013-04-05 Thread Stefan Berger
Implement helper functions to find the TPM's sysfs cancel file. Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com Reviewed-by: Corey Bryant cor...@linux.vnet.ibm.com Tested-by: Corey Bryant cor...@linux.vnet.ibm.com --- po/POTFILES.in |1 src/Makefile.am |1

[libvirt] [PATCH v4 11/11] Add test case for TPM passthrough

2013-04-05 Thread Stefan Berger
Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com Reviewed-by: Corey Bryant cor...@linux.vnet.ibm.com Tested-by: Corey Bryant cor...@linux.vnet.ibm.com --- tests/qemuxml2argvdata/qemuxml2argv-tpm-passthrough.args |6 +++ tests/qemuxml2argvdata/qemuxml2argv-tpm-passthrough.xml | 29

[libvirt] [PATCH v4 01/11] Add QMP probing for TPM

2013-04-05 Thread Stefan Berger
Probe for QEMU's QMP TPM support by querying the lists of supported TPM models (query-tpm-models) and backend types (query-tpm-types). The setting of the capability flags following the strings returned from the commands above is only provided in the patch where domain_conf.c gets TPM support due

[libvirt] [PATCH v4 05/11] Parse TPM passthrough XML in the domain XML

2013-04-05 Thread Stefan Berger
Parse the domain XML with TPM passthrough support. The TPM passthrough XML may look like this: tpm model='tpm-tis' backend type='passthrough' device path='/dev/tpm0'/ /backend /tpm Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com Reviewed-by: Corey Bryant

[libvirt] [PATCH v4 10/11] TPM support for QEMU command line

2013-04-05 Thread Stefan Berger
For TPM passthrough device support create command line parameters like: -tpmdev passthrough,id=tpm-tpm0,path=/dev/tpm0,cancel-path=/sys/class/misc/tpm0/device/cancel -device tpm-tis,tpmdev=tpm-tpm0,id=tpm0 Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com Reviewed-by: Corey Bryant

[libvirt] [PATCH v4 02/11] Add function to find a needle in a string array

2013-04-05 Thread Stefan Berger
Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com Reviewed-by: Corey Bryant cor...@linux.vnet.ibm.com Tested-by: Corey Bryant cor...@linux.vnet.ibm.com --- src/libvirt_private.syms |1 + src/util/virstring.c | 14 ++ src/util/virstring.h |2 ++ 3 files

[libvirt] [PATCH v4 03/11] Add documentation and schema for TPM passthrough

2013-04-05 Thread Stefan Berger
Supported TPM passthrough XML may look as follows: tpm model='tpm-tis' backend type='passthrough' device path='/dev/tpm0'/ /backend /tpm Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com Reviewed-by: Corey Bryant cor...@linux.vnet.ibm.com Tested-by: Corey Bryant

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

2013-04-05 Thread Osier Yang
On 05/04/13 03:38, Osier Yang wrote: --- 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

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

2013-04-05 Thread Osier Yang
On 05/04/13 16:33, Daniel P. Berrange wrote: On Fri, Apr 05, 2013 at 01:00:00PM +0800, Han Cheng wrote: 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

Re: [libvirt] [PATCH 1/7] New XML attributes for storage pool source adapter

2013-04-05 Thread John Ferlan
On 03/25/2013 12:43 PM, Osier Yang wrote: This introduces 4 new attributes for storage pool source adapter. E.g. adapter type='fc_host' parent='scsi_host5' wwnn='2000c9831b4b' wwpn='1000c9831b4b'/ Attribute 'type' can be either 'scsi_host' or 'fc_host', and defaults to

Re: [libvirt] [PATCH 2/7] storage: Make the adapter name be consistent with node device driver

2013-04-05 Thread John Ferlan
On 03/25/2013 12:43 PM, Osier Yang wrote: node device driver names the HBA like scsi_host5, but storage driver uses host5, which could make the user confused. This changes them to be consistent. However, for back-compat reason, adapter name like host5 is still supported. v1 - v2: * Use

[libvirt] [PATCH] Make guest OS bootable when hardware failure happens in log disk

2013-04-05 Thread Seiji Aguchi
[Problem] Currently, guest OS's messages can be logged to a local disk of host OS by creating chadevs with options below. -chardev file,id=charserial0,path=log file's path -device isa-serial,chardev=chardevserial0,id=serial0 When a hardware failure happens in the disk, qemu-kvm can't create

Re: [libvirt] [PATCH 3/7] storage: Move virStorageBackendSCSIGetHostNumber into iscsi backend

2013-04-05 Thread John Ferlan
On 03/25/2013 12:43 PM, Osier Yang wrote: It's only used by iscsi backend. --- src/storage/storage_backend_iscsi.c | 39 - src/storage/storage_backend_scsi.c | 39 - src/storage/storage_backend_scsi.h | 3 --- 3

Re: [libvirt] [PATCH 1/7] New XML attributes for storage pool source adapter

2013-04-05 Thread Osier Yang
On 05/04/13 22:53, John Ferlan wrote: On 03/25/2013 12:43 PM, Osier Yang wrote: This introduces 4 new attributes for storage pool source adapter. E.g. adapter type='fc_host' parent='scsi_host5' wwnn='2000c9831b4b' wwpn='1000c9831b4b'/ Attribute 'type' can be either 'scsi_host' or

Re: [libvirt] [PATCH 4/7] phyp: Prohibit fc_host adapter for phyp driver

2013-04-05 Thread John Ferlan
On 03/25/2013 12:43 PM, Osier Yang wrote: It's possible to support fc_host adapter for phyp driver too, but at this stage I'd like to not allow it when I'm not that clear how it works. --- src/phyp/phyp_driver.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

Re: [libvirt] [PATCH] Make guest OS bootable when hardware failure happens in log disk

2013-04-05 Thread Daniel P. Berrange
On Fri, Apr 05, 2013 at 02:36:45PM +, Seiji Aguchi wrote: [Problem] Currently, guest OS's messages can be logged to a local disk of host OS by creating chadevs with options below. -chardev file,id=charserial0,path=log file's path -device isa-serial,chardev=chardevserial0,id=serial0

Re: [libvirt] [PATCH 4/7] phyp: Prohibit fc_host adapter for phyp driver

2013-04-05 Thread Osier Yang
On 05/04/13 23:20, John Ferlan wrote: On 03/25/2013 12:43 PM, Osier Yang wrote: It's possible to support fc_host adapter for phyp driver too, but at this stage I'd like to not allow it when I'm not that clear how it works. --- src/phyp/phyp_driver.c | 7 +++ 1 file changed, 7

Re: [libvirt] [PATCH] Make guest OS bootable when hardware failure happens in log disk

2013-04-05 Thread Seiji Aguchi
NACK this is putting inappropriate policy decisions into libvirt. This may be how you want this scenario to work, but it is certainly not what every user of libvirt will want. How about adding some option to libvirt so that the users can choose policies? If the storage is fubar the

[libvirt] [PATCH v2] qemu: Support multiple queue virtio-scsi

2013-04-05 Thread Osier Yang
This introduce a new attribute num_queues (same with the good name QEMU uses) for virtio-scsi controller. An example of the XML: controller type='scsi' index='0' model='virtio-scsi' num_queues='8'/ The corresponding QEMU command line: -device

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

2013-04-05 Thread Wido den Hollander
From: root root@kvm01.(none) 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 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index

[libvirt] [PATCH v2] util: Add a helper to check if all bits of a bitmap are clear

2013-04-05 Thread Osier Yang
--- src/libvirt_private.syms | 1 + src/util/virbitmap.c | 17 + src/util/virbitmap.h | 3 +++ 3 files changed, 21 insertions(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index b7b9631..6b831b3 100644 --- a/src/libvirt_private.syms +++

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

2013-04-05 Thread Wido den Hollander
On 04/05/2013 05:36 PM, Wido den Hollander wrote: From: root root@kvm01.(none) My bad for this one, I noticed it to late. Wido 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

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

2013-04-05 Thread Osier Yang
On 05/04/13 14:53, Paolo Bonzini wrote: Il 04/04/2013 21:40, Osier Yang ha scritto: Depending on the pool type, this should be treated as file or block. You do this correctly in patch 8, but I think it is not complete. For example, will your patches allow SCSI passthrough of a volume inside an

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

2013-04-05 Thread Eric Blake
On 04/05/2013 09:36 AM, Wido den Hollander wrote: From: root root@kvm01.(none) Please resend, after properly configuring your git. 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 |

Re: [libvirt] [PATCH v2] util: Add a helper to check if all bits of a bitmap are clear

2013-04-05 Thread Eric Blake
On 04/05/2013 10:32 AM, Osier Yang wrote: --- src/libvirt_private.syms | 1 + src/util/virbitmap.c | 17 + src/util/virbitmap.h | 3 +++ 3 files changed, 21 insertions(+) The implementation looks correct, but I still think this patch should be the one that enhances

[libvirt] [PATCH] build: use proper pod for nested bulleted VIRSH_DEBUG list

2013-04-05 Thread Eric Blake
Newer pod (hello rawhide) complains if you attempt to mix bullets and non-bullets in the same list: virsh.pod around line 3177: Expected text after =item, not a bullet As our intent was to nest an inner list, we make that explicit to keep pod happy. * tools/virsh.pod (ENVIRONMENT): Use correct

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

2013-04-05 Thread Wido den Hollander
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 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 552a81b..464d30a 100644 ---

[libvirt] [PATCH 9/8] qemu: Allow volume type disk for device 'lun'

2013-04-05 Thread Osier Yang
This allows one use block type volume as the disk source for device 'lun'. --- src/qemu/qemu_command.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index c29796d..2fc63ae 100644 --- a/src/qemu/qemu_command.c +++

[libvirt] [PATCH] Add a test suite for keycode mapping functions

2013-04-05 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Validate that translations between different keycode sets are functioning. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- tests/virkeycodetest.c | 107 + 1 file changed, 107 insertions(+)

Re: [libvirt] [PATCH] Add a test suite for keycode mapping functions

2013-04-05 Thread Eric Blake
On 04/05/2013 10:50 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Validate that translations between different keycode sets are functioning. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- tests/virkeycodetest.c | 107

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

2013-04-05 Thread Osier Yang
Like 7/8, 8/8, 9/8, there must be many places which also should be modified to not prevent the new volume type disk out of the door, but it's hard to find them out at once, disk related stuffs are always hairy. Anyway, it doesn't affect to let the basic go in first, because they are all

[libvirt] [PATCH] build: check correct protocol.o file

2013-04-05 Thread Eric Blake
By default, libtool builds two .o files for every .lo rule: src/foo.o - static builds src/.libs/foo.o - shared library builds But since commit ad42b34b disabled static builds, src/foo.o is no longer built by default. On a fresh checkout, this means our protocol check rules using pdwtags were

Re: [libvirt] [PATCH v2] util: Add a helper to check if all bits of a bitmap are clear

2013-04-05 Thread Osier Yang
On 05/04/13 23:59, Eric Blake wrote: On 04/05/2013 10:32 AM, Osier Yang wrote: --- src/libvirt_private.syms | 1 + src/util/virbitmap.c | 17 + src/util/virbitmap.h | 3 +++ 3 files changed, 21 insertions(+) The implementation looks correct, but I still think

[libvirt] [PATCH v3] util: Add a helper to check if all bits of a bitmap are clear

2013-04-05 Thread Osier Yang
--- src/libvirt_private.syms | 1 + src/util/virbitmap.c | 17 + src/util/virbitmap.h | 3 +++ tests/virbitmaptest.c| 33 - 4 files changed, 53 insertions(+), 1 deletion(-) diff --git a/src/libvirt_private.syms

Re: [libvirt] [PATCH 4/7] add pci-bridge controller type

2013-04-05 Thread Laine Stump
On 04/03/2013 11:50 AM, Ján Tomko wrote: From: liguang lig.f...@cn.fujitsu.com add a new controller type, then one can define a pci-bridge controller like this: controller type='pci-bridge' index='0'/ In the next patch we're prohibiting exactly this config (index='0') because the

Re: [libvirt] [PATCH v3] util: Add a helper to check if all bits of a bitmap are clear

2013-04-05 Thread Eric Blake
On 04/05/2013 12:06 PM, Osier Yang wrote: --- src/libvirt_private.syms | 1 + src/util/virbitmap.c | 17 + src/util/virbitmap.h | 3 +++ tests/virbitmaptest.c| 33 - 4 files changed, 53 insertions(+), 1 deletion(-) ACK with one

Re: [libvirt] [PATCH 5/7] qemu: build command line for pci-bridge device

2013-04-05 Thread Laine Stump
On 04/03/2013 11:50 AM, Ján Tomko wrote: From: liguang lig.f...@cn.fujitsu.com --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c | 15 ++- tests/qemuhelptest.c | 21 ++--- 4 files changed, 31

Re: [libvirt] [PATCH 1/7] Rewrite keycode map to avoid a struct

2013-04-05 Thread Eric Blake
On 04/03/2013 09:06 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Playing games with field offsets in a struct causes all sorts of alignment warnings on ARM platforms util/virkeycode.c: In function '__virKeycodeValueFromString': util/virkeycode.c:26:7:

[libvirt] new libvirt pci controller type and pcie/q35 (was Re: [PATCH 4/7] add pci-bridge controller type)

2013-04-05 Thread Laine Stump
On 04/05/2013 01:38 PM, Daniel P. Berrange wrote: On Fri, Apr 05, 2013 at 12:32:04PM -0400, Laine Stump wrote: On 04/03/2013 11:50 AM, Ján Tomko wrote: From: liguang lig.f...@cn.fujitsu.com add a new controller type, then one can define a pci-bridge controller like this: controller

Re: [libvirt] [PATCH 5/7] util: Add helper to get the scsi host name by iterating over sysfs

2013-04-05 Thread John Ferlan
On 03/25/2013 12:43 PM, Osier Yang wrote: The helper iterates over sysfs, to find out the matched scsi host name by comparing the wwnn,wwpn pair. It will be used by checkPool and refreshPool of storage scsi backend. New helper getAdapterName is introduced in storage_backend_scsi.c, which uses

[libvirt] 1.4.0 memballoon bug?

2013-04-05 Thread Serge Hallyn
Hi, When I run virsh -c qemu:///system domxml-to-native qemu-argv /tmp/qatest.xml from 1.4.0 with the qatest.xml below (which has no memballoon device specified), I get an 'unspecified error'. Some printf debugging shows that virDomainDefParseXML is automatically adding a virtio memballoon

Re: [libvirt] new libvirt pci controller type and pcie/q35 (was Re: [PATCH 4/7] add pci-bridge controller type)

2013-04-05 Thread Alex Williamson
On Fri, 2013-04-05 at 14:42 -0400, Laine Stump wrote: On 04/05/2013 01:38 PM, Daniel P. Berrange wrote: On Fri, Apr 05, 2013 at 12:32:04PM -0400, Laine Stump wrote: On 04/03/2013 11:50 AM, Ján Tomko wrote: From: liguang lig.f...@cn.fujitsu.com add a new controller type, then one can

  1   2   >