[libvirt] [PATCH 1/7] util: Fix regression of wwn reading

2013-05-06 Thread Osier Yang
Introduced by commit 244ce462e29, which refactored the helper for wwn reading, however, it forgot to change the old strndup and sizeof(buf), sizeof(buf) operates on the fixed length array (buf) in the old code, but now buf is a pointer. Before the fix: % virsh nodedev-dumpxml scsi_host5 device

[libvirt] [PATCH 0/7] util: Fixes for NPIV related helpers

2013-05-06 Thread Osier Yang
Osier Yang (7): util: Fix regression of wwn reading util: Fix regression introduced by commit 4360a098441 util: Don't miss the slash in constructed path util: Change virIsCapable* to return bool util: Update the comment for virGetFCHostNameByWWN util: Honor the passed sysfs_prefix

[libvirt] [PATCH 2/7] util: Fix regression introduced by commit 4360a098441

2013-05-06 Thread Osier Yang
Which refactored the old code, and introduced new helper virIsCapableVport, but the path for checking with access() is not correctly constructed. --- src/util/virutil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/virutil.c b/src/util/virutil.c index

[libvirt] [PATCH 7/7] tests: Add tests for fc_host

2013-05-06 Thread Osier Yang
Since the NPIV machine is not easy to get, it's very likely to introduce regressions when doing changes on the existing code. This patch dumps part of the sysfs files (the necessary ones) of fc_host as test input data, to test the related util functions. It could be extended for more fc_host

[libvirt] [PATCH 5/7] util: Update the comment for virGetFCHostNameByWWN

2013-05-06 Thread Osier Yang
The returned result is something like host5 acutally. --- src/util/virutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virutil.c b/src/util/virutil.c index dfbef06..c83996d 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@ -3265,7 +3265,7 @@ cleanup:

[libvirt] [PATCH 6/7] util: Honor the passed sysfs_prefix

2013-05-06 Thread Osier Yang
The helper works for default sysfs_prefix, but for user specified prefix, it doesn't work. (Detected when writing test cases. A later patch will add the test cases for fc_host). --- src/util/virutil.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git

[libvirt] [PATCH 3/7] util: Don't miss the slash in constructed path

2013-05-06 Thread Osier Yang
In case of the caller can pass a prefix (or sysfs_prefix) without the trailing slash, and Unix-Like system always eats up the redundant slash in the filepath, let's add it explicitly. --- src/util/virutil.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git

[libvirt] [PATCH 4/7] util: Change virIsCapable* to return bool

2013-05-06 Thread Osier Yang
Function name with aIsB generally means its return value is in Bi-state (true/false). --- src/node_device/node_device_linux_sysfs.c | 4 ++-- src/util/virutil.c| 18 +- src/util/virutil.h| 4 ++-- 3 files changed, 13 insertions(+),

[libvirt] Missing documentation?

2013-05-06 Thread Joseph Glanville
Hi, I am playing with libvirt and I noticed the API reference appears to be empty, the page in particular is: http://libvirt.org/html/index.html I also tried to build the documentation from git but this also produces empty html along with a stream of errors because W3C is blocking access to the

[libvirt] [PATCH 0/3]add 'policy' attribute for qemu vnc display sharing policy

2013-05-06 Thread Guannan Ren
These patches try to add a new attribute 'policy' to element graphics of vnc type. This attribute has three values: libvirt XML: graphics type='vnc' port='5900' policy='force-shared' QEMU commandline -vnc :5900,share=allow-exclusive Allows clients to ask for exclusive access which is

[libvirt] [PATCH 3/3] qemu: support share attribute and its values to -vnc option

2013-05-06 Thread Guannan Ren
--- src/qemu/qemu_command.c| 13 .../qemuxml2argv-graphics-vnc-policy.args | 4 +++ .../qemuxml2argv-graphics-vnc-policy.xml | 35 ++ tests/qemuxml2argvtest.c | 1 + 4 files changed, 53

[libvirt] [PATCH 1/3] qemu: new vnc display sharing policy caps flag

2013-05-06 Thread Guannan Ren
QEMU_CAPS_VNC_DISPLAY_POLICY (qemu = v1.10) --- docs/formatdomain.html.in | 13 +++-- docs/schemas/domaincommon.rng | 9 + src/qemu/qemu_capabilities.c | 12 src/qemu/qemu_capabilities.h | 1 + tests/qemuhelptest.c | 9 ++--- 5 files changed, 35

[libvirt] [PATCH 2/3] conf: add 'policy' attribute to graphics element for vnc

2013-05-06 Thread Guannan Ren
-vnc :5900,share=allow-exclusive allows clients to ask for exclusive access which is implemented by dropping other connections Connecting multiple clients in parallel requires all clients asking for a shared session (vncviewer: -shared switch) -vnc :5900,share=force-shared disables exclusive

[libvirt] [PATCH v1 4/8] qemu_monitor: Introduce qemuMonitorAttachCharDev

2013-05-06 Thread Michal Privoznik
The function being introduced is responsible for preparing and executing 'chardev-add' qemu monitor command. Moreover, in case of PTY chardev, the corresponding pty path is updated. --- src/qemu/qemu_monitor.c | 21 + src/qemu/qemu_monitor.h | 3 + src/qemu/qemu_monitor_json.c |

[libvirt] [PATCH v1 1/8] domain_conf: Introduce chardev hotplug helpers

2013-05-06 Thread Michal Privoznik
For now, only these three helpers are needed: virDomainChrFind - to find a duplicate chardev within VM def virDomainChrInsert - wrapper for inserting a new chardev into VM def virDomainChrRemove - wrapper for removing chardev from VM def There is, however, one internal helper as well:

[libvirt] [PATCH v1 7/8] qemu: Introduce qemuBuildChrDeviceStr

2013-05-06 Thread Michal Privoznik
The function being introduced is responsible for creating command line argument for '-device' for given character device. Based on the chardev type, it calls appropriate qemuBuild.*ChrDeviceStr(), e.g. qemuBuildSerialChrDeviceStr() for serial chardev and so on. --- src/qemu/qemu_command.c | 196

[libvirt] [PATCH v1 5/8] qemu_monitor: Introduce qemuMonitorDetachCharDev

2013-05-06 Thread Michal Privoznik
This function wraps 'chardev-remove' qemu monitor command around. It takes chardev alias as its single argument besides qemu monitor pointer. --- src/qemu/qemu_monitor.c | 20 src/qemu/qemu_monitor.h | 2 ++ src/qemu/qemu_monitor_json.c | 23 +++

[libvirt] [PATCH v1 3/8] qemu_monitor_json: Move InetSocketAddress build to a separate function

2013-05-06 Thread Michal Privoznik
Currently, we are building InetSocketAddress qemu json type within the qemuMonitorJSONNBDServerStart function. However, other future functions may profit from the code as well. So it should be moved into a static function. --- src/qemu/qemu_monitor_json.c | 47

[libvirt] [PATCH v1 8/8] qemu: Implement chardev hotplug on live level

2013-05-06 Thread Michal Privoznik
Since previous patches has prepared everything for us, we may now implement live hotplug of a character device. --- src/qemu/qemu_driver.c | 10 + src/qemu/qemu_hotplug.c | 97 + src/qemu/qemu_hotplug.h | 6 +++ 3 files changed, 113

[libvirt] [PATCH v1 0/8] Chardev hotplug

2013-05-06 Thread Michal Privoznik
The first round. For some reasons, I am still unable to hotplug any king of chardev. For instance: console type='pty' source path='/dev/pts/4'/ target port='0'/ /console Doesn't work. On the other hand, any domain with such device coldpluged refuse to start anyway :) Michal

[libvirt] [PATCH v1 2/8] qemu: Implement chardev hotplug on config level

2013-05-06 Thread Michal Privoznik
There are two levels on which a device may be hotplugged: config and live. The config level requires just an insert or remove from internal domain definition structure, which is what this patch exactly does. There is currently no implementation for a chardev update action, as there's not much to

[libvirt] [PATCH v1 6/8] qemu_command: Honour chardev alias assignment with a function

2013-05-06 Thread Michal Privoznik
The chardev alias assignment is going to be needed in a separate places, so it should be moved into a separate function rather than copying code randomly around. --- src/qemu/qemu_command.c | 66 ++--- src/qemu/qemu_command.h | 3 +++ 2 files changed,

[libvirt] IPv6 iscsi targets

2013-05-06 Thread Ján Tomko
Hello. Before running iscsiadm, libvirt translates the source host to an IP address for the --portal option. However, it only resolves to IPv4 and only uses the first address. iscsiadm allows a hostname to be specified [1][2], but specifying a hostname instead of the address doesn't work if the

Re: [libvirt] [RFC] New CPU hotplug APIs

2013-05-06 Thread Peter Krempa
On 05/02/13 11:13, Peter Krempa wrote: On 04/25/13 14:22, Peter Krempa wrote: Hi upstream, I'd like to discuss the design of CPU modification related APIs before I start working on them. Qemu recently added support for modification of the state of the cpu using the guest agent and is also

Re: [libvirt] [PATCH 05/40] Simplify the Xen get type driver method

2013-05-06 Thread Jim Fehlig
Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com There is no point iterating over sub-drivers since the user would not have a virConnectPtr instance at all if opening the drivers failed. Just return 'Xen' immediately. Signed-off-by: Daniel P. Berrange

Re: [libvirt] [PATCH 06/40] Simplify the Xen get version driver method

2013-05-06 Thread Jim Fehlig
Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The hypervisor driver is mandatory, so the the call to xenHypervisorGetVersion must always succeed. Thus there is no need to ever run xenDaemonGetVersion Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

[libvirt] [PATCH qom-cpu-next 1/3] target-i386: Add feature-words property

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

[libvirt] [PATCH qom-cpu-next 3/3] target-i386: Add filtered-features property to X86CPU

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

[libvirt] [PATCH qom-cpu-next 0/3] X86CPU: feature-words/filtered-features properties (v12)

2013-05-06 Thread Eduardo Habkost
Resubmitting after a rebase and a few trivial changes. Changes v11 - v12: * Remove unnecessary entries from .gitignore * Fix indentation of x86_cpu_get_feature_words() declaration * Rebase on top of qom-cpu-next (commit bd87d2a - target-i386: Use FeatureWord loop on

[libvirt] [PATCH qom-cpu-next 2/3] target-i386: Introduce X86CPU.filtered_features field

2013-05-06 Thread Eduardo Habkost
This field will contain the feature bits that were filtered out because of missing host support. Signed-off-by: Eduardo Habkost ehabk...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- Changes v11 - v12: * Rebase on top of qom-cpu-next (commit bd87d2a - target-i386: Use FeatureWord

Re: [libvirt] [Qemu-devel] [PATCH qom-cpu 5/9] target-i386: Add ECX information to FeatureWordInfo

2013-05-06 Thread Andreas Färber
Am 03.05.2013 17:54, schrieb Eduardo Habkost: On Fri, May 03, 2013 at 05:16:46PM +0200, Andreas Färber wrote: Am 22.04.2013 21:00, schrieb Eduardo Habkost: FEAT_7_0_EBX uses ECX as input, so we have to take that into account when reporting feature word values. Signed-off-by: Eduardo Habkost

Re: [libvirt] [Qemu-devel] [PATCH qom-cpu 7/9] target-i386: Use FeatureWord loop on filter_features_for_kvm()

2013-05-06 Thread Andreas Färber
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 03.05.2013 17:01, schrieb Eric Blake: On 04/22/2013 01:00 PM, Eduardo Habkost wrote: Instead of open-coding the filtering code for each feature word, change the existing code to use the feature_word_info array, that have exactly the same CPUID

Re: [libvirt] [PATCH 01/25] conf: Generic XMLs for scsi hostdev

2013-05-06 Thread John Ferlan
On 05/03/2013 02:07 PM, Osier Yang wrote: From: Han Cheng hanc.f...@cn.fujitsu.com An example of the scsi hostdev XML: hostdev mode='subsystem' type='scsi' source adapter name='scsi_host0'/ address bus='0' target='0' unit='0'/ /source address

Re: [libvirt] [PATCH 07/40] Simplify the Xen get max vcpus / node get info driver methods

2013-05-06 Thread Jim Fehlig
Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Unconditionally call into xenHypervisorGetMaxVcpus and xenDaemonNodeGetInfo respectively, since those drivers are both mandatory Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/xen/xen_driver.c | 15

Re: [libvirt] [PATCH 08/40] Simplify the Xen count/list domains driver methods

2013-05-06 Thread Jim Fehlig
Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The XenStore driver is mandatory, so it can be used unconditonally for the xenUnifiedConnectListDomains xenUnifiedConnectNumOfDomains drivers. Delete the unused XenD and Hypervisor driver code for listing / counting

Re: [libvirt] [PATCH 02/25] qemu: New cap flags for scsi-generic

2013-05-06 Thread John Ferlan
On 05/03/2013 02:07 PM, Osier Yang wrote: From: Han Cheng hanc.f...@cn.fujitsu.com Adding two cap flags for scsi-generic: QEMU_CAPS_SCSI_GENERIC QEMU_CAPS_SCSI_GENERIC_BOOTINDEX Signed-off-by: Han Cheng hanc.f...@cn.fujitsu.com Signed-off-by: Osier Yang hanc.f...@cn.fujitsu.com ---

Re: [libvirt] [PATCH 09/40] Simplify the Xen domain create driver method

2013-05-06 Thread Jim Fehlig
Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Unconditionally call xenDaemonCreateXML in the xenUnifiedDomainCreateXML driver, since the XenD driver is always present. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/xen/xen_driver.c| 6 ++

Re: [libvirt] [PATCHv2] qemu: Do fake auto-allocation of ports when generating native command

2013-05-06 Thread Peter Krempa
On 05/02/13 11:16, Peter Krempa wrote: When attempting to generate the native command line from an XML file that uses graphics port auto allocation, the generated commandline wouldn't be valid. This patch adds fake autoallocation of ports as done when starting the actual machine. --- Notes:

Re: [libvirt] [PATCHv2] qemu: Do fake auto-allocation of ports when generating native command

2013-05-06 Thread Eric Blake
On 05/02/2013 03:16 AM, Peter Krempa wrote: When attempting to generate the native command line from an XML file that uses graphics port auto allocation, the generated commandline wouldn't be valid. This patch adds fake autoallocation of ports as done when starting the actual machine. ---

Re: [libvirt] [PATCHv2] qemu: Do fake auto-allocation of ports when generating native command

2013-05-06 Thread Michal Privoznik
On 02.05.2013 11:16, Peter Krempa wrote: When attempting to generate the native command line from an XML file that uses graphics port auto allocation, the generated commandline wouldn't be valid. This patch adds fake autoallocation of ports as done when starting the actual machine. ---

[libvirt] [PATCH 2/1] build: clean up stray files after 'make check'

2013-05-06 Thread Eric Blake
'make distcheck' complained: ERROR: files left in build directory after distclean: ./python/libvirt.pyc ./tests/commandhelper.log * tests/commandtest.c (test16): Unlink log file. * python/Makefile.am (CLEANFILES): Clean up compiled python files. Signed-off-by: Eric Blake ebl...@redhat.com ---

Re: [libvirt] [PATCH 03/25] utils: util functions for scsi hostdev

2013-05-06 Thread John Ferlan
On 05/03/2013 02:07 PM, Osier Yang wrote: From: Han Cheng hanc.f...@cn.fujitsu.com This patch adds util functions for scsi hostdev. Signed-off-by: Han Cheng hanc.f...@cn.fujitsu.com Signed-off-by: Osier Yang jy...@redhat.com --- v3 - v4: * Use strdup instead of virAsprintf if the

Re: [libvirt] Requested operation is not valid: domain is not running but exactly vm is running

2013-05-06 Thread Eric Blake
On 05/02/2013 11:45 PM, yue wrote: hi,all [these days, sending mail in charset=GBK is counterproductive; sending mail in UTF-8 is preferred] requested operation is not valid: domain is not running but exactly vm is running when call getCPUStats,interfaceStats... system: centos6.3

Re: [libvirt] Missing documentation?

2013-05-06 Thread Eric Blake
On 05/05/2013 02:57 AM, Joseph Glanville wrote: Hi, I am playing with libvirt and I noticed the API reference appears to be empty, the page in particular is: http://libvirt.org/html/index.html Yeah, Dan did a refactoring of several web pages recently, and probably missed something that

Re: [libvirt] [PATCH qom-cpu-next 0/3] X86CPU: feature-words/filtered-features properties (v12)

2013-05-06 Thread Andreas Färber
Am 06.05.2013 18:20, schrieb Eduardo Habkost: Resubmitting after a rebase and a few trivial changes. Changes v11 - v12: * Remove unnecessary entries from .gitignore * Fix indentation of x86_cpu_get_feature_words() declaration * Rebase on top of qom-cpu-next (commit bd87d2a -

Re: [libvirt] [PATCH v3 03/34] Adapt to VIR_STRDUP and VIR_STRNDUP in src/conf/*

2013-05-06 Thread Eric Blake
On 05/05/2013 05:01 AM, Michal Privoznik wrote: @@ -228,7 +228,7 @@ virCapabilitiesAddHostFeature(virCapsPtr caps, caps-host.nfeatures, 1) 0) return -1; -if ((caps-host.features[caps-host.nfeatures] = strdup(name)) == NULL) +if

Re: [libvirt] [PATCH 2/1] build: clean up stray files after 'make check'

2013-05-06 Thread Eric Blake
On 05/06/2013 11:15 AM, Eric Blake wrote: 'make distcheck' complained: ERROR: files left in build directory after distclean: ./python/libvirt.pyc ./tests/commandhelper.log * tests/commandtest.c (test16): Unlink log file. Stale commit message buffer. The correct commit message is:

Re: [libvirt] [PATCH 04/25] qemu: Build qemu command line for scsi host device

2013-05-06 Thread John Ferlan
On 05/03/2013 02:07 PM, Osier Yang wrote: From: Han Cheng hanc.f...@cn.fujitsu.com Except the scsi host device's controller is lsilogic, mapping between the libvirt attributes and scsi-generic properties is: libvirt qemu - controller bus

Re: [libvirt] [PATCH 05/25] rng: Interleave hostdev elements

2013-05-06 Thread John Ferlan
On 05/03/2013 02:07 PM, Osier Yang wrote: --- docs/schemas/domaincommon.rng | 42 ++ 1 file changed, 22 insertions(+), 20 deletions(-) Seems reasonable, not an expert though... John -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH 05/25] rng: Interleave hostdev elements

2013-05-06 Thread Eric Blake
On 05/06/2013 11:47 AM, John Ferlan wrote: On 05/03/2013 02:07 PM, Osier Yang wrote: --- docs/schemas/domaincommon.rng | 42 ++ 1 file changed, 22 insertions(+), 20 deletions(-) Seems reasonable, not an expert though... Your gut feel was right -

Re: [libvirt] [PATCH 06/25] Introduce readonly for hostdev

2013-05-06 Thread John Ferlan
On 05/03/2013 02:07 PM, Osier Yang wrote: Since it's generic enough to be used by other types in future, I put it in hostdev as sub-element, though now it's only used by scsi host device. --- docs/formatdomain.html.in | 4 +++ docs/schemas/domaincommon.rng

Re: [libvirt] [PATCH 07/25] qemu: Support bootindex for scsi host device

2013-05-06 Thread John Ferlan
On 05/03/2013 02:07 PM, Osier Yang wrote: --- src/qemu/qemu_command.c| 10 +++ .../qemuxml2argv-hostdev-scsi-boot.args| 9 ++ .../qemuxml2argv-hostdev-scsi-boot.xml | 34 ++ tests/qemuxml2argvtest.c

Re: [libvirt] [PATCH 08/25] qemu: Allow the scsi-generic device in cgroup

2013-05-06 Thread John Ferlan
On 05/03/2013 02:07 PM, Osier Yang wrote: From: Han Cheng hanc.f...@cn.fujitsu.com This adds the scsi-generic device into the device controller's whitelist, so that it's allowed to used by the qemu process. Signed-off-by: Han Cheng hanc.f...@cn.fujitsu.com Signed-off-by: Osier Yang

[libvirt] Static Route for IPv6

2013-05-06 Thread Gene Czarcinski
In the process of adding the code to support static routes for IPv4 and IPv6, I hit a problem when I tried to specify a static route for ::/0 (that is default) ... the error was file exists. and the problem is that this is a feature and not a bug. Here is the comment from the bugzilla report

Re: [libvirt] [PATCH 09/25] security: Manage the security label for scsi host device

2013-05-06 Thread John Ferlan
On 05/03/2013 02:07 PM, Osier Yang wrote: To not introduce more redundant code, helpers are added for both selinux, dac, and apparmor backends. Signed-off-by: Han Cheng hanc.f...@cn.fujitsu.com Signed-off-by: Osier Yang jyang@redhat v2.5 - v3: * Splitted from 8/10 of v2.5 * Don't

Re: [libvirt] [PATCH 2/1] build: clean up stray files after 'make check'

2013-05-06 Thread Peter Krempa
On 05/06/13 19:39, Eric Blake wrote: On 05/06/2013 11:15 AM, Eric Blake wrote: 'make distcheck' complained: ERROR: files left in build directory after distclean: ./python/libvirt.pyc ./tests/commandhelper.log * tests/commandtest.c (test16): Unlink log file. Stale commit message buffer. The

Re: [libvirt] [PATCH] build: always include libvirt_lxc.syms in tarball

2013-05-06 Thread Peter Krempa
On 05/03/13 01:50, Eric Blake wrote: On a mingw build, 'make distcheck' fails with: GEN libvirt_qemu.def make[3]: *** No rule to make target `../../src/libvirt_lxc.syms', needed by `libvirt_lxc.def'. Stop. I traced it to a missing entry in EXTRA_DIST. But rather than keep the entire

Re: [libvirt] [PATCH 2/2] spec: proper soft static allocation of qemu uid

2013-05-06 Thread Peter Krempa
On 05/01/13 22:32, Eric Blake wrote: https://bugzilla.redhat.com/show_bug.cgi?id=924501 tracks a problem that occurs if uid 107 is already in use at the time libvirt is first installed. In response that problem, Fedora packaging guidelines were recently updated. This fixes the spec file to

Re: [libvirt] [PATCH 2/1] build: clean up stray files after 'make check'

2013-05-06 Thread Eric Blake
On 05/06/2013 01:22 PM, Peter Krempa wrote: On 05/06/13 19:39, Eric Blake wrote: On 05/06/2013 11:15 AM, Eric Blake wrote: 'make distcheck' complained: ERROR: files left in build directory after distclean: ./python/libvirt.pyc ./tests/commandhelper.log * tests/commandtest.c (test16):

Re: [libvirt] [PATCH 2/2] spec: proper soft static allocation of qemu uid

2013-05-06 Thread Eric Blake
On 05/06/2013 01:30 PM, Peter Krempa wrote: On 05/01/13 22:32, Eric Blake wrote: https://bugzilla.redhat.com/show_bug.cgi?id=924501 tracks a problem that occurs if uid 107 is already in use at the time libvirt is first installed. In response that problem, Fedora packaging guidelines were

[libvirt] [PATCH] qemu: allocate network connections sooner during domain startup

2013-05-06 Thread Laine Stump
VFIO device assignment requires a cgroup ACL to be setup for access to the /dev/vfio/nn group device for any devices that will be assigned to a guest. In the case of a host device that is allocated from a pool, it was being allocated during qemuBuildCommandLine(), which is called by

Re: [libvirt] [PATCH 08/40] Simplify the Xen count/list domains driver methods

2013-05-06 Thread Jim Fehlig
Jim Fehlig wrote: Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The XenStore driver is mandatory, so it can be used unconditonally for the xenUnifiedConnectListDomains xenUnifiedConnectNumOfDomains drivers. Delete the unused XenD and Hypervisor driver code for

Re: [libvirt] [PATCH 10/40] Simplify the Xen domain lookup driver methods

2013-05-06 Thread Jim Fehlig
Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Unconditionally invoke the xenHypervisorLookupDomainByID, xenHypervisorLookupDomainByUUID or xenDaemonLookupByName for looking up domains. Fallback to xenXMDomainLookupByUUID and xenXMDomainLookupByName for legacy XenD

Re: [libvirt] [PATCHv2] qemu: Do fake auto-allocation of ports when generating native command

2013-05-06 Thread Peter Krempa
On 05/06/13 19:09, Eric Blake wrote: On 05/02/2013 03:16 AM, Peter Krempa wrote: When attempting to generate the native command line from an XML file that uses graphics port auto allocation, the generated commandline wouldn't be valid. This patch adds fake autoallocation of ports as done when

Re: [libvirt] Static Route for IPv6

2013-05-06 Thread Laine Stump
On 05/06/2013 02:41 PM, Gene Czarcinski wrote: In the process of adding the code to support static routes for IPv4 and IPv6, I hit a problem when I tried to specify a static route for ::/0 (that is default) ... the error was file exists. and the problem is that this is a feature and not a bug.

Re: [libvirt] [PATCH 11/40] Simplify the Xen domain is persistent driver method

2013-05-06 Thread Jim Fehlig
Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Unconditionally call xenDaemonLookupByUUID, since the XenD driver must always be present. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/xen/xen_driver.c | 41 +++--

Re: [libvirt] [PATCH 12/40] Simplify the Xen domain suspend/resume driver methods

2013-05-06 Thread Jim Fehlig
Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Update xenUnifiedDomainSuspend and xenUnifiedDomainResume to unconditionally invoke the XenD APIs for suspend/resume. Delete the impls in the hypervisor driver which was unreachable. Signed-off-by: Daniel P. Berrange

Re: [libvirt] [PATCH 14/40] Simplify the Xen domain destroy driver method

2013-05-06 Thread Jim Fehlig
Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Unconditionally call the xenDaemonDomainDestroyFlags API since the XenD driver is always available. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/xen/xen_driver.c | 19 +---

Re: [libvirt] [PATCH 15/40] Simplify the Xen domain get OS type driver method

2013-05-06 Thread Jim Fehlig
Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Make xenUnifiedDomainGetOSType directly call either the xenHypervisorDomainGetOSType or xenDaemonDomainGetOSType method depending on whether the domain is active or not. Useful to add a note about removing the unused

Re: [libvirt] [PATCH 15/40] Simplify the Xen domain get OS type driver method

2013-05-06 Thread Jim Fehlig
Jim Fehlig wrote: Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Make xenUnifiedDomainGetOSType directly call either the xenHypervisorDomainGetOSType or xenDaemonDomainGetOSType method depending on whether the domain is active or not. Useful to add a

Re: [libvirt] [PATCH 16/40] Remove Xen get hostname driver method

2013-05-06 Thread Jim Fehlig
Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The xenGetHostname entry point in the xenUnifiedDriver table was unused. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/xen/xen_driver.h | 1 - 1 file changed, 1 deletion(-) ACK. Regards, Jim

Re: [libvirt] [PATCH v3 04/34] Adapt to VIR_STRDUP and VIR_STRNDUP in src/cpu/*

2013-05-06 Thread Eric Blake
On 05/03/2013 08:53 AM, Michal Privoznik wrote: --- src/cpu/cpu_generic.c | 8 src/cpu/cpu_map.c | 3 ++- src/cpu/cpu_powerpc.c | 13 ++--- src/cpu/cpu_x86.c | 10 +- 4 files changed, 17 insertions(+), 17 deletions(-) @@ -131,7 +131,7 @@

Re: [libvirt] [PATCH] Fix docs generator regression in previous commit

2013-05-06 Thread Daniel Veillard
On Fri, May 03, 2013 at 04:59:13PM +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The previous commit failed to update the XSL to take account of fact that in XHTML mode the elements need namespace prefixes. This caused every web page to be blank! Pushed as

[libvirt] Libvirt 1.0.5 with Openvswitch 1.11.90: unable to add bridge br0 port vnet0 operation not supported

2013-05-06 Thread Christopher Paggen (cpaggen)
Howdy, Running the most recent OVS and libvirt I'm running into the following error message with virt-install: root@qemu-kvm:~/libvirt-1.0.5# ovs-vsctl -V ovs-vsctl (Open vSwitch) 1.11.90 Compiled May 6 2013 22:37:22 root@qemu-kvm:~/libvirt-1.0.5# root@qemu-kvm:~/libvirt-1.0.5# virt-install

Re: [libvirt] [PATCH v3 05/34] Adapt to VIR_STRDUP and VIR_STRNDUP in src/esx/*

2013-05-06 Thread Eric Blake
On 05/03/2013 08:53 AM, Michal Privoznik wrote: --- src/esx/esx_driver.c| 43 ++-- src/esx/esx_interface_driver.c | 7 +--- src/esx/esx_network_driver.c| 28 - src/esx/esx_storage_backend_iscsi.c | 21 +++---

[libvirt] [PATCH 0/2] VIR_STRDUP ease of use

2013-05-06 Thread Eric Blake
As pointed out during my (ongoing) review of Michal's series, I think that letting VIR_STRDUP take a NULL source can make it easier to use; I also think that documenting the guarantee that it evaluates arguments exactly once is worth enforcing. Hmm, I guess that means I should write a 3/2 patch

[libvirt] [PATCH 1/2] alloc: make VIR_APPEND_ELEMENT safer

2013-05-06 Thread Eric Blake
VIR_APPEND_ELEMENT(array, size, elem) was not safe if the expression for 'size' had side effects. While no one in the current code base was trying to pass side effects, we might as well be robust and explicitly document our intentions. * src/util/viralloc.c (virInsertElementsN): Add special

[libvirt] [PATCH 2/2] string: make VIR_STRDUP easier to use

2013-05-06 Thread Eric Blake
While reviewing proposed VIR_STRDUP conversions, I've already noticed several places that do: if (str VIR_STRDUP(dest, str) 0) which can be simplified by allowing str to be NULL (something that strdup() doesn't allow). Meanwhile, code that wants to ensure a non-NULL dest regardless of the

Re: [libvirt] [PATCH 10/40] Simplify the Xen domain lookup driver methods

2013-05-06 Thread Jim Fehlig
Jim Fehlig wrote: Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Unconditionally invoke the xenHypervisorLookupDomainByID, xenHypervisorLookupDomainByUUID or xenDaemonLookupByName for looking up domains. Fallback to xenXMDomainLookupByUUID and

Re: [libvirt] [PATCH v3 06/34] Adapt to VIR_STRDUP and VIR_STRNDUP in src/hyperv/*

2013-05-06 Thread Eric Blake
On 05/03/2013 08:53 AM, Michal Privoznik wrote: --- src/hyperv/hyperv_driver.c | 50 ++ src/hyperv/hyperv_util.c | 18 + 2 files changed, 15 insertions(+), 53 deletions(-) @@ -908,21 +895,12 @@

Re: [libvirt] [PATCH v3 34/34] Introduce syntax-check rule to prefer VIR_STRDUP over strdup

2013-05-06 Thread Eric Blake
On 05/03/2013 08:53 AM, Michal Privoznik wrote: --- cfg.mk | 8 1 file changed, 8 insertions(+) diff --git a/cfg.mk b/cfg.mk index 1d63bbd..4ed2c3a 100644 --- a/cfg.mk +++ b/cfg.mk @@ -387,6 +387,11 @@ sc_prohibit_asprintf: halt='use strdup instead of virAsprintf with

Re: [libvirt] [PATCH 17/40] Simplify the Xen domain get/set (max) memory driver methods

2013-05-06 Thread Jim Fehlig
Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Simplify the Xen memory limit driver methods to directly call the most appropriate sub-driver Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/xen/xen_driver.c | 50 ++-

Re: [libvirt] [RFC] New CPU hotplug APIs

2013-05-06 Thread Li Zhang
On 2013年04月25日 20:22, Peter Krempa wrote: Hi upstream, I'd like to discuss the design of CPU modification related APIs before I start working on them. Qemu recently added support for modification of the state of the cpu using the guest agent and is also doing work on hot plug of cpus and