[Qemu-devel] [Bug 1802465] Re: typing string via VNC is unreliable

2018-11-24 Thread Gao
In my case the problem is quite subtle. Nearly every time we send the key strokes, the guest os keeps receiving space or tab or new line character. And ending part of the text is truncated, where the truncated part is fixed depending on the keystrokes we are sending. Additionally, the keystroke

[Qemu-devel] [Bug 1809075] [NEW] Concurrency bug on keyboard events: capslock LED messing up keycode streams causes character misses at guest kernel

2018-12-18 Thread Gao
Public bug reported: Whenever capslock is pressed on host, both capslock keycode(0x3a 0xba) and capslock LED keycode(0xfa 0xfa) would be sent to the ps2 keycode stream. However, capslock LED is handled by another thread, confirmed by tracing `ps2_write_keyboard` with gdb. The keycode of casplock

[Qemu-devel] [Bug 1809075] Re: Concurrency bug on keyboard events: capslock LED messing up keycode streams causes character misses at guest kernel

2018-12-18 Thread Gao
### Reproduce steps Add `fprintf(stderr, "ps2_queue 0x%x\n", b);` to `hw/input/ps2.c` and re-build qemu. - qemu-system-x86_64 -hda --enable-kvm -m <> -display vnc=:1 - vncviewer -Shared :5901 In guest os, find the keyboard device(very likely to be /dev/input/event0) ``` sudo evtest /dev/input/e

Re: [Qemu-devel] [MASCOT CONTEST] Clare Liguori #1

2012-02-16 Thread Wanlong Gao
On 02/15/2012 10:46 PM, Anthony Liguori wrote: > Please respond to this note with an '+1', or an Ack, to vote for this icon. ACK

Re: [Qemu-devel] [PATCH V2 00/20] Multiqueue virtio-net

2013-01-27 Thread Wanlong Gao
dev=hn0 > > Management tools such as libvirt can pass multiple pre-created fds/vhostfds > through > > ./qemu -netdev tap,id=hn0,fds=X:Y,vhostfds=M:N -device > virtio-net-pci,netdev=hn0 > > No git tree this round since github is unavailable in China... I saw that github had already been opened again. I can use it. Thanks, Wanlong Gao

Re: [Qemu-devel] [PATCH V2 00/20] Multiqueue virtio-net

2013-01-28 Thread Wanlong Gao
On 01/28/2013 12:24 PM, Jason Wang wrote: > On 01/28/2013 11:27 AM, Wanlong Gao wrote: >> On 01/25/2013 06:35 PM, Jason Wang wrote: >>> Hello all: >>> >>> This seires is an update of last version of multiqueue virtio-net support. >>> >>> This s

[Qemu-devel] [PATCH V8 05/11] NUMA: Add Linux libnuma detection

2013-08-19 Thread Wanlong Gao
Add detection of libnuma (mostly contained in the numactl package) to the configure script. Can be enabled or disabled on the command line, default is use if available. Signed-off-by: Andre Przywara Signed-off-by: Wanlong Gao --- configure | 32 1 file changed

[Qemu-devel] [PATCH V8 01/11] NUMA: add NumaOptions, NumaNodeOptions and NumaMemOptions

2013-08-19 Thread Wanlong Gao
Reviewed-by: Laszlo Ersek Signed-off-by: Wanlong Gao --- qapi-schema.json | 47 +++ 1 file changed, 47 insertions(+) diff --git a/qapi-schema.json b/qapi-schema.json index a51f7d2..b9b18e4 100644 --- a/qapi-schema.json +++ b/qapi-schema.json

[Qemu-devel] [PATCH V8 10/11] NUMA: add qmp command query-numa

2013-08-19 Thread Wanlong Gao
Add qmp command query-numa to show guest NUMA information. Signed-off-by: Wanlong Gao --- numa.c | 69 qapi-schema.json | 36 + qmp-commands.hx | 49 3 files

[Qemu-devel] [PATCH V8 02/11] NUMA: split -numa option

2013-08-19 Thread Wanlong Gao
eviewed-by: Laszlo Ersek Signed-off-by: Wanlong Gao --- Makefile.target | 2 +- include/sysemu/sysemu.h | 3 + numa.c | 144 qemu-options.hx | 6 +- vl.c| 113 ++

[Qemu-devel] [PATCH V8 00/11] Add support for binding guest numa nodes to host numa nodes

2013-08-19 Thread Wanlong Gao
s for repeating options" patch set, thanks for Laszlo's help V6-V7: change UInt16 to uint16 (Laszlo) fix a typo in adding qmp command set-mem-policy V7-V8: rebase to current master with Laszlo's V2 of OptsVisitor patch set fix an adding white space line error Wan

[Qemu-devel] [PATCH V8 03/11] NUMA: move numa related code to numa.c

2013-08-19 Thread Wanlong Gao
Signed-off-by: Wanlong Gao --- cpus.c | 14 --- include/sysemu/cpus.h | 1 - include/sysemu/sysemu.h | 2 ++ numa.c | 66 + vl.c| 47 +-- 5 files

[Qemu-devel] [PATCH V8 11/11] NUMA: convert hmp command info_numa to use qmp command query_numa

2013-08-19 Thread Wanlong Gao
Signed-off-by: Wanlong Gao --- hmp.c | 54 ++ hmp.h | 1 + monitor.c | 21 + 3 files changed, 56 insertions(+), 20 deletions(-) diff --git a/hmp.c b/hmp.c index 98d2a76..3b2f04d 100644 --- a/hmp.c +++ b/hmp.c

[Qemu-devel] [PATCH V8 09/11] NUMA: add hmp command set-mem-policy

2013-08-19 Thread Wanlong Gao
Add hmp command set-mem-policy to set host memory policy for a guest NUMA node. Then we can also set node's memory policy using the monitor command like: (qemu) set-mem-policy 0 policy=membind,relative=false,host-nodes=0-1 Signed-off-by: Wanlong Gao --- hmp-commands.hx

[Qemu-devel] [PATCH V8 06/11] NUMA: parse guest numa nodes memory policy

2013-08-19 Thread Wanlong Gao
eid=1,cpus=1 \ -numa mem,nodeid=0,size=1G,policy=membind,host-nodes=0-1 \ -numa mem,nodeid=1,size=1G,policy=interleave,relative=true,host-nodes=1 Signed-off-by: Wanlong Gao --- include/sysemu/sysemu.h | 3 +++ numa.c | 13 + qapi-schema.json

[Qemu-devel] [PATCH V8 07/11] NUMA: set guest numa nodes memory policy

2013-08-19 Thread Wanlong Gao
rzywara Signed-off-by: Wanlong Gao --- numa.c | 89 ++ 1 file changed, 89 insertions(+) diff --git a/numa.c b/numa.c index 436b8e0..b2c0048 100644 --- a/numa.c +++ b/numa.c @@ -28,6 +28,16 @@ #include "qapi-visit.h" #include

Re: [Qemu-devel] [PATCH v2 0/8] OptsVisitor: support / flatten integer ranges for repeating options

2013-08-19 Thread Wanlong Gao
On 08/20/2013 06:35 AM, Laszlo Ersek wrote: > v1->v2: Tested-by: Wanlong Gao > - rebased to current master (patch #8 only applied with "git am -3"), > - now patch #7 adds "test-bitops" too to .gitignore, > - patch #8 updates "qapi-schema-test.out"

[Qemu-devel] [PATCH V8 04/11] NUMA: Add numa_info structure to contain numa nodes info

2013-08-19 Thread Wanlong Gao
Add the numa_info structure to contain the numa nodes memory, VCPUs information and the future added numa nodes host memory policies. Reviewed-by: Eduardo Habkost Signed-off-by: Andre Przywara Signed-off-by: Wanlong Gao --- hw/i386/pc.c| 4 ++-- include/sysemu/sysemu.h | 8

[Qemu-devel] [PATCH V8 08/11] NUMA: add qmp command set-mem-policy to set memory policy for NUMA node

2013-08-19 Thread Wanlong Gao
This QMP command allows user set guest node's memory policy through the QMP protocol. The qmp-shell command is like: set-mem-policy nodeid=0 policy=membind relative=true host-nodes=0-1 Signed-off-by: Wanlong Gao --- numa.c

Re: [Qemu-devel] [PATCH V8 00/11] Add support for binding guest numa nodes to host numa nodes

2013-08-20 Thread Wanlong Gao
On 08/20/2013 09:43 PM, Paolo Bonzini wrote: > Il 20/08/2013 03:07, Wanlong Gao ha scritto: >> -numa node,nodeid=0,cpus=0, \ >> -numa mem,size=1024M,policy=membind,host-nodes=0-1 \ >> -numa node,nodeid=1,cpus=1 \ >> -numa mem,size=1024M,policy=interleave,host-nodes=

Re: [Qemu-devel] [PATCH V8 07/11] NUMA: set guest numa nodes memory policy

2013-08-20 Thread Wanlong Gao
ed-device, all guest page's page count will be +1 and >> any page migration will not work. AutoNUMA won't too. >> >> So, we should set the guest nodes memory allocation policies before >> the pages are really mapped. >> >> Signed-off-by: Andre Przywara >

Re: [Qemu-devel] [PATCH V8 07/11] NUMA: set guest numa nodes memory policy

2013-08-21 Thread Wanlong Gao
o[i].host_mem. mbind doesn't need its 'maxnode' param to be > the highest possible host node bit, but rather just the highest possible bit > set in the nodemask passed to it. find_last_bit will find that bit. You still > need to add 1 to it as you do with numa_numa_configured_nodes() though, due > to the kernel decrementing it by one erroneously as you've pointed out in your > comment. Thank you very much for your explanation, I'll change as you said. ;) Regards, Wanlong Gao > > drew >

Re: [Qemu-devel] [PATCH V8 00/11] Add support for binding guest numa nodes to host numa nodes

2013-08-21 Thread Wanlong Gao
On 08/21/2013 05:00 PM, Paolo Bonzini wrote: > Il 21/08/2013 03:22, Wanlong Gao ha scritto: >> On 08/20/2013 09:43 PM, Paolo Bonzini wrote: >>> Il 20/08/2013 03:07, Wanlong Gao ha scritto: >>>> -numa node,nodeid=0,cpus=0, \ >>>> -numa mem,size=1024M,p

Re: [Qemu-devel] [PATCH V8 00/11] Add support for binding guest numa nodes to host numa nodes

2013-08-21 Thread Wanlong Gao
On 08/21/2013 05:22 PM, Paolo Bonzini wrote: > Il 21/08/2013 11:08, Wanlong Gao ha scritto: >>>>> Also, do you still need a "-m" option if you use "-numa mem"? >>>> >>>> The "-m" options will be used to compute the memory siz

Re: [Qemu-devel] [PATCH V8 00/11] Add support for binding guest numa nodes to host numa nodes

2013-08-21 Thread Wanlong Gao
On 08/21/2013 05:33 PM, Laszlo Ersek wrote: > On 08/20/13 03:07, Wanlong Gao wrote: > >> V7-V8: >> rebase to current master with Laszlo's V2 of OptsVisitor patch set >> fix an adding white space line error > > My R-b's that you've kept from V

Re: [Qemu-devel] [PATCH V8 01/11] NUMA: add NumaOptions, NumaNodeOptions and NumaMemOptions

2013-08-21 Thread Wanlong Gao
On 08/22/2013 04:59 AM, Eric Blake wrote: > On 08/19/2013 07:07 PM, Wanlong Gao wrote: >> Reviewed-by: Laszlo Ersek >> Signed-off-by: Wanlong Gao >> --- >> qapi-schema.json | 47 +++ >&g

Re: [Qemu-devel] [PATCH V8 01/11] NUMA: add NumaOptions, NumaNodeOptions and NumaMemOptions

2013-08-21 Thread Wanlong Gao
On 08/22/2013 10:29 AM, Eric Blake wrote: > On 08/21/2013 07:12 PM, Wanlong Gao wrote: > >>>> + '*mem':'str' }} >>> >>> Why is size passed as a 'str' instead of an integral type? If anything, >>> at the QMP layer, i

[Qemu-devel] [PATCH V9 07/12] NUMA: parse guest numa nodes memory policy

2013-08-22 Thread Wanlong Gao
eid=1,cpus=1 \ -numa mem,nodeid=0,size=1G,policy=membind,host-nodes=0-1 \ -numa mem,nodeid=1,size=1G,policy=interleave,relative=true,host-nodes=1 Signed-off-by: Wanlong Gao --- include/sysemu/sysemu.h | 3 +++ numa.c | 13 + qapi-schema.json

[Qemu-devel] [PATCH V9 04/12] NUMA: move numa related code to numa.c

2013-08-22 Thread Wanlong Gao
Signed-off-by: Wanlong Gao --- cpus.c | 14 - include/sysemu/cpus.h | 1 - include/sysemu/sysemu.h | 2 ++ numa.c | 76 + vl.c| 57 + 5 files

[Qemu-devel] [PATCH V9 01/12] NUMA: add NumaOptions, NumaNodeOptions and NumaMemOptions

2013-08-22 Thread Wanlong Gao
These are used to generate stuff for OptsVisitor. Reviewed-by: Laszlo Ersek Signed-off-by: Wanlong Gao --- qapi-schema.json | 47 +++ 1 file changed, 47 insertions(+) diff --git a/qapi-schema.json b/qapi-schema.json index a51f7d2..11851a1 100644

[Qemu-devel] [PATCH V9 00/12] Add support for binding guest numa nodes to host numa nodes

2013-08-22 Thread Wanlong Gao
->V9: rebase to current master check if total numa memory size is equal to ram_size (Paolo) add comments to the OptsVisitor stuff in qapi-schema.json (Eric, Laszlo) replace the use of numa_num_configured_nodes() (Andrew) avoid abusing the fact i==nodeid (Andrew) Wanlong Gao (12):

[Qemu-devel] [PATCH V9 06/12] NUMA: Add Linux libnuma detection

2013-08-22 Thread Wanlong Gao
Add detection of libnuma (mostly contained in the numactl package) to the configure script. Can be enabled or disabled on the command line, default is use if available. Signed-off-by: Andre Przywara Signed-off-by: Wanlong Gao --- configure | 32 1 file changed

[Qemu-devel] [PATCH V9 10/12] NUMA: add hmp command set-mem-policy

2013-08-22 Thread Wanlong Gao
Add hmp command set-mem-policy to set host memory policy for a guest NUMA node. Then we can also set node's memory policy using the monitor command like: (qemu) set-mem-policy 0 policy=membind,relative=false,host-nodes=0-1 Signed-off-by: Wanlong Gao --- hmp-commands.hx

[Qemu-devel] [PATCH V9 12/12] NUMA: convert hmp command info_numa to use qmp command query_numa

2013-08-22 Thread Wanlong Gao
Signed-off-by: Wanlong Gao --- hmp.c | 54 ++ hmp.h | 1 + monitor.c | 21 + 3 files changed, 56 insertions(+), 20 deletions(-) diff --git a/hmp.c b/hmp.c index 98d2a76..3b2f04d 100644 --- a/hmp.c +++ b/hmp.c

[Qemu-devel] [PATCH V9 05/12] NUMA: Add numa_info structure to contain numa nodes info

2013-08-22 Thread Wanlong Gao
Add the numa_info structure to contain the numa nodes memory, VCPUs information and the future added numa nodes host memory policies. Reviewed-by: Eduardo Habkost Signed-off-by: Andre Przywara Signed-off-by: Wanlong Gao --- hw/i386/pc.c| 4 ++-- include/sysemu/sysemu.h | 8

[Qemu-devel] [PATCH V9 08/12] NUMA: set guest numa nodes memory policy

2013-08-22 Thread Wanlong Gao
rzywara Signed-off-by: Wanlong Gao --- numa.c | 90 ++ 1 file changed, 90 insertions(+) diff --git a/numa.c b/numa.c index 4ccc6cb..4a9c368 100644 --- a/numa.c +++ b/numa.c @@ -28,6 +28,16 @@ #include "qapi-visit.h" #include

[Qemu-devel] [PATCH V9 09/12] NUMA: add qmp command set-mem-policy to set memory policy for NUMA node

2013-08-22 Thread Wanlong Gao
This QMP command allows user set guest node's memory policy through the QMP protocol. The qmp-shell command is like: set-mem-policy nodeid=0 policy=membind relative=true host-nodes=0-1 Signed-off-by: Wanlong Gao --- numa.c

[Qemu-devel] [PATCH V9 11/12] NUMA: add qmp command query-numa

2013-08-22 Thread Wanlong Gao
Add qmp command query-numa to show guest NUMA information. Signed-off-by: Wanlong Gao --- numa.c | 69 qapi-schema.json | 36 + qmp-commands.hx | 49 3 files

[Qemu-devel] [PATCH V9 03/12] NUMA: check if the total numa memory size is equal to ram_size

2013-08-22 Thread Wanlong Gao
ta to ACPI table. Signed-off-by: Wanlong Gao --- vl.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/vl.c b/vl.c index 8829344..46d1d55 100644 --- a/vl.c +++ b/vl.c @@ -4172,6 +4172,16 @@ int main(int argc, char **argv, char **envp) node_mem[i] = ram_size - us

[Qemu-devel] [PATCH V9 02/12] NUMA: split -numa option

2013-08-22 Thread Wanlong Gao
eviewed-by: Laszlo Ersek Signed-off-by: Wanlong Gao --- Makefile.target | 2 +- include/sysemu/sysemu.h | 3 + numa.c | 144 qemu-options.hx | 6 +- vl.c| 113 ++

Re: [Qemu-devel] [PATCH V9 07/12] NUMA: parse guest numa nodes memory policy

2013-08-25 Thread Wanlong Gao
on of "-numa mem,", >> the memory policy then can be set like following: >> -numa node,nodeid=0,cpus=0 \ >> -numa node,nodeid=1,cpus=1 \ >> -numa mem,nodeid=0,size=1G,policy=membind,host-nodes=0-1 \ >> -numa mem,nodeid=1,size=1G,poli

Re: [Qemu-devel] [PATCH V9 06/12] NUMA: Add Linux libnuma detection

2013-08-25 Thread Wanlong Gao
>> Signed-off-by: Andre Przywara >> Signed-off-by: Wanlong Gao > > Is this patch still necessary? I thought that dropping the > numa_num_configured_nodes() calls from patch 8/12 got rid > of the need for this library. Maybe I missed other uses? Yes, in 08/12 we also

Re: [Qemu-devel] [PATCH V9 06/12] NUMA: Add Linux libnuma detection

2013-08-26 Thread Wanlong Gao
e, so it's not going to adapt to onlining/offlining. OK, thank you. Then I should define MPOL_* macros in QEMU and use mbind(2) syscall directly, right? Thanks, Wanlong Gao > > drew >

Re: [Qemu-devel] [PATCH V9 06/12] NUMA: Add Linux libnuma detection

2013-08-28 Thread Wanlong Gao
t;> yourself. libnuma:numa_max_node() returns an int that it only initializes >>>>>> at library load time, so it's not going to adapt to onlining/offlining. >>>> >>>> OK, thank you. >>>> Then I should define MPOL_* macros in QEMU and use mbind(2) syscall >>>> directly, >>>> right? >> Hmm, yeah, that's too bad that numaif.h is part of libnuma, and not a more >> general lib. Whether or not we want to redefine those symbols within >> qemu, in order to avoid the dependency on installing numactl-devel, isn't >> something I can answer. That's a better question for Anthony. Anthony? Paolo, >> any opinions? Maybe we should pick up uapi/linux/mempolicy.h with the >> linux-header synch script? >> > > I think using libnuma is fine. In principle this could be used on other > OSes than Linux, I think? But seems that mbind(2) is Linux-specific syscall, right? Thanks, Wanlong Gao > > Paolo >

[Qemu-devel] [PATCH V10 00/11] Add support for binding guest numa nodes to host numa nodes

2013-08-28 Thread Wanlong Gao
remove libnuma (Andrew) MAX_NODES=64 -> MAX_NODES=128 since libnuma selected 128 (Andrew) use MAX_NODES instead of MAX_CPUMASK_BITS for host_mem bitmap (Andrew) remove a useless clear_bit() operation (Andrew) Wanlong Gao (11): NUMA: add NumaOptions, NumaNodeOptions and NumaMemOpti

[Qemu-devel] [PATCH V10 01/11] NUMA: add NumaOptions, NumaNodeOptions and NumaMemOptions

2013-08-28 Thread Wanlong Gao
These are used to generate stuff for OptsVisitor. Reviewed-by: Laszlo Ersek Signed-off-by: Wanlong Gao --- qapi-schema.json | 47 +++ 1 file changed, 47 insertions(+) diff --git a/qapi-schema.json b/qapi-schema.json index a51f7d2..11851a1 100644

[Qemu-devel] [PATCH V10 04/11] NUMA: move numa related code to numa.c

2013-08-28 Thread Wanlong Gao
Signed-off-by: Wanlong Gao --- cpus.c | 14 - include/sysemu/cpus.h | 1 - include/sysemu/sysemu.h | 2 ++ numa.c | 76 + vl.c| 57 + 5 files

[Qemu-devel] [PATCH V10 02/11] NUMA: split -numa option

2013-08-28 Thread Wanlong Gao
eviewed-by: Laszlo Ersek Signed-off-by: Wanlong Gao --- Makefile.target | 2 +- include/sysemu/sysemu.h | 3 + numa.c | 144 qemu-options.hx | 6 +- vl.c| 113 ++

[Qemu-devel] [PATCH V10 06/11] NUMA: parse guest numa nodes memory policy

2013-08-28 Thread Wanlong Gao
eid=1,cpus=1 \ -numa mem,nodeid=0,size=1G,policy=membind,host-nodes=0-1 \ -numa mem,nodeid=1,size=1G,policy=interleave,relative=true,host-nodes=1 Signed-off-by: Wanlong Gao --- include/sysemu/sysemu.h | 5 - numa.c | 13 + qapi-schema.json

[Qemu-devel] [PATCH V10 05/11] NUMA: Add numa_info structure to contain numa nodes info

2013-08-28 Thread Wanlong Gao
Add the numa_info structure to contain the numa nodes memory, VCPUs information and the future added numa nodes host memory policies. Reviewed-by: Eduardo Habkost Signed-off-by: Andre Przywara Signed-off-by: Wanlong Gao --- hw/i386/pc.c| 4 ++-- include/sysemu/sysemu.h | 8

[Qemu-devel] [PATCH V10 09/11] NUMA: add hmp command set-mem-policy

2013-08-28 Thread Wanlong Gao
Add hmp command set-mem-policy to set host memory policy for a guest NUMA node. Then we can also set node's memory policy using the monitor command like: (qemu) set-mem-policy 0 policy=membind,relative=false,host-nodes=0-1 Signed-off-by: Wanlong Gao --- hmp-commands.hx

[Qemu-devel] [PATCH V10 07/11] NUMA: set guest numa nodes memory policy

2013-08-28 Thread Wanlong Gao
rzywara Signed-off-by: Wanlong Gao --- numa.c | 85 ++ 1 file changed, 85 insertions(+) diff --git a/numa.c b/numa.c index 4ccc6cb..65bb4de 100644 --- a/numa.c +++ b/numa.c @@ -28,6 +28,15 @@ #include "qapi-visit.h" #include

[Qemu-devel] [PATCH V10 08/11] NUMA: add qmp command set-mem-policy to set memory policy for NUMA node

2013-08-28 Thread Wanlong Gao
This QMP command allows user set guest node's memory policy through the QMP protocol. The qmp-shell command is like: set-mem-policy nodeid=0 policy=membind relative=true host-nodes=0-1 Signed-off-by: Wanlong Gao --- numa.c

[Qemu-devel] [PATCH V10 03/11] NUMA: check if the total numa memory size is equal to ram_size

2013-08-28 Thread Wanlong Gao
ta to ACPI table. Signed-off-by: Wanlong Gao --- vl.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/vl.c b/vl.c index 0ef5c5a..92aacc1 100644 --- a/vl.c +++ b/vl.c @@ -4174,6 +4174,16 @@ int main(int argc, char **argv, char **envp) node_mem[i] = ram_size - us

[Qemu-devel] [PATCH V10 10/11] NUMA: add qmp command query-numa

2013-08-28 Thread Wanlong Gao
Add qmp command query-numa to show guest NUMA information. Signed-off-by: Wanlong Gao --- numa.c | 65 qapi-schema.json | 36 +++ qmp-commands.hx | 49 ++ 3

[Qemu-devel] [PATCH V10 11/11] NUMA: convert hmp command info_numa to use qmp command query_numa

2013-08-28 Thread Wanlong Gao
Signed-off-by: Wanlong Gao --- hmp.c | 54 ++ hmp.h | 1 + monitor.c | 21 + 3 files changed, 56 insertions(+), 20 deletions(-) diff --git a/hmp.c b/hmp.c index ae695b0..2d878c6 100644 --- a/hmp.c +++ b/hmp.c

[Qemu-devel] [PATCH V11 02/11] NUMA: split -numa option

2013-08-29 Thread Wanlong Gao
eviewed-by: Laszlo Ersek Signed-off-by: Wanlong Gao --- Makefile.target | 2 +- include/sysemu/sysemu.h | 3 + numa.c | 144 qemu-options.hx | 6 +- vl.c| 113 ++

[Qemu-devel] [PATCH V11 03/11] NUMA: check if the total numa memory size is equal to ram_size

2013-08-29 Thread Wanlong Gao
ta to ACPI table. Signed-off-by: Wanlong Gao --- vl.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/vl.c b/vl.c index 0ef5c5a..92aacc1 100644 --- a/vl.c +++ b/vl.c @@ -4174,6 +4174,16 @@ int main(int argc, char **argv, char **envp) node_mem[i] = ram_size - us

[Qemu-devel] [PATCH V11 09/11] NUMA: add hmp command set-mem-policy

2013-08-29 Thread Wanlong Gao
Add hmp command set-mem-policy to set host memory policy for a guest NUMA node. Then we can also set node's memory policy using the monitor command like: (qemu) set-mem-policy 0 policy=membind,relative=false,host-nodes=0-1 Signed-off-by: Wanlong Gao --- hmp-commands.hx

[Qemu-devel] [PATCH V11 06/11] NUMA: parse guest numa nodes memory policy

2013-08-29 Thread Wanlong Gao
eid=1,cpus=1 \ -numa mem,nodeid=0,size=1G,policy=membind,host-nodes=0-1 \ -numa mem,nodeid=1,size=1G,policy=interleave,relative=true,host-nodes=1 Signed-off-by: Wanlong Gao --- include/sysemu/sysemu.h | 5 - numa.c | 13 + qapi-schema.json

[Qemu-devel] [PATCH V11 08/11] NUMA: add qmp command set-mem-policy to set memory policy for NUMA node

2013-08-29 Thread Wanlong Gao
This QMP command allows user set guest node's memory policy through the QMP protocol. The qmp-shell command is like: set-mem-policy nodeid=0 policy=membind relative=true host-nodes=0-1 Signed-off-by: Wanlong Gao --- numa.c

[Qemu-devel] [PATCH V11 11/11] NUMA: convert hmp command info_numa to use qmp command query_numa

2013-08-29 Thread Wanlong Gao
Signed-off-by: Wanlong Gao --- hmp.c | 54 ++ hmp.h | 1 + monitor.c | 21 + 3 files changed, 56 insertions(+), 20 deletions(-) diff --git a/hmp.c b/hmp.c index ae695b0..2d878c6 100644 --- a/hmp.c +++ b/hmp.c

[Qemu-devel] [PATCH V11 04/11] NUMA: move numa related code to numa.c

2013-08-29 Thread Wanlong Gao
Signed-off-by: Wanlong Gao --- cpus.c | 14 - include/sysemu/cpus.h | 1 - include/sysemu/sysemu.h | 2 ++ numa.c | 76 + vl.c| 57 + 5 files

[Qemu-devel] [PATCH V11 00/11] Add support for binding guest numa nodes to host numa nodes

2013-08-29 Thread Wanlong Gao
remove libnuma (Andrew) MAX_NODES=64 -> MAX_NODES=128 since libnuma selected 128 (Andrew) use MAX_NODES instead of MAX_CPUMASK_BITS for host_mem bitmap (Andrew) remove a useless clear_bit() operation (Andrew) V10->V11: rebase to current master fix "maxnode" argu

[Qemu-devel] [PATCH V11 07/11] NUMA: set guest numa nodes memory policy

2013-08-29 Thread Wanlong Gao
rzywara Signed-off-by: Wanlong Gao --- numa.c | 85 ++ 1 file changed, 85 insertions(+) diff --git a/numa.c b/numa.c index 4ccc6cb..89be03d 100644 --- a/numa.c +++ b/numa.c @@ -28,6 +28,15 @@ #include "qapi-visit.h" #include

[Qemu-devel] [PATCH V11 05/11] NUMA: Add numa_info structure to contain numa nodes info

2013-08-29 Thread Wanlong Gao
Add the numa_info structure to contain the numa nodes memory, VCPUs information and the future added numa nodes host memory policies. Reviewed-by: Eduardo Habkost Signed-off-by: Andre Przywara Signed-off-by: Wanlong Gao --- hw/i386/pc.c| 4 ++-- include/sysemu/sysemu.h | 8

[Qemu-devel] [PATCH V11 01/11] NUMA: add NumaOptions, NumaNodeOptions and NumaMemOptions

2013-08-29 Thread Wanlong Gao
These are used to generate stuff for OptsVisitor. Reviewed-by: Laszlo Ersek Signed-off-by: Wanlong Gao --- qapi-schema.json | 47 +++ 1 file changed, 47 insertions(+) diff --git a/qapi-schema.json b/qapi-schema.json index a51f7d2..11851a1 100644

[Qemu-devel] [PATCH V11 10/11] NUMA: add qmp command query-numa

2013-08-29 Thread Wanlong Gao
Add qmp command query-numa to show guest NUMA information. Signed-off-by: Wanlong Gao --- numa.c | 65 qapi-schema.json | 36 +++ qmp-commands.hx | 49 ++ 3

Re: [Qemu-devel] [PATCH V11 06/11] NUMA: parse guest numa nodes memory policy

2013-09-03 Thread Wanlong Gao
On 09/04/2013 10:28 AM, Eduardo Habkost wrote: > On Fri, Aug 30, 2013 at 11:10:45AM +0800, Wanlong Gao wrote: >> The memory policy setting format is like: >> >> policy={default|membind|interleave|preferred}[,relative=true],host-nodes=N-N >> And we are adding thi

Re: [Qemu-devel] [PATCH V11 02/11] NUMA: split -numa option

2013-09-03 Thread Wanlong Gao
On 09/04/2013 09:49 AM, Eduardo Habkost wrote: > On Fri, Aug 30, 2013 at 11:10:41AM +0800, Wanlong Gao wrote: >> Change -numa option like following as Paolo suggested: >> -numa node,nodeid=0,cpus=0-1 \ >> -numa mem,nodeid=0,size=1G >> >> This new opt

[Qemu-devel] [PATCH V12 09/13] NUMA: set guest numa nodes memory policy

2013-09-04 Thread Wanlong Gao
rzywara Signed-off-by: Wanlong Gao --- numa.c | 86 ++ 1 file changed, 86 insertions(+) diff --git a/numa.c b/numa.c index da4dbbd..915a67a 100644 --- a/numa.c +++ b/numa.c @@ -27,6 +27,16 @@ #include "qapi-visit.h" #include

[Qemu-devel] [PATCH V12 02/13] NUMA: check if the total numa memory size is equal to ram_size

2013-09-04 Thread Wanlong Gao
ta to ACPI table. Signed-off-by: Wanlong Gao --- numa.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/numa.c b/numa.c index ce7736a..beda80e 100644 --- a/numa.c +++ b/numa.c @@ -150,6 +150,16 @@ void set_numa_nodes(void) node_mem[i] = ram_size - us

[Qemu-devel] [PATCH V12 04/13] NUMA: convert -numa option to use OptsVisitor

2013-09-04 Thread Wanlong Gao
Signed-off-by: Wanlong Gao --- include/sysemu/sysemu.h | 3 +- numa.c | 148 +++- qapi-schema.json| 30 ++ vl.c| 11 +++- 4 files changed, 114 insertions(+), 78 deletions(-) diff --git a/include

[Qemu-devel] [PATCH V12 06/13] NUMA: add "-numa mem," options

2013-09-04 Thread Wanlong Gao
lo Ersek Signed-off-by: Wanlong Gao --- include/sysemu/sysemu.h | 1 + numa.c | 36 qemu-options.hx | 6 -- vl.c| 2 ++ 4 files changed, 43 insertions(+), 2 deletions(-) diff --git a/include/sysemu/sysem

[Qemu-devel] [PATCH V12 07/13] NUMA: expand MAX_NODES from 64 to 128

2013-09-04 Thread Wanlong Gao
libnuma choosed 128 for MAX_NODES, so we follow libnuma here. Signed-off-by: Wanlong Gao --- include/sysemu/sysemu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index 58c728c..12529a1 100644 --- a/include/sysemu/sysemu.h

[Qemu-devel] [PATCH V12 12/13] NUMA: add qmp command query-numa

2013-09-04 Thread Wanlong Gao
Add qmp command query-numa to show guest NUMA information. Signed-off-by: Wanlong Gao --- numa.c | 65 qapi-schema.json | 36 +++ qmp-commands.hx | 49 ++ 3

[Qemu-devel] [PATCH V12 05/13] NUMA: introduce NumaMemOptions

2013-09-04 Thread Wanlong Gao
Signed-off-by: Wanlong Gao --- qapi-schema.json | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/qapi-schema.json b/qapi-schema.json index fe12ea5..3ca742e 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3783,7 +3783,8 @@ ## { '

[Qemu-devel] [PATCH V12 00/13] Add support for binding guest numa nodes to host numa nodes

2013-09-04 Thread Wanlong Gao
argument of mbind(2) V11->V12: rebase to current master split patch 02/11 of V11 (Eduardo) add some max value check (Eduardo) split MAX_NODES change patch (Eduardo) *I hope this can catch up the train of 1.7.* Thanks, Wanlong Gao Wanlong Gao (13): NUMA: move numa related code to n

[Qemu-devel] [PATCH V12 11/13] NUMA: add hmp command set-mem-policy

2013-09-04 Thread Wanlong Gao
Add hmp command set-mem-policy to set host memory policy for a guest NUMA node. Then we can also set node's memory policy using the monitor command like: (qemu) set-mem-policy 0 policy=membind,relative=false,host-nodes=0-1 Signed-off-by: Wanlong Gao --- hmp-commands.hx

[Qemu-devel] [PATCH V12 01/13] NUMA: move numa related code to new file numa.c

2013-09-04 Thread Wanlong Gao
Signed-off-by: Wanlong Gao --- Makefile.target | 2 +- cpus.c | 14 include/sysemu/cpus.h | 1 - include/sysemu/sysemu.h | 3 + numa.c | 182 vl.c| 139

[Qemu-devel] [PATCH V12 13/13] NUMA: convert hmp command info_numa to use qmp command query_numa

2013-09-04 Thread Wanlong Gao
Signed-off-by: Wanlong Gao --- hmp.c | 54 ++ hmp.h | 1 + monitor.c | 21 + 3 files changed, 56 insertions(+), 20 deletions(-) diff --git a/hmp.c b/hmp.c index ae695b0..2d878c6 100644 --- a/hmp.c +++ b/hmp.c

[Qemu-devel] [PATCH V12 10/13] NUMA: add qmp command set-mem-policy to set memory policy for NUMA node

2013-09-04 Thread Wanlong Gao
This QMP command allows user set guest node's memory policy through the QMP protocol. The qmp-shell command is like: set-mem-policy nodeid=0 policy=membind relative=true host-nodes=0-1 Signed-off-by: Wanlong Gao --- numa.c

[Qemu-devel] [PATCH V12 08/13] NUMA: parse guest numa nodes memory policy

2013-09-04 Thread Wanlong Gao
eid=1,cpus=1 \ -numa mem,nodeid=0,size=1G,policy=membind,host-nodes=0-1 \ -numa mem,nodeid=1,size=1G,policy=interleave,relative=true,host-nodes=1 Signed-off-by: Wanlong Gao --- include/sysemu/sysemu.h | 3 +++ numa.c | 18 ++ qapi-schema.json

[Qemu-devel] [PATCH V12 03/13] NUMA: Add numa_info structure to contain numa nodes info

2013-09-04 Thread Wanlong Gao
Add the numa_info structure to contain the numa nodes memory, VCPUs information and the future added numa nodes host memory policies. Reviewed-by: Eduardo Habkost Signed-off-by: Andre Przywara Signed-off-by: Wanlong Gao --- hw/i386/pc.c| 4 ++-- include/sysemu/sysemu.h | 8

[Qemu-devel] [PATCH] pci-assign: remove the duplicate function name in debug message

2013-04-11 Thread Wanlong Gao
While DEBUG() already includes the function name. Signed-off-by: Wanlong Gao --- hw/i386/kvm/pci-assign.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c index c1e08ec..6afb82e 100644 --- a/hw/i386/kvm/pci

Re: [Qemu-devel] [PATCH 0/8] OptsVisitor: support / flatten integer ranges for repeating options

2013-07-29 Thread Wanlong Gao
;> - updated the cover letter to take native lists into account, plus >>> cleaned it up. >> >> Will this be considered for 1.7? > > Yes, why not? :) Nice, I'm rebasing my NUMA patch set on this series. Thanks, Wanlong Gao > > Paolo > >>

[Qemu-devel] [PATCH V6 01/11] NUMA: add NumaOptions, NumaNodeOptions and NumaMemOptions

2013-07-30 Thread Wanlong Gao
Signed-off-by: Wanlong Gao --- qapi-schema.json | 58 1 file changed, 58 insertions(+) diff --git a/qapi-schema.json b/qapi-schema.json index a51f7d2..b31fd08 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3773,3 +3773,61

[Qemu-devel] [PATCH V6 05/11] NUMA: Add Linux libnuma detection

2013-07-30 Thread Wanlong Gao
Add detection of libnuma (mostly contained in the numactl package) to the configure script. Can be enabled or disabled on the command line, default is use if available. Signed-off-by: Andre Przywara Signed-off-by: Wanlong Gao --- configure | 32 1 file changed

[Qemu-devel] [PATCH V6 02/11] NUMA: split -numa option

2013-07-30 Thread Wanlong Gao
Signed-off-by: Wanlong Gao --- Makefile.target | 2 +- include/sysemu/sysemu.h | 3 + numa.c | 145 qemu-options.hx | 6 +- vl.c| 113 ++--- 5 files ch

[Qemu-devel] [PATCH V6 00/11] Add support for binding guest numa nodes to host numa nodes

2013-07-30 Thread Wanlong Gao
e (Laszlo, Paolo) add back "-numa node,mem=xxx" as legacy (Paolo) change cpus and host-nodes to array (Laszlo, Eric) change "nodeid" to "uint16" add NumaMemPolicy enum type (Eric) rebased on Laszlo's "OptsVisitor: support / flatten integ

[Qemu-devel] [PATCH V6 09/11] NUMA: add hmp command set-mem-policy

2013-07-30 Thread Wanlong Gao
Add hmp command set-mem-policy to set host memory policy for a guest NUMA node. Then we can also set node's memory policy using the monitor command like: (qemu) set-mem-policy 0 policy=membind,relative=false,host-nodes=0-1 Signed-off-by: Wanlong Gao --- hmp-commands.hx

[Qemu-devel] [PATCH V6 06/11] NUMA: parse guest numa nodes memory policy

2013-07-30 Thread Wanlong Gao
eid=1,cpus=1 \ -numa mem,nodeid=0,size=1G,policy=membind,host-nodes=0-1 \ -numa mem,nodeid=1,size=1G,policy=interleave,relative=true,host-nodes=1 Signed-off-by: Wanlong Gao --- include/sysemu/sysemu.h | 3 +++ numa.c | 13 + qapi-schema.json

[Qemu-devel] [PATCH V6 08/11] NUMA: add qmp command set-mem-policy to set memory policy for NUMA node

2013-07-30 Thread Wanlong Gao
This QMP command allows user set guest node's memory policy through the QMP protocol. The qmp-shell command is like: set-mem-policy nodeid=0 policy=membind relative=true host-nodes=0-1 Signed-off-by: Wanlong Gao --- numa.c

[Qemu-devel] [PATCH V6 07/11] NUMA: set guest numa nodes memory policy

2013-07-30 Thread Wanlong Gao
rzywara Signed-off-by: Wanlong Gao --- numa.c | 89 ++ 1 file changed, 89 insertions(+) diff --git a/numa.c b/numa.c index 45325a1..c5a2b90 100644 --- a/numa.c +++ b/numa.c @@ -28,6 +28,16 @@ #include "qapi-visit.h" #include

[Qemu-devel] [PATCH V6 10/11] NUMA: add qmp command query-numa

2013-07-30 Thread Wanlong Gao
Add qmp command query-numa to show guest NUMA information. Signed-off-by: Wanlong Gao --- numa.c | 69 qapi-schema.json | 36 + qmp-commands.hx | 49 3 files

[Qemu-devel] [PATCH V6 11/11] NUMA: convert hmp command info_numa to use qmp command query_numa

2013-07-30 Thread Wanlong Gao
Signed-off-by: Wanlong Gao --- hmp.c | 54 ++ hmp.h | 1 + monitor.c | 21 + 3 files changed, 56 insertions(+), 20 deletions(-) diff --git a/hmp.c b/hmp.c index b199409..3152f2e 100644 --- a/hmp.c +++ b/hmp.c

[Qemu-devel] [PATCH V6 03/11] NUMA: move numa related code to numa.c

2013-07-30 Thread Wanlong Gao
Signed-off-by: Wanlong Gao --- cpus.c | 14 --- include/sysemu/cpus.h | 1 - include/sysemu/sysemu.h | 2 ++ numa.c | 65 + vl.c| 47 +-- 5 files

[Qemu-devel] [PATCH V6 04/11] NUMA: Add numa_info structure to contain numa nodes info

2013-07-30 Thread Wanlong Gao
Add the numa_info structure to contain the numa nodes memory, VCPUs information and the future added numa nodes host memory policies. Reviewed-by: Eduardo Habkost Signed-off-by: Andre Przywara Signed-off-by: Wanlong Gao --- hw/i386/pc.c| 4 ++-- include/sysemu/sysemu.h | 8

Re: [Qemu-devel] [PATCH V6 02/11] NUMA: split -numa option

2013-07-30 Thread Wanlong Gao
On 07/30/2013 07:14 PM, Laszlo Ersek wrote: > On 07/30/13 09:32, Wanlong Gao wrote: > >> +static int numa_node_parse(NumaNodeOptions *opts) >> +{ >> +uint16_t nodenr; >> +UInt16List *cpus = NULL; >> + >> +if (opts->has_nodeid) { >

[Qemu-devel] [PATCH V7 02/11] NUMA: split -numa option

2013-07-30 Thread Wanlong Gao
eviewed-by: Laszlo Ersek Signed-off-by: Wanlong Gao --- Makefile.target | 2 +- include/sysemu/sysemu.h | 3 + numa.c | 145 qemu-options.hx | 6 +- vl.c| 113 ++

  1   2   3   4   5   6   7   8   9   10   >