Re: [PATCH 1/3] vhost-net: check the support of mergeable buffer outside the receive loop

2011-01-17 Thread Jason Wang
Michael S. Tsirkin writes: On Mon, Jan 17, 2011 at 04:10:59PM +0800, Jason Wang wrote: No need to check the support of mergeable buffer inside the recevie loop as the whole handle_rx()_xx is in the read critical region. So this patch move it ahead of the receiving loop. Signed

Re: [PATCH 2/3] vhost-net: Unify the code of mergeable and big buffer handling

2011-01-17 Thread Jason Wang
Michael S. Tsirkin writes: On Tue, Jan 18, 2011 at 11:05:33AM +0800, Jason Wang wrote: Michael S. Tsirkin writes: On Mon, Jan 17, 2011 at 04:11:08PM +0800, Jason Wang wrote: Codes duplication were found between the handling of mergeable and big buffers, so this patch tries

Re: [PATCH 1/3] vhost-net: check the support of mergeable buffer outside the receive loop

2011-01-18 Thread Jason Wang
Michael S. Tsirkin writes: On Tue, Jan 18, 2011 at 12:26:17PM +0800, Jason Wang wrote: Michael S. Tsirkin writes: On Mon, Jan 17, 2011 at 04:10:59PM +0800, Jason Wang wrote: No need to check the support of mergeable buffer inside the recevie loop as the whole handle_rx()_xx

[PATCH kvm-unit-tests 00/10] Minor cleanup and fix for 32bit test

2010-08-24 Thread Jason Wang
The following series do some minor cleanup and fix for the 32bit test. --- Jason Wang (10): Do not track config.mak and kvmtrace Remove trailing whitespaces Makefile cleanup Correct the path in README Drop print.S Remove the duplicated rdmsr/wrmsr

[PATCH kvm-unit-tests 01/10] Do not track config.mak and kvmtrace

2010-08-24 Thread Jason Wang
config.mak was generated by configure and kvmtrace were compiled throuh makefile. Signed-off-by: Jason Wang jasow...@redhat.com --- config.mak |8 kvmtrace | Bin 2 files changed, 0 insertions(+), 8 deletions(-) delete mode 100644 config.mak delete mode 100755 kvmtrace diff

[PATCH kvm-unit-tests 02/10] Remove trailing whitespaces

2010-08-24 Thread Jason Wang
Signed-off-by: Jason Wang jasow...@redhat.com --- config-x86-common.mak | 14 +++--- x86/access.c |2 +- x86/cstart64.S|4 ++-- x86/print.S |6 +++--- x86/sieve.c |2 +- x86/vm.c |6 +++--- 6 files changed, 17

[PATCH kvm-unit-tests 03/10] Makefile cleanup

2010-08-24 Thread Jason Wang
Remove the obsoleted target and directories. Signed-off-by: Jason Wang jasow...@redhat.com --- Makefile |9 + 1 files changed, 1 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 5347ce8..d25e6f2 100644 --- a/Makefile +++ b/Makefile @@ -30,10 +30,6 @@ CFLAGS

[PATCH kvm-unit-tests 04/10] Correct the path in README

2010-08-24 Thread Jason Wang
Signed-off-by: Jason Wang jasow...@redhat.com --- README | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README b/README index 6a83831..9c0c518 100644 --- a/README +++ b/README @@ -7,17 +7,17 @@ Tests uses a qemu's virtual test device, named testdev

[PATCH kvm-unit-tests 05/10] Drop print.S

2010-08-24 Thread Jason Wang
We've already had lib/printf.c. Signed-off-by: Jason Wang jasow...@redhat.com --- config-x86-common.mak |9 - x86/print.S | 31 --- 2 files changed, 4 insertions(+), 36 deletions(-) delete mode 100644 x86/print.S diff --git a/config-x86

[PATCH kvm-unit-tests 06/10] Remove the duplicated rdmsr/wrmsr

2010-08-24 Thread Jason Wang
They have been implemented in lib/x86/processor.h. Also rename the cpuid to cpuid_test because cpuid have been defined. Signed-off-by: Jason Wang jasow...@redhat.com --- x86/msr.c| 16 +--- x86/vmexit.c | 20 +++- 2 files changed, 4 insertions(+), 32 deletions

[PATCH kvm-unit-tests 07/10] Correct the tss size

2010-08-24 Thread Jason Wang
TSS size should be 104 byte. Signed-off-by: Jason Wang jasow...@redhat.com --- x86/cstart64.S |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/x86/cstart64.S b/x86/cstart64.S index 5d358ad..b871153 100644 --- a/x86/cstart64.S +++ b/x86/cstart64.S @@ -69,7 +69,7 @@ tss

[PATCH kvm-unit-tests 08/10] Check whether in long mode before testing vmexit caused by cr8 access

2010-08-24 Thread Jason Wang
CR8 is only availabe when in long mode. Signed-off-by: Jason Wang jasow...@redhat.com --- x86/vmexit.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/x86/vmexit.c b/x86/vmexit.c index 819c24b..34b0af4 100644 --- a/x86/vmexit.c +++ b/x86/vmexit.c @@ -48,6

[PATCH kvm-unit-tests 09/10] Do not test IA32_EFER in 32bit mode.

2010-08-24 Thread Jason Wang
Signed-off-by: Jason Wang jasow...@redhat.com --- x86/msr.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/x86/msr.c b/x86/msr.c index 9c85369..c3e0014 100644 --- a/x86/msr.c +++ b/x86/msr.c @@ -49,9 +49,11 @@ struct msr_info msr_info[] = { .index = 0xc102

[PATCH kvm-unit-tests 10/10] Add the 32bit smp initialization code

2010-08-24 Thread Jason Wang
Add the smp initlaization codes for 32bit. This would make the 32bit smp tests available. Signed-off-by: Jason Wang jasow...@redhat.com --- x86/cstart.S | 179 -- 1 files changed, 173 insertions(+), 6 deletions(-) diff --git a/x86

Re: [PATCH kvm-unit-tests 07/10] Correct the tss size

2010-08-25 Thread Jason Wang
- Avi Kivity a...@redhat.com wrote: On 08/24/2010 04:47 PM, Jason Wang wrote: TSS size should be 104 byte. Signed-off-by: Jason Wangjasow...@redhat.com --- x86/cstart64.S |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/x86/cstart64.S b/x86

Re: [PATCH kvm-unit-tests 07/10] Correct the tss size

2010-08-25 Thread Jason Wang
- Avi Kivity a...@redhat.com wrote: On 08/25/2010 12:40 PM, Jason Wang wrote: - Avi Kivitya...@redhat.com wrote: On 08/24/2010 04:47 PM, Jason Wang wrote: TSS size should be 104 byte. Signed-off-by: Jason Wangjasow...@redhat.com --- x86/cstart64.S |2 +- 1

Re: [PATCH kvm-unit-tests 07/10] Correct the tss size

2010-08-25 Thread Jason Wang
- Avi Kivity a...@redhat.com wrote: On 08/25/2010 03:27 PM, Jason Wang wrote: - Avi Kivitya...@redhat.com wrote: On 08/25/2010 12:40 PM, Jason Wang wrote: - Avi Kivitya...@redhat.com wrote: On 08/24/2010 04:47 PM, Jason Wang wrote: TSS size should be 104 byte

Re: [PATCH kvm-unit-tests 07/10] Correct the tss size

2010-08-26 Thread Jason Wang
- Avi Kivity a...@redhat.com wrote: On 08/25/2010 04:00 PM, Jason Wang wrote: 00400bb8__setup_args: 400bb8: 41 55 push %r13 400bba: 41 54 push %r12 400bbc: 55 push %rbp 400bbd

[PATCH kvm-unit-tests v2 00/10] Minor cleanup and fix for

2010-08-26 Thread Jason Wang
32bit test The following series implements... Change from v1: Remove one quad word from RSP filed instead of IST. Compile out cr8 access test for 32bit test. --- Jason Wang (10): Do not track config.mak and kvmtrace Remove trailing whitespaces Makefile cleanup Correct

[PATCH kvm-unit-tests v2 01/10] Do not track config.mak and kvmtrace

2010-08-26 Thread Jason Wang
config.mak was generated by configure and kvmtrace were compiled throuh makefile. Signed-off-by: Jason Wang jasow...@redhat.com --- config.mak |8 kvmtrace | Bin 2 files changed, 0 insertions(+), 8 deletions(-) delete mode 100644 config.mak delete mode 100755 kvmtrace diff

[PATCH kvm-unit-tests v2 02/10] Remove trailing whitespaces

2010-08-26 Thread Jason Wang
Signed-off-by: Jason Wang jasow...@redhat.com --- config-x86-common.mak | 14 +++--- x86/access.c |2 +- x86/cstart64.S|4 ++-- x86/print.S |6 +++--- x86/sieve.c |2 +- x86/vm.c |6 +++--- 6 files changed, 17

[PATCH kvm-unit-tests v2 03/10] Makefile cleanup

2010-08-26 Thread Jason Wang
Remove the obsoleted target and directories. Signed-off-by: Jason Wang jasow...@redhat.com --- Makefile |9 + 1 files changed, 1 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 5347ce8..d25e6f2 100644 --- a/Makefile +++ b/Makefile @@ -30,10 +30,6 @@ CFLAGS

[PATCH kvm-unit-tests v2 04/10] Correct the path in README

2010-08-26 Thread Jason Wang
Signed-off-by: Jason Wang jasow...@redhat.com --- README | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README b/README index 6a83831..9c0c518 100644 --- a/README +++ b/README @@ -7,17 +7,17 @@ Tests uses a qemu's virtual test device, named testdev

[PATCH kvm-unit-tests v2 06/10] Remove the duplicated rdmsr/wrmsr

2010-08-26 Thread Jason Wang
They have been implemented in lib/x86/processor.h. Also rename the cpuid to cpuid_test because cpuid have been defined. Signed-off-by: Jason Wang jasow...@redhat.com --- x86/msr.c| 16 +--- x86/vmexit.c | 20 +++- 2 files changed, 4 insertions(+), 32 deletions

[PATCH kvm-unit-tests v2 07/10] Correct the tss size

2010-08-26 Thread Jason Wang
TSS size should be 104 bytes. Signed-off-by: Jason Wang jasow...@redhat.com --- x86/cstart64.S |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/x86/cstart64.S b/x86/cstart64.S index 5d358ad..ef09d82 100644 --- a/x86/cstart64.S +++ b/x86/cstart64.S @@ -68,7 +68,7 @@ tss

[PATCH kvm-unit-tests v2 08/10] Do not check cr8 access when running in 32 bit

2010-08-26 Thread Jason Wang
CR8 is only available in long mode. Signed-off-by: Jason Wang jasow...@redhat.com --- x86/vmexit.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/x86/vmexit.c b/x86/vmexit.c index 819c24b..84c384d 100644 --- a/x86/vmexit.c +++ b/x86/vmexit.c @@ -49,6 +49,7 @@ static

[PATCH kvm-unit-tests v2 09/10] Do not test IA32_EFER in 32bit mode.

2010-08-26 Thread Jason Wang
Signed-off-by: Jason Wang jasow...@redhat.com --- x86/msr.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/x86/msr.c b/x86/msr.c index 9c85369..c3e0014 100644 --- a/x86/msr.c +++ b/x86/msr.c @@ -49,9 +49,11 @@ struct msr_info msr_info[] = { .index = 0xc102

[PATCH kvm-unit-tests v2 10/10] Add 32 bit smp initialization code

2010-08-26 Thread Jason Wang
Add smp initlaization codes for 32bit. This would make the 32bit smp tests available. Signed-off-by: Jason Wang jasow...@redhat.com --- x86/cstart.S | 179 -- 1 files changed, 173 insertions(+), 6 deletions(-) diff --git a/x86/cstart.S b

[PATCH kvm-unit-test 0/6] Kvmclock test

2010-08-26 Thread Jason Wang
The following series implements test of kvmlock. --- Jason Wang (6): Introduce memory barriers. Introduce atomic operations Export tsc related helpers Introduce atol() Add a simple kvmclock driver Add a test for kvm-clock config-x86-common.mak |7

[PATCH kvm-unit-test 1/6] Introduce memory barriers.

2010-08-26 Thread Jason Wang
Signed-off-by: Jason Wang jasow...@redhat.com --- lib/x86/smp.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/lib/x86/smp.h b/lib/x86/smp.h index c2e7350..df5fdba 100644 --- a/lib/x86/smp.h +++ b/lib/x86/smp.h @@ -1,6 +1,10 @@ #ifndef __SMP_H #define __SMP_H

[PATCH kvm-unit-test 2/6] Introduce atomic operations

2010-08-26 Thread Jason Wang
Signed-off-by: Jason Wang jasow...@redhat.com --- config-x86-common.mak |1 lib/x86/atomic.c | 38 +++ lib/x86/atomic.h | 164 + 3 files changed, 203 insertions(+), 0 deletions(-) create mode 100644 lib/x86/atomic.c

[PATCH kvm-unit-test 3/6] Export tsc related helpers

2010-08-26 Thread Jason Wang
Signed-off-by: Jason Wang jasow...@redhat.com --- lib/x86/processor.h | 22 ++ x86/tsc.c | 16 +--- x86/vmexit.c| 15 --- 3 files changed, 23 insertions(+), 30 deletions(-) diff --git a/lib/x86/processor.h b/lib/x86/processor.h

[PATCH kvm-unit-test 4/6] Introduce atol()

2010-08-26 Thread Jason Wang
Signed-off-by: Jason Wang jasow...@redhat.com --- lib/string.c | 31 +++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/lib/string.c b/lib/string.c index acac3c0..1f19f5c 100644 --- a/lib/string.c +++ b/lib/string.c @@ -30,3 +30,34 @@ void *memset

[PATCH kvm-unit-test 5/6] Add a simple kvmclock driver

2010-08-26 Thread Jason Wang
Most of the codes were borrowed from arxh/x86/kernel/kvmclock.c. A special bit: PV_CLOCK_CYCLE_RAW_TEST_BIT is used to notify the driver to return unadjusted cycles. Signed-off-by: Jason Wang jasow...@redhat.com --- x86/kvmclock.c | 166

[PATCH kvm-unit-test 6/6] Add a test for kvm-clock

2010-08-26 Thread Jason Wang
-01-01 00:00:00 UTC which could be easily get through date +%s and the max accepted offset value between the tod of guest and host. Signed-off-by: Jason Wang jasow...@redhat.com --- config-x86-common.mak |6 ++ x86/README|2 + x86/kvmclock_test.c | 145

[PATCH] KVM: pit: Do not check pending pit timer in vcpu thread

2010-08-27 Thread Jason Wang
Pit interrupt injection was done by workqueue, so no need to check pending pit timer in vcpu thread which could lead unnecessary unblocking of vcpu. Signed-off-by: Jason Wang jasow...@redhat.com --- arch/x86/kvm/i8254.c |9 - arch/x86/kvm/irq.c |7 +-- 2 files changed, 1

Re: [PATCH kvm-unit-test 6/6] Add a test for kvm-clock

2010-08-29 Thread Jason Wang
- Glauber Costa glom...@redhat.com wrote: On Fri, Aug 27, 2010 at 01:49:53PM +0800, Jason Wang wrote: This patch implements two tests for kvmclock. First one check whether the date of time returned by kvmclock matches the value got from host. Second one check whether the cycle

Re: [PATCH kvm-unit-test 5/6] Add a simple kvmclock driver

2010-08-29 Thread Jason Wang
- Glauber Costa glom...@redhat.com wrote: On Fri, Aug 27, 2010 at 01:49:45PM +0800, Jason Wang wrote: +#define unlikely(x)__builtin_expect(!!(x), 0) + +struct pvclock_vcpu_time_info hv_clock[MAX_CPU]; this structure have to be 4-byte aligned. Let the compiler help you

Re: [PATCH kvm-unit-test 6/6] Add a test for kvm-clock

2010-08-29 Thread Jason Wang
- Glauber Costa glom...@redhat.com wrote: On Fri, Aug 27, 2010 at 01:49:53PM +0800, Jason Wang wrote: This patch implements two tests for kvmclock. First one check whether the date of time returned by kvmclock matches the value got from host. Second one check whether the cycle

Re: [PATCH kvm-unit-test 6/6] Add a test for kvm-clock

2010-08-29 Thread Jason Wang
- Zachary Amsden zams...@redhat.com wrote: On 08/26/2010 07:49 PM, Jason Wang wrote: This patch implements two tests for kvmclock. First one check whether the date of time returned by kvmclock matches the value got from host. Second one check whether the cycle of kvmclock grows

[PATCH kvm-unit-tests v2 0/8] Tests for kvmclock

2010-08-31 Thread Jason Wang
--- Jason Wang (8): Introduce some type definiations. Increase max_cpu to 64 Introduce memory barriers. Introduce atomic operations Export tsc related helpers Introduce atol() Add a simple kvmclock driver Add tests for kvm-clock config-x86-common.mak

[PATCH kvm-unit-tests v2 1/8] Introduce some type definiations.

2010-08-31 Thread Jason Wang
Signed-off-by: Jason Wang jasow...@redhat.com --- lib/libcflat.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/lib/libcflat.h b/lib/libcflat.h index d0d3df2..9cb90cf 100644 --- a/lib/libcflat.h +++ b/lib/libcflat.h @@ -23,10 +23,14 @@ #include stdarg.h typedef

[PATCH kvm-unit-tests v2 3/8] Introduce memory barriers.

2010-08-31 Thread Jason Wang
Signed-off-by: Jason Wang jasow...@redhat.com --- lib/x86/smp.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/lib/x86/smp.h b/lib/x86/smp.h index c2e7350..df5fdba 100644 --- a/lib/x86/smp.h +++ b/lib/x86/smp.h @@ -1,6 +1,10 @@ #ifndef __SMP_H #define __SMP_H

[PATCH kvm-unit-tests v2 4/8] Introduce atomic operations

2010-08-31 Thread Jason Wang
Signed-off-by: Jason Wang jasow...@redhat.com --- config-x86-common.mak |1 lib/x86/atomic.c | 37 +++ lib/x86/atomic.h | 164 + 3 files changed, 202 insertions(+), 0 deletions(-) create mode 100644 lib/x86/atomic.c

[PATCH kvm-unit-tests v2 5/8] Export tsc related helpers

2010-08-31 Thread Jason Wang
Signed-off-by: Jason Wang jasow...@redhat.com --- lib/x86/processor.h | 22 ++ x86/tsc.c | 16 +--- x86/vmexit.c| 15 --- 3 files changed, 23 insertions(+), 30 deletions(-) diff --git a/lib/x86/processor.h b/lib/x86/processor.h

[PATCH kvm-unit-tests v2 6/8] Introduce atol()

2010-08-31 Thread Jason Wang
Signed-off-by: Jason Wang jasow...@redhat.com --- lib/libcflat.h |1 + lib/string.c | 31 +++ 2 files changed, 32 insertions(+), 0 deletions(-) diff --git a/lib/libcflat.h b/lib/libcflat.h index 9cb90cf..d4ee2e0 100644 --- a/lib/libcflat.h +++ b/lib/libcflat.h

[PATCH kvm-unit-tests v2 7/8] Add a simple kvmclock driver

2010-08-31 Thread Jason Wang
Most of the codes were borrowed from arxh/x86/kernel/kvmclock.c. A special bit: PV_CLOCK_CYCLE_RAW_TEST_BIT is used to notify the driver to return unadjusted cycles. Signed-off-by: Jason Wang jasow...@redhat.com --- x86/kvmclock.c | 279

[PATCH kvm-unit-tests v2 8/8] Add tests for kvm-clock

2010-08-31 Thread Jason Wang
-off-by: Jason Wang jasow...@redhat.com --- config-x86-common.mak |6 +- x86/README|1 x86/kvmclock_test.c | 166 + x86/unittests.cfg |5 + 4 files changed, 177 insertions(+), 1 deletions(-) create mode 100644 x86

[PATCH 1/2] KVM test: unittest: Fix the broken smp params

2010-09-06 Thread Jason Wang
Make smp param in unittests.cfg works again. Signed-off-by: Jason Wang jasow...@redhat.com --- client/tests/kvm/tests/unittest.py |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/tests/unittest.py b/client/tests/kvm/tests/unittest.py index 69c4b43

[PATCH 2/2] KVM test: unittest: Build unittests from new repo

2010-09-06 Thread Jason Wang
Kvm-unit-tests have moved to a repo out of qemu-kvm. This patch let the unittest could build the tests from specified git repo. Signed-off-by: Jason Wang jasow...@redhat.com --- client/tests/kvm/tests/build.py | 16 ++-- client/tests/kvm/unittests.cfg.sample |1 + 2 files

[PATCH] vhost: max s/g to match qemu

2010-09-14 Thread Jason Wang
with copying large files w/ and w/o migration in both linux and windows guests. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/vhost/net.c |2 +- drivers/vhost/vhost.c | 49 - drivers/vhost/vhost.h | 18 -- 3

Re: [PATCH] vhost-net: fix range checking in mrg bufs case

2010-09-16 Thread Jason Wang
Tested-by: Jason Wang jasow...@redhat.com - Michael S. Tsirkin m...@redhat.com wrote: In mergeable buffer case, we use headcount, log_num and seg as indexes in same-size arrays, and we know that headcount = seg and log_num equals either 0 or seg. Therefore, the right thing to do

[PATCH 1/2] KVM test: Use -drive to add nic device when possible

2010-09-25 Thread Jason Wang
This patch tries to use -drive to add nic device becuase recent qemu suggest to use it. A nic_extra_params was also introduced to add some advanced params to a nic (currently only availabe for virtio_net) such as mrg_rxbuf. Signed-off-by: Jason Wang jasow...@redhat.com --- client/tests/kvm

[PATCH 2/2] KVM test: Add vhost-net support

2010-09-25 Thread Jason Wang
Vhost is a kernel-level backend for virtio. This patch add a nic_params named vhost to enable/disable vhost backend. Signed-off-by: Jason Wang jasow...@redhat.com --- client/tests/kvm/kvm_vm.py |7 +-- client/tests/kvm/tests_base.cfg.sample |2 ++ 2 files changed, 7

[PATCH 0/3] Launch other test during migration

2010-09-25 Thread Jason Wang
, but it work well. - Two sample tests which take advantages of the background class: Test reboot during guest migration and test file_transfer during guest migration. In the future, we could even lauch autotest client test during guest migation. --- Jason Wang (3): KVM Test: Introduce a helper

[PATCH 1/3] KVM Test: Introduce a helper class to run a test in the background

2010-09-25 Thread Jason Wang
and raise it when master call join(). Signed-off-by: Jason Wang jasow...@redhat.com --- client/tests/kvm/kvm_test_utils.py | 44 +++- 1 files changed, 43 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/kvm_test_utils.py b/client/tests/kvm

[PATCH 2/3] KVM test: Test reboot during migration

2010-09-25 Thread Jason Wang
This test is simple: it's doing the migration and guest rebooting in the same time and then check the completion of migration and verify the guest state by loggin it again after reboot. Signed-off-by: Jason Wang jasow...@redhat.com --- client/tests/kvm/tests/migration_with_reboot.py | 45

[PATCH 3/3] KVM test: Test the file transfer during migartion

2010-09-25 Thread Jason Wang
This test just do the file transfer from host to guest during migartion in order to check whether the nic/block state could be saved and loaded correctly. Signed-off-by: Jason Wang jasow...@redhat.com --- .../kvm/tests/migration_with_file_transfer.py | 59 client

Re: [PATCH 1/2] KVM test: Use -drive to add nic device when possible

2010-09-25 Thread Jason Wang
- Markus Armbruster arm...@redhat.com wrote: Jason Wang jasow...@redhat.com writes: This patch tries to use -drive to add nic device becuase recent qemu suggest -device, you mean. Suggest to fix your commit message. Thanks, would fix it. to use it. A nic_extra_params was also

[V2 PATCH 1/2] KVM test: Use -device to add nic device when possible

2010-09-25 Thread Jason Wang
This patch tries to use -device to add nic device becuase recent qemu suggest to use it. A nic_extra_params was also introduced to add some advanced params to a nic (currently only availabe for virtio_net) such as mrg_rxbuf. Signed-off-by: Jason Wang jasow...@redhat.com --- client/tests/kvm

[V2 PATCH 2/2] KVM test: Add vhost-net support

2010-09-25 Thread Jason Wang
Vhost is a kernel-level backend for virtio. This patch add a nic_params named vhost to enable/disable vhost backend. Signed-off-by: Jason Wang jasow...@redhat.com --- client/tests/kvm/kvm_vm.py |7 +-- client/tests/kvm/tests_base.cfg.sample |2 ++ 2 files changed, 7

[RFC PATCH 1/4] net: move announce_self_create to net.c

2010-09-27 Thread Jason Wang
Export and move announce_self_create to net.c in order to be used by model specific announcing function. Signed-off-by: Jason Wang jasow...@redhat.com --- net.c| 31 +++ net.h|1 + savevm.c | 32 3 files changed, 32

[RFC PATCH 2/4] net: Introduce model specific nic announce function

2010-09-27 Thread Jason Wang
This patch introduce a function pointer in NetClientInfo which is called during self announcement to do the model specific mac address announcement. Previous method were kept for the model without its own implementation. Signed-off-by: Jason Wang jasow...@redhat.com --- net.h|2

[RFC PATCH 3/4] virtio-net: Limit the num of uni/multicast mac addresses

2010-09-27 Thread Jason Wang
of uni/multicast mac addresses in qemu. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/virtio-net.c | 17 - 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/hw/virtio-net.c b/hw/virtio-net.c index 0a9cae2..79afb65 100644 --- a/hw/virtio-net.c +++ b/hw/virtio

[RFC PATCH 4/4] virtio-net: implement virtio-net specific announce function

2010-09-27 Thread Jason Wang
, but current virtio-net implementation can not distinguish the mapping between mac addresses and vlan. And I believe this function must be implemented with the modifications of guest drivers ( vlan_dev_info ). Signed-off-by: Jason Wang jasow...@redhat.com --- hw/virtio-net.c | 30

[RFC PATCH 0/4] Model specific function for nic announcement

2010-09-27 Thread Jason Wang
in guest which means the vlan after migration is still broken. This patchset is just an RFC and need your suggestions and comments. Thanks. --- Jason Wang (4): net: move announce_self_create to net.c net: Introduce model specific nic announce function virtio-net: Limit the num

Re: [PATCH] KVM test: Make vm.serial_login() work

2010-09-27 Thread Jason Wang
the order of the kernel arguments has to be: console=tty0 console=ttyS0,115200 instead of: console=ttyS0,115200 console=tty0 Fixing it in all linux guests unattended files. Signed-off-by: Jason Wang jasow...@redhat.com --- client/tests/kvm/unattended/Fedora-10.ks |2

Re: [V2 PATCH 2/2] KVM test: Add vhost-net support

2010-10-08 Thread Jason Wang
Meneghel Rodrigues wrote: On Sun, 2010-09-26 at 10:28 +0800, Jason Wang wrote: Vhost is a kernel-level backend for virtio. This patch add a nic_params named vhost to enable/disable vhost backend. Jason, I had rebased your patches. The patches themselves look good, but apparently the syntax

Re: [PATCH 0/3] Launch other test during migration

2010-10-17 Thread Jason Wang
. Any comments or suggestions? - Jason Wang jasow...@redhat.com wrote: We could give a further test of migration by launch test during migartion. So the following series implements: - A simple class to run a specified test in the background which could be used to launch other test

Re: [PATCH 0/3] Launch other test during migration

2010-10-19 Thread Jason Wang
pradeep writes: On Mon, 18 Oct 2010 00:59:20 -0400 (EDT) Jason Wang jasow...@redhat.com wrote: Hello guys: Any further suggestion which I need to improve those patches? I agree that there's no much tests need to be run is this way except for migration. In order

[PATCH] KVM test: Add a subtest kdump

2010-10-28 Thread Jason Wang
Add a new subtest to check whether kdump work correctly in guest. This test just try to trigger crash on each vcpu and then verify it by checking the vmcore. Signed-off-by: Jason Wang jasow...@redhat.com --- client/tests/kvm/tests/kdump.py | 79 ++ client

Re: [PATCH 3/3] KVM test: Test the file transfer during migartion

2010-11-01 Thread Jason Wang
Michael Goldish writes: On 09/25/2010 11:36 AM, Jason Wang wrote: This test just do the file transfer from host to guest during migartion in order to check whether the nic/block state could be saved and loaded correctly. Signed-off-by: Jason Wang jasow...@redhat.com

Re: [PATCH 0/3] Launch other test during migration

2010-11-01 Thread Jason Wang
Michael Goldish writes: On 09/25/2010 11:36 AM, Jason Wang wrote: We could give a further test of migration by launch test during migartion. So the following series implements: - A simple class to run a specified test in the background which could be used to launch other

Re: [PATCH 0/3] Launch other test during migration

2010-11-02 Thread Jason Wang
Michael Goldish writes: On 11/02/2010 07:34 AM, Jason Wang wrote: Michael Goldish writes: On 09/25/2010 11:36 AM, Jason Wang wrote: We could give a further test of migration by launch test during migartion. So the following series implements: - A simple class

[PATCH] virtio-net: init link state correctly

2010-11-03 Thread Jason Wang
, the unconditional call to nerif_carrier_on() is also removed. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/net/virtio_net.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index bb6b67f..0a0cd35 100644

[V2 PATCH] virtio-net: init link state correctly

2010-11-04 Thread Jason Wang
not support VIRITO_NET_F_STATUS, we could not get its status through virtnet_update_status() and what we can only do is always assuming the link is up. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/net/virtio_net.c | 12 +--- 1 files changed, 9 insertions(+), 3 deletions

[V2 PATCH] virtio-net: init link state correctly

2010-11-04 Thread Jason Wang
Jason Wang writes: CC netdev missed in the original patch. For device that supports VIRTIO_NET_F_STATUS, there's no need to assume the link is up and we need to call nerif_carrier_off() before querying device status, otherwise we may get wrong operstate after diver was loaded because

[rfc net-next v6 1/3] virtio_net: Introduce VIRTIO_NET_F_MULTIQUEUE

2012-10-30 Thread Jason Wang
From: Krishna Kumar krkum...@in.ibm.com Introduce VIRTIO_NET_F_MULTIQUEUE. Signed-off-by: Krishna Kumar krkum...@in.ibm.com Signed-off-by: Jason Wang jasow...@redhat.com --- include/uapi/linux/virtio_net.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/uapi

[rfc net-next v6 2/3] virtio_net: multiqueue support

2012-10-30 Thread Jason Wang
from the same flow, driver would let the device (usually tuntap) to use the 'rx follows tx' packet steering rules when working in multiqueue mode. In this mode, the device would select the rxq based on the last queue where the packet of the flow were sent. Signed-off-by: Jason Wang jasow

[rfc net-next v6 3/3] virtio-net: change the number of queues through ethtool

2012-10-30 Thread Jason Wang
This patch implement the {set|get}_channels method of ethool to allow user to change the number of queues dymaically when the device is running. This would let the user to tune the device for specific applications. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/net/virtio_net.c | 43

Re: [rfc net-next v6 0/3] Multiqueue virtio-net

2012-10-31 Thread Jason Wang
On 10/31/2012 03:05 AM, Rick Jones wrote: On 10/30/2012 03:03 AM, Jason Wang wrote: Hi all: This series is an update version of multiqueue virtio-net driver based on Krishna Kumar's work to let virtio-net use multiple rx/tx queues to do the packets reception and transmission. Please review

Re: [rfc net-next v6 2/3] virtio_net: multiqueue support

2012-11-18 Thread Jason Wang
On 11/05/2012 07:16 AM, Rusty Russell wrote: Jason Wang jasow...@redhat.com writes: This addes multiqueue support to virtio_net driver. There's two mode supported: single queue pair mode and multiple queue pairs mode. An obvious difference compared with a physical mq card is that virtio-net

Re: [rfc net-next v6 3/3] virtio-net: change the number of queues through ethtool

2012-11-18 Thread Jason Wang
On 11/05/2012 07:46 AM, Rusty Russell wrote: Jason Wang jasow...@redhat.com writes: This patch implement the {set|get}_channels method of ethool to allow user to change the number of queues dymaically when the device is running. This would let the user to tune the device for specific

Re: [rfc net-next v6 2/3] virtio_net: multiqueue support

2012-11-18 Thread Jason Wang
On 11/05/2012 09:08 AM, Rusty Russell wrote: Jason Wang jasow...@redhat.com writes: +struct virtnet_info { + u16 num_queue_pairs;/* # of RX/TX vq pairs */ + u16 total_queue_pairs; + + struct send_queue *sq; + struct receive_queue *rq; + struct virtqueue

Re: [PATCHv4] virtio-spec: virtio network device RFS support

2012-11-22 Thread Jason Wang
On 11/22/2012 10:46 PM, Michael S. Tsirkin wrote: Add RFS support to virtio network device. Add a new feature flag VIRTIO_NET_F_RFS for this feature, a new configuration field max_virtqueue_pairs to detect supported number of virtqueues as well as a new command VIRTIO_NET_CTRL_RFS to program

[net-next rfc v7 0/3] Multiqueue virtio-net

2012-11-27 Thread Jason Wang
://lwn.net/Articles/505388/ - V4: https://lkml.org/lkml/2012/6/25/120 - V2: http://lwn.net/Articles/467283/ Perf Numbers: Will do some basic test and post as a reply to this mail. Jason Wang (3): virtio-net: separate fields of sending/receiving queue from virtnet_info virtio_net: multiqueue

[net-next rfc v7 1/3] virtio-net: separate fields of sending/receiving queue from virtnet_info

2012-11-27 Thread Jason Wang
...@in.ibm.com Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/net/virtio_net.c | 289 +- 1 files changed, 158 insertions(+), 131 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 26c502e..7975133 100644

[net-next rfc v7 2/3] virtio_net: multiqueue support

2012-11-27 Thread Jason Wang
processor id. - smp affinity hint were set to the vcpu that owns the queue pairs. Signed-off-by: Krishna Kumar krkum...@in.ibm.com Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/net/virtio_net.c| 454 ++- include/uapi/linux/virtio_net.h

[net-next rfc v7 3/3] virtio-net: change the number of queues through ethtool

2012-11-27 Thread Jason Wang
This patch implement the {set|get}_channels method of ethool to allow user to change the number of queues dymaically when the device is running. This would let the user to configure it on demand. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/net/virtio_net.c | 41

Re: [net-next rfc v7 2/3] virtio_net: multiqueue support

2012-12-02 Thread Jason Wang
On Sunday, December 02, 2012 06:06:31 PM Michael S. Tsirkin wrote: On Tue, Nov 27, 2012 at 06:15:59PM +0800, Jason Wang wrote: This addes multiqueue support to virtio_net driver. In multiple queue modes, the driver expects the number of queue paris is equal to the number of vcpus

Re: [net-next rfc v7 2/3] virtio_net: multiqueue support

2012-12-02 Thread Jason Wang
On Monday, December 03, 2012 12:34:08 PM Rusty Russell wrote: Jason Wang jasow...@redhat.com writes: +static const struct ethtool_ops virtnet_ethtool_ops; + +/* + * Converting between virtqueue no. and kernel tx/rx queue no. + * 0:rx0 1:tx0 2:cvq 3:rx1 4:tx1 ... 2N+1:rxN 2N+2:txN

Re: [net-next rfc v7 3/3] virtio-net: change the number of queues through ethtool

2012-12-02 Thread Jason Wang
On Sunday, December 02, 2012 06:09:06 PM Michael S. Tsirkin wrote: On Tue, Nov 27, 2012 at 06:16:00PM +0800, Jason Wang wrote: This patch implement the {set|get}_channels method of ethool to allow user to change the number of queues dymaically when the device is running. This would let

Re: [net-next rfc v7 2/3] virtio_net: multiqueue support

2012-12-03 Thread Jason Wang
On 12/03/2012 05:47 PM, Michael S. Tsirkin wrote: On Mon, Dec 03, 2012 at 02:05:27PM +0800, Jason Wang wrote: On Monday, December 03, 2012 12:34:08 PM Rusty Russell wrote: Jason Wang jasow...@redhat.com writes: +static const struct ethtool_ops virtnet_ethtool_ops; + +/* + * Converting

Re: [net-next rfc v7 2/3] virtio_net: multiqueue support

2012-12-03 Thread Jason Wang
On 12/03/2012 06:14 PM, Michael S. Tsirkin wrote: On Tue, Nov 27, 2012 at 06:15:59PM +0800, Jason Wang wrote: - if (!try_fill_recv(vi-rq, GFP_KERNEL)) - schedule_delayed_work(vi-rq.refill, 0); + for (i = 0; i vi-max_queue_pairs; i++) + if (!try_fill_recv(vi-rq[i

Re: [net-next rfc v7 1/3] virtio-net: separate fields of sending/receiving queue from virtnet_info

2012-12-04 Thread Jason Wang
On Monday, December 03, 2012 01:18:48 PM Michael S. Tsirkin wrote: On Mon, Dec 03, 2012 at 01:15:01PM +0800, Jason Wang wrote: + + /* Work struct for refilling if we run low on memory. */ + struct delayed_work refill; I can't really see the justificaiton for a refill

Re: [net-next rfc v7 1/3] virtio-net: separate fields of sending/receiving queue from virtnet_info

2012-12-04 Thread Jason Wang
On Tuesday, December 04, 2012 02:13:11 PM Rusty Russell wrote: Jason Wang jasow...@redhat.com writes: On Monday, December 03, 2012 12:25:42 PM Rusty Russell wrote: + +/* Work struct for refilling if we run low on memory. */ +struct delayed_work refill; I can't

Re: [net-next rfc v7 2/3] virtio_net: multiqueue support

2012-12-04 Thread Jason Wang
On Monday, December 03, 2012 01:11:18 PM Michael S. Tsirkin wrote: On Mon, Dec 03, 2012 at 06:01:58PM +0800, Jason Wang wrote: On 12/03/2012 05:47 PM, Michael S. Tsirkin wrote: On Mon, Dec 03, 2012 at 02:05:27PM +0800, Jason Wang wrote: On Monday, December 03, 2012 12:34:08 PM Rusty

Re: [net-next rfc v7 2/3] virtio_net: multiqueue support

2012-12-04 Thread Jason Wang
On Tuesday, December 04, 2012 09:35:03 AM Michael S. Tsirkin wrote: On Mon, Dec 03, 2012 at 06:30:49PM +0800, Jason Wang wrote: On 12/03/2012 06:14 PM, Michael S. Tsirkin wrote: On Tue, Nov 27, 2012 at 06:15:59PM +0800, Jason Wang wrote: - if (!try_fill_recv(vi-rq, GFP_KERNEL

[PATCH net-next 0/3] Multiqueue support for virtio-net

2012-12-04 Thread Jason Wang
://lwn.net/Articles/467283/ Perf Numbers: Will do some basic test and post as a reply to this mail. Jason Wang (3): virtio-net: separate fields of sending/receiving queue from virtnet_info virtio_net: multiqueue support virtio-net: change the number of queues through ethtool drivers

[PATCH net-next 3/3] virtio-net: change the number of queues through ethtool

2012-12-04 Thread Jason Wang
This patch implement the ethtool_{set|get}_channels method of ethool to allow user to change the number of queues dymaically when the device is running. This would let the user to configure it on demand. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/net/virtio_net.c | 44

<    1   2   3   4   5   6   7   8   >