[libvirt] [PATCH 1/3 V7] add nodeGetCPUmap() for getting available CPU IDs in a cpumap.

2012-03-01 Thread Lai Jiangshan
From: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Changelog: - fixed typos. - fixed string scan routine. Signed-off-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- src/libvirt_private.syms |1 + src/nodeinfo.c

[libvirt] [PATCH 3/3 V7] cpu-stats command shows cpu statistics information of a domain.

2012-03-01 Thread Lai Jiangshan
option Changed from V: rebase Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- tools/virsh.c | 154 +++ tools/virsh.pod |8 +++ 2 files changed, 162 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c

[libvirt] [PATCH 2/3 V7] qemu driver for virDomainGetCPUstats using cpuacct cgroup.

2012-03-01 Thread Lai Jiangshan
/qemu_conf.c - take care of cpuacct cgroup. * src/qemu/qemu_driver.c - added an interface * src/util/cgroup.c/h- added interface for getting percpu cputime Signed-off-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- src/qemu/qemu.conf

Re: [libvirt] [PATCH 1/3 V6] add nodeGetCPUmap() for getting available CPU IDs in a cpumap.

2012-02-22 Thread Lai Jiangshan
On 02/23/2012 08:10 AM, Eric Blake wrote: +if (virDomainCpuSetParse(str, 0, map, + VIR_DOMAIN_CPUMASK_LEN) 0) { +goto error; +} + +for (i = 0; i VIR_DOMAIN_CPUMASK_LEN; i++) { +if (map[i]) { +max_id = i; That's off

Re: [libvirt] [PATCH 1/3 V6] add nodeGetCPUmap() for getting available CPU IDs in a cpumap.

2012-02-21 Thread Lai Jiangshan
Hi, Eric Did you received these new patches? Thanks, Lai On 02/16/2012 03:15 PM, Lai Jiangshan wrote: From: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Changelog: - fixed typos. - fixed string scan routine. Signed-off-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Signed

[libvirt] [PATCH 1/3 V6] add nodeGetCPUmap() for getting available CPU IDs in a cpumap.

2012-02-15 Thread Lai Jiangshan
From: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Changelog: - fixed typos. - fixed string scan routine. Signed-off-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- src/libvirt_private.syms |1 + src/nodeinfo.c

[libvirt] [PATCH 2/3 V6] qemu driver for virDomainGetCPUstats using cpuacct cgroup.

2012-02-15 Thread Lai Jiangshan
/qemu_conf.c - take care of cpuacct cgroup. * src/qemu/qemu_driver.c - added an interface * src/util/cgroup.c/h- added interface for getting percpu cputime Signed-off-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- src/qemu/qemu.conf

Re: [libvirt] [PATCH 1/1 V4] virt-top: correct virt-top -1 command via cpuacct cgroup

2012-02-15 Thread Lai Jiangshan
, which is sent today. Thanks, Lai On 02/08/2012 04:59 PM, Lai Jiangshan wrote: Old virt-top -1 is not correct, its output is generated by guess: use average usage for pinned physical CPUs. example(old virt-top -1): PHYCPU %CPU rhel6 Windows

[libvirt] [PATCH 6/5 V5] GetCPUStats: fix overflow test

2012-02-09 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- src/libvirt.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index 8035add..a55d823 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -18541,7 +18541,7 @@ int virDomainGetCPUStats

[libvirt] [PATCH 4/5 V5] qemu driver for virDomainGetCPUstats using cpuacct cgroup.

2012-02-09 Thread Lai Jiangshan
/qemu_conf.c - take care of cpuacct cgroup. * src/qemu/qemu_driver.c - added an interface * src/util/cgroup.c/h- added interface for getting percpu cputime Signed-off-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- src/qemu/qemu.conf

[libvirt] [PATCH 5/5 V5] cpu-accts command shows cpu accounting information of a domain.

2012-02-09 Thread Lai Jiangshan
From: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Total: cpu_time15.8 CPU0: cpu_time8.6 CPU1: cpu_time3.5 CPU2: cpu_time2.4 CPU3: cpu_time1.3 --- tools/virsh.c | 116

[libvirt] [PATCH 3/5 V5] add nodeGetCPUmap() for getting available CPU IDs in a bitmap.

2012-02-09 Thread Lai Jiangshan
Hiroyuki kamezawa.hir...@jp.fujitsu.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- src/libvirt_private.syms |2 + src/nodeinfo.c | 51 src/nodeinfo.h |4 +++ src/util/bitmap.c| 65

[libvirt] [PATCH 1/1 V4] ocaml-libvirt: add D.get_cpu_stats() API to ocaml-libvirt

2012-02-08 Thread Lai Jiangshan
Changed from V3: use new virDomainGetCPUStats() libvirt-API. use C code to construct the typed_param list array Acked-by: Richard W.M. Jones rjo...@redhat.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- libvirt/libvirt.ml |8 libvirt/libvirt.mli

[libvirt] [PATCH 1/1 V4] virt-top: correct virt-top -1 command via cpuacct cgroup

2012-02-08 Thread Lai Jiangshan
usages. Acked-by: Richard W.M. Jones rjo...@redhat.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- virt-top/virt_top.ml | 80 +++-- 1 files changed, 31 insertions(+), 49 deletions(-) diff --git a/virt-top/virt_top.ml b/virt-top/virt_top.ml

Re: [libvirt] [PATCH V4 1/5] Add new public API virDomainGetCPUStats()

2012-02-08 Thread Lai Jiangshan
Hi, Eric Are any problem/suggestion with 3/5 4/5 5/5 of V4 patchset? If not, I will rebase them and resend them with tiny fixes applied. Thanks, Lai -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH 4/5 V3] virsh: Enable the pcpuinfo command in virsh

2012-01-17 Thread Lai Jiangshan
: - Usage: 44.1 Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- tools/virsh.c | 93 +++ tools/virsh.pod |5 +++ 2 files changed, 98 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index c511e2a

[libvirt] [PATCH 1/1 V3] virt-top: correct virt-top -1 command via cpuacct cgroup

2012-01-17 Thread Lai Jiangshan
updates. Acked-by: Richard W.M. Jones rjo...@redhat.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- virt-top/virt_top.ml | 75 + 1 files changed, 26 insertions(+), 49 deletions(-) diff --git a/virt-top/virt_top.ml b/virt-top/virt_top.ml index

[libvirt] [PATCH 1/5 V3] libvirt: Add new public API virDomainGetPcpusUsage

2012-01-17 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- include/libvirt/libvirt.h.in |5 python/generator.py |1 + src/driver.h |7 + src/libvirt.c| 51 ++ src/libvirt_public.syms |5

[libvirt] [PATCH 0/5 0/1 0/1 V3] Add new public API virDomainGetPcpusUsage() and pcpuinfo command in virsh

2012-01-17 Thread Lai Jiangshan
cleanup Add python implementation of virDomainGetPcpusUsage() Acked-by: Richard W.M. Jones rjo...@redhat.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com Patch for libvirt(5 patches): daemon/remote.c | 68 include/libvirt/libvirt.h.in

[libvirt] [PATCH 1/1 V3] ocaml-libvirt: and virDomainGetPcpusUsage() API to ocaml-libvirt

2012-01-17 Thread Lai Jiangshan
Acked-by: Richard W.M. Jones rjo...@redhat.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- libvirt/libvirt.ml |1 + libvirt/libvirt.mli |4 libvirt/libvirt_c_oneoffs.c | 25 + 3 files changed, 30 insertions(+), 0 deletions(-) diff

[libvirt] [PATCH 5/5 V3] python: implement virDomainGetPcpusUsage

2012-01-17 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- python/generator.py |2 +- python/libvirt-override-api.xml |6 ++ python/libvirt-override.c | 33 + 3 files changed, 40 insertions(+), 1 deletions(-) diff --git a/python

[libvirt] [PATCH 2/5 V3] remote: mplement new API virDomainGetPcpusUsage for remote driver

2012-01-17 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- daemon/remote.c | 68 ++ src/remote/remote_driver.c | 51 +++ src/remote/remote_protocol.x | 17 ++- src/remote_protocol-structs | 13

[libvirt] [PATCH 3/5 V3] qemu: implement new API virDomainGetPcpusUsage for qemu driver

2012-01-17 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- src/qemu/qemu.conf |5 ++- src/qemu/qemu_conf.c |3 +- src/qemu/qemu_driver.c | 74 src/util/cgroup.c |7 src/util/cgroup.h |1 + 5 files changed, 87

Re: [libvirt] [PATCH 0/4 0/1 0/1 V2] Add new public API virDomainGetPcpusUsage() and pcpuinfo command in virsh

2012-01-09 Thread Lai Jiangshan
On 01/05/2012 12:55 AM, Eric Blake wrote: On 01/03/2012 09:09 PM, Lai Jiangshan wrote: virt-top -1 can call virDomainGetPcpusUsage() periodically and get the CPU activities per CPU. (See the last patch in this series). virsh is also added a pcpuinfo command which calls virDomainGetPcpusUsage

Re: [libvirt] [PATCH 1/4 V2] libvirt: Add new public API virDomainGetPcpusUsage

2012-01-06 Thread Lai Jiangshan
On 01/05/2012 10:23 PM, Richard W.M. Jones wrote: On Wed, Jan 04, 2012 at 12:09:18PM +0800, Lai Jiangshan wrote: +int virDomainGetPcpusUsage(virDomainPtr dom, + unsigned long long *usages, + int *nr_usages

[libvirt] [PATCH 1/4 V2] libvirt: Add new public API virDomainGetPcpusUsage

2012-01-03 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- include/libvirt/libvirt.h.in |5 python/generator.py |1 + src/driver.h |7 + src/libvirt.c| 51 ++ src/libvirt_public.syms |5

[libvirt] [PATCH 4/4 V2] virsh: Enable the pcpuinfo command in virsh

2012-01-03 Thread Lai Jiangshan
: - Usage: 44.1 Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- tools/virsh.c | 93 +++ tools/virsh.pod |5 +++ 2 files changed, 98 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 0bc0519..f6fac24

[libvirt] [PATCH 2/4 V2] remote: mplement new API virDomainGetPcpusUsage for remote driver

2012-01-03 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- daemon/remote.c | 68 ++ src/remote/remote_driver.c | 51 +++ src/remote/remote_protocol.x | 17 ++- src/remote_protocol-structs | 13

[libvirt] [PATCH 1/1 V2] ocaml-libvirt: and virDomainGetPcpusUsage() API to ocaml-libvirt

2012-01-03 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- libvirt/libvirt.ml |1 + libvirt/libvirt.mli |4 libvirt/libvirt_c_oneoffs.c | 25 + 3 files changed, 30 insertions(+), 0 deletions(-) diff --git a/libvirt/libvirt.ml b/libvirt

[libvirt] [PATCH 0/4 0/1 0/1 V2] Add new public API virDomainGetPcpusUsage() and pcpuinfo command in virsh

2012-01-03 Thread Lai Jiangshan
virt-top -1 can call virDomainGetPcpusUsage() periodically and get the CPU activities per CPU. (See the last patch in this series). virsh is also added a pcpuinfo command which calls virDomainGetPcpusUsage(), it gets information about the physic CPUs, such as the usage of CPUs, the current

[libvirt] [PATCH 3/4 V2] qemu: implement new API virDomainGetPcpusUsage for qemu driver

2012-01-03 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- src/qemu/qemu.conf |5 ++- src/qemu/qemu_conf.c |3 +- src/qemu/qemu_driver.c | 74 src/util/cgroup.c |7 src/util/cgroup.h |1 + 5 files changed, 87

[libvirt] [PATCH 1/1 V2] virt-top: correct virt-top -1 command via cpuacct cgroup

2012-01-03 Thread Lai Jiangshan
. Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- virt-top/virt_top.ml | 75 + 1 files changed, 26 insertions(+), 49 deletions(-) diff --git a/virt-top/virt_top.ml b/virt-top/virt_top.ml index ef5ac67..2556b77 100644 --- a/virt-top/virt_top.ml

[libvirt] [PATCH] virsh: move version command to virsh group

2011-12-27 Thread Lai Jiangshan
Trivial patch, move version command to virsh commands group. It has no any related with any domain. It may connect to the daemon, so the flag is 0 but not VSH_CMD_FLAG_NOCONNECT. --- diff --git a/tools/virsh.c b/tools/virsh.c index 02f2e0d..0166bc6 100644 --- a/tools/virsh.c +++ b/tools/virsh.c

Re: [libvirt] [PATCH 0/4] Add new public API virDomainGetPcpusUsage and pcpuinfo command in virsh

2011-12-15 Thread Lai Jiangshan
Hi, Eric On 12/08/2011 11:44 AM, Eric Blake wrote: On 12/07/2011 08:40 PM, Lai Jiangshan wrote: virt-top -1 can call virDomainGetPcpusUsage() periodically and get the CPU activities per CPU. (still require virt-top site patch). virsh is also added a pcpuinfo command which calls

Re: [libvirt] [PATCH 0/4] Add new public API virDomainGetPcpusUsage and pcpuinfo command in virsh

2011-12-08 Thread Lai Jiangshan
On 12/08/2011 11:44 AM, Eric Blake wrote: On 12/07/2011 08:40 PM, Lai Jiangshan wrote: virt-top -1 can call virDomainGetPcpusUsage() periodically and get the CPU activities per CPU. (still require virt-top site patch). virsh is also added a pcpuinfo command which calls virDomainGetPcpusUsage

[libvirt] [PATCH 2/4] remote: implement new API virDomainGetPcpusUsage for remote driver

2011-12-07 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- daemon/remote.c | 68 ++ src/remote/remote_driver.c | 51 +++ src/remote/remote_protocol.x | 17 ++- src/remote_protocol-structs | 13

[libvirt] [PATCH 0/4] Add new public API virDomainGetPcpusUsage and pcpuinfo command in virsh

2011-12-07 Thread Lai Jiangshan
attached vCPUs. # virsh pcpuinfo rhel6 CPU:0 Curr VCPU: - Usage: 47.3 CPU:1 Curr VCPU: 1 Usage: 46.8 CPU:2 Curr VCPU: 0 Usage: 52.7 CPU:3 Curr VCPU: - Usage: 44.1 Lai Jiangshan (4): Add new

[libvirt] [PATCH 3/4] qemu: implement new API virDomainGetPcpusUsage for qemu driver

2011-12-07 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- src/qemu/qemu.conf |5 ++- src/qemu/qemu_conf.c |3 +- src/qemu/qemu_driver.c | 74 src/util/cgroup.c |7 src/util/cgroup.h |1 + 5 files changed, 87

[libvirt] [PATCH 4/4] Enable the pcpuinfo command in virsh

2011-12-07 Thread Lai Jiangshan
: - Usage: 44.1 Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- tools/virsh.c | 93 +++ tools/virsh.pod |5 +++ 2 files changed, 98 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 0fccf88..4a3833c

[libvirt] [PATCH 1/4] Add new public API virDomainGetPcpusUsage

2011-12-07 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- include/libvirt/libvirt.h.in |5 python/generator.py |1 + src/driver.h |7 + src/libvirt.c| 51 ++ src/libvirt_public.syms |5

[libvirt] problem of escaped scancodes

2011-08-23 Thread Lai Jiangshan
Hi, Daniel P. Berrange, Our user found that some keycode can not be handled well when they try to map other keycode to xt_kbd keycode, when xt_kbd keycode is an escaped scancode. The xt_kbd keycode http://git.gnome.org/browse/gtk-vnc/plain/src/keymaps.csv are come from x86_keycodes[] of

Re: [libvirt] [PATCH ] send-key: Implement Python API

2011-07-25 Thread Lai Jiangshan
ping. On 07/21/2011 05:21 PM, Lai Jiangshan wrote: Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- diff --git a/python/libvirt-override.c b/python/libvirt-override.c index b713b6a..1ef5bfa 100644 --- a/python/libvirt-override.c +++ b/python/libvirt-override.c @@ -3789,6 +3789,53

[libvirt] [PATCH ] send-key: Implement Python API

2011-07-21 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- diff --git a/python/libvirt-override.c b/python/libvirt-override.c index b713b6a..1ef5bfa 100644 --- a/python/libvirt-override.c +++ b/python/libvirt-override.c @@ -3789,6 +3789,53 @@ libvirt_virStreamSend(PyObject *self ATTRIBUTE_UNUSED

Re: [libvirt] [PATCH] virsh: add custom readline generator

2011-07-20 Thread Lai Jiangshan
On 06/28/2011 05:29 PM, Michal Privoznik wrote: On 27.06.2011 21:39, Eric Blake wrote: On 06/27/2011 12:06 PM, Michal Privoznik wrote: That is, if you have command-based custom generators, then each command has to repeat parsing functionality, then call back to common list generators; whereas

[libvirt] [PATCH 2/4 V5] util: add virtkey

2011-07-20 Thread Lai Jiangshan
virKeycodeValueTranslate(virKeycodeSet from_codeset, virKeycodeSet to_offset, int key_value); Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- include/libvirt/libvirt.h.in |6 ++ src/Makefile.am | 12 +++- src/libvirt_private.syms

[libvirt] [PATCH 0/4 V5] Add support for send keys to guest

2011-07-20 Thread Lai Jiangshan
Add virtkey lib for usage-improvment and keycode translating. Expose send-key in virsh Implement send-key function for the qemu driver Daniel P. Berrange (1): util: Add keymaps.csv Lai Jiangshan (3): util: add virtkey send-key: Expose the new API in virsh qemu:send-key: Implement

[libvirt] [PATCH 4/4 V5] qemu:send-key: Implement the driver methods

2011-07-20 Thread Lai Jiangshan
qemu driver just accept xt_kbd codeset's keycode, so the lib virtkey is used for translating keycodes from other codesets. Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- src/qemu/qemu_driver.c | 71 ++ src/qemu/qemu_monitor.c | 17

[libvirt] [PATCH 1/4 V5] util: Add keymaps.csv

2011-07-20 Thread Lai Jiangshan
, USB keycodes, Win32 keycodes, the XT encoding used by Xorg on Cygwin, the XT encoding used by Xorg on Linux with kbd driver. Signed-off-by: Daniel P. Berrange berra...@redhat.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- src/Makefile.am |2 +- src/util/keymaps.csv | 463

[libvirt] [PATCH 3/4 V5] send-key: Expose the new API in virsh

2011-07-20 Thread Lai Jiangshan
Also support string names for the linux keycode(auto detect). Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com Acked-by: Daniel P. Berrange berra...@redhat.com --- tools/virsh.c | 94 +++ tools/virsh.pod |4 ++ 2 files changed, 98

[libvirt] [PATCH 0/4 V4] Add support for send keys to guest

2011-07-13 Thread Lai Jiangshan
Add virtkey lib for usage-improvment and keycode translating. Expose send-key in virsh Implement send-key function for the qemu driver Daniel P. Berrange (1): util: Add keymaps.csv Lai Jiangshan (3): util: add virtkey send-key: Expose the new API in virsh qemu:send-key: Implement

[libvirt] [PATCH 2/4 V4] util: add virtkey

2011-07-13 Thread Lai Jiangshan
(virKeycodeSet from_codeset, virKeycodeSet to_offset, int key_value); Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- include/libvirt/libvirt.h.in |8 +++ src/Makefile.am | 11 - src/libvirt_private.syms |5 ++ src/util

[libvirt] [PATCH 1/4 V4] util: Add keymaps.csv

2011-07-13 Thread Lai Jiangshan
, USB keycodes, Win32 keycodes, the XT encoding used by Xorg on Cygwin, the XT encoding used by Xorg on Linux with kbd driver. Signed-off-by: Daniel P. Berrange berra...@redhat.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- src/util/keymaps.csv | 463

[libvirt] [PATCH 4/4 V4] qemu:send-key: Implement the driver methods

2011-07-13 Thread Lai Jiangshan
qemu driver just accept xt_kbd codeset's keycode, so the lib virtkey is used for translating keycodes from other codesets. Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- src/qemu/qemu_driver.c | 71 ++ src/qemu/qemu_monitor.c | 17

Re: [libvirt] [PATCH 1/3 V3] lib: add virtkey

2011-06-27 Thread Lai Jiangshan
On 06/24/2011 09:18 PM, Daniel P. Berrange wrote: On Fri, Jun 24, 2011 at 02:33:29PM +0800, Lai Jiangshan wrote: Add virtkey lib for usage-improvment and keycode translating. Add 4 internal API for the aim const char *virKeycodeSetName(virKeycodeSet codeset); virKeycodeSet virParseKeycodeSet

[libvirt] [PATCH 0/3 V3] Add support for send keys to guest

2011-06-24 Thread Lai Jiangshan
Add virtkey lib for usage-improvment and keycode translating. Expose send-key in virsh Implement send-key function for the qemu driver Lai Jiangshan (3): lib: add virtkey send-key: Expose the new API in virsh qemu:send-key: Implement the driver methods include/libvirt/libvirt.h.in |6

[libvirt] [PATCH 2/3 V3] send-key: Expose the new API in virsh

2011-06-24 Thread Lai Jiangshan
Also support string names for the linux keycode(auto detect). Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- tools/virsh.c | 93 +++ tools/virsh.pod |4 ++ 2 files changed, 97 insertions(+), 0 deletions(-) diff --git a/tools

[libvirt] [PATCH 3/3 V3] qemu:send-key: Implement the driver methods

2011-06-24 Thread Lai Jiangshan
qemu driver just accept xt_kbd codeset's keycode, so the lib virtkey is used for translating keycodes from other codesets. Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- src/qemu/qemu_driver.c | 51 ++ src/qemu/qemu_monitor.c | 37

[libvirt] [PATCH 1/3 V3] lib: add virtkey

2011-06-24 Thread Lai Jiangshan
(virKeycodeSet from_codeset, virKeycodeSet to_offset, int key_value); Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- include/libvirt/libvirt.h.in |6 + src/Makefile.am |3 +- src/libvirt_private.syms |5 + src/util/virtkey.c

[libvirt] [PATCH] virsh: add custom readline generator

2011-06-24 Thread Lai Jiangshan
Custom readline generator will help for some usecase. Also add a custom readline generator for the help command. Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- diff --git a/tools/virsh.c b/tools/virsh.c index fcd254d..51e43c1 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -13575,7

[libvirt] [PATCH 05/10 V2] [PATCH 05/13] send-key: Defining the public API

2011-06-07 Thread Lai Jiangshan
Add public virDomainSendKey() and enum libvirt_keycode_set for the @codeset. Python version of virDomainSendKey() has not been implemented yet, it will be done soon. Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- include/libvirt/libvirt.h.in |7 +++ include/libvirt/virtkeys.h

[libvirt] [PATCH 02/10 V2] improve the iteration of VSH_OT_ARGV options

2011-06-07 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- tools/virsh.c | 47 --- 1 files changed, 24 insertions(+), 23 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 61eb11e..638029c 100644 --- a/tools/virsh.c +++ b/tools/virsh.c

[libvirt] [PATCH 00/10 V2] Add support for send keys to guest

2011-06-07 Thread Lai Jiangshan
) these usage-improvment patches does not touch any APIs nor change the behaviors: support KEY_XXX names for the linux keycode for virsh command(auto detect), translate keycodes between different codesets, ...etc. Lai Jiangshan (10): allow name for VSH_OT_ARGV options improve the iteration

[libvirt] [PATCH 04/10 V2] remote generator: Handle (unsigned) int arrays

2011-06-07 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- daemon/remote_generator.pl | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/daemon/remote_generator.pl b/daemon/remote_generator.pl index 632972c..532fe63 100755 --- a/daemon/remote_generator.pl +++ b

[libvirt] [PATCH 09/10 V2] send-key: Expose the new API in virsh

2011-06-07 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- tools/virsh.c | 102 +++ tools/virsh.pod |4 ++ 2 files changed, 106 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index d13c12b..7b5847f 100644 --- a/tools

[libvirt] [PATCH 06/10 V2] send-key: Defining the internal API

2011-06-07 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- src/driver.h |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/driver.h b/src/driver.h index 5df798a..2e335a1 100644 --- a/src/driver.h +++ b/src/driver.h @@ -542,6 +542,13 @@ typedef int typedef int

[libvirt] [PATCH 01/10 V2] allow name for VSH_OT_ARGV options

2011-06-07 Thread Lai Jiangshan
string arguments to echo [string]... is added to SYNOPSIS. string arguments to echo is added to OPTIONS. Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- tools/virsh.c | 19 +-- 1 files changed, 13 insertions(+), 6 deletions(-) diff --git a/tools

[libvirt] [PATCH 07/10] send-key: Implementing the public API

2011-06-07 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- src/libvirt.c | 63 + 1 files changed, 63 insertions(+), 0 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index cbe1926..112f690 100644 --- a/src/libvirt.c +++ b/src/libvirt.c

[libvirt] [PATCH 08/10 V2] send-key: Implementing the remote protocol

2011-06-07 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- src/remote/remote_driver.c |1 + src/remote/remote_protocol.x | 16 +++- src/remote_protocol-structs | 11 +++ 3 files changed, 27 insertions(+), 1 deletions(-) diff --git a/src/remote/remote_driver.c b/src

[libvirt] [PATCH 10/10 V2] qemu:send-key: Implement the driver methods

2011-06-07 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- src/qemu/qemu_driver.c | 50 ++ src/qemu/qemu_monitor.c | 27 ++ src/qemu/qemu_monitor.h |6 + src/qemu/qemu_monitor_json.c | 15 src/qemu

[libvirt] [PATCH 03/10 V2] add VSH_OFLAG_REQ_OPT options

2011-06-07 Thread Lai Jiangshan
-by: Lai Jiangshan la...@cn.fujitsu.com --- tools/virsh.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 638029c..d13c12b 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -152,6 +152,7 @@ enum { VSH_OFLAG_NONE = 0

Re: [libvirt] [PATCH 00/13] Add support for send keys to guest

2011-05-26 Thread Lai Jiangshan
On 05/26/2011 12:36 AM, Daniel P. Berrange wrote: On Wed, May 25, 2011 at 05:37:42PM +0800, Lai Jiangshan wrote: Add API virDomainSendKey() and virsh send-key command. # virsh help send-key NAME send-key - Send keycodes to the guest SYNOPSIS send-key domain [--codeset string

Re: [libvirt] [PATCH 05/13] send-key: Defining the public API

2011-05-26 Thread Lai Jiangshan
On 05/26/2011 12:43 AM, Daniel P. Berrange wrote: On Wed, May 25, 2011 at 05:37:47PM +0800, Lai Jiangshan wrote: Add public virDomainSendKey() and enum libvirt_keycode_set for the @codeset. Python version of virDomainSendKey() has not been implemented yet, it will be done soon. Signed-off

[libvirt] [PATCH 08/13] send-key: Implementing the remote protocol

2011-05-25 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@fujitsu.com --- src/remote/remote_driver.c |1 + src/remote/remote_protocol.x | 19 ++- src/remote_protocol-structs | 11 +++ 3 files changed, 30 insertions(+), 1 deletions(-) diff --git a/src/remote/remote_driver.c b/src

[libvirt] [PATCH 09/13] send-key: Expose the new API in virsh

2011-05-25 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@fujitsu.com --- tools/virsh.c | 103 +++ tools/virsh.pod |4 ++ 2 files changed, 107 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 80cffac..505a821 100644 --- a/tools

[libvirt] [PATCH 04/13] remote_generator: support general dynamic array

2011-05-25 Thread Lai Jiangshan
It will allow us use dynamic_array_basic_type member_nameMAX for remote protocol and avoid so many manual coding. For avoiding ambiguity, dynamic_array_basic_type must have a _DABT suffix. Signed-off-by: Lai Jiangshan la...@fujitsu.com --- daemon/remote_generator.pl | 18 ++ 1

[libvirt] [PATCH 11/13] send-key: support KEY_XXX names for the linux keycode

2011-05-25 Thread Lai Jiangshan
It make send-key command more friendly for user. Signed-off-by: Lai Jiangshan la...@fujitsu.com --- include/libvirt/virtkeys.h | 253 tools/virsh.c | 21 2 files changed, 274 insertions(+), 0 deletions(-) diff --git a/include

[libvirt] [PATCH 03/13] add VSH_OFLAG_REQ_OPT options

2011-05-25 Thread Lai Jiangshan
-by: Lai Jiangshan la...@fujitsu.com --- tools/virsh.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 2e27535..80cffac 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -152,6 +152,7 @@ enum { VSH_OFLAG_NONE = 0

[libvirt] [PATCH 01/13] allow name for VSH_OT_ARGV options

2011-05-25 Thread Lai Jiangshan
string arguments to echo [string]... is added to SYNOPSIS. string arguments to echo is added to OPTIONS. Signed-off-by: Lai Jiangshan la...@fujitsu.com --- tools/virsh.c | 19 +-- 1 files changed, 13 insertions(+), 6 deletions(-) diff --git a/tools/virsh.c b

[libvirt] [PATCH 06/13] send-key: Defining the internal API

2011-05-25 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@fujitsu.com --- src/driver.h |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/driver.h b/src/driver.h index 450dd53..70a30d9 100644 --- a/src/driver.h +++ b/src/driver.h @@ -535,6 +535,13 @@ typedef int typedef int

[libvirt] [PATCH 10/13] qemu:send-key: Implement the driver methods

2011-05-25 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@fujitsu.com --- src/qemu/qemu_driver.c | 50 ++ src/qemu/qemu_monitor.c | 28 +++ src/qemu/qemu_monitor.h |6 + src/qemu/qemu_monitor_json.c | 15 src/qemu

[libvirt] [PATCH 00/13] Add support for send keys to guest

2011-05-25 Thread Lai Jiangshan
soon. Lai Jiangshan (13): allow name for VSH_OT_ARGV options improve the iteration of VSH_OT_ARGV options add VSH_OFLAG_REQ_OPT options remote_generator: support general dynamic array send-key: Defining the public API send-key: Defining the internal API send-key: Implementing

[libvirt] [PATCH 13/13] virsh, send-key: add --codeset xt:keystring support

2011-05-25 Thread Lai Jiangshan
It make send-key command more friendly for user. Signed-off-by: Lai Jiangshan la...@fujitsu.com --- tools/virsh.c | 224 - 1 files changed, 221 insertions(+), 3 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 3bccc08

[libvirt] [PATCH 05/13] send-key: Defining the public API

2011-05-25 Thread Lai Jiangshan
Add public virDomainSendKey() and enum libvirt_keycode_set for the @codeset. Python version of virDomainSendKey() has not been implemented yet, it will be done soon. Signed-off-by: Lai Jiangshan la...@fujitsu.com --- include/libvirt/libvirt.h.in |7 +++ include/libvirt/virtkeys.h

[libvirt] [PATCH 02/13] improve the iteration of VSH_OT_ARGV options

2011-05-25 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@fujitsu.com --- tools/virsh.c | 47 --- 1 files changed, 24 insertions(+), 23 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index c358580..2e27535 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -277,7

[libvirt] [PATCH 07/13] send-key: Implementing the public API

2011-05-25 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@fujitsu.com --- src/libvirt.c | 54 ++ 1 files changed, 54 insertions(+), 0 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index ff16c48..8246975 100644 --- a/src/libvirt.c +++ b/src/libvirt.c

[libvirt] [PATCH 12/13] qemu, send-key: map linux keycode to xt keycode

2011-05-25 Thread Lai Jiangshan
It allows us use linux keycode for qemu driver. Signed-off-by: Lai Jiangshan la...@fujitsu.com --- src/qemu/qemu_monitor.c | 49 ++- 1 files changed, 48 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c

[libvirt] [PATCH 0/6 V4] Add support for injecting NMI to guest

2011-05-10 Thread Lai Jiangshan
This patch series implements a feature of injecting NMI to guest, which is accessible via new virDomainInjectNMI API and 'inject-nmi' command in virsh. Lai Jiangshan (6): inject-nmi: Defining the public API inject-nmi: Defining the internal API inject-nmi: Implementing the public API

[libvirt] [PATCH 3/6 V4] inject-nmi: Implementing the public API

2011-05-10 Thread Lai Jiangshan
--- src/libvirt.c | 44 1 files changed, 44 insertions(+), 0 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index abacf85..f468b61 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -5217,6 +5217,50 @@ error: } /** + *

[libvirt] [PATCH 6/6 V4] qemu, inject-nmi: Implement the driver methods

2011-05-10 Thread Lai Jiangshan
--- src/qemu/qemu_driver.c | 46 +- src/qemu/qemu_monitor.c | 14 src/qemu/qemu_monitor.h |2 + src/qemu/qemu_monitor_json.c | 27 src/qemu/qemu_monitor_json.h |1 +

[libvirt] [PATCH 1/6 V4] inject-nmi: Defining the public API

2011-05-10 Thread Lai Jiangshan
--- include/libvirt/libvirt.h.in |2 ++ src/libvirt_public.syms |5 + 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in index 5783303..0e1e27a 100644 --- a/include/libvirt/libvirt.h.in +++

[libvirt] [PATCH 5/6 V4] inject-nmi: Expose the new API in virsh

2011-05-10 Thread Lai Jiangshan
--- tools/virsh.c | 35 +++ tools/virsh.pod |4 2 files changed, 39 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 2b16714..c2dabd7 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -2912,6 +2912,40 @@

[libvirt] [PATCH 4/6 V4] inject-nmi: Implementing the remote protocol

2011-05-10 Thread Lai Jiangshan
--- daemon/remote_generator.pl |2 +- src/remote/remote_driver.c |2 +- src/remote/remote_protocol.x |8 +++- src/remote_protocol-structs |4 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/daemon/remote_generator.pl b/daemon/remote_generator.pl index

Re: [libvirt] [PATCH] libvirt, logging: cleanup VIR_DEBUG0() VIR_INFO0() VIR_WARN0() VIR_ERROR0()

2011-05-10 Thread Lai Jiangshan
Is this OK? fmt... #define high_level_api(fmt...) low_level_api(fmt) On 05/10/2011 11:29 PM, Eric Blake wrote: On 05/10/2011 08:52 AM, Eric Blake wrote: On 05/09/2011 03:24 AM, Lai Jiangshan wrote: These VIR_0 APIs make us confused, use the non-0-suffix APIs instead. How

Re: [libvirt] [PATCH 0/6 V3] Add support for injecting NMI to guest

2011-05-05 Thread Lai Jiangshan
On 04/21/2011 02:42 PM, Lai Jiangshan wrote: This patch series implements a feature of injecting NMI to guest, which is accessible via new virDomainInjectNMI API and 'inject-nmi' command in virsh. Lai Jiangshan (6): inject-nmi: Defining the public API inject-nmi: Defining

[libvirt] [PATCH 2/6 V3] inject-nmi: Defining the internal API

2011-04-21 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- src/driver.h |4 src/esx/esx_driver.c |1 + src/libxl/libxl_driver.c |1 + src/lxc/lxc_driver.c |1 + src/openvz/openvz_driver.c |1 + src/phyp/phyp_driver.c |3 ++- src/qemu

[libvirt] [PATCH 0/6 V3] Add support for injecting NMI to guest

2011-04-21 Thread Lai Jiangshan
This patch series implements a feature of injecting NMI to guest, which is accessible via new virDomainInjectNMI API and 'inject-nmi' command in virsh. Lai Jiangshan (6): inject-nmi: Defining the public API inject-nmi: Defining the internal API inject-nmi: Implementing the public API

[libvirt] [PATCH 3/6 V3] inject-nmi: Implementing the public API

2011-04-21 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- src/libvirt.c | 44 1 files changed, 44 insertions(+), 0 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index 9e6784b..32446d1 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -5214,6

[libvirt] [PATCH 4/6 V3] inject-nmi: Implementing the remote protocol

2011-04-21 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- daemon/remote.c | 28 daemon/remote_dispatch_args.h |1 + daemon/remote_dispatch_prototypes.h |8 daemon/remote_dispatch_table.h |5 + src/remote

[libvirt] [PATCH 5/6 V3] inject-nmi: Expose the new API in virsh

2011-04-21 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- tools/virsh.c | 35 +++ tools/virsh.pod |4 2 files changed, 39 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 9ac27b3..54fd6bf 100644 --- a/tools/virsh.c +++ b

[libvirt] [PATCH 6/6 V3] qemu, inject-nmi: Implement the driver methods

2011-04-21 Thread Lai Jiangshan
Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- src/qemu/qemu_driver.c | 46 +- src/qemu/qemu_monitor.c | 14 src/qemu/qemu_monitor.h |2 + src/qemu/qemu_monitor_json.c | 27 src/qemu

  1   2   >