Re: [PATCHv5 3/3] vhost_net: a kernel-level virtio server

2009-09-14 Thread Michael S. Tsirkin
On Mon, Sep 14, 2009 at 01:57:06PM +0800, Xin, Xiaohui wrote: The irqfd/ioeventfd patches are part of Avi's kvm.git tree: git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm.git I expect them to be merged by 2.6.32-rc1 - right, Avi? Michael, I think I have the kernel patch for

Re: Running kvm/use/kvmctl just segfault

2009-09-14 Thread shawn du
Thank you for your information. Although those tests will be eliminated, I will try to fix them. I just consider running these tests will be an easier and quicker way for me to dissect kvm. If there is another way, please let me know. Regards, Shawn On Mon, Sep 14, 2009 at 1:12 PM, Avi Kivity

Re: [RFC] KVM: x86: conditionally acquire/release slots_lock on entry/exit

2009-09-14 Thread Avi Kivity
On 09/14/2009 08:03 AM, Avi Kivity wrote: Right it will. But this does not stop the fault path from creating shadow pages with stale sp-gfn (the only way to do that would be mutual exclusion AFAICS). So we put the kvm_mmu_zap_pages() call as part of the synchronize_srcu() callback to take

Re: Running kvm/use/kvmctl just segfault

2009-09-14 Thread Avi Kivity
On 09/14/2009 10:12 AM, shawn du wrote: Thank you for your information. Although those tests will be eliminated, I will try to fix them. I just consider running these tests will be an easier and quicker way for me to dissect kvm. If there is another way, please let me know. I recommend

[PATCH] test: add cr8 latency tests

2009-09-14 Thread Avi Kivity
In light of the recent cr8/ept problem. Signed-off-by: Avi Kivity a...@redhat.com --- kvm/user/test/x86/vmexit.c | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/kvm/user/test/x86/vmexit.c b/kvm/user/test/x86/vmexit.c index bd1895f..cce26d9 100644 ---

Re: [PATCH 01/10] Add test device for use with the test suite

2009-09-14 Thread Gerd Hoffmann
On 09/13/09 17:18, Avi Kivity wrote: The test device implements: - a serial port (0xf1) - an exit port (0xf4) - a memory size port (0xd1) +++ b/hw/pc.c +extern int testdevice; + +if (testdevice) { +create_test_device(ram_size); +} +++ b/qemu-options.hx

Re: [Autotest] [PATCH 12/19] KVM test: Add new module kvm_test_utils.py

2009-09-14 Thread Uri Lublin
On 09/14/2009 08:26 AM, Yolkfull Chow wrote: On Wed, Sep 09, 2009 at 09:12:05PM +0300, Michael Goldish wrote: This module is meant to reduce code size by performing common test procedures. Generally, code here should look like test code. +def wait_for_login(vm, nic_index=0, timeout=240): +

Re: [PATCH 01/10] Add test device for use with the test suite

2009-09-14 Thread Avi Kivity
On 09/14/2009 10:52 AM, Gerd Hoffmann wrote: This is lame, isn't it? We have qdev now! Yes. But who knows how to use it? In my defence, this is a temporary hack and is not intended to be merged upstream. The serial device will be replaced by the standard serial port (or virtio-console),

Re: [Autotest] [PATCH 12/19] KVM test: Add new module kvm_test_utils.py

2009-09-14 Thread Yolkfull Chow
On Mon, Sep 14, 2009 at 10:58:01AM +0300, Uri Lublin wrote: On 09/14/2009 08:26 AM, Yolkfull Chow wrote: On Wed, Sep 09, 2009 at 09:12:05PM +0300, Michael Goldish wrote: This module is meant to reduce code size by performing common test procedures. Generally, code here should look like test

Re: [Autotest] [PATCH 12/19] KVM test: Add new module kvm_test_utils.py

2009-09-14 Thread Michael Goldish
- Uri Lublin u...@redhat.com wrote: On 09/14/2009 08:26 AM, Yolkfull Chow wrote: On Wed, Sep 09, 2009 at 09:12:05PM +0300, Michael Goldish wrote: This module is meant to reduce code size by performing common test procedures. Generally, code here should look like test code. +def

[KVM-AUTOTEST PATCH 1/4] KVM test: migration test: destroy dest_vm if test fails

2009-09-14 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_tests.py | 94 ++--- 1 files changed, 50 insertions(+), 44 deletions(-) diff --git a/client/tests/kvm/kvm_tests.py b/client/tests/kvm/kvm_tests.py index b61d98c..446b415 100644 ---

[KVM-AUTOTEST PATCH 2/4] KVM test: wait_for_login(): include the VM's name in log messages

2009-09-14 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_test_utils.py |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/tests/kvm/kvm_test_utils.py b/client/tests/kvm/kvm_test_utils.py index 39e92b9..9924232 100644 ---

[KVM-AUTOTEST PATCH 3/4] KVM test: kvm_vm.py: wrap VM.destroy() in a try-finally block

2009-09-14 Thread Michael Goldish
This makes the function a little shorter or at least a little cleaner. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_vm.py | 84 ++-- 1 files changed, 42 insertions(+), 42 deletions(-) diff --git

Re: [Autotest] [KVM-AUTOTEST PATCH 0/7] KVM test: support for the new remote shell server for Windows

2009-09-14 Thread Yolkfull Chow
On Tue, Aug 18, 2009 at 06:30:14PM -0400, Michael Goldish wrote: - Lucas Meneghel Rodrigues l...@redhat.com wrote: On Tue, Aug 18, 2009 at 7:15 AM, Michael Goldishmgold...@redhat.com wrote: - Lucas Meneghel Rodrigues l...@redhat.com wrote: Ok, very good, similarly to

Re: [PATCH] Adding a userspace application crash handling system to autotest

2009-09-14 Thread Michael Goldish
I think this is a very useful feature to have. Please see some very minor comments below. - Lucas Meneghel Rodrigues l...@redhat.com wrote: This patch adds a system to watch user space segmentation faults, writing core dumps and some degree of core dump analysis report. We believe that

Re: [PATCH 2/3] add SPTE_HOST_WRITEABLE flag to the shadow ptes

2009-09-14 Thread Marcelo Tosatti
On Thu, Sep 10, 2009 at 07:38:57PM +0300, Izik Eidus wrote: this flag notify that the host physical page we are pointing to from the spte is write protected, and therefore we cant change its access to be write unless we run get_user_pages(write = 1). (this is needed for change_pte support in

[PATCH 2/2] test-device: add support for irq injection

2009-09-14 Thread Avi Kivity
This allows apic.flat to pass. Signed-off-by: Avi Kivity a...@redhat.com --- hw/pc.c | 18 +- 1 files changed, 13 insertions(+), 5 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 360dbfb..ea31b0f 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -1131,12 +1131,20 @@ static uint32_t

[PATCH 0/2] Make apic.flat test pass again

2009-09-14 Thread Avi Kivity
The apic test doesn't run under qemu; this patchset make it pass again. Avi Kivity (2): test: Mask PIC interrupts before APIC test test-device: add support for irq injection hw/pc.c | 18 +- kvm/user/test/x86/apic.c | 13 + 2 files changed,

[PATCH 1/2] test: Mask PIC interrupts before APIC test

2009-09-14 Thread Avi Kivity
We aren't ready to handle PIC interrupts, so mask them. Signed-off-by: Avi Kivity a...@redhat.com --- kvm/user/test/x86/apic.c | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/kvm/user/test/x86/apic.c b/kvm/user/test/x86/apic.c index 7794615..b712ef8 100644

Re: [Autotest] [KVM-AUTOTEST PATCH 0/7] KVM test: support for the new remote shell server for Windows

2009-09-14 Thread Michael Goldish
- Yolkfull Chow yz...@redhat.com wrote: On Tue, Aug 18, 2009 at 06:30:14PM -0400, Michael Goldish wrote: - Lucas Meneghel Rodrigues l...@redhat.com wrote: On Tue, Aug 18, 2009 at 7:15 AM, Michael Goldishmgold...@redhat.com wrote: - Lucas Meneghel Rodrigues

Re: Running kvm/use/kvmctl just segfault

2009-09-14 Thread Marcelo Tosatti
On Mon, Sep 14, 2009 at 10:18:32AM +0300, Avi Kivity wrote: On 09/14/2009 10:12 AM, shawn du wrote: Thank you for your information. Although those tests will be eliminated, I will try to fix them. I just consider running these tests will be an easier and quicker way for me to dissect kvm.

Re: [PATCH 01/10] Add test device for use with the test suite

2009-09-14 Thread Avi Kivity
On 09/14/2009 03:59 PM, Anthony Liguori wrote: Avi Kivity wrote: The test device implements: - a serial port (0xf1) - an exit port (0xf4) - a memory size port (0xd1) It is planned to replace these with the standard serial and firmware configuration ports. Signed-off-by: Avi Kivity

[PATCH 3/3] test: add x2apic test

2009-09-14 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- kvm/user/test/x86/apic.c | 46 ++ 1 files changed, 46 insertions(+), 0 deletions(-) diff --git a/kvm/user/test/x86/apic.c b/kvm/user/test/x86/apic.c index fdeec4c..504def2 100644 ---

[PATCH 2/3] test: use new apic_icr_write() to issue IPI

2009-09-14 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- kvm/user/test/x86/apic.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kvm/user/test/x86/apic.c b/kvm/user/test/x86/apic.c index 72dd963..fdeec4c 100644 --- a/kvm/user/test/x86/apic.c +++ b/kvm/user/test/x86/apic.c @@

[PATCH 1/3] test: Use function table for APIC access

2009-09-14 Thread Avi Kivity
Prepare for x2apic. Signed-off-by: Avi Kivity a...@redhat.com --- kvm/user/test/x86/apic.c | 41 +++-- 1 files changed, 39 insertions(+), 2 deletions(-) diff --git a/kvm/user/test/x86/apic.c b/kvm/user/test/x86/apic.c index b712ef8..72dd963 100644 ---

[PATCH 0/3] Add x2apic mode to apic test

2009-09-14 Thread Avi Kivity
Adapt the apic test code to also test x2apic mode. Avi Kivity (3): test: Use function table for APIC access test: use new apic_icr_write() to issue IPI test: add x2apic test kvm/user/test/x86/apic.c | 91 -- 1 files changed, 87 insertions(+),

Re: [PATCH] Activate Virtualization On Demand

2009-09-14 Thread Marcelo Tosatti
On Wed, Sep 09, 2009 at 04:18:58PM +0200, Alexander Graf wrote: X86 CPUs need to have some magic happening to enable the virtualization extensions on them. This magic can result in unpleasant results for users, like blocking other VMMs from working (vmx) or using invalid TLB entries (svm).

Re: [PATCH 01/10] Add test device for use with the test suite

2009-09-14 Thread Avi Kivity
On 09/14/2009 11:01 AM, Avi Kivity wrote: On 09/14/2009 10:52 AM, Gerd Hoffmann wrote: This is lame, isn't it? We have qdev now! Yes. But who knows how to use it? Didn't notice you had a patch there. Thanks. Will repost with your patch. -- error compiling committee.c: too many arguments

Re: [PATCH] Activate Virtualization On Demand

2009-09-14 Thread Marcelo Tosatti
On Mon, Sep 14, 2009 at 05:52:48PM +0200, Alexander Graf wrote: On 14.09.2009, at 15:23, Marcelo Tosatti wrote: On Wed, Sep 09, 2009 at 04:18:58PM +0200, Alexander Graf wrote: X86 CPUs need to have some magic happening to enable the virtualization extensions on them. This magic can result

Re: [PATCH] Activate Virtualization On Demand

2009-09-14 Thread Alexander Graf
On 14.09.2009, at 18:14, Marcelo Tosatti wrote: On Mon, Sep 14, 2009 at 05:52:48PM +0200, Alexander Graf wrote: On 14.09.2009, at 15:23, Marcelo Tosatti wrote: On Wed, Sep 09, 2009 at 04:18:58PM +0200, Alexander Graf wrote: X86 CPUs need to have some magic happening to enable the

pci: is reset incomplete?

2009-09-14 Thread Michael S. Tsirkin
Hi! pci bus reset does not seem to clear pci config registers, such as BAR registers, or memory space enable, of the attached devices: it only clears the interrupt state. This seems wrong, but easy to fix. Comments? -- MST -- To unsubscribe from this list: send the line unsubscribe kvm in the

Re: Running kvm/use/kvmctl just segfault

2009-09-14 Thread Avi Kivity
On 09/14/2009 06:38 PM, shawn du wrote: Well, in fact not only the smp test failed, all tests failed. I don't know it is just me or not. But after debugging the kvmctl main.c and libkvm.c code, I found out that it is the invocation to pre_kvm_run() and post_kvm_run() caused the segfault, it is

Re: [PATCHv5 3/3] vhost_net: a kernel-level virtio server

2009-09-14 Thread Gregory Haskins
Michael S. Tsirkin wrote: On Fri, Sep 11, 2009 at 12:00:21PM -0400, Gregory Haskins wrote: FWIW: VBUS handles this situation via the memctx abstraction. IOW, the memory is not assumed to be a userspace address. Rather, it is a memctx-specific address, which can be userspace, or any other

Re: [PATCH] Activate Virtualization On Demand

2009-09-14 Thread Marcelo Tosatti
On Mon, Sep 14, 2009 at 06:25:20PM +0200, Alexander Graf wrote: having succeeded. The hardware_enable_all caller calls hardware_disable_all (kvm_usage_count--) when enabling fails. But it does not hold any lock in between hardware_enable_all and hardware_disable_all. So its unsafe if

Re: [PATCHv5 3/3] vhost_net: a kernel-level virtio server

2009-09-14 Thread Michael S. Tsirkin
On Mon, Sep 14, 2009 at 12:08:55PM -0400, Gregory Haskins wrote: For Ira's example, the addresses would represent a physical address on the PCI boards, and would follow any kind of relevant rules for converting a GPA to a host accessible address (even if indirectly, via a dma controller). I

Re: [PATCH] Activate Virtualization On Demand

2009-09-14 Thread Alexander Graf
On 14.09.2009, at 18:46, Marcelo Tosatti wrote: On Mon, Sep 14, 2009 at 06:25:20PM +0200, Alexander Graf wrote: having succeeded. The hardware_enable_all caller calls hardware_disable_all (kvm_usage_count--) when enabling fails. But it does not hold any lock in between hardware_enable_all

Re: [PATCHv5 3/3] vhost_net: a kernel-level virtio server

2009-09-14 Thread Michael S. Tsirkin
On Mon, Sep 14, 2009 at 12:08:55PM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: On Fri, Sep 11, 2009 at 12:00:21PM -0400, Gregory Haskins wrote: FWIW: VBUS handles this situation via the memctx abstraction. IOW, the memory is not assumed to be a userspace address. Rather, it is

Re: [PATCH 2/3] add SPTE_HOST_WRITEABLE flag to the shadow ptes

2009-09-14 Thread Izik Eidus
Marcelo Tosatti wrote: Why can't you use the writable bit in the spte? So that you can only sync a writeable spte if it was writeable before, in sync_page? I could, but there we will add overhead for read only gptes that become writable in the guest... If you prefer to fault on the syncing

Re: [PATCH 2/3] add SPTE_HOST_WRITEABLE flag to the shadow ptes

2009-09-14 Thread Marcelo Tosatti
On Mon, Sep 14, 2009 at 07:51:16PM +0300, Izik Eidus wrote: Marcelo Tosatti wrote: Why can't you use the writable bit in the spte? So that you can only sync a writeable spte if it was writeable before, in sync_page? I could, but there we will add overhead for read only gptes that become

Re: Running kvm/use/kvmctl just segfault

2009-09-14 Thread shawn du
Well, in fact not only the smp test failed, all tests failed. I don't know it is just me or not. But after debugging the kvmctl main.c and libkvm.c code, I found out that it is the invocation to pre_kvm_run() and post_kvm_run() caused the segfault, it is really mysterious. Then I just commented

Re: pci: is reset incomplete?

2009-09-14 Thread Anthony Liguori
Michael S. Tsirkin wrote: Hi! pci bus reset does not seem to clear pci config registers, such as BAR registers, or memory space enable, of the attached devices: it only clears the interrupt state. This seems wrong, but easy to fix. I don't think most pci devices reset their config space in

Re: [Autotest] [PATCH] Adding a userspace application crash handling system to autotest

2009-09-14 Thread John Admanski
Sorry, I haven't had time to take a look yet. Been busy. :( I'll try and get in a review some time today. -- John On Sun, Sep 13, 2009 at 9:40 PM, Lucas Meneghel Rodrigues l...@redhat.com wrote: Hi John, do you think the code looks good enough for inclusion? On Tue, Sep 8, 2009 at 10:53 AM,

Re: [PATCH] Activate Virtualization On Demand

2009-09-14 Thread Alexander Graf
On 14.09.2009, at 15:23, Marcelo Tosatti wrote: On Wed, Sep 09, 2009 at 04:18:58PM +0200, Alexander Graf wrote: X86 CPUs need to have some magic happening to enable the virtualization extensions on them. This magic can result in unpleasant results for users, like blocking other VMMs from

Re: pci: is reset incomplete?

2009-09-14 Thread Michael S. Tsirkin
On Mon, Sep 14, 2009 at 12:15:29PM -0500, Anthony Liguori wrote: Michael S. Tsirkin wrote: Hi! pci bus reset does not seem to clear pci config registers, such as BAR registers, or memory space enable, of the attached devices: it only clears the interrupt state. This seems wrong, but easy to

[GIT PULL][RESEND]KVM updates for 2.6.32-rc1

2009-09-14 Thread Avi Kivity
Linus, please pull from git://git.kernel.org/pub/scm/virt/kvm/kvm.git kvm-updates/2.6.32 to receive the KVM updates for this cycle. Changes include - support for injecting MCEs into guests - irqfd/ioeventfd, an eventfd-based mechanism to connect user- and kernel- based components to guests

Re: [PATCHv5 3/3] vhost_net: a kernel-level virtio server

2009-09-14 Thread Gregory Haskins
Michael S. Tsirkin wrote: On Mon, Sep 14, 2009 at 12:08:55PM -0400, Gregory Haskins wrote: For Ira's example, the addresses would represent a physical address on the PCI boards, and would follow any kind of relevant rules for converting a GPA to a host accessible address (even if indirectly,

Re: [PATCHv5 3/3] vhost_net: a kernel-level virtio server

2009-09-14 Thread Gregory Haskins
Michael S. Tsirkin wrote: On Mon, Sep 14, 2009 at 12:08:55PM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: On Fri, Sep 11, 2009 at 12:00:21PM -0400, Gregory Haskins wrote: FWIW: VBUS handles this situation via the memctx abstraction. IOW, the memory is not assumed to be a userspace

Re: pci: is reset incomplete?

2009-09-14 Thread Anthony Liguori
Michael S. Tsirkin wrote: On Mon, Sep 14, 2009 at 12:15:29PM -0500, Anthony Liguori wrote: Michael S. Tsirkin wrote: Hi! pci bus reset does not seem to clear pci config registers, such as BAR registers, or memory space enable, of the attached devices: it only clears the interrupt

Re: kvm scaling question

2009-09-14 Thread Bruce Rogers
On 9/11/2009 at 9:46 AM, Javier Guerra jav...@guerrag.com wrote: On Fri, Sep 11, 2009 at 10:36 AM, Bruce Rogers brog...@novell.com wrote: Also, when I did a simple experiment with vcpu overcommitment, I was surprised how quickly performance suffered (just bringing a Linux vm up), since I

Re: kvm scaling question

2009-09-14 Thread Bruce Rogers
On 9/11/2009 at 3:53 PM, Marcelo Tosatti mtosa...@redhat.com wrote: On Fri, Sep 11, 2009 at 09:36:10AM -0600, Bruce Rogers wrote: I am wondering if anyone has investigated how well kvm scales when supporting many guests, or many vcpus or both. I'll do some investigations into the per vm

Re: kvm scaling question

2009-09-14 Thread Bruce Rogers
On 9/11/2009 at 5:02 PM, Andre Przywara andre.przyw...@amd.com wrote: Marcelo Tosatti wrote: On Fri, Sep 11, 2009 at 09:36:10AM -0600, Bruce Rogers wrote: I am wondering if anyone has investigated how well kvm scales when supporting many guests, or many vcpus or both. I'll do some

[PATCH] Add pass through feature test (support SR-IOV)

2009-09-14 Thread Yolkfull Chow
It supports both SR-IOV virtual functions' and physical NIC card pass through. * For SR-IOV virtual functions passthrough, we could specify the module parameter 'max_vfs' in config file. * For physical NIC card pass through, we should specify the device name(s). Signed-off-by: Yolkfull

Re: Running kvm/use/kvmctl just segfault

2009-09-14 Thread shawn du
Yes, I am running the latest qemu-kvm.git against the not so latest 2.6.27.18 kernel in Ubuntu 8.10. Normal VMs just run smoothly. Is there a problem? Shawn On Mon, Sep 14, 2009 at 11:50 PM, Avi Kivity a...@redhat.com wrote: On 09/14/2009 06:38 PM, shawn du wrote: Well, in fact not only the