[RFC PATCH 1/4] virt-test: add NTttcp subtests

2011-12-23 Thread Amos Kong
can compare it by a common method. Signed-off-by: Qingtang Zhou qz...@redhat.com Signed-off-by: Amos Kong ak...@redhat.com --- client/tests/kvm/subtests.cfg.sample | 21 client/virt/tests/ntttcp.py | 160 ++ 2 files changed, 181 insertions(+), 0

[RFC PATCH 2/4] virt-test: Refactor netperf test and add analysis module

2011-12-23 Thread Amos Kong
Always use a VM as netperf server, we can use another VM/localhost/external host as the netperf clients. We setup env and launch test by executing remote ssh commands, you need to configure the IP of local/external host in configure file, VMs' IP can be got automatically. Signed-off-by: Amos Kong

[RFC PATCH 3/4] netperf: pin guest vcpus/memory/vhost thread to numa node

2011-12-23 Thread Amos Kong
Dynamically checking hardware and pin guest cpu threads and guest memory to last numa node Signed-off-by: Amos Kong ak...@redhat.com --- client/virt/tests/netperf.py | 19 ++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/client/virt/tests/netperf.py b/client

[RFC PATCH 4/4] virt: Introduce regression testing infrastructure

2011-12-23 Thread Amos Kong
. autotest result directory should be shared by NFS first, and specify its address in perf.conf Signed-off-by: Amos Kong ak...@redhat.com --- client/tests/kvm/control|7 + client/tests/kvm/perf.conf | 23 client/virt/tests/analyzer.py | 224

Re: [PATCH v2] MMIO: Make coalesced mmio use a device per zone

2011-12-21 Thread Amos Kong
- Original Message - On 07/19/2011 02:05 PM, Sasha Levin wrote: On Tue, 2011-07-19 at 13:57 +0300, Avi Kivity wrote: On 07/19/2011 01:31 PM, Sasha Levin wrote: This patch changes coalesced mmio to create one mmio device per zone instead of handling all zones in one

Re: [PATCH] virt-test: support static ip address in framework

2011-12-20 Thread Amos Kong
On 21/12/11 03:03, Lucas Meneghel Rodrigues wrote: On 12/19/2011 11:11 AM, Amos Kong wrote: Sometime, we need to test with guest(s) which have static ip address(es). eg. No real/emulated DHCP server in test environment. eg. Test with old image we don't want to change the net config. eg. Test

Re: [SeaBIOS PATCH v3] hotplug: Add device per func in ACPI DSDT tables

2011-12-19 Thread Amos Kong
On 14/12/11 09:06, Kevin O'Connor wrote: On Tue, Dec 06, 2011 at 07:32:55PM -0500, Amos Kong wrote: - Original Message - On Tue, Dec 06, 2011 at 01:39:35PM +0800, Amos Kong wrote: Only func 0 is registered to guest driver (we can only found func 0 in slot-funcs list of driver

[PATCH] virt-test: support static ip address in framework

2011-12-19 Thread Amos Kong
-by: Amos Kong ak...@redhat.com --- client/tests/kvm/base.cfg.sample |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/base.cfg.sample b/client/tests/kvm/base.cfg.sample index 411decf..c86ec1f 100644 --- a/client/tests/kvm/base.cfg.sample +++ b/client/tests/kvm

Re: [PATCH] virt-test: support static ip address in framework

2011-12-19 Thread Amos Kong
- Original Message - * On 2011-12-19 21:11:32 +0800, Amos Kong (ak...@redhat.com) wrote: Sometime, we need to test with guest(s) which have static ip address(es). eg. No real/emulated DHCP server in test environment. eg. Test with old image we don't want to change the net config

Re: [RFC] virtio: use mandatory barriers for remote processor vdevs

2011-12-18 Thread Amos Kong
On 12/12/11 13:12, Rusty Russell wrote: On Mon, 12 Dec 2011 11:06:53 +0800, Amos Kongak...@redhat.com wrote: On 12/12/11 06:27, Benjamin Herrenschmidt wrote: On Sun, 2011-12-11 at 14:25 +0200, Michael S. Tsirkin wrote: Forwarding some results by Amos, who run multiple netperf streams in

Re: [RFC] virtio: use mandatory barriers for remote processor vdevs

2011-12-18 Thread Amos Kong
On 19/12/11 10:19, Amos Kong wrote: On 12/12/11 13:12, Rusty Russell wrote: On Mon, 12 Dec 2011 11:06:53 +0800, Amos Kongak...@redhat.com wrote: On 12/12/11 06:27, Benjamin Herrenschmidt wrote: On Sun, 2011-12-11 at 14:25 +0200, Michael S. Tsirkin wrote: Forwarding some results by Amos, who

Re: [RFC] virtio: use mandatory barriers for remote processor vdevs

2011-12-18 Thread Amos Kong
On 19/12/11 10:41, Benjamin Herrenschmidt wrote: On Mon, 2011-12-19 at 10:19 +0800, Amos Kong wrote: I tested with the same environment and scenarios. tested one scenarios for three times and compute the average for more precision. Thanks, Amos - compare results --- Mon Dec

Re: [RFC] virtio: use mandatory barriers for remote processor vdevs

2011-12-12 Thread Amos Kong
On 12/12/2011 01:12 PM, Rusty Russell wrote: On Mon, 12 Dec 2011 11:06:53 +0800, Amos Kong ak...@redhat.com wrote: On 12/12/11 06:27, Benjamin Herrenschmidt wrote: On Sun, 2011-12-11 at 14:25 +0200, Michael S. Tsirkin wrote: Forwarding some results by Amos, who run multiple netperf streams

Re: [RFC] virtio: use mandatory barriers for remote processor vdevs

2011-12-11 Thread Amos Kong
On 12/12/11 06:27, Benjamin Herrenschmidt wrote: On Sun, 2011-12-11 at 14:25 +0200, Michael S. Tsirkin wrote: Forwarding some results by Amos, who run multiple netperf streams in parallel, from an external box to the guest. TCP_STREAM results were noisy. This could be due to buffering done

[PATCH] virt-test: Add a class NumaNode

2011-12-08 Thread Amos Kong
(thread_id=(\d+), o): | logging.debug(pin vcpu thread(%s) to host cpu node % i) | p.pin_cpu(i) | p.show() Signed-off-by: Amos Kong ak...@redhat.com --- client/tests/kvm/base.cfg.sample |5 client/virt/kvm_vm.py|8 ++ client/virt/virt_utils.py| 50

Re: [SeaBIOS PATCH v3] hotplug: Add device per func in ACPI DSDT tables

2011-12-06 Thread Amos Kong
- Original Message - On Tue, Dec 06, 2011 at 01:39:35PM +0800, Amos Kong wrote: Only func 0 is registered to guest driver (we can only found func 0 in slot-funcs list of driver), the other functions could not be cleaned when hot-removing the whole slot. This patch adds device

[PATCH] PCI: Can continually add funcs after adding func0

2011-11-24 Thread Amos Kong
(func 0 is necessary), and all functions will be removed in one time. Signed-off-by: Amos Kong ak...@redhat.com --- drivers/pci/hotplug/acpiphp_glue.c | 29 + 1 files changed, 13 insertions(+), 16 deletions(-) diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers

Re: About hotplug multifunction

2011-11-23 Thread Amos Kong
On 09/09/11 15:08, Amos Kong wrote: Hello all, I'm working on hotplug pci multifunction. 1. qemu cmdline: ./x86_64-softmmu/qemu-system-x86_64 -snapshot -m 2000 /home/kvm_autotest_root/images/rhel61-64-virtio.qcow2 -vnc :0 -monitor unix:/tmp/a,server,nowait --enable-kvm -net none 2. script

Re: [Autotest] [PATCH 05/11] virt: Introducing libvirt VM class

2011-10-12 Thread Amos Kong
On 10/12/2011 05:07 AM, Lucas Meneghel Rodrigues wrote: This is a first attempt at providing a libvirt VM class, in order to implement the needed methods for virt testing. With this class, we will be able to implement a libvirt test, that behaves similarly to the KVM test. As of implementation

Re: [Autotest] [PATCH 06/11] virt: Introducing libvirt monitor

2011-10-12 Thread Amos Kong
On 10/12/2011 05:07 AM, Lucas Meneghel Rodrigues wrote: This is an initial implementation for a libvirt monitor. With it, we plan on making the libvirt test use all the monitor features, making most of the tests available for kvm available for libvirt. As of implementation details, it uses

[Autotest PATCH] virt: Only update macaddr cache when capture dhcp ACK packet

2011-09-29 Thread Amos Kong
Currently, tcpdump can capture both dhcp Offer and ACK packets, macaddr cache will be updated in those to condition, dhcp Offer packet doesn't mean the IP is already allocated to dhcp client. Signed-off-by: Amos Kong ak...@redhat.com --- client/virt/virt_env_process.py | 10 -- 1 files

Re: [PATCHv2 0/3] acpi: fix up EJ0 in DSDT

2011-09-28 Thread Amos Kong
infrastructure that can match Method and Name Operators - instead of matching specific method name, insert tags in original DSL source and match that to AML Patch looks good to me. Acked-by: Amos Kong ak...@redhat.com - Here's a bug: guest thinks it can eject VGA device

Re: [Autotest] [PATCH] KVM-test: Add two scripts to disable services for perf tests

2011-09-22 Thread Amos Kong
- Original Message - On Wed, Sep 7, 2011 at 3:07 AM, Amos Kong ak...@redhat.com wrote: System services on guest and host take uncertain resource, it effects the perf results. We can use the below two scripts to disable some services of host and guest. stop_serivices_perf.sh

[SeaBIOS PATCH v2] Fix regression of commit 87b533bf

2011-09-20 Thread Amos Kong
From 4678a3cb0e0a3cd7a4bc3d284c5719fdba90bc61 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor ke...@koconnor.net Date: Tue, 20 Sep 2011 15:43:55 +0800 Subject: [PATCH V2] Fix regression of commit 87b533bf From: Kevin O'Connor ke...@koconnor.net After adding more device entries in ACPI DSDT tables,

[SeaBIOS PATCH] hotplug: Add device per func in ACPI DSDT tables

2011-09-20 Thread Amos Kong
- Original Message - On Mon, Sep 19, 2011 at 01:02:59PM +0300, Michael S. Tsirkin wrote: On Mon, Sep 19, 2011 at 12:57:33PM +0300, Gleb Natapov wrote: On Mon, Sep 19, 2011 at 03:27:38AM -0400, Amos Kong wrote: Only func 0 is registered to guest driver (we can only found

[SeaBIOS PATCH v2] hotplug: Add device per func in ACPI DSDT tables

2011-09-20 Thread Amos Kong
From 48ea1c9188334b89a60b4f9e853e86fc04fda4a5 Mon Sep 17 00:00:00 2001 From: Amos Kong ak...@redhat.com Date: Tue, 20 Sep 2011 15:38:43 +0800 Subject: [SeaBIOS PATCH v2] hotplug: Add device per func in ACPI DSDT tables Only func 0 is registered to guest driver (we can only found func 0 in slot

Re: [SeaBIOS PATCH v2] hotplug: Add device per func in ACPI DSDT tables

2011-09-20 Thread Amos Kong
- Original Message - On Tue, Sep 20, 2011 at 06:45:57AM -0400, Amos Kong wrote: From 48ea1c9188334b89a60b4f9e853e86fc04fda4a5 Mon Sep 17 00:00:00 2001 From: Amos Kong ak...@redhat.com Date: Tue, 20 Sep 2011 15:38:43 +0800 Subject: [SeaBIOS PATCH v2] hotplug: Add device per func

[SEABIOS PATCH 0/2] fix of hotplug multi-func device

2011-09-19 Thread Amos Kong
Hotplug multi-func device doesn't work, only func 0 are regiestered to guest pci driver, this patchset just add device entry in ACPI DSDT tables for all functions in the slot. --- Amos Kong (2): Fix regression of commit 87b533bf hotplug: Add device per func in ACPI DSDT tables 0

[SeaBIOS PATCH 1/2] Fix regression of commit 87b533bf

2011-09-19 Thread Amos Kong
. However, a side effect of marking that code (handle_post) as init code is that it is more likely the linker could place the code at an address less than 0xe. The patch (just a hack) would cover up the issue. Signed-off-by: Amos Kong ak...@redhat.com --- 0 files changed, 0 insertions(+), 0

[SeaBIOS PATCH 2/2] hotplug: Add device per func in ACPI DSDT tables

2011-09-19 Thread Amos Kong
/multiple function device, they are all fine. new acpi-dst.hex(332K): http://amos-kong.rhcloud.com/pub/acpi-dsdt.hex Signed-off-by: Amos Kong ak...@redhat.com --- src/acpi-dsdt.dsl | 31 +-- 1 files changed, 25 insertions(+), 6 deletions(-) diff --git a/src/acpi

Re: [PATCH] [dhcp] Use random transaction ID to associate messages

2011-09-17 Thread Amos Kong
- Original Message - Whole Archive: http://marc.info/?l=kvmm=131609166918121w=2 - Original Message - On Thu, 2011-09-15 at 10:43 -0400, Amos Kong wrote: - Original Message - - Original Message - On Thu, 15 Sep 2011 21:00:38 +0800, Amos Kong ak

[IPXE PATCH] [dhcp] Use random transaction ID to associate messages

2011-09-17 Thread Amos Kong
suggests us to use random xid, it's necessary. This patch generates random id when start dhcp, and record it to netdev struct. Signed-off-by: Amos Kong ak...@redhat.com CC: Eduardo Habkost ehabk...@redhat.com CC: Michael Brown mc...@ipxe.org --- src/include/ipxe/netdevice.h |3 +++ src/net/udp

Re: [PATCH] [dhcp] Use random transaction ID to associate messages

2011-09-16 Thread Amos Kong
- Original Message - On Thu, 2011-09-15 at 10:43 -0400, Amos Kong wrote: - Original Message - - Original Message - On Thu, 15 Sep 2011 21:00:38 +0800, Amos Kong ak...@redhat.com wrote: + netdev-xid = random(); This will not work for reboots

[PATCH] [dhcp] Use random transaction ID to associate messages

2011-09-15 Thread Amos Kong
'xid' for each retransmission is an implementation decision. A client may choose to reuse the same 'xid' or select a new 'xid' for each retransmitted message. This patch generates random id when start dhcp, and record it to netdev struct. Signed-off-by: Amos Kong ak...@redhat.com CC: Eduardo

Re: [PATCH] [dhcp] Use random transaction ID to associate messages

2011-09-15 Thread Amos Kong
- Original Message - - Original Message - On Thu, 15 Sep 2011 21:00:38 +0800, Amos Kong ak...@redhat.com wrote: + netdev-xid = random(); This will not work for reboots. The decision that the hardware address is choosen was not accidental. Not sure if some DHCP

Re: [PATCH] [dhcp] Use random transaction ID to associate messages

2011-09-15 Thread Amos Kong
Whole Archive: http://marc.info/?l=kvmm=131609166918121w=2 - Original Message - On Thu, 2011-09-15 at 10:43 -0400, Amos Kong wrote: - Original Message - - Original Message - On Thu, 15 Sep 2011 21:00:38 +0800, Amos Kong ak...@redhat.com wrote

Re: [PATCH] pci: clean all funcs when hot-removing multifunc device

2011-09-14 Thread Amos Kong
- Original Message - (2011/09/14 13:55), Amos Kong wrote: 'slot-funcs' is initialized in acpiphp_glue.c:register_slot() before hotpluging device, and only one entry(func 0) is added to it, no new entry will be added to the list when hotpluging devices to the slot. I guess

Re: [PATCH] pci: clean all funcs when hot-removing multifunc device

2011-09-14 Thread Amos Kong
- Original Message - - Original Message - (2011/09/14 13:55), Amos Kong wrote: 'slot-funcs' is initialized in acpiphp_glue.c:register_slot() before hotpluging device, and only one entry(func 0) is added to it, no new entry will be added to the list when hotpluging

Re: About hotplug multifunction

2011-09-13 Thread Amos Kong
Hi all, After reading the pci driver code, I found a problem. There is a list for each slot, (slot-funcs) it will be inited in acpiphp_glue.c:register_slot() before hotpluging device, and only one entry(func 0) will be added to it, no new entry will be added to the list when hotpluging devices

Re: About hotplug multifunction

2011-09-13 Thread Amos Kong
- Original Message - Hi all, I've tested with WinXp guest, the multifunction hotplug works. After reading the pci driver code, I found a problem. There is a list for each slot, (slot-funcs) it will be inited in acpiphp_glue.c:register_slot() before hotpluging device, and only one

[PATCH] pci: clean all funcs when hot-removing multifunc device

2011-09-13 Thread Amos Kong
) @ ls /dev/vd* vdb vdc vde vdf vdg vdh @ mkfs /dev/vdb INFO: task mkfs.ext2:1784 blocked for more than 120 seconds. (task hung) Hotpluging multifunc of WinXp is fine. Signed-off-by: Amos Kong ak...@redhat.com --- drivers/pci/hotplug/acpiphp_glue.c

About hotplug multifunction

2011-09-09 Thread Amos Kong
Hello all, I'm working on hotplug pci multifunction. 1. qemu cmdline: ./x86_64-softmmu/qemu-system-x86_64 -snapshot -m 2000 /home/kvm_autotest_root/images/rhel61-64-virtio.qcow2 -vnc :0 -monitor unix:/tmp/a,server,nowait --enable-kvm -net none 2. script to add virtio-blk devices: for i in

Re: [PATCH] KVM-test: Add two scripts to disable services for perf tests

2011-09-08 Thread Amos Kong
- Original Message - On Wed, 07 Sep 2011 14:07:49 +0800, Amos Kong ak...@redhat.com wrote: System services on guest and host take uncertain resource, it effects the perf results. We can use the below two scripts to disable some services of host and guest

[PATCH] KVM-test: Add two scripts to disable services for perf tests

2011-09-07 Thread Amos Kong
can use them to prepare environment for performance testcases. Signed-off-by: Amos Kong ak...@redhat.com --- client/tests/kvm/scripts/off_services_perf.sh | 27 client/tests/kvm/scripts/stop_services_perf.sh | 27 2 files changed, 54 insertions

Re: [PATCH] kvm tools: Sanitize output characters in serial console

2011-08-10 Thread Amos Kong
On Wed, Aug 10, 2011 at 2:53 PM, walimis walimis...@gmail.com wrote: On Wed, Aug 10, 2011 at 02:15:45PM +0800, Asias He wrote: On 08/10/2011 01:55 PM, Pekka Enberg wrote: On Wed, Aug 10, 2011 at 8:43 AM, Asias He asias.he...@gmail.com wrote: On 08/10/2011 01:30 PM, Pekka Enberg wrote: On

Re: [PATCH] KVM Test: Call postprocess_vm before postprocess_image.

2011-08-04 Thread Amos Kong
, vm_params, env, vm_name) However, I'm ok for Feng's fix. Acked-by: Amos Kong ak...@redhat.com @error.context_aware @@ -293,7 +300,7 @@ def postprocess(test, params, env): error.context(postprocessing) # Postprocess all VMs and images -process(test, params, env, postprocess_image

Re: [RFC PATCH] KVM-test: Add subtest: usb

2011-08-02 Thread Amos Kong
- Original Message - On 07/29/11 06:53, Amos Kong wrote: This test adds a usb storage for the guest, and do some check from monitor and inside the guest. It's not very stable, could you help to review if something is wrong? Not stable means what exactly? I found you had

[PATCH v2] KVM-test: Add subtest: usb

2011-08-02 Thread Amos Kong
with the detail output of 'lsusb -v' - create disk image by pre_cmd CC: Gerd Hoffmann kra...@redhat.com Signed-off-by: Amos Kong ak...@redhat.com --- client/tests/kvm/tests/usb.py | 50 client/tests/kvm/tests_base.cfg.sample |9 ++ 2 files changed, 59

[PATCH v3] KVM-test: Add subtest: usb

2011-08-02 Thread Amos Kong
with the detail output of 'lsusb -v' - create disk image by pre_cmd Changes from v2: - reuse the new interface to add a usb disk to guest - report a rh-bug 727725 CC: Gerd Hoffmann kra...@redhat.com Signed-off-by: Amos Kong ak...@redhat.com --- client/tests/kvm/tests/usb.py | 50

[PATCH] KVM-test: Add hdparm subtest

2011-08-01 Thread Amos Kong
This test uses 'hdparm' to set disk device to low/high performance status, and compare the reading speed. The emulated device should pass all the tests. Signed-off-by: Feng Yang fy...@redhat.com Signed-off-by: Amos Kong ak...@redhat.com --- client/tests/kvm/tests/hdparm.py | 84

[PATCH] KVM-test: Add new subtest: floppy

2011-07-28 Thread Amos Kong
This test does some basic operation on the virtual floppy, it supports both Linux and Windows guests. Signed-off-by: Amos Kong ak...@redhat.com --- client/tests/kvm/tests/floppy.py | 62 client/tests/kvm/tests_base.cfg.sample | 23 2 files

[RFC PATCH] KVM-test: Add subtest: usb

2011-07-28 Thread Amos Kong
/images/usbdevice.qcow2',if=none,cache=none,id=usb2.1 -device usb-storage,bus=ehci.0,drive=usb2.1,port=2 12:42:16 INFO | (qemu) *** EHCI support is under development *** CC: Gerd Hoffmann kra...@redhat.com Signed-off-by: Amos Kong ak...@redhat.com --- client/tests/kvm/tests/usb.py | 49

Re: [PATCH] KVM test: Add a subtest cpuflags

2011-07-28 Thread Amos Kong
On Thu, Mar 4, 2010 at 3:20 PM, sshang ssh...@redhat.com wrote:  This test mainly tests whether all guest cpu flags are supported by host machine. Signed-off-by: sshang ssh...@redhat.com Hi Lucas, It seems that this patch[1] was lost by us. Have confirmed with shuang, this subtest needs to

Re: [Autotest] KVM autotest tip of the week - How to run KVM autotest tests on an existing guest image

2011-07-25 Thread Amos Kong
On Mon, Jul 25, 2011 at 03:25:15PM -0300, Lucas Meneghel Rodrigues wrote: Hi folks, a little later than expected, here are the docs that explain how to run KVM autotest tests on an existing guest image: http://autotest.kernel.org/wiki/KVMAutotest/RunTestsExistingGuest Good work! Lucas

[PATCH] KVM-test: Add subtest cdrom

2011-07-11 Thread Amos Kong
Test cdrom about mount/format/copy/md5sum, change iso file by monitor command, create iso files by pre_command, clean temporary file by post_command. Signed-off-by: Amos Kong ak...@redhat.com --- client/tests/kvm/tests/cdrom.py| 131 client/tests/kvm

[PATCH] KVM test: Add subtest nmi_watchdog

2011-07-11 Thread Amos Kong
Uses kernel supported nmi_watchdog to test the nmi support of kvm, check the nmi count in Linux platform through /proc/interrupts. Signed-off-by: Amos Kong ak...@redhat.com --- client/tests/kvm/tests/nmi_watchdog.py | 57 client/tests/kvm/tests_base.cfg.sample

[PATCH 1/3] virtio: Correct error message of unavailable index

2011-06-15 Thread Amos Kong
'head' is an index of VirtQueueElement, it should less than vring.num Signed-off-by: Amos Kong ak...@redhat.com --- hw/virtio.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/virtio.c b/hw/virtio.c index 6e8814c..a3d0eee 100644 --- a/hw/virtio.c +++ b/hw/virtio.c

[PATCH 2/3] virtio: Strictly check queue_size when adding virtqueue

2011-06-15 Thread Amos Kong
Qemu should abort when 'queue_size' is less than or equals to zero. Signed-off-by: Amos Kong ak...@redhat.com --- hw/virtio.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/virtio.c b/hw/virtio.c index a3d0eee..855fe54 100644 --- a/hw/virtio.c +++ b/hw/virtio.c

[PATCH 3/3] virtio: Define max_nr_ports to unsigned

2011-06-15 Thread Amos Kong
-by: Amos Kong ak...@redhat.com --- hw/virtio-serial-bus.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index 9a12104..aae8456 100644 --- a/hw/virtio-serial-bus.c +++ b/hw/virtio-serial-bus.c @@ -727,7 +727,8 @@ static int

Re: [PATCH 2/3] virtio: Strictly check queue_size when adding virtqueue

2011-06-15 Thread Amos Kong
On Wed, Jun 15, 2011 at 11:36:02PM +0300, Michael S. Tsirkin wrote: On Wed, Jun 15, 2011 at 10:25:33PM +0800, Amos Kong wrote: Qemu should abort when 'queue_size' is less than or equals to zero. Signed-off-by: Amos Kong ak...@redhat.com BTW, these patches apply upstream so should

Re: [PATCH 1/3] virtio: Correct error message of unavailable index

2011-06-15 Thread Amos Kong
On Wed, Jun 15, 2011 at 11:30:32PM +0300, Michael S. Tsirkin wrote: On Wed, Jun 15, 2011 at 10:25:24PM +0800, Amos Kong wrote: 'head' is an index of VirtQueueElement, it should less than vring.num Signed-off-by: Amos Kong ak...@redhat.com --- hw/virtio.c |2 +- 1 files changed

[PATCH v2] virtio: Define queue_size to unsigned

2011-06-15 Thread Amos Kong
It's not valid for queue_size to be negative, then the type ought to be unsigned. Changes from V1: - drop the check and just define it to unsigned. Signed-off-by: Amos Kong ak...@redhat.com --- hw/virtio.c |2 +- hw/virtio.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff

current qemu-kvm doesn't work with vhost

2011-06-09 Thread Amos Kong
host kernel: 2.6.39-rc2+ qemu-kvm : 05f1737582ab6c075476bde931c5eafbc62a9349 (gdb) r -monitor stdio -m 800 ~/RHEL-Server-6.0-64-virtio.qcow2 -snapshot -device virtio-net-pci,netdev=he -netdev tap,vhost=on,id=he (qemu) [New Thread 0x7fffbe7dd700 (LWP 10410)] [New Thread 0x7fffbdfdc700 (LWP

[PATCH] tun: do not put self in waitq if doing a nonblock read

2011-06-08 Thread Amos Kong
this patch, it drops to 4%. Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Amos Kong ak...@redhat.com --- drivers/net/tun.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 74e9405..95dbff4 100644 --- a/drivers/net

[PATCH v2] virtio-spec: Fix wrong bit number of device status

2011-06-07 Thread Amos Kong
refers to bit numbers and the headers use absolute numbers, they are not consistent. it shoule be 'FAILED(8)'. 2^(8-1) = 128 Changes from V1: - Fix wrong patch body Signed-off-by: Amos Kong ak...@redhat.com --- virtio-spec.lyx |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff

[PATCH 1/2] KVM-test: control: Fix of spliting augments

2011-05-24 Thread Amos Kong
-off-by: Amos Kong ak...@redhat.com --- client/tests/kvm/control |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/control b/client/tests/kvm/control index c887a3e..959d2bc 100644 --- a/client/tests/kvm/control +++ b/client/tests/kvm/control @@ -55,7 +55,7

[PATCH 2/2] KVM-test: kvm_vm.py: Add quotation marks for appended arguments

2011-05-24 Thread Amos Kong
Appended kernel cmdline should be involved by quotation marks. -append 'root=/dev/vda ro ..' Reported-by: Cong Wang amw...@redhat.com Signed-off-by: Amos Kong ak...@redhat.com --- client/virt/kvm_vm.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/client/virt

Re: [PATCH 2/5] KVM test: Add helpers to control the TAP/bridge

2011-05-23 Thread Amos Kong
On Sat, May 21, 2011 at 01:23:27AM -0300, Lucas Meneghel Rodrigues wrote: This patch adds some helpers to assist virt test to setup the bridge or macvtap based guest networking. Changes from v1: * Fixed undefined variable errors on the exception class definitions Signed-off-by: Jason

Re: [AUTOTEST][PATCH] Add ability to call autotest client tests from kvm tests like a subtest.

2011-05-10 Thread Amos Kong
On Wed, May 04, 2011 at 04:42:39PM +0200, Jiří Župka wrote: Example run client/tests/sleeptest. test.runsubtest(sleeptest, **args) args is dictionary with parameters for subtest. For sleeptest looks like { seconds:5 }. This args says sleeptest sleep 5 seconds. This patch are necessary

Re: [Autotest] [Autotest PATCH] KVM-test: TSC drift test

2011-05-06 Thread Amos Kong
* On Fri, Apr 29, 2011 at 02:42:20AM -0300, Lucas Meneghel Rodrigues wrote: On Thu, Apr 21, 2011 at 4:33 AM, Amos Kong ak...@redhat.com wrote: This case is used to test the drift between host and guest. Use taskset to make tsc program execute in a single cpu. If the drift ratio bigger than

[PATCH 1/3] KVM-test: introduce a verify_status method

2011-05-06 Thread Amos Kong
This method is used to check if VM status is same as we expected. Signed-off-by: Amos Kong ak...@redhat.com --- 0 files changed, 0 insertions(+), 0 deletions(-) diff --git a/client/virt/kvm_monitor.py b/client/virt/kvm_monitor.py index 7934b07..aff716a 100644 --- a/client/virt/kvm_monitor.py

[PATCH 2/3] KVM-test: Simple stop/continue test

2011-05-06 Thread Amos Kong
Change guest state by monitor cmd, verify guest status, and try to login guest by network. Changes from v1: - use new method verify_status() to check vm status Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Amos Kong ak...@redhat.com --- client/tests/kvm/tests/stop_continue.py

[PATCH 3/3] KVM-test: Check if guest bootable after reseting several times

2011-05-06 Thread Amos Kong
This test comes from a regression bug: Guest can not found bootable device after reseting several times by monitor command. https://bugzilla.redhat.com/show_bug.cgi?id=531026 Changes from v1: - add bug id to commitlog - remove unnecessary imports - add some log message Signed-off-by: Amos Kong

[PATCH v3 1/2] KVM-test: Add qemu-ifup-atbr0

2011-05-04 Thread Amos Kong
'atbr0' is a private bridge. This script is used to setup tap device. Changes from v2: - drop the absolute path of brctl and ifconfig Signed-off-by: Amos Kong ak...@redhat.com --- client/tests/kvm/scripts/qemu-ifup-atbr0 |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) create

[PATCH] KVM-test: Drop the absolute path of brctl/ifconfig

2011-05-04 Thread Amos Kong
The absolute paths of brctl are not same in different distribution. Signed-off-by: Amos Kong ak...@redhat.com --- client/tests/kvm/scripts/qemu-ifup | 12 ++-- client/tests/kvm/scripts/qemu-ifup-ipv6 | 12 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff

[PATCH v2 1/2] KVM-test: Add qemu-ifup-atbr0

2011-05-03 Thread Amos Kong
'atbr0' is a private bridge. This script is used to setup tap device. Signed-off-by: Amos Kong ak...@redhat.com --- client/tests/kvm/scripts/qemu-ifup-atbr0 |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) create mode 100755 client/tests/kvm/scripts/qemu-ifup-atbr0 diff --git

[PATCH v2 2/2] KVM-test: Setup private bridge in framework

2011-05-03 Thread Amos Kong
and general enough. Configure parameters: bridge = private priv_brname = atbr0 priv_subnet = 192.168.58 nic_script = scripts/qemu-ifup-atbr0 Signed-off-by: Amos Kong ak...@redhat.com --- 0 files changed, 0 insertions(+), 0 deletions(-) diff --git a/client/virt/virt_env_process.py b/client/virt

Re: [AUTOTEST][PATCH] Add ability to call autotest client tests from kvm tests like a subtest.

2011-04-26 Thread Amos Kong
On Tue, Apr 26, 2011 at 12:22:31PM +0200, Jiří Župka wrote: Example run autotest/client/netperf2 like a server. test.runsubtest(netperf2, tag=server, server_ip=host_ip, client_ip=guest_ip, role='server') Client part is called in paralel thread on virtual machine. guest =

Re: [KVM-AUTOTEST] [AUTOTEST][PATCH] Add ability to call autotest client tests from kvm tests like a subtest.

2011-04-26 Thread Amos Kong
On Tue, Apr 26, 2011 at 01:22:13PM -0400, Cleber Rosa wrote: On 04/26/2011 11:52 AM, Lucas Meneghel Rodrigues wrote: On Tue, 2011-04-26 at 23:08 +0800, Amos Kong wrote: On Tue, Apr 26, 2011 at 12:22:31PM +0200, Jiří Župka wrote: +else: +logging.error(Host cannot communicate

[Autotest PATCH] KVM-test: Simple stop/continue test

2011-04-21 Thread Amos Kong
Change guest state by monitor cmd, verify guest status, and try to login guest by network. Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Amos Kong ak...@redhat.com --- client/tests/kvm/tests/stop_continue.py | 52 +++ client/tests/kvm

[Autotest PATCH] KVM-test: Check if guest bootable after reseting several times

2011-04-21 Thread Amos Kong
This test comes from a regression bug: Guest can not found bootable device after reseting several times by monitor command. Signed-off-by: Amos Kong ak...@redhat.com --- client/tests/kvm/tests/system_reset_bootable.py | 29 +++ client/tests/kvm/tests_base.cfg.sample

[Autotest PATCH] KVM-test: TSC drift test

2011-04-21 Thread Amos Kong
This case is used to test the drift between host and guest. Use taskset to make tsc program execute in a single cpu. If the drift ratio bigger than 10%, then fail this case. Signed-off-by: Amos Kong ak...@redhat.com --- client/tests/kvm/deps/get_tsc.c| 27 ++ client/tests/kvm

[PATCH] kvm tools: Add robust error handling for fork/waitpid()

2011-04-17 Thread Amos Kong
; + } + } this path does not seem to have robust error handling: both fork() and waitpid() can (and sometimes do) fail. If waitpid() fails then 'status' might be ununitialized as well, IIRC. Thanks, Ingo Signed-off-by: Amos Kong kongjian...@gmail.com --- tools/kvm/virtio-net.c | 11

[PATCH 3/3 v2] kvm tools: Setup bridged network by a script

2011-04-15 Thread Amos Kong
Changes from v1: - rebased to latest tree - replace system() by execv() Signed-off-by: Amos Kong kongjian...@gmail.com --- tools/kvm/include/kvm/virtio-net.h |1 + tools/kvm/kvm-run.c| 10 +- tools/kvm/virtio-net.c | 35 +-- 3

[PATCH 1/3] kvm tools: Add a script to setup private bridge

2011-04-13 Thread Amos Kong
\ --dhcp-range 192.168.33.1,192.168.33.254 Signed-off-by: Amos Kong kongjian...@gmail.com --- tools/kvm/util/set_private_br.sh | 51 ++ 1 files changed, 51 insertions(+), 0 deletions(-) create mode 100755 tools/kvm/util/set_private_br.sh diff --git a/tools

[PATCH 2/3] kvm tools: Add a script to setup tap device

2011-04-13 Thread Amos Kong
# ./kvm-ifup-vbr0 $tap_name Signed-off-by: Amos Kong kongjian...@gmail.com --- tools/kvm/util/kvm-ifup-vbr0 |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) create mode 100755 tools/kvm/util/kvm-ifup-vbr0 diff --git a/tools/kvm/util/kvm-ifup-vbr0 b/tools/kvm/util/kvm-ifup-vbr0

[PATCH 3/3] kvm tools: Setup bridged network by a script

2011-04-13 Thread Amos Kong
Signed-off-by: Amos Kong kongjian...@gmail.com --- tools/kvm/include/kvm/virtio-net.h |2 +- tools/kvm/kvm-run.c|9 - tools/kvm/virtio-net.c | 14 ++ 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/tools/kvm/include/kvm/virtio

Re: [PATCH] kvm tools: Implement exit kvm tools on Ctrl+a+x

2011-04-10 Thread Amos Kong
On Sun, Apr 10, 2011 at 11:13:54AM +0400, Cyrill Gorcunov wrote: On 04/10/2011 11:09 AM, Pekka Enberg wrote: On Sun, Apr 10, 2011 at 9:50 AM, Asias He asias.he...@gmail.com wrote: This patch makes Ctrl+a escape key. Ctrl+a+x will terminate kvm tools. It works for both serial and virtio

Re: [PATCH] kvm tools: Make virt_queue__available return false if queue is not initialized.

2011-04-10 Thread Amos Kong
, used = 0x0}, pfn = 0, last_avail_idx = 0} Reported-by: Amos Kong ak...@redhat.com Signed-off-by: Asias He asias.he...@gmail.com --- tools/kvm/include/kvm/virtio.h | 22 -- tools/kvm/virtio.c | 32 +--- 2 files changed, 29

[RFC] [PATCH v2] kvm tools: Make virt_queue__available return false if queue is not initialized.

2011-04-10 Thread Amos Kong
the check of virt_queue out of virt_queue__get_iov() Reported-by: Amos Kong ak...@redhat.com Signed-off-by: Asias He asias.he...@gmail.com Signed-off-by: Amos Kong ak...@redhat.com --- tools/kvm/include/kvm/virtio.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/tools/kvm

kvm tools: rhel6.0 guest hung during shutdown

2011-04-10 Thread Amos Kong
I try to test with a rhel6.0 guest, it hung during the shutdown. guest)# init 0 guest)# could not read byte from child: Success initctl: Event failed Stopping atd: [ OK ] Stopping abrt daemon: [ OK ] Stopping sshd: [ OK ] Shutting down postfix: [ OK ] Stopping crond: [ OK ] Stopping

Re: [PATCH] kvm tools: Use ioport__register() for legacy devices

2011-04-10 Thread Amos Kong
...@kernel.org Looks good for me. Reviewed-by: Amos Kong ak...@redhat.com --- tools/kvm/include/kvm/ioport.h |2 + tools/kvm/ioport.c | 128 tools/kvm/kvm-run.c|3 + 3 files changed, 57 insertions(+), 76 deletions

Re: vnet0

2011-04-10 Thread Amos Kong
On Sun, Apr 10, 2011 at 08:05:30PM +0530, Onkar Mahajan wrote: What is vnet0 ? I see it when i do ifconfig in the host. Is it a TAP device ?? What's the output of '# brctl show' ? -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

kvm tools: about using virtio-console

2011-04-09 Thread Amos Kong
Hi pekka, Does virtio-console work with kvm-tools? It seems that virtio-console.vps[] is not initialized in virtio-console.c (gdb) r run -i linux-0.2.img -k ./vmlinuz-2.6.38-rc6+ -r ./initrd.img-2.6.38-rc6+ -p=init=1 -m 500 -c Starting program: /project/rh/kvm-tools/tools/kvm/kvm run -i

Re: [Autotest] [PATCH 1/7] KVM test: Move test utilities to client/tools

2011-03-10 Thread Amos Kong
On Wed, Mar 09, 2011 at 06:21:04AM -0300, Lucas Meneghel Rodrigues wrote: The programs cd_hash, html_report, scan_results can be used by other users of autotest, so move them to the tools directory inside the client directory. Signed-off-by: Lucas Meneghel Rodrigues l...@redhat.com ---

[PATCH] KVM-test: Support qxl and vga parameters in make_qemu_command.

2011-03-02 Thread Amos Kong
. Signed-off-by: Feng Yang fy...@redhat.com Signed-off-by: Amos Kong ak...@redhat.com --- client/tests/kvm/kvm_vm.py | 38 client/tests/kvm/tests_base.cfg.sample |4 +++ 2 files changed, 42 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm

[PATCH] KVM-test: Add a new test: privacy test

2011-02-28 Thread Amos Kong
Communicate between two vms, and try to capture packages from another vm in the same lan. This test used tcpdump, so we need limit it with Linux guests. Signed-off-by: Amos Kong ak...@redhat.com --- client/tests/kvm/tests/privacy.py | 44 client/tests/kvm

Re: [PATCH] Remove ethtool from rtl8139 variant

2011-02-18 Thread Amos Kong
On Fri, Feb 18, 2011 at 05:14:09PM -0200, Lucas Meneghel Rodrigues wrote: As the original patch set don't define supported_features for it. Signed-off-by: Lucas Meneghel Rodrigues l...@redhat.com Acked-by: Amos Kong ak...@redhat.com --- client/tests/kvm/tests/ethtool.py |6

Re: [KVM-AUTOTEST PATCH] KVM test: refactor kvm_config.py

2011-02-09 Thread Amos Kong
On Wed, Feb 09, 2011 at 11:28:56AM +0200, Avi Kivity wrote: On 02/09/2011 03:50 AM, Michael Goldish wrote: This is a reimplementation of the dict generator. It is much faster than the current implementation and uses a very small amount of memory. Running time and memory usage scale

Re: [Autotest] [PATCH 1/3] KVM test: Introduce check_image postprocess directive

2011-01-18 Thread Amos Kong
- Original Message - With check_image_foo = yes, KVM autotest will use qemu-img to perform checks on the qcow2 image. This new functionality intends to replace the script check_image.py. The plan is to supersede most of the pre/post scripts in place throughout KVM autotest. Good

<    1   2   3   4   >