Re: [libvirt] [PATCH 18/4] virsh: split out virsh-volume.c

2012-08-21 Thread Eric Blake
On 08/20/2012 10:58 PM, Laine Stump wrote: On 08/20/2012 07:48 PM, Eric Blake wrote: Last of the file splits. * tools/virsh-volume.h: New file. * tools/Makefile.am (virsh_SOURCES): Build it. * tools/virsh.c: Use new header. * tools/virsh-volume.c: Likewise. --- tools/Makefile.am| 3

[libvirt] [PATCH] build: fix build with autoconf 2.59

2012-08-21 Thread Eric Blake
Commit 350583c8 broke development on a RHEL 5 box, where the ancient Autoconf 2.59 lacks AS_VERSION_STRING. Rather than backport the complex awk script that newer autoconf uses for true strverscmp comparisons from the shell, it was easier to just open-code a shell case statement. * configure.ac

[libvirt] [PATCH v2 02/17] Introduce the function virCgroupMoveTask

2012-08-21 Thread Hu Tao
Introduce a new API to move tasks of one controller from a cgroup to another cgroup Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- src/libvirt_private.syms |2 + src/util/cgroup.c| 109

[libvirt] [PATCH v2 00/17] Supports for emulator-pin and emulator-bandwidth

2012-08-21 Thread Hu Tao
This series adds support of emulator-pin to pin emulator threads on specified physical CPUs, and emulator-bandwidth to control physical CPU bandwidth for emulator threads. changes: v2: - rename hypervisor to emulator all through the series - no Flags-suffix for new APIs - reduce code

[libvirt] [PATCH v2 01/17] Introduce the function virCgroupForEmulator

2012-08-21 Thread Hu Tao
From: Wen Congyang we...@cn.fujitsu.com Introduce the function virCgroupForEmulator() to create sub directory for simulator thread(include I/O thread, vhost-net thread) Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Hu Tao

[libvirt] [PATCH v2 13/17] Introduce virDomainEmulatorPinAdd and virDomainEmulatorPinDel functions

2012-08-21 Thread Hu Tao
From: Tang Chen tangc...@cn.fujitsu.com Introduce 2 APIs to support emulator threads pin. 1) virDomainEmulatorPinAdd: setup emulator threads pin with a given cpumap string. 2) virDomainEmulatorPinDel: remove all emulator threads pin. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com

[libvirt] [PATCH v2 03/17] create a new cgroup and move all emulator threads to the new cgroup

2012-08-21 Thread Hu Tao
From: Wen Congyang we...@cn.fujitsu.com Create a new cgroup and move all emulator threads to the new cgroup. And then we can do the other things: 1. limit only vcpu usage rather than the whole qemu 2. limit for emulator threads(include vhost-net threads) Signed-off-by: Wen Congyang

[libvirt] [PATCH v2 06/17] updates of some vcpupin related functions

2012-08-21 Thread Hu Tao
1. add a new function virDomainVcpuPinDefCopy 2. make virDomainVcpuPinDefFree non-static --- src/conf/domain_conf.c | 34 +- src/conf/domain_conf.h |5 + src/libvirt_private.syms |2 ++ 3 files changed, 40 insertions(+), 1 deletion(-) diff --git

[libvirt] [PATCH v2 04/17] add function bitmapFromBytemap() to convert bytemap to bitmap

2012-08-21 Thread Hu Tao
--- src/conf/domain_conf.c | 39 +-- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 851284a..0dafb9e 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -10791,36 +10791,47

[libvirt] [PATCH v2 15/17] remote: introduce emulator pinning RPCs

2012-08-21 Thread Hu Tao
From: Tang Chen tangc...@cn.fujitsu.com Introduce 2 APIs to support emulator threads in remote driver. 1) remoteDomainPinEmulator: call driver api, such as qemudDomainPinEmulator. 2) remoteDomainGetEmulatorPinInfo: call driver api, such as qemudDomainGetEmulatorPinInfo. They are similar

[libvirt] [PATCH v2 11/17] Add qemuProcessSetEmulatorAffinites and set emulator threads affinities

2012-08-21 Thread Hu Tao
From: Tang Chen tangc...@cn.fujitsu.com Emulator threads should also be pinned by sched_setaffinity(), just the same as vcpu threads. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- src/qemu/qemu_process.c | 54

[libvirt] [PATCH v2 05/17] refactor virDomainVcpuPinAdd()

2012-08-21 Thread Hu Tao
--- src/conf/domain_conf.c | 81 ++ src/conf/domain_conf.h |3 +- src/libxl/libxl_driver.c | 13 +++- src/qemu/qemu_driver.c | 26 +-- src/xen/xend_internal.c | 13 +++- 5 files changed, 82 insertions(+), 54

[libvirt] [PATCH v2 07/17] Enable cpuset cgroup and synchronous vcpupin info to cgroup.

2012-08-21 Thread Hu Tao
vcpu threads pin are implemented using sched_setaffinity(), but not controlled by cgroup. This patch does the following things: 1) enable cpuset cgroup 2) reflect all the vcpu threads pin info to cgroup Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Hu Tao

[libvirt] [PATCH v2 08/17] Change virDomainVcpuPinDefParseXML to support parsing emulatorpin

2012-08-21 Thread Hu Tao
--- src/conf/domain_conf.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 264adcc..9abf675 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -7759,7 +7759,19 @@ cleanup:

[libvirt] [PATCH v2 09/17] Support simulatorpin xml parse.

2012-08-21 Thread Hu Tao
From: Tang Chen tangc...@cn.fujitsu.com This patch adds a new xml element simulatorpin, which is a sibling to the existing vcpupin element under the cputune, to pin simulator threads to specified physical CPUs. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Hu Tao

[libvirt] [PATCH v2 14/17] qemu: support emulator pinning

2012-08-21 Thread Hu Tao
Introduce 2 APIs to support emulator threads pin in qemu driver. 1) qemudDomainPinEmulator: setup emulator threads pin info. 2) qemudDomainGetEmulatorPinInfo: get all emulator threads pin info. They are similar to qemudDomainPinVcpuFlags and qemudDomainGetVcpuPinInfo. And also,

[libvirt] [PATCH v2 10/17] qemu: synchronize emulatorpin info to cgroup

2012-08-21 Thread Hu Tao
From: Tang Chen tangc...@cn.fujitsu.com Introduce qemuSetupCgroupEmulatorPin() function to add emulator threads pin info to cpuset cgroup, the same as vcpupin. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- src/qemu/qemu_cgroup.c | 51

[libvirt] [PATCH v2 17/17] new command emulatorpin

2012-08-21 Thread Hu Tao
--- tools/virsh-domain.c | 188 ++ tools/virsh.pod | 16 + 2 files changed, 204 insertions(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index aab5921..dfbe501 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c

[libvirt] [PATCH v2 12/17] Introduce virDomainPinEmulator and virDomainGetEmulatorPinInfo functions.

2012-08-21 Thread Hu Tao
From: Tang Chen tangc...@cn.fujitsu.com Introduce 2 APIs to set/get physical cpu pinning info of emulator threads. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- include/libvirt/libvirt.h.in | 10 +++ src/driver.h | 12

[libvirt] [PATCH v2 16/17] Add a new function vshPrintPinInfo.

2012-08-21 Thread Hu Tao
This is a helper function to print vcpu pin info. --- tools/virsh-domain.c | 65 -- 1 file changed, 42 insertions(+), 23 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index edbda91..aab5921 100644 ---

Re: [libvirt] [PATCH 0/5] network: define new API virNetworkDefineXMLFlags

2012-08-21 Thread Laine Stump
On 08/20/2012 02:17 AM, Laine Stump wrote: I would like to enhance libvirt's network API to allow enacting any changes in definition immediately, as an alternative to the current behavior of saving the changes right away, but not using them until the next time the network is destroyed and

Re: [libvirt] [PATCH 0/5] add usb redirection filter support

2012-08-21 Thread Hans de Goede
Hi, On 08/20/2012 06:06 PM, Daniel P. Berrange wrote: On Sun, Aug 19, 2012 at 11:42:43PM +0800, Guannan Ren wrote: BZ RFE https://bugzilla.redhat.com/show_bug.cgi?id=795929 qemu support: http://git.qemu.org/?p=qemu.git;a=commitdiff;h=6af165892cf900291046f1d25f95416f379504c2 Since qemu has

Re: [libvirt] [PATCH v2 02/17] Introduce the function virCgroupMoveTask

2012-08-21 Thread Hu Tao
On Tue, Aug 21, 2012 at 02:43:52PM +0800, Hu Tao wrote: Introduce a new API to move tasks of one controller from a cgroup to another cgroup Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com ---

Re: [libvirt] [PATCH] esx: Support VLAN tags in virtual network port groups

2012-08-21 Thread Ansis Atteka
On Sun, Aug 19, 2012 at 8:35 PM, Laine Stump la...@laine.org wrote: On 08/18/2012 07:46 AM, Matthias Bolte wrote: --- src/esx/esx_network_driver.c | 38 +- 1 files changed, 33 insertions(+), 5 deletions(-) diff --git a/src/esx/esx_network_driver.c

[libvirt] [PATCH] command: avoid double close in virExecWithHook

2012-08-21 Thread Ján Tomko
Fix possible double close in the child process after the fork in case infd and outfd are equal, just like they are after being called from virNetSocketNewConnectCommand. --- src/util/command.c | 14 +- 1 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/util/command.c

Re: [libvirt] [PATCH v2 00/17] Supports for emulator-pin and emulator-bandwidth

2012-08-21 Thread Hu Tao
I forgot to do a rebase when sending this series, it happened there are some conflicts with the latest tree. I'll do a rebase and resend the series. -- Thanks, Hu Tao -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH v2.1 00/21] Supports for emulator-pin and emulator-bandwidth

2012-08-21 Thread Hu Tao
This series adds support of emulator-pin to pin emulator threads on specified physical CPUs, and emulator-bandwidth to control physical CPU bandwidth for emulator threads. changes: v2.1: - rebase - include emulator-bandwidth patches - minor fix of virCgroupAddTaskStrController v2: -

[libvirt] [PATCH v2.1 11/21] Add qemuProcessSetEmulatorAffinites and set emulator threads affinities

2012-08-21 Thread Hu Tao
From: Tang Chen tangc...@cn.fujitsu.com Emulator threads should also be pinned by sched_setaffinity(), just the same as vcpu threads. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- src/qemu/qemu_process.c | 54

[libvirt] [PATCH v2.1 01/21] Introduce the function virCgroupForEmulator

2012-08-21 Thread Hu Tao
From: Wen Congyang we...@cn.fujitsu.com Introduce the function virCgroupForEmulator() to create sub directory for simulator thread(include I/O thread, vhost-net thread) Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Hu Tao

[libvirt] [PATCH v2.1 04/21] add function bitmapFromBytemap() to convert bytemap to bitmap

2012-08-21 Thread Hu Tao
--- src/conf/domain_conf.c | 39 +-- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index c9f5a3c..4e52177 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -10893,36 +10893,47

[libvirt] [PATCH v2.1 06/21] updates of some vcpupin related functions

2012-08-21 Thread Hu Tao
1. add a new function virDomainVcpuPinDefCopy 2. make virDomainVcpuPinDefFree non-static --- src/conf/domain_conf.c | 34 +- src/conf/domain_conf.h |5 + src/libvirt_private.syms |2 ++ 3 files changed, 40 insertions(+), 1 deletion(-) diff --git

[libvirt] [PATCH v2.1 02/21] Introduce the function virCgroupMoveTask

2012-08-21 Thread Hu Tao
Introduce a new API to move tasks of one controller from a cgroup to another cgroup Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- src/libvirt_private.syms |2 + src/util/cgroup.c| 110

[libvirt] [PATCH v2.1 13/21] Introduce virDomainEmulatorPinAdd and virDomainEmulatorPinDel functions

2012-08-21 Thread Hu Tao
From: Tang Chen tangc...@cn.fujitsu.com Introduce 2 APIs to support emulator threads pin. 1) virDomainEmulatorPinAdd: setup emulator threads pin with a given cpumap string. 2) virDomainEmulatorPinDel: remove all emulator threads pin. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com

[libvirt] [PATCH v2.1 07/21] Enable cpuset cgroup and synchronous vcpupin info to cgroup.

2012-08-21 Thread Hu Tao
vcpu threads pin are implemented using sched_setaffinity(), but not controlled by cgroup. This patch does the following things: 1) enable cpuset cgroup 2) reflect all the vcpu threads pin info to cgroup Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Hu Tao

[libvirt] [PATCH v2.1 18/21] limit cpu bandwidth only for vcpus

2012-08-21 Thread Hu Tao
This patch changes the behaviour of xml element cputune.period and cputune.quota to limit cpu bandwidth only for vcpus, and no longer limit cpu bandwidth for the whole guest. The reasons to do this are: - This matches docs of cputune.period and cputune.quota. - The other parts excepting

[libvirt] [PATCH v2.1 03/21] create a new cgroup and move all emulator threads to the new cgroup

2012-08-21 Thread Hu Tao
From: Wen Congyang we...@cn.fujitsu.com Create a new cgroup and move all emulator threads to the new cgroup. And then we can do the other things: 1. limit only vcpu usage rather than the whole qemu 2. limit for emulator threads(include vhost-net threads) Signed-off-by: Wen Congyang

[libvirt] [PATCH v2.1 08/21] Change virDomainVcpuPinDefParseXML to support parsing emulatorpin

2012-08-21 Thread Hu Tao
--- src/conf/domain_conf.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index ff27bc7..62ba9de 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -7860,7 +7860,19 @@ cleanup:

[libvirt] [PATCH v2.1 05/21] refactor virDomainVcpuPinAdd()

2012-08-21 Thread Hu Tao
--- src/conf/domain_conf.c | 81 ++ src/conf/domain_conf.h |3 +- src/libxl/libxl_driver.c | 13 +++- src/qemu/qemu_driver.c | 26 +-- src/xen/xend_internal.c | 13 +++- 5 files changed, 82 insertions(+), 54

[libvirt] [PATCH v2.1 20/21] new interface to control emulator_period/emulator_quota

2012-08-21 Thread Hu Tao
This patch adds two macros: VIR_DOMAIN_SCHEDULER_EMULATOR_PERIOD, VIR_DOMAIN_SCHEDULER_EMULATOR_QUOTA for controlling cpu bandwidth for emulator activities not tied to vcpus --- include/libvirt/libvirt.h.in | 24 +--- tools/virsh.pod | 11 ++- 2 files

[libvirt] [PATCH v2.1 12/21] Introduce virDomainPinEmulator and virDomainGetEmulatorPinInfo functions.

2012-08-21 Thread Hu Tao
From: Tang Chen tangc...@cn.fujitsu.com Introduce 2 APIs to set/get physical cpu pinning info of emulator threads. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- include/libvirt/libvirt.h.in | 10 +++ src/driver.h | 12

[libvirt] [PATCH v2.1 10/21] qemu: synchronize emulatorpin info to cgroup

2012-08-21 Thread Hu Tao
From: Tang Chen tangc...@cn.fujitsu.com Introduce qemuSetupCgroupEmulatorPin() function to add emulator threads pin info to cpuset cgroup, the same as vcpupin. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- src/qemu/qemu_cgroup.c | 51

[libvirt] [PATCH v2.1 17/21] new command emulatorpin

2012-08-21 Thread Hu Tao
--- tools/virsh-domain.c | 188 ++ tools/virsh.pod | 16 + 2 files changed, 204 insertions(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 047d374..95015ad 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c

[libvirt] [PATCH v2.1 09/21] Support emulatorpin xml parse.

2012-08-21 Thread Hu Tao
From: Tang Chen tangc...@cn.fujitsu.com This patch adds a new xml element emulatorpin, which is a sibling to the existing vcpupin element under the cputune, to pin emulator threads to specified physical CPUs. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Hu Tao

[libvirt] [PATCH v2.1 16/21] Add a new function vshPrintPinInfo.

2012-08-21 Thread Hu Tao
This is a helper function to print vcpu pin info. --- tools/virsh-domain.c | 65 -- 1 file changed, 42 insertions(+), 23 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 94ac1aa..047d374 100644 ---

[libvirt] [PATCH v2.1 19/21] qemu: introduce period/quota tuning for emulator

2012-08-21 Thread Hu Tao
This patch introduces support of setting emulator's period and quota to limit cpu bandwidth when the vm starts. Also updates XML Schema for new entries and docs. --- docs/formatdomain.html.in | 24 docs/schemas/domaincommon.rng | 10 ++

[libvirt] [PATCH v2.1 14/21] qemu: support emulator pinning

2012-08-21 Thread Hu Tao
Introduce 2 APIs to support emulator threads pin in qemu driver. 1) qemudDomainPinEmulator: setup emulator threads pin info. 2) qemudDomainGetEmulatorPinInfo: get all emulator threads pin info. They are similar to qemudDomainPinVcpuFlags and qemudDomainGetVcpuPinInfo. And also,

[libvirt] [PATCH v2.1 15/21] remote: introduce emulator pinning RPCs

2012-08-21 Thread Hu Tao
From: Tang Chen tangc...@cn.fujitsu.com Introduce 2 APIs to support emulator threads in remote driver. 1) remoteDomainPinEmulator: call driver api, such as qemudDomainPinEmulator. 2) remoteDomainGetEmulatorPinInfo: call driver api, such as qemudDomainGetEmulatorPinInfo. They are similar

[libvirt] [PATCH v2.1 21/21] qemu: support of emulator_period and emulator_quota's modification

2012-08-21 Thread Hu Tao
From: Wen Congyang we...@cn.fujitsu.com allow the user change/get emulator's period and quota when the vm is running. --- src/qemu/qemu_driver.c | 133 +++- 1 file changed, 132 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c

Re: [libvirt] [PATCH 0/5] add usb redirection filter support

2012-08-21 Thread Daniel P. Berrange
On Tue, Aug 21, 2012 at 09:04:03AM +0200, Hans de Goede wrote: Hi, On 08/20/2012 06:06 PM, Daniel P. Berrange wrote: On Sun, Aug 19, 2012 at 11:42:43PM +0800, Guannan Ren wrote: BZ RFE https://bugzilla.redhat.com/show_bug.cgi?id=795929 qemu support:

Re: [libvirt] [PATCH] build: silence stupid gcc warning on STREQ_NULLABLE

2012-08-21 Thread Daniel P. Berrange
On Mon, Aug 20, 2012 at 01:51:49PM -0600, Eric Blake wrote: Our existing STRNEQ_NULLABLE() triggered a warning in gcc 4.7 when used with a literal NULL argument: qemumonitorjsontest.c: In function 'testQemuMonitorJSONGetMachines': qemumonitorjsontest.c:289:5: error: null argument where

Re: [libvirt] IVSHMEM support

2012-08-21 Thread Daniel P. Berrange
On Mon, Aug 20, 2012 at 03:34:30PM -0400, Shawn Furrow wrote: Hi all, Does anyone know if Libvirt supports shared memory devices such as IVSHMEM. I know it didn't at one point but I didn't know if support for it had been recently added. No, we don't currently support that feature. Patches

Re: [libvirt] [libguestfs] Options for hotplugging

2012-08-21 Thread Daniel P. Berrange
On Mon, Aug 20, 2012 at 10:07:43PM +0100, Richard W.M. Jones wrote: In the first case (using /dev/sdX names), some magic already happens translating these to the real names underneath, but currently that magic is just /dev/sdX - /dev/vdX for the virtio case. Ah I didn't realize that you

Re: [libvirt] [PATCH v4] qemu: Unify port-wise SPICE and VNC behavior

2012-08-21 Thread Daniel P. Berrange
On Tue, Aug 14, 2012 at 02:52:19PM +0200, Martin Kletzander wrote: Port allocations for SPICE and VNC behave almost the same (with default ports), but there is some mess in the code. This patch clears these inconsistencies and makes sure the same behavior will be used when ports for remote

Re: [libvirt] [libguestfs] Options for hotplugging

2012-08-21 Thread Richard W.M. Jones
On Tue, Aug 21, 2012 at 10:32:51AM +0100, Daniel P. Berrange wrote: On Mon, Aug 20, 2012 at 10:07:43PM +0100, Richard W.M. Jones wrote: In the first case (using /dev/sdX names), some magic already happens translating these to the real names underneath, but currently that magic is just

Re: [libvirt] [PATCH v4] qemu: Unify port-wise SPICE and VNC behavior

2012-08-21 Thread Martin Kletzander
On 08/21/2012 11:36 AM, Daniel P. Berrange wrote: On Tue, Aug 14, 2012 at 02:52:19PM +0200, Martin Kletzander wrote: Port allocations for SPICE and VNC behave almost the same (with default ports), but there is some mess in the code. This patch clears these inconsistencies and makes sure the

[libvirt] [PATCH 4/4] DEBUG: print out netlink message.

2012-08-21 Thread Tang Chen
Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- src/util/virnetlink.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c index fff98f1..3e6f26a 100644 --- a/src/util/virnetlink.c +++ b/src/util/virnetlink.c @@ -342,6 +342,8 @@

[libvirt] [PATCH 1/4] Improve netlink to support all protocol.

2012-08-21 Thread Tang Chen
This patch improve all the API in virnetlink.c to support all kinds of netlink protocols, and make all netlink sockets be able to join in groups. SOL_NETLINK is not defined on every system, so this patch defines SOL_NETLINK as 270. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com ---

[libvirt] [PATCH 0/4] Improve netlink to support all protocols.

2012-08-21 Thread Tang Chen
These patches improved libvirt to support all netlink protocols, and also introduced a new netlink service to listen to hotplug events. Tang Chen (4): Improve netlink to support all protocol. Introduce virNetlinkEventServiceStopAll() to stop all netlink services in libvirt. Add uevent

[libvirt] [PATCH 2/4] Introduce virNetlinkEventServiceStopAll() to stop all netlink services.

2012-08-21 Thread Tang Chen
This patch introduce virNetlinkEventServiceStopAll() to stop all the monitors to receive netlink messages for libvirtd. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- daemon/libvirtd.c|2 +- src/libvirt_private.syms |1 + src/util/virnetlink.c| 50

[libvirt] [PATCH 3/4] Add uevent netlink service.

2012-08-21 Thread Tang Chen
This patch adds a new netlink service with NETLINK_KOBJECT_UEVENT protocol hotplug event. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- daemon/libvirtd.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index 922c5b5..c0a2f03 100644 ---

Re: [libvirt] [PATCH 0/5] add usb redirection filter support

2012-08-21 Thread Hans de Goede
Hi, On 08/21/2012 11:23 AM, Daniel P. Berrange wrote: Snip We want the admin of the vm to be able to set policy as to which devices can be redirected to the vm, for example for security reasons. Clearly the right place to enforce such a policy is the host and not the client, esp. since the

Re: [libvirt] [PATCH v4 3/5] Update security layer to handle many security labels

2012-08-21 Thread Viktor Mihajlovski
On 08/16/2012 12:10 AM, Marcelo Cerri wrote: -if (!def-seclabels[0]-norelabel) { -def-seclabels[0]-imagelabel = virSecuritySELinuxGenNewContext( -data-file_context, mcs); -if (!def-seclabels[0]-imagelabel) { +if

Re: [libvirt] [PATCH v4 3/5] Update security layer to handle many security labels

2012-08-21 Thread Daniel P. Berrange
On Tue, Aug 21, 2012 at 12:45:47PM +0200, Viktor Mihajlovski wrote: On 08/16/2012 12:10 AM, Marcelo Cerri wrote: -if (!def-seclabels[0]-norelabel) { -def-seclabels[0]-imagelabel = virSecuritySELinuxGenNewContext( -

Re: [libvirt] [libguestfs] Options for hotplugging

2012-08-21 Thread Matthew Booth
On 20/08/12 22:07, Richard W.M. Jones wrote: (1) The raw libvirt option In this one we'd simply provide thin wrappers around virDomainAttachDevice and virDomainDetactDevice, and leave it up to the user to know what they're doing. The problem with this is the hidden appliance disk. We

Re: [libvirt] [PATCH 0/5] add usb redirection filter support

2012-08-21 Thread Daniel P. Berrange
On Tue, Aug 21, 2012 at 12:46:41PM +0200, Hans de Goede wrote: Hi, On 08/21/2012 11:23 AM, Daniel P. Berrange wrote: Snip We want the admin of the vm to be able to set policy as to which devices can be redirected to the vm, for example for security reasons. Clearly the right place to

[libvirt] [PATCH] Fix parsing of uid/gid on Mingw32

2012-08-21 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The DAC security driver uses the virStrToLong_ui function to parse the uid/gid out of the seclabel string. This works on Linux where 'uid_t' is an unsigned int, but on Mingw32 it is just an 'int'. This causes compiler warnings about signed/ unsigned

Re: [libvirt] [libguestfs] Options for hotplugging

2012-08-21 Thread Richard W.M. Jones
On Tue, Aug 21, 2012 at 11:49:04AM +0100, Matthew Booth wrote: (3) The serial numbers option This was Dan's suggestion. Hotplugged drives are known only by their serial number. ie. We hotplug them via libvirt using the serial/ field, and then they are accessed using /dev/disk/by-id/serial.

Re: [libvirt] [PATCH] Fix parsing of uid/gid on Mingw32

2012-08-21 Thread Michal Privoznik
On 21.08.2012 13:09, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The DAC security driver uses the virStrToLong_ui function to parse the uid/gid out of the seclabel string. This works on Linux where 'uid_t' is an unsigned int, but on Mingw32 it is just an 'int'.

[libvirt] [PATCH] build: split driver_storage into convenience library

2012-08-21 Thread Eric Blake
Commit 1d22ba95 was complete at the time, but we have since reintroduced a warning that is fixed in the same manner: CCLD storagebackendsheepdogtest *** Warning: Linking the executable storagebackendsheepdogtest against the loadable module *** libvirt_driver_storage.so is not portable! *

Re: [libvirt] [PATCHv2 0/4] Add LibSSH2 transport

2012-08-21 Thread Peter Krempa
On 08/15/12 15:33, Daniel P. Berrange wrote: On Sat, Aug 11, 2012 at 11:20:58PM +0200, Peter Krempa wrote: This is a second respin of the LibSSH2 transport patch series. The most notable changes: - - Rebased on top of current upstream (virObject, new error codes) -

Re: [libvirt] [PATCH 3/4] tests: Add tests for dump-core option

2012-08-21 Thread Michal Privoznik
On 15.08.2012 11:25, Martin Kletzander wrote: --- tests/qemuargv2xmltest.c |2 + .../qemuxml2argv-machine-core-off.args |5 .../qemuxml2argv-machine-core-off.xml | 26

Re: [libvirt] [PATCH 4/4] docs: Document dump-core memory feature

2012-08-21 Thread Michal Privoznik
On 15.08.2012 11:25, Martin Kletzander wrote: --- docs/formatdomain.html.in | 13 ++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index bb225b1..af44742 100644 --- a/docs/formatdomain.html.in +++

Re: [libvirt] [PATCH 1/4] Add support for limiting guest coredump

2012-08-21 Thread Michal Privoznik
On 15.08.2012 11:25, Martin Kletzander wrote: Sometimes when guest machine crashes, coredump can get huge due to the guest memory. This can be limited using madvise(2) system call and is being used in QEMU hypervisor. This patch adds an option for configuring that in the domain XML. ---

Re: [libvirt] [PATCH 2/4] qemu: add support for dump-guest-core option

2012-08-21 Thread Michal Privoznik
On 15.08.2012 11:25, Martin Kletzander wrote: The dump-guest-core' option is new option for the machine type (-machine pc,dump-guest-core) that controls whether the guest memory will be marked as dumpable. While testing this, I've found out that the value for the '-M' options is not parsed

[libvirt] [PATCH] sanlock: Provide better error if lockspace directory is missing

2012-08-21 Thread Jiri Denemark
Generating Unable to add lockspace /lock/space/dir/__LIBVIRT__DISKS__: No such file or directory is correct but not exactly clear. This patch changes the error message to Unable to create lockspace /lock/space/dir/__LIBVIRT__DISKS__: parent directory does not exist or is not a directory. ---

[libvirt] [PATCH] daemon: Autodetect lock driver directory

2012-08-21 Thread Jiri Denemark
When running libvirtd from a build directory, libvirtd would load lock drivers from system directory unless explicitly overridden by setting LIBVIRT_LOCK_MANAGER_PLUGIN_DIR environment variable. Since we already autodetect driver directory if libvirt is build with driver modules, we can use the

Re: [libvirt] [PATCH] daemon: Autodetect lock driver directory

2012-08-21 Thread Daniel P. Berrange
On Tue, Aug 21, 2012 at 03:42:23PM +0200, Jiri Denemark wrote: When running libvirtd from a build directory, libvirtd would load lock drivers from system directory unless explicitly overridden by setting LIBVIRT_LOCK_MANAGER_PLUGIN_DIR environment variable. Since we already autodetect driver

Re: [libvirt] [PATCH] sanlock: Provide better error if lockspace directory is missing

2012-08-21 Thread Daniel P. Berrange
On Tue, Aug 21, 2012 at 03:42:37PM +0200, Jiri Denemark wrote: Generating Unable to add lockspace /lock/space/dir/__LIBVIRT__DISKS__: No such file or directory is correct but not exactly clear. This patch changes the error message to Unable to create lockspace

Re: [libvirt] [PATCH] build: split driver_storage into convenience library

2012-08-21 Thread Michal Privoznik
On 21.08.2012 15:05, Eric Blake wrote: Commit 1d22ba95 was complete at the time, but we have since reintroduced a warning that is fixed in the same manner: CCLD storagebackendsheepdogtest *** Warning: Linking the executable storagebackendsheepdogtest against the loadable module ***

[libvirt] [PATCH] additional parameter needed for dnsmasq

2012-08-21 Thread Gene Czarcinski
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=849787 As currently configured, dnsmasq for a virtual network will pass some queries upstream toward the Internet. This includes and MX queries as well a A queries when dnsmasq cannot answer for that name. This is occurring whether a

Re: [libvirt] [PATCH 11/23] Introduce an internal API for handling file based lockspaces

2012-08-21 Thread Daniel P. Berrange
On Thu, Aug 16, 2012 at 04:31:28PM -0600, Eric Blake wrote: On 08/09/2012 09:20 AM, Daniel P. Berrange wrote: eg to lock /var/lib/libvirt/images/foo.img the application might do virLockSpacePtr lockspace = virLockSpaceNew(/var/lib/libvirt/imagelocks); lockname =

Re: [libvirt] [PATCH] output status information during guest shutdown again

2012-08-21 Thread Gerd v. Egidy
Hi Eric, thanks for the in-depth review. Sorry for answering so late but I had some urgent stuff popping up here. I'll send an updated version of my patch in the next mail. tools/libvirt-guests.service.in | 1 + 2 files changed, 51 insertions(+), 15 deletions(-) mode change 100644 =

Re: [libvirt] [PATCH] output status information during guest shutdown again

2012-08-21 Thread Gerd v. Egidy
Since the move to systemd libvirt-guests doesn't output this progress information anymore. This patch brings back this feature. It is helpful to show the admin what the system is waiting for and what is left of the timeout (e.g. for calibrating the shutdown timing of a ups). Rewriting the

Re: [libvirt] [PATCH] additional parameter needed for dnsmasq

2012-08-21 Thread Daniel P. Berrange
On Tue, Aug 21, 2012 at 10:43:44AM -0400, Gene Czarcinski wrote: RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=849787 As currently configured, dnsmasq for a virtual network will pass some queries upstream toward the Internet. This includes and MX queries as well a A queries when

Re: [libvirt] [PATCH 1/4] Improve netlink to support all protocol.

2012-08-21 Thread Doug Goldstein
On Tue, Aug 21, 2012 at 5:12 AM, Tang Chen tangc...@cn.fujitsu.com wrote: This patch improve all the API in virnetlink.c to support all kinds of netlink protocols, and make all netlink sockets be able to join in groups. SOL_NETLINK is not defined on every system, so this patch defines

Re: [libvirt] [PATCH 4/4] DEBUG: print out netlink message.

2012-08-21 Thread Doug Goldstein
On Tue, Aug 21, 2012 at 5:12 AM, Tang Chen tangc...@cn.fujitsu.com wrote: Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- src/util/virnetlink.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c index fff98f1..3e6f26a 100644 ---

Re: [libvirt] [PATCH 0/5] support guest agent general command

2012-08-21 Thread Michal Privoznik
On 08.08.2012 16:36, Eric Blake wrote: [adding qemu-devel, for a qemu-ga question] On 08/07/2012 06:04 PM, MATSUDA, Daiki wrote: Hi, All. I rewrote the patches as Eric suggested. virsh # help qemu-agent-command NAME qemu-agent-command - Qemu Guest Agent Command SYNOPSIS

Re: [libvirt] [PATCH v4] network: use firewalld instead of iptables, when available

2012-08-21 Thread Thomas Woerner
Hello Laine, On 08/16/2012 08:18 AM, Laine Stump wrote: From: Thomas Woerner twoer...@redhat.com (This is Thomas v3 version of 1/2 of the firewalld patches, modified to check for firewall-cmd and firewalld state only once, rather than every time an iptables rule is added or removed. It's not

Re: [libvirt] [PATCH] build: silence stupid gcc warning on STREQ_NULLABLE

2012-08-21 Thread Eric Blake
On 08/21/2012 03:25 AM, Daniel P. Berrange wrote: On Mon, Aug 20, 2012 at 01:51:49PM -0600, Eric Blake wrote: Our existing STRNEQ_NULLABLE() triggered a warning in gcc 4.7 when used with a literal NULL argument: qemumonitorjsontest.c: In function 'testQemuMonitorJSONGetMachines':

Re: [libvirt] [PATCH] build: split driver_storage into convenience library

2012-08-21 Thread Eric Blake
On 08/21/2012 07:59 AM, Michal Privoznik wrote: On 21.08.2012 15:05, Eric Blake wrote: Commit 1d22ba95 was complete at the time, but we have since reintroduced a warning that is fixed in the same manner: CCLD storagebackendsheepdogtest *** Warning: Linking the executable

Re: [libvirt] [PATCH 13/23] Add JSON serialization of virNetSocketPtr objects for process re-exec()

2012-08-21 Thread Daniel P. Berrange
On Thu, Aug 16, 2012 at 05:16:50PM -0600, Eric Blake wrote: On 08/09/2012 09:20 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Add two new APIs virNetSocketNewPostExecRestart and virNetSocketPreExecRestart which allow a virNetSocketPtr object to be created

Re: [libvirt] [PATCH v4] network: use firewalld instead of iptables, when available

2012-08-21 Thread Doug Goldstein
On Thu, Aug 16, 2012 at 1:18 AM, Laine Stump la...@laine.org wrote: From: Thomas Woerner twoer...@redhat.com (This is Thomas v3 version of 1/2 of the firewalld patches, modified to check for firewall-cmd and firewalld state only once, rather than every time an iptables rule is added or

Re: [libvirt] [PATCH 0/5] support guest agent general command

2012-08-21 Thread Eric Blake
On 08/21/2012 09:26 AM, Michal Privoznik wrote: Question to the qemu folks - can we enhance 'guest-info' to tell us commands required to give output on success, vs. commands that are expected to never answer (except on possible error), so that libvirt can then make smarter decisions about

Re: [libvirt] [PATCH 13/23] Add JSON serialization of virNetSocketPtr objects for process re-exec()

2012-08-21 Thread Eric Blake
On 08/21/2012 09:48 AM, Daniel P. Berrange wrote: On Thu, Aug 16, 2012 at 05:16:50PM -0600, Eric Blake wrote: On 08/09/2012 09:20 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Add two new APIs virNetSocketNewPostExecRestart and virNetSocketPreExecRestart which

Re: [libvirt] [PATCHv6 1/2] Support for Disk Geometry Override

2012-08-21 Thread Daniel P. Berrange
On Mon, Aug 20, 2012 at 03:58:50PM +0200, Viktor Mihajlovski wrote: From: J.B. Joret j...@linux.vnet.ibm.com A hypervisor may allow to override the disk geometry of drives. Qemu, as an example with cyls=,heads=,secs=[,trans=]. This patch extends the domain config to allow the specification

Re: [libvirt] [PATCHv6 2/2] qemu: Disk Geometry Override Support

2012-08-21 Thread Daniel P. Berrange
On Mon, Aug 20, 2012 at 03:58:51PM +0200, Viktor Mihajlovski wrote: From: J.B. Joret j...@linux.vnet.ibm.com Qemu command line generation for geometry override and testcases. V2 Changes: squashed qemu code and testcases. V3 Changes: use virReportError. V4 Changes: rebase V5

Re: [libvirt] [PATCH] command: avoid double close in virExecWithHook

2012-08-21 Thread Daniel P. Berrange
On Tue, Aug 21, 2012 at 11:01:44AM +0200, Ján Tomko wrote: Fix possible double close in the child process after the fork in case infd and outfd are equal, just like they are after being called from virNetSocketNewConnectCommand. --- src/util/command.c | 14 +- 1 files changed,

Re: [libvirt] [PATCH v2.1 01/21] Introduce the function virCgroupForEmulator

2012-08-21 Thread Daniel P. Berrange
On Tue, Aug 21, 2012 at 05:18:24PM +0800, Hu Tao wrote: From: Wen Congyang we...@cn.fujitsu.com Introduce the function virCgroupForEmulator() to create sub directory for simulator thread(include I/O thread, vhost-net thread) Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by:

Re: [libvirt] [PATCH v2.1 02/21] Introduce the function virCgroupMoveTask

2012-08-21 Thread Daniel P. Berrange
On Tue, Aug 21, 2012 at 05:18:25PM +0800, Hu Tao wrote: Introduce a new API to move tasks of one controller from a cgroup to another cgroup Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com ---

Re: [libvirt] [PATCH v2.1 03/21] create a new cgroup and move all emulator threads to the new cgroup

2012-08-21 Thread Daniel P. Berrange
On Tue, Aug 21, 2012 at 05:18:26PM +0800, Hu Tao wrote: From: Wen Congyang we...@cn.fujitsu.com Create a new cgroup and move all emulator threads to the new cgroup. And then we can do the other things: 1. limit only vcpu usage rather than the whole qemu 2. limit for emulator threads(include

  1   2   >