[libvirt] [PATCH] domblkstat: Produce error message that at least sounds like English

2014-02-28 Thread Michal Privoznik
Compare: # virsh domblkstat freebsd hdd error: Failed to get block stats freebsd hdd error: invalid argument: invalid path: hdd with: # virsh domblkstat freebsd hdd error: Failed to get block stats for domain 'freebsd' device 'hdd' error: invalid argument: invalid path: hdd

[libvirt] [PATCH] virDomainBlockStats(Flags): Produce saner error message on empty disk path

2014-02-28 Thread Michal Privoznik
As of 0bd2ccdec an empty disk path for virDomainBlockStats (or the one with Flags) is allowed meaning get me overall summarized statistics. However, running 'virsh domblkstat $dom' throws a misleading error: # ./tools/virsh domblkstat dom error: Failed to get block stats dom error: invalid

Re: [libvirt] [PATCH] virDomainBlockStats(Flags): Produce saner error message on empty disk path

2014-02-28 Thread Martin Kletzander
On Fri, Feb 28, 2014 at 10:18:09AM +0100, Michal Privoznik wrote: As of 0bd2ccdec an empty disk path for virDomainBlockStats (or the one with Flags) is allowed meaning get me overall summarized statistics. However, running 'virsh domblkstat $dom' throws a misleading error: # ./tools/virsh

Re: [libvirt] [PATCH] domblkstat: Produce error message that at least sounds like English

2014-02-28 Thread Martin Kletzander
On Fri, Feb 28, 2014 at 10:18:21AM +0100, Michal Privoznik wrote: Compare: # virsh domblkstat freebsd hdd error: Failed to get block stats freebsd hdd error: invalid argument: invalid path: hdd with: # virsh domblkstat freebsd hdd error: Failed to get block stats for domain

[libvirt] [PATCHv2 0/2] Add virusbtest

2014-02-28 Thread Ján Tomko
v1: https://www.redhat.com/archives/libvir-list/2014-February/msg01620.html v2: Split the mocked part into a separate file and only build the test on Linux. Remove 'serial' files. Get out of testDeviceFind earlier if failure is expected and use a switch. Switches are nice. Check number of returned

[libvirt] [PATCHv2 1/2] Add tests for virUSBDeviceFind functions

2014-02-28 Thread Ján Tomko
Mock the /sys/bus/usb directory and test the finding (and not finding) of some USB devices. --- .gitignore | 1 + cfg.mk | 3 +- tests/Makefile.am | 22 +++ tests/virusbmock.c

[libvirt] [PATCHv2 2/2] Add a test for virUSBDeviceList functions

2014-02-28 Thread Ján Tomko
Most of them are already tested in a limited way by testing virUSBDeviceFind. --- tests/virusbtest.c | 102 + 1 file changed, 102 insertions(+) diff --git a/tests/virusbtest.c b/tests/virusbtest.c index 9eb9abe..bb849b5 100644 ---

Re: [libvirt] [PATCH] Check if systemd is the init before creating machines

2014-02-28 Thread Ján Tomko
On 02/27/2014 09:29 PM, Ján Tomko wrote: If systemd is installed, but not the init system, systemd-machined fails with an unhelpful error message: Launch helper exited with unknown return code 1 Fall back to manual cgroup creation if systemd is installed, but it's not PID 1. [1]

Re: [libvirt] [PATCHv2 0/2] Add virusbtest

2014-02-28 Thread Michal Privoznik
On 28.02.2014 11:10, Ján Tomko wrote: v1: https://www.redhat.com/archives/libvir-list/2014-February/msg01620.html v2: Split the mocked part into a separate file and only build the test on Linux. Remove 'serial' files. Get out of testDeviceFind earlier if failure is expected and use a switch.

Re: [libvirt] [Xen-devel] [PATCH LIBVIRT] libxl: Recognise ARM architectures

2014-02-28 Thread Daniel P. Berrange
On Fri, Feb 28, 2014 at 02:12:30AM +, Ian Campbell wrote: On Wed, 2014-02-26 at 15:01 +, Daniel P. Berrange wrote: Yep, if ARM has a PV console, then we'd need to add tiny bit to the XML to allow us to configure that explicitly, similar to how we do for KVM's virtio-console

Re: [libvirt] [PATCH] Check if systemd is the init before creating machines

2014-02-28 Thread Daniel P. Berrange
On Thu, Feb 27, 2014 at 09:29:24PM +0100, Ján Tomko wrote: If systemd is installed, but not the init system, systemd-machined fails with an unhelpful error message: Launch helper exited with unknown return code 1 Fall back to manual cgroup creation if systemd is installed, but it's not PID

Re: [libvirt] [PATCH] qemu: add PCI-multibus support for ppc

2014-02-28 Thread hong-hua....@freescale.com
Hi Daniel, Refer to libvirt/src/qemu/qemu_capabilities.c, only x86_64/i686 support PCI_MULTIBUS. /* Currently only x86_64 and i686 support PCI-multibus. */ if (qemuCaps-arch == VIR_ARCH_X86_64 || qemuCaps-arch == VIR_ARCH_I686) { virQEMUCapsSet(qemuCaps,

Re: [libvirt] [Xen-devel] [PATCH LIBVIRT] libxl: Recognise ARM architectures

2014-02-28 Thread Stefano Stabellini
On Fri, 28 Feb 2014, Daniel P. Berrange wrote: On Fri, Feb 28, 2014 at 02:12:30AM +, Ian Campbell wrote: On Wed, 2014-02-26 at 15:01 +, Daniel P. Berrange wrote: Yep, if ARM has a PV console, then we'd need to add tiny bit to the XML to allow us to configure that explicitly,

Re: [libvirt] [PATCH 1/2] apparmor: Allow access to filesystem mounts

2014-02-28 Thread Serge Hallyn
Quoting Guido Günther (g...@godiug.net): Hi Felix, On Thu, Jan 30, 2014 at 06:22:51PM +0100, Felix Geyer wrote: On 29.01.2014 07:48, Guido Günther wrote: Hi, On Sun, Jan 26, 2014 at 10:47:34PM +0100, Felix Geyer wrote: [..snip..] ` +if (recursive) { +// allow reading

Re: [libvirt] [Xen-devel] [PATCH LIBVIRT] libxl: Recognise ARM architectures

2014-02-28 Thread Ian Campbell
On Fri, 2014-02-28 at 14:29 +, Stefano Stabellini wrote: On Fri, 28 Feb 2014, Daniel P. Berrange wrote: So actually this leads me to ask what kind of console Arm fullvirt Xen guests actually have ? If they just use the traditional Xen paravirt console, then we just need to make sure

Re: [libvirt] [PATCH] qemu: Enable 'host-passthrough' cpu mode for arm

2014-02-28 Thread Cole Robinson
On 02/26/2014 11:40 AM, Oleg Strikov wrote: This patch allows libvirt user to specify 'host-passthrough' cpu mode while using qemu/kvm backend on arm (arm32). It uses 'host' as a CPU model name instead of some other stub (correct CPU detection is not implemented yet) to allow libvirt user to

Re: [libvirt] [PATCH v2 2/8] Fix journald PRIORITY values

2014-02-28 Thread Eric Blake
On 02/24/2014 09:49 AM, Daniel P. Berrange wrote: The systemd journal expects log record PRIORITY values to be encoded using the syslog compatible numbering scheme, not libvirt's own native numbering scheme. We must therefore apply a conversion. Signed-off-by: Daniel P. Berrange

Re: [libvirt] [PATCH v2 1/8] Send virLogMetadata fields onto the journal

2014-02-28 Thread Eric Blake
On 02/24/2014 09:49 AM, Daniel P. Berrange wrote: The systemd journal accepts arbitrary user specified log fields. These can be passed into virLogMessage via the virLogMetadata structure. Allow up to 5 custom fields to be reported by libvirt callers. Signed-off-by: Daniel P. Berrange

Re: [libvirt] [PATCH v2 5/8] Add docs about use of systemd journal for logging

2014-02-28 Thread Eric Blake
On 02/24/2014 09:49 AM, Daniel P. Berrange wrote: Document the various fields that libvirt will emit for journal log records. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- docs/logging.html.in | 35 --- 1 file changed, 32 insertions(+), 3

Re: [libvirt] [PATCH] virsh: support remaining domain events

2014-02-28 Thread Eric Blake
On 02/24/2014 02:49 PM, Eric Blake wrote: Earlier, I added 'virsh event' for lifecycle events, to get the concept approved; this patch finishes the support for all other events, although the user still has to register for one event type at a time. A future patch may add an --all parameter to

Re: [libvirt] [PATCH v2 7/8] Add comments describing the different log sources

2014-02-28 Thread Eric Blake
On 02/24/2014 09:49 AM, Daniel P. Berrange wrote: Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/util/virlog.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) ACK; safe for release -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization

Re: [libvirt] [PATCH v2 4/8] Auto-generate the table of contents in logging doc

2014-02-28 Thread Eric Blake
On 02/24/2014 09:49 AM, Daniel P. Berrange wrote: The logging doc had a hand-written table of contents instead of using the automatic XSL generated one. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- docs/logging.html.in | 21 - 1 file changed, 4

Re: [libvirt] [PATCH v2 8/8] Generate a unique journald log for QEMU capabilities failure

2014-02-28 Thread Eric Blake
On 02/24/2014 09:49 AM, Daniel P. Berrange wrote: When probing QEMU capabilities fails for a binary generate a log message with MESSAGE_ID==8ae2f3fb-2dbe-498e-8fbd-012d40afa361. Borderline between new feature vs. improved debuggability of the 1.2.2 release; I can live with this going in even

Re: [libvirt] [PATCH v2 6/8] Include error domain and code in log messages from errors

2014-02-28 Thread Eric Blake
On 02/24/2014 09:49 AM, Daniel P. Berrange wrote: When a virError is raised, pass the error domain and code onto the systemd journald using metadata fields. This allows error messages to be queried by code eg $ journalctl LIBVIRT_CODE=43 Requires the user to do a reverse lookup from the

Re: [libvirt] [PATCH] Check if systemd is the init before creating machines

2014-02-28 Thread Ján Tomko
On 02/28/2014 12:05 PM, Daniel P. Berrange wrote: On Thu, Feb 27, 2014 at 09:29:24PM +0100, Ján Tomko wrote: If systemd is installed, but not the init system, systemd-machined fails with an unhelpful error message: Launch helper exited with unknown return code 1 Fall back to manual cgroup

Re: [libvirt] [PATCH] Check if systemd is the init before creating machines

2014-02-28 Thread Daniel P. Berrange
On Thu, Feb 27, 2014 at 09:29:24PM +0100, Ján Tomko wrote: If systemd is installed, but not the init system, systemd-machined fails with an unhelpful error message: Launch helper exited with unknown return code 1 Fall back to manual cgroup creation if systemd is installed, but it's not PID

Re: [libvirt] [PATCH 2/1] virsh: add --all flag to 'event' command

2014-02-28 Thread Daniel P. Berrange
On Mon, Feb 24, 2014 at 05:08:29PM -0700, Eric Blake wrote: Similar to our event-test demo program, it's nice to be able to have a mode where we can sniff all events at once, rather than having to spawn multiple virsh in parallel with one for each event type. (Can I just say our RegisterAny

Re: [libvirt] [PATCH v2 8/8] Generate a unique journald log for QEMU capabilities failure

2014-02-28 Thread Daniel P. Berrange
On Fri, Feb 28, 2014 at 10:21:48AM -0700, Eric Blake wrote: On 02/24/2014 09:49 AM, Daniel P. Berrange wrote: When probing QEMU capabilities fails for a binary generate a log message with MESSAGE_ID==8ae2f3fb-2dbe-498e-8fbd-012d40afa361. Borderline between new feature vs. improved

Re: [libvirt] KVM Domain memory and disk usage

2014-02-28 Thread Qiang Fu
Hi Martin, Thank you so much for your explanation. As you said here: Right now we can get domain memory statistics through the following virsh cmds: 1. dumpxml: this returns memory and currentMemory This are settings for the domain that you can change before the domain starts. memory

[libvirt] [PATCH] bhyve: support domain undefine

2014-02-28 Thread Roman Bogorodskiy
Implement domainUndefine and required helper functions: - domainIsActive - domainIsPersistent --- src/bhyve/bhyve_driver.c | 79 src/bhyve/bhyve_utils.h | 1 + 2 files changed, 80 insertions(+) diff --git a/src/bhyve/bhyve_driver.c

[libvirt] [PATCH] bhyve: support domain undefine

2014-02-28 Thread Roman Bogorodskiy
Re-add domain undefine support. I have already implemented it in v9 of my initial bhyve patch, but, apparently, based v10 not on v9, but on v8, so this change didn't make it into the tree (shame on me). Roman Bogorodskiy (1): bhyve: support domain undefine src/bhyve/bhyve_driver.c | 79

Re: [libvirt] KVM Domain memory and disk usage

2014-02-28 Thread Eric Blake
On 02/28/2014 11:28 AM, Qiang Fu wrote: Right now we can get domain memory statistics through the following virsh cmds: 1. dumpxml: this returns memory and currentMemory This are settings for the domain that you can change before the domain starts. memory is the maximum it can reach

Re: [libvirt] [PATCH] bhyve: support domain undefine

2014-02-28 Thread Eric Blake
On 02/28/2014 12:30 PM, Roman Bogorodskiy wrote: Implement domainUndefine and required helper functions: - domainIsActive - domainIsPersistent --- src/bhyve/bhyve_driver.c | 79 src/bhyve/bhyve_utils.h | 1 + 2 files changed, 80

Re: [libvirt] KVM Domain memory and disk usage

2014-02-28 Thread Qiang Fu
Hi Eric, When we run the virsh dommemstat cmd, it returns us two values, actual and rss. I am referring to the rss here. I believe this is the qemu process in the host. So you mean it could be greater than the maximum memory allocation (memory in virsh dumpxml) to the guest? Why? Thanks, Bruce

Re: [libvirt] KVM Domain memory and disk usage

2014-02-28 Thread Eric Blake
On 02/28/2014 01:21 PM, Qiang Fu wrote: Hi Eric, [please don't top-post on technical lists] When we run the virsh dommemstat cmd, it returns us two values, actual and rss. 'virsh dommemstat' calls the virDomainMemoryStats() API, which in turn reports information from multiple places.

Re: [libvirt] [PATCH] bhyve: support domain undefine

2014-02-28 Thread Roman Bogorodskiy
Eric Blake wrote: On 02/28/2014 12:30 PM, Roman Bogorodskiy wrote: Implement domainUndefine and required helper functions: - domainIsActive - domainIsPersistent --- src/bhyve/bhyve_driver.c | 79 src/bhyve/bhyve_utils.h | 1 +

Re: [libvirt] [PATCH 1/2] apparmor: Allow access to filesystem mounts

2014-02-28 Thread Serge Hallyn
Hi, a separate patch was posted to a new launchpad bug which does a bit more sanity checking on the values passed in, so I went ahead and merged the two. I did however notice that there is no Signed-off-by for Felix. Felix, are you ok with this new version? Subject: [PATCH 1/1] virt-aa-helper:

Re: [libvirt] Libvirt Java Bindings - adding domain event support - pull request

2014-02-28 Thread Eric Blake
On 02/26/2014 08:47 PM, Chris Ellis wrote: Hi all I'm new to this list, I've been making use of the Libvirt Java bindings recently. I wanted to make use of domain events yesterday so my application can be alerted when the state of a domain changes etc. Sideline observations (I'm not a user

Re: [libvirt] Compiling libvirt RPC client library for QNX

2014-02-28 Thread Panday Ritesh Sharma (rpanday)
On 25/02/14 11:17 PM, Eric Blake ebl...@redhat.com wrote: On 02/25/2014 09:05 AM, Panday Ritesh Sharma (rpanday) wrote: We are using a wrapper of make for compilation for QNX. So I need to know, when I am compiling this client library on linux with '--without-libvirtd' option, what all .c

[libvirt] [PATCH v13 13/49] pass driver name as a parameter to virHostdevPrepareHostdevPCIDevices

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c index 0b1be8f..bbc85bc 100644 --- a/src/qemu/qemu_hostdev.c +++ b/src/qemu/qemu_hostdev.c @@

[libvirt] [PATCH v13 04/49] add virhostdev files to maintain global state of host devices

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- po/POTFILES.in |1 + src/Makefile.am |1 + src/libvirt_private.syms |4 ++ src/util/virhostdev.c| 103 ++ src/util/virhostdev.h| 44 +++ 5 files

[libvirt] [PATCH v13 00/49] write separate module for hostdev passthrough

2014-02-28 Thread Chunyan Liu
These patches implements a separate module for hostdev passthrough so that it could be shared by different drivers and can maintain a global state of a host device. Patches 1~6 are to switch existing qemu and lxc driver to use common library lists, so that to maintain a global state of every host

[libvirt] [PATCH v13 01/49] add 'driver' info to used_by

2014-02-28 Thread Chunyan Liu
Specify which driver and which domain in used_by area to avoid conflict among different drivers. Signed-off-by: Chunyan Liu cy...@suse.com --- src/lxc/lxc_hostdev.c | 24 +++-- src/qemu/qemu_conf.h|2 + src/qemu/qemu_driver.c | 16 ++- src/qemu/qemu_hostdev.c |

[libvirt] [PATCH v13 15/49] pass driver name as a parameter to virHostdevReAttachPCIDevices

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c index 74923a1..ea776ce 100644 --- a/src/qemu/qemu_hostdev.c +++ b/src/qemu/qemu_hostdev.c @@

[libvirt] [PATCH v13 25/49] rename qemu*USBDevices to virHostdev*USBDevices

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c index 1a589f4..15ed47c 100644 --- a/src/qemu/qemu_hostdev.c +++

[libvirt] [PATCH v13 11/49] rename qemu*NetConfigRestore/Replace to virHostdevNetConfigRestore/Replace

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c | 59 +++ 1 files changed, 29 insertions(+), 30 deletions(-) diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c index 76e3978..cdad2db 100644 ---

[libvirt] [PATCH v13 20/49] extract general code from qemuUpdateActiveScsiHostdevs

2014-02-28 Thread Chunyan Liu
Extract general code from qemuUpdateActiveScsiHostdevs to virHostdevUpdateActiveScsiHostdevs Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c | 27 ++- 1 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_hostdev.c

[libvirt] [PATCH v13 10/49] extract general code from qemuPrepareHostdevPCIDevices

2014-02-28 Thread Chunyan Liu
Extract general code from qemuPrepareHostdevPCIDevices to virHostdevPrepareHostdevPCIDevices. Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c | 49 +++--- 1 files changed, 33 insertions(+), 16 deletions(-) diff --git

[libvirt] [PATCH v13 22/49] move virHostdevUpdate* functions to virhostdev.c

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/libvirt_private.syms |3 + src/qemu/qemu_hostdev.c | 152 -- src/util/virhostdev.c| 152 ++ src/util/virhostdev.h| 12 4 files changed,

[libvirt] [PATCH v13 18/49] extract general code from qemuUpdateActivePciHostdevs

2014-02-28 Thread Chunyan Liu
Extract general code from qemuUpdateActivePciHostdevs to virHostdevUpdateActivePciHostdevs. Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c | 28 +++- 1 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_hostdev.c

[libvirt] [PATCH v13 08/49] qemu_hostdev: move ColdBoot as a flag

2014-02-28 Thread Chunyan Liu
For extracting hostdev codes from qemu_hostdev.c to common library, change qemu specific COLD_BOOT handling to be a flag, and pass it to hostdev functions. Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c |6 +++--- src/qemu/qemu_hostdev.h |4 ++--

[libvirt] [PATCH v13 09/49] qemu_hostdev: move netconfig file location to virhostdev stateDir

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c | 27 +++ 1 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c index 6be58ef..4a36417 100644 --- a/src/qemu/qemu_hostdev.c +++

[libvirt] [PATCH v13 14/49] extract general code from qemuDomainReAttachHostdevDevices

2014-02-28 Thread Chunyan Liu
Extract general code from qemuDomainReAttachHostdevDevicesi to virHostdevReAttachPCIDevices Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c | 41 + 1 files changed, 29 insertions(+), 12 deletions(-) diff --git

[libvirt] [PATCH v13 29/49] pass driver name as parameter to virHostdevPrepareSCSIDevices

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c index 5eb12d1..a7b4e74 100644 --- a/src/qemu/qemu_hostdev.c +++ b/src/qemu/qemu_hostdev.c @@

[libvirt] [PATCH v13 06/49] lxc: use general virhostdev lists instead of its own

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/lxc/lxc_conf.h|4 src/lxc/lxc_driver.c | 17 + src/lxc/lxc_hostdev.c | 49 - 3 files changed, 41 insertions(+), 29 deletions(-) diff --git a/src/lxc/lxc_conf.h

[libvirt] [PATCH v13 16/49] rename qemuReAttachPciDevice to virHostdevReAttachPciDevice

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c | 16 +--- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c index ea776ce..8f009e1 100644 --- a/src/qemu/qemu_hostdev.c +++

[libvirt] [PATCH v13 24/49] extract general code from qemuPrepareHostUSBDevices

2014-02-28 Thread Chunyan Liu
Extract general code from qemuPrepareHostUSBDevices to virHostdevPrepareHostUSBDevices. Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c | 37 - 1 files changed, 24 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_hostdev.c

[libvirt] [PATCH v13 07/49] qemu_hostdev: move cfg-relaxedACS as a flag

2014-02-28 Thread Chunyan Liu
For extracting hostdev codes from qemu_hostdev.c to common library, change qemu specific cfg-relaxedACS handling to be a flag, and pass it to hostdev functions. Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c | 11 +++ src/qemu/qemu_hostdev.h | 10 --

[libvirt] [PATCH v13 27/49] move virHostdevPrepareHostUSBDevices to virhostdev.c

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/libvirt_private.syms |1 + src/qemu/qemu_hostdev.c | 217 -- src/util/virhostdev.c| 216 + src/util/virhostdev.h|7 ++ 4 files changed, 224

[libvirt] [PATCH v13 19/49] extract general code from qemuUpdateActiveUsbHostdevs

2014-02-28 Thread Chunyan Liu
Extract general code from qemuUpdateActiveUsbHostdevs to virHostdevUpdateActiveUsbHostdevs. Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c | 27 ++- 1 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_hostdev.c

[libvirt] [PATCH v13 21/49] pass driver_name as parameter of virHostdevUpdate*Hostdevs functions

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c | 18 ++ 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c index 972ea09..c35a5df 100644 --- a/src/qemu/qemu_hostdev.c +++

[libvirt] [PATCH v13 05/49] qemu: use general virhostdev lists instead of its own

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_conf.h|8 -- src/qemu/qemu_driver.c | 74 +-- src/qemu/qemu_hostdev.c | 192 --- src/qemu/qemu_hotplug.c |1 + 4 files changed, 151 insertions(+), 124

[libvirt] [PATCH v13 17/49] move virHostdevPrepare(ReAttach)PCIDevices to virhostdev.c

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/libvirt_private.syms |3 +- src/qemu/qemu_hostdev.c | 648 - src/qemu/qemu_hostdev.h |5 - src/qemu/qemu_process.c |1 + src/util/virhostdev.c| 649

[libvirt] [PATCH v13 38/49] extract general code of NodeDeviceReAttach

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_driver.c | 67 1 files changed, 39 insertions(+), 28 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 46d975e..1b81689 100644 ---

[libvirt] [PATCH v13 31/49] extract general code from qemuDomainReAttachHostUsbDevices

2014-02-28 Thread Chunyan Liu
Extract general code from qemuDomainReAttachHostUsbDevices to virHostdevDomainReAttachHostUsbDevices. Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c | 32 1 files changed, 20 insertions(+), 12 deletions(-) diff --git

[libvirt] [PATCH v13 23/49] qemuPrepareUSBDevices: code adjustment for extracting general code

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c index 5771f41..e39bc47 100644 --- a/src/qemu/qemu_hostdev.c +++ b/src/qemu/qemu_hostdev.c @@

[libvirt] [PATCH v13 41/49] improve parameter name to let it more meaningful

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/util/virhostdev.c | 38 -- src/util/virhostdev.h | 10 +- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c index e3b818e..9cd11d4 100644

[libvirt] [PATCH v13 39/49] extract general code of NodeDeviceReset

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_driver.c | 29 - 1 files changed, 20 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 1b81689..44ac556 100644 --- a/src/qemu/qemu_driver.c +++

[libvirt] [PATCH v13 37/49] extract general code of NodeDeviceDetach

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_driver.c | 33 ++--- 1 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7d924b2..46d975e 100644 --- a/src/qemu/qemu_driver.c +++

[libvirt] [PATCH v13 34/49] extract general code from qemuDomainReAttachHostScsiDevices

2014-02-28 Thread Chunyan Liu
Extract general code from qemuDomainReAttachHostScsiDevices to virHostdevDomainReAttachHostScsiDevices. Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c | 48 ++ 1 files changed, 31 insertions(+), 17 deletions(-) diff --git

[libvirt] [PATCH v13 28/49] extract general code from qemuPrepareHostSCSIDevices

2014-02-28 Thread Chunyan Liu
Extract general code from qemuPrepareHostSCSIDevices to virHostdevPrepareHostSCSIDevices. Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c | 70 +++--- 1 files changed, 41 insertions(+), 29 deletions(-) diff --git

[libvirt] [PATCH v13 26/49] pass driver name to virHostdevPrepareUSBDevices

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c index 15ed47c..a7e6c91 100644 --- a/src/qemu/qemu_hostdev.c +++ b/src/qemu/qemu_hostdev.c @@

[libvirt] [PATCH v13 43/49] improve virHostdevUpdate* parameters to make it more widely used

2014-02-28 Thread Chunyan Liu
Changes parameter from vm def to specific hostdevs info and name info, so that it could be used more widely, e.g, could be used without full vm def info. Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c |9 ++--- src/util/virhostdev.c | 35

[libvirt] [PATCH v13 30/49] move virHostdevPrepareHostSCSIDevices to virhostdev.c

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/libvirt_private.syms |1 + src/qemu/qemu_hostdev.c | 112 -- src/util/virhostdev.c| 112 ++ src/util/virhostdev.h|6 +++ 4 files changed,

[libvirt] [PATCH v13 35/49] pass driver name as parameter to virHostdevReAttachScciHostdevs

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c index 66fb26a..7ef9b1b 100644 --- a/src/qemu/qemu_hostdev.c +++ b/src/qemu/qemu_hostdev.c @@

[libvirt] [PATCH v13 36/49] move virHostdevReAttachHostScsiDevices to virhostdev.c

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/libvirt_private.syms |1 + src/qemu/qemu_hostdev.c | 62 -- src/util/virhostdev.c| 62 ++ src/util/virhostdev.h|6 4 files changed,

[libvirt] [PATCH v13 32/49] pass driver name as paramter to virHostdevReAttachUsbHostdevs

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c index 64372a3..2c92c2b 100644 --- a/src/qemu/qemu_hostdev.c +++ b/src/qemu/qemu_hostdev.c @@

[libvirt] [PATCH v13 47/49] change lxc_hostdev.c to use virhostdev common library APIs

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/lxc/lxc_hostdev.c | 320 +++-- 1 files changed, 16 insertions(+), 304 deletions(-) diff --git a/src/lxc/lxc_hostdev.c b/src/lxc/lxc_hostdev.c index 8398646..3d9cc04 100644 --- a/src/lxc/lxc_hostdev.c

[libvirt] [PATCH v13 33/49] move virHostdevDomainReAttachHostUsbDevices to virhostdev.c

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/libvirt_private.syms |1 + src/qemu/qemu_hostdev.c | 65 -- src/util/virhostdev.c| 65 ++ src/util/virhostdev.h|6 4 files changed,

[libvirt] [PATCH v13 40/49] move virHostdevNodeDevice* to virhostdev.c

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/libvirt_private.syms |3 ++ src/qemu/qemu_driver.c | 81 -- src/util/virhostdev.c| 80 + src/util/virhostdev.h|8 4 files changed,

[libvirt] [PATCH v13 45/49] add parameter checks to common interfaces

2014-02-28 Thread Chunyan Liu
Check NULL parameter inputs Signed-off-by: Chunyan Liu cy...@suse.com --- src/util/virhostdev.c | 59 + 1 files changed, 59 insertions(+), 0 deletions(-) diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c index 9c189a7..73844a6 100644

[libvirt] [PATCH v13 44/49] add 3 wrapper functions for prepare/reattach/update domain hostdevs

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/libvirt_private.syms |4 ++ src/util/virhostdev.c| 104 ++ src/util/virhostdev.h| 24 ++- 3 files changed, 130 insertions(+), 2 deletions(-) diff --git a/src/libvirt_private.syms

[libvirt] [PATCH v13 48/49] add hostdev pci backend type for xen

2014-02-28 Thread Chunyan Liu
Add VIR_DOMAIN_HOSTDEV_PCI_BACKEND_XEN. For legacy xen, it will use pciback as stub driver. Signed-off-by: Chunyan Liu cy...@suse.com --- docs/schemas/domaincommon.rng |1 + src/conf/domain_conf.c|3 ++- src/conf/domain_conf.h|1 + src/libxl/libxl_domain.c |9

[libvirt] [PATCH v13 49/49] add pci passthrough to libxl driver

2014-02-28 Thread Chunyan Liu
Add pci passthrough to libxl driver, support attach-device, detach-device and start a vm with pci hostdev specified. Signed-off-by: Chunyan Liu cy...@suse.com --- src/libxl/libxl_conf.c | 63 +++ src/libxl/libxl_conf.h |4 + src/libxl/libxl_driver.c | 447

[libvirt] [PATCH v13 42/49] rename some function names to keep consistency

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/libvirt_private.syms |8 +++--- src/qemu/qemu_hostdev.c | 16 +++--- src/util/virhostdev.c| 52 +++--- src/util/virhostdev.h| 40 +- 4 files

[libvirt] [PATCH v13 46/49] add unit test for new virhostdev common library

2014-02-28 Thread Chunyan Liu
Add unit test for hostdev common library. Current tests are based on virpcimock. Signed-off-by: Chunyan Liu cy...@suse.com --- .gitignore |1 + tests/Makefile.am |5 + tests/virhostdevtest.c | 507 3 files changed, 513

[libvirt] [PATCH v13 02/49] qemu: reuse hostdev interfaces to avoid duplicate

2014-02-28 Thread Chunyan Liu
Same logic of preparing/reattaching hostdevs could be used in attach/detach hotplug places, so reuse hostdev interfaces to avoid duplicate, also for later extracting general code to common library. Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c |8 +++---

[libvirt] [PATCH v13 03/49] qemu: remove functions now used internally only from qemu_hostdev.h

2014-02-28 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c | 12 ++-- src/qemu/qemu_hostdev.h | 13 - 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c index e9c33f8..d37d3fe 100644 ---