[PATCH 1/8] KVM: fix tracing kvm_try_async_get_page

2010-10-27 Thread Xiao Guangrong
Tracing 'async' and *pfn is useless, since 'async' is always true, and '*pfn' is always fault_pfn' We can trace 'gva' and 'gfn' instead, it can help us to see the life-cycle of an async_pf Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c |2 +-

[PATCH 2/8] KVM: cleanup aysnc_pf tracepoints

2010-10-27 Thread Xiao Guangrong
Use 'DECLARE_EVENT_CLASS' to cleanup async_pf tracepoints Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- include/trace/events/kvm.h | 76 --- 1 files changed, 35 insertions(+), 41 deletions(-) diff --git a/include/trace/events/kvm.h

[PATCH 3/8] KVM: fix searching async gfn in kvm_async_pf_gfn_slot

2010-10-27 Thread Xiao Guangrong
The 'gfn' is not recorded if the next slot is empty Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/x86.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 7876ec8..16f42ff 100644 ---

[PATCH 4/8] KVM: avoid unnecessary wait for a async pf

2010-10-27 Thread Xiao Guangrong
In current code, it checks async pf completion out of the wait context, like this: if (vcpu-arch.mp_state == KVM_MP_STATE_RUNNABLE !vcpu-arch.apf.halted) r = vcpu_enter_guest(vcpu); else { ..

[PATCH 5/8] KVM: don't touch vcpu stat after async pf is complete

2010-10-27 Thread Xiao Guangrong
Don't make a KVM_REQ_UNHALT request after async pf is completed since it can break guest's 'halt' instruction. Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/include/asm/kvm_host.h |1 + arch/x86/kvm/x86.c |5 + virt/kvm/async_pf.c |

[PATCH 6/8] KVM: simply wakup async pf

2010-10-27 Thread Xiao Guangrong
The current way is queued a complete async pf with: asyc_pf.page = bad_page async_pf.arch.gfn = 0 It has two problems while kvm_check_async_pf_completion handle this async_pf: - since !async_pf.page, it can retry a pseudo #PF - it can delete gfn 0 from vcpu-arch.apf.gfns[]

[PATCH 7/8] KVM: make async_pf work queue lockless

2010-10-27 Thread Xiao Guangrong
The async_pf number is very few since only pending interrupt can let it re-enter to the guest mode. During my test(Host 4 CPU + 4G, Guest 4 VCPU + 6G), it's no more than 10 requests in the system. So, we can only increase the completion counter in the work queue context, and walk

[PATCH 8/8] KVM: add debugfs file to show the number of async pf

2010-10-27 Thread Xiao Guangrong
It can help us to see the state of async pf Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/x86.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index c0e7ad0..2dd8059 100644 --- a/arch/x86/kvm/x86.c

Re: [KVM-AUTOTEST PATCH 4/5] KVM test: kvm_subprocess: rename get_command_status_output() and friends

2010-10-27 Thread Michael Goldish
On 10/27/2010 07:59 AM, Feng Yang wrote: - Michael Goldish mgold...@redhat.com wrote: From: Michael Goldish mgold...@redhat.com To: autot...@test.kernel.org, kvm@vger.kernel.org Cc: Michael Goldish mgold...@redhat.com Sent: Wednesday, October 27, 2010 12:49:43 AM GMT +08:00 Beijing /

Re: KVM: MMU: fix rmap_remove on non present sptes

2010-10-27 Thread Avi Kivity
On 10/25/2010 03:58 PM, Marcelo Tosatti wrote: drop_spte should not attempt to rmap_remove a non present shadow pte. This fixes a BUG_ON seen on kvm-autotest. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line

Re: [patch 0/4] support read-only mappings (v2)

2010-10-27 Thread Avi Kivity
On 10/22/2010 06:18 PM, Marcelo Tosatti wrote: v2: - remove kvm_mmu_set_base_ptes - fix mmu_set_spte overwrite thinko Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

[PATCH 0/3] KVM: dirty logging optimization - double buffering

2010-10-27 Thread Takuya Yoshikawa
This patch series just change the way we allocate dirty bitmaps but don't change timing related issues. - Changelog I have not changed anything about patch 1 and 2 since I got looks good comment from Marcelo. Just rebased. Patch 3 has become simpler by rebasing on top of this series.

[PATCH 1/3 rebased] KVM: introduce wrapper functions for creating/destroying dirty bitmaps

2010-10-27 Thread Takuya Yoshikawa
This makes it easy to change the way of allocating/freeing dirty bitmaps. Signed-off-by: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp Signed-off-by: Fernando Luis Vazquez Cao ferna...@oss.ntt.co.jp --- virt/kvm/kvm_main.c | 30 +++--- 1 files changed, 23

[PATCH 2/3 rebased] KVM: pre-allocate one more dirty bitmap to avoid vmalloc()

2010-10-27 Thread Takuya Yoshikawa
Currently x86's kvm_vm_ioctl_get_dirty_log() needs to allocate a bitmap by vmalloc() which will be used in the next logging and this has been causing bad effect to VGA and live-migration: vmalloc() consumes extra systime, triggers tlb flush, etc. This patch resolves this issue by pre-allocating

[PATCH 3/3 rebased] KVM: use kmalloc() for small dirty bitmaps

2010-10-27 Thread Takuya Yoshikawa
Currently we are using vmalloc() for all dirty bitmaps even if they are small enough, say less than K bytes. We use kmalloc() if dirty bitmap size is less than or equal to PAGE_SIZE so that we can avoid vmalloc area usage for VGA. Signed-off-by: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp

Re: [Qemu-devel] [PATCH 1/2] Type-safe ioport callbacks

2010-10-27 Thread Avi Kivity
On 10/26/2010 08:33 PM, Blue Swirl wrote: Why two types? I think some devices use PIO on a PC and MMIO on other architectures. Sharing the type would allow sharing code. Then there are the functions provided by rwhandler.c. I think that interface makes even more sense compared to

[KVM-AUTOTEST PATCH] KVM test: kvm_vm.py: style corrections in add_nic() and add_net()

2010-10-27 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_vm.py | 25 +++-- 1 files changed, 11 insertions(+), 14 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index bb24c6a..02d7dff 100755 ---

[KVM-AUTOTEST PATCH] KVM test: VM.create(): fix netdev_id generation

2010-10-27 Thread Michael Goldish
Clear the list of netdev IDs before generating new ones. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_vm.py |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index 02d7dff..a65e2e9

[KVM-AUTOTEST PATCH] KVM test: kvm_subprocess: add aliases for cmd_* functions for backward compatibility

2010-10-27 Thread Michael Goldish
Add aliases to maintain compatibility with tests that use the long names. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_subprocess.py | 25 + 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_subprocess.py

Re: [PATCH 1/8] KVM: fix tracing kvm_try_async_get_page

2010-10-27 Thread Gleb Natapov
On Wed, Oct 27, 2010 at 05:01:49PM +0800, Xiao Guangrong wrote: Tracing 'async' and *pfn is useless, since 'async' is always true, and '*pfn' is always fault_pfn' We can trace 'gva' and 'gfn' instead, it can help us to see the life-cycle of an async_pf Make sense. This is leftover from

Re: [PATCH 2/8] KVM: cleanup aysnc_pf tracepoints

2010-10-27 Thread Gleb Natapov
On Wed, Oct 27, 2010 at 05:02:50PM +0800, Xiao Guangrong wrote: Use 'DECLARE_EVENT_CLASS' to cleanup async_pf tracepoints Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Nice Acked-by: Gleb Natapov g...@redhat.com --- include/trace/events/kvm.h | 76

Re: [PATCH 3/8] KVM: fix searching async gfn in kvm_async_pf_gfn_slot

2010-10-27 Thread Gleb Natapov
On Wed, Oct 27, 2010 at 05:03:33PM +0800, Xiao Guangrong wrote: The 'gfn' is not recorded if the next slot is empty This function is not used for gfn recording, only to search for recorded gfn, but without the fix it walks over all entries if gfn is not in the hash. Signed-off-by: Xiao

Re: [PATCH 4/8] KVM: avoid unnecessary wait for a async pf

2010-10-27 Thread Gleb Natapov
On Wed, Oct 27, 2010 at 05:04:58PM +0800, Xiao Guangrong wrote: In current code, it checks async pf completion out of the wait context, like this: if (vcpu-arch.mp_state == KVM_MP_STATE_RUNNABLE !vcpu-arch.apf.halted) r = vcpu_enter_guest(vcpu);

Re: [PATCH 5/8] KVM: don't touch vcpu stat after async pf is complete

2010-10-27 Thread Gleb Natapov
On Wed, Oct 27, 2010 at 05:05:57PM +0800, Xiao Guangrong wrote: Don't make a KVM_REQ_UNHALT request after async pf is completed since it can break guest's 'halt' instruction. Why is it a problem? CPU may be unhalted by different events so OS shouldn't depend on it. Signed-off-by: Xiao

Re: fyi: gcc33-hammer crashes when compiling kvm emulate.c

2010-10-27 Thread Avi Kivity
On 10/26/2010 10:37 PM, H. Peter Anvin wrote: On 10/26/2010 01:27 PM, Andi Kleen wrote: That is an issue too, as 3.x does a lot fewer optimizations than 4.x. Well to be fair the default -Os build disables most of the fancy stuff (and the resulting code is often terrible) I guess it

Re: [PATCH 6/8] KVM: simply wakup async pf

2010-10-27 Thread Gleb Natapov
On Wed, Oct 27, 2010 at 05:07:32PM +0800, Xiao Guangrong wrote: The current way is queued a complete async pf with: asyc_pf.page = bad_page async_pf.arch.gfn = 0 It has two problems while kvm_check_async_pf_completion handle this async_pf: - since !async_pf.page, it can retry a

Re: [PATCH 8/8] KVM: add debugfs file to show the number of async pf

2010-10-27 Thread Gleb Natapov
On Wed, Oct 27, 2010 at 05:10:51PM +0800, Xiao Guangrong wrote: It can help us to see the state of async pf I have patch to add three async pf statistics: apf_not_present apf_present apf_doublefault But Avi now wants to deprecate debugfs interface completely and move towards ftrace, so I had

Re: [PATCH 7/8] KVM: make async_pf work queue lockless

2010-10-27 Thread Gleb Natapov
On Wed, Oct 27, 2010 at 05:09:41PM +0800, Xiao Guangrong wrote: The async_pf number is very few since only pending interrupt can let it re-enter to the guest mode. During my test(Host 4 CPU + 4G, Guest 4 VCPU + 6G), it's no more than 10 requests in the system. So, we can only increase the

Re: [Autotest] [KVM-AUTOTEST PATCH 4/5] KVM test: kvm_subprocess: rename get_command_status_output() and friends

2010-10-27 Thread Lucas Meneghel Rodrigues
On Wed, 2010-10-27 at 01:59 -0400, Feng Yang wrote: - Michael Goldish mgold...@redhat.com wrote: From: Michael Goldish mgold...@redhat.com To: autot...@test.kernel.org, kvm@vger.kernel.org Cc: Michael Goldish mgold...@redhat.com Sent: Wednesday, October 27, 2010 12:49:43 AM GMT

Re: [SeaBIOS] [PATCH] mark irq9 active high in DSDT

2010-10-27 Thread Avi Kivity
On 10/25/2010 12:52 PM, Avi Kivity wrote: I'm okay with making tags and branches of seabios for bug fixes. So far qemu/kvm has just grabbed various builds of seabios - is it worthwhile to branch off of the seabios-0.6.1 version - which would mean qemu/kvm would pull in additional changes

Re: [PATCH iproute2] Add passthru mode and support 'mode' parameter with macvtap devices

2010-10-27 Thread Arnd Bergmann
On Wednesday 27 October 2010, Sridhar Samudrala wrote: Support a new 'passthru' mode with macvlan and 'mode' parameter with macvtap devices. Signed-off-by: Sridhar Samudrala s...@us.ibm.com Can you split this into two patches? We definitely want the part adding support for macvtap device

Re: [RFC PATCH] macvlan: Introduce a PASSTHRU mode to takeover the underlying device

2010-10-27 Thread Arnd Bergmann
On Wednesday 27 October 2010, Sridhar Samudrala wrote: With the current default macvtap mode, a KVM guest using virtio with macvtap backend has the following limitations. - cannot change/add a mac address on the guest virtio-net - cannot create a vlan device on the guest virtio-net - cannot

Re: KVM devices assignment; PCIe AER?

2010-10-27 Thread Etienne Martineau
On Wed, 27 Oct 2010, Alex Williamson wrote: I've actually been working on porting the qemu vfio driver over to qemu-kvm recently, and nearly have it working. For MSI-X interrupts I've ported to the common msix.c code, which abstracts how the interrupt is actually sent to the guest. I've also

Re: extraneous allocation in qemu-kvm's hw/pc_piix.c

2010-10-27 Thread Tim Pepper
(apologies for double posting of this message...mail client fubar) -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [Xen-devel] Re: [PATCH] x86/pvclock-xen: zero last_value on resume

2010-10-27 Thread Jeremy Fitzhardinge
On 10/26/2010 10:48 AM, Glauber Costa wrote: On Tue, 2010-10-26 at 09:59 -0700, Jeremy Fitzhardinge wrote: If the guest domain has been suspend/resumed or migrated, then the system clock backing the pvclock clocksource may revert to a smaller value (ie, can be non-monotonic across the

Re: KVM devices assignment; PCIe AER?

2010-10-27 Thread Alex Williamson
On Wed, 2010-10-27 at 11:23 -0700, Etienne Martineau wrote: On Wed, 27 Oct 2010, Alex Williamson wrote: I've actually been working on porting the qemu vfio driver over to qemu-kvm recently, and nearly have it working. For MSI-X interrupts I've ported to the common msix.c code, which

Re: [Qemu-devel] [PATCH 1/2] Type-safe ioport callbacks

2010-10-27 Thread Blue Swirl
On Wed, Oct 27, 2010 at 9:26 AM, Avi Kivity a...@redhat.com wrote:  On 10/26/2010 08:33 PM, Blue Swirl wrote:  Why two types?  I think some devices use PIO on a PC and MMIO on other  architectures.  Sharing the type would allow sharing code. Then there are the functions provided by

Re: [Autotest] [PATCH] KVM Test: add -w parameter in nc command in kvm_utils.py

2010-10-27 Thread Lucas Meneghel Rodrigues
On Wed, 2010-10-20 at 14:55 +0800, Feng Yang wrote: If a connection and stdin are idle for more than timeout seconds, then the connection is silently closed. withou this paramter, nc will listen forever for a connection. This may cause our test hang. redmine issue:

Re: [Xen-devel] Re: [PATCH] x86/pvclock-xen: zero last_value on resume

2010-10-27 Thread H. Peter Anvin
I'll check it this evening when I'm at a working network again :( Jeremy Fitzhardinge jer...@goop.org wrote: On 10/26/2010 10:48 AM, Glauber Costa wrote: On Tue, 2010-10-26 at 09:59 -0700, Jeremy Fitzhardinge wrote: If the guest domain has been suspend/resumed or migrated, then the system

Re: [PATCH] [PATCH V2] patch to enable installing cygwin and running autotest in windows guests

2010-10-27 Thread Lucas Meneghel Rodrigues
On Mon, 2010-09-27 at 17:43 +0530, Yogananth Subramanian wrote: The patch creates two new files 'scripts/cyg_install.py' and 'tests/cyg_install'. 'scripts/cyg_install.py' is used to install cygwin in unattended mode. This patch also introduces a new parameter 'patch_file'to run_autotest() in

[RFC PATCH 0/1] vhost: Reduce TX used buffer signal for performance

2010-10-27 Thread Shirley Ma
This patch will change vhost TX used buffer guest signaling from one by one to 3/4 ring size. I have tried different size, like 4, 16, 1/4 size, 1/2 size, and found that the large size is best for message size between 256 - 4K with netperf TCP_STREAM test, so 3/4 of the ring size is picked up for

Re: [RFC PATCH 0/1] vhost: Reduce TX used buffer signal for performance

2010-10-27 Thread Shirley Ma
This patch changes vhost TX used buffer signal to guest from one by one to up to 3/4 of vring size. This change improves vhost TX message size from 256 to 8K performance for both bandwidth and CPU utilization without inducing any regression. Signed-off-by: Shirley Ma x...@us.ibm.com ---

Re: [KVM-AUTOTEST PATCH 5/5] [RFC] KVM test: kvm_subprocess: rename kvm_shell_session and friends

2010-10-27 Thread Lucas Meneghel Rodrigues
On Tue, 2010-10-26 at 18:49 +0200, Michael Goldish wrote: PEP 8 states that class names should use the CapWords convention. kvm_spawn - Spawn kvm_tail - Tail kvm_expect - Expect kvm_shell_session - ShellSession This is an RFC because I wonder if the proposed names are too general, even

Re: KVM devices assignment; PCIe AER?

2010-10-27 Thread Etienne Martineau
On Wed, 27 Oct 2010, Alex Williamson wrote: No, emulated devices trigger interrupts directly with qemu_set_irq. irqfds are currently only used by vhost afaik, since it's being interrupted externally, much like pass through devices are. Fair enough. Thanks for the clarification. Sort of.

[RFC PATCH 1/1] vhost: TX used buffer guest signal accumulation

2010-10-27 Thread Shirley Ma
This patch changes vhost TX used buffer guest signal from one by one to 3/4 of vring size. This change improves vhost TX transmission both bandwidth and CPU utilization performance for 256 to 8K messages s ize without inducing any regression. Signed-off-by: Shirley Ma x...@us.ibm.com ---

Re: KVM devices assignment; PCIe AER?

2010-10-27 Thread Alex Williamson
On Wed, 2010-10-27 at 14:43 -0700, Etienne Martineau wrote: On Wed, 27 Oct 2010, Alex Williamson wrote: No, emulated devices trigger interrupts directly with qemu_set_irq. irqfds are currently only used by vhost afaik, since it's being interrupted externally, much like pass through devices

Attempting to achieve 1920x2400 VGA resolution

2010-10-27 Thread Craig Johnston
I've been attempting to patch up the qemu-kvm package to allow me to achieve a display resolution of 1920x2400. I followed the suggestions from the Wiki FAQ on the subject, but ran into a wall. I patched up the hw/vga_int.h file to bump VBE_DISPI_MAX_YRES to 2400, and (as a test) replaced the

Re: [Autotest] [PATCH] KVM Test: add -w parameter in nc command in kvm_utils.py

2010-10-27 Thread Feng Yang
- Lucas Meneghel Rodrigues l...@redhat.com wrote: From: Lucas Meneghel Rodrigues l...@redhat.com To: Feng Yang fy...@redhat.com Cc: autot...@test.kernel.org, kvm@vger.kernel.org Sent: Thursday, October 28, 2010 4:26:17 AM GMT +08:00 Beijing / Chongqing / Hong Kong / Urumqi Subject:

Re: [RFC PATCH 1/1] vhost: TX used buffer guest signal accumulation

2010-10-27 Thread Shirley Ma
Resubmit this patch for fixing some minor error (white space, typo). Signed-off-by: Shirley Ma x...@us.ibm.com --- drivers/vhost/net.c | 20 +++- drivers/vhost/vhost.c | 32 drivers/vhost/vhost.h |3 +++ 3 files changed, 54

Re: KVM devices assignment; PCIe AER?

2010-10-27 Thread Michael S. Tsirkin
On Wed, Oct 27, 2010 at 04:58:20PM -0600, Alex Williamson wrote: On Wed, 2010-10-27 at 14:43 -0700, Etienne Martineau wrote: On Wed, 27 Oct 2010, Alex Williamson wrote: No, emulated devices trigger interrupts directly with qemu_set_irq. irqfds are currently only used by vhost afaik, since

Re: [v3 RFC PATCH 0/4] Implement multiqueue virtio-net

2010-10-27 Thread Krishna Kumar2
Michael S. Tsirkin m...@redhat.com wrote on 10/26/2010 04:39:13 PM: (merging two posts into one) I think we discussed the need for external to guest testing over 10G. For large messages we should not see any change but you should be able to get better numbers for small messages assuming a MQ

Re: KVM devices assignment; PCIe AER?

2010-10-27 Thread Alex Williamson
On Thu, 2010-10-28 at 06:58 +0200, Michael S. Tsirkin wrote: On Wed, Oct 27, 2010 at 04:58:20PM -0600, Alex Williamson wrote: On Wed, 2010-10-27 at 14:43 -0700, Etienne Martineau wrote: On Wed, 27 Oct 2010, Alex Williamson wrote: No, emulated devices trigger interrupts directly with

Re: [RFC PATCH 1/1] vhost: TX used buffer guest signal accumulation

2010-10-27 Thread Michael S. Tsirkin
On Wed, Oct 27, 2010 at 09:40:04PM -0700, Shirley Ma wrote: Resubmit this patch for fixing some minor error (white space, typo). Signed-off-by: Shirley Ma x...@us.ibm.com My concern is this can delay signalling for unlimited time. Could you pls test this with guests that do not have

Re: KVM devices assignment; PCIe AER?

2010-10-27 Thread Michael S. Tsirkin
On Wed, Oct 27, 2010 at 11:17:42PM -0600, Alex Williamson wrote: On Thu, 2010-10-28 at 06:58 +0200, Michael S. Tsirkin wrote: On Wed, Oct 27, 2010 at 04:58:20PM -0600, Alex Williamson wrote: On Wed, 2010-10-27 at 14:43 -0700, Etienne Martineau wrote: On Wed, 27 Oct 2010, Alex Williamson

Re: [v3 RFC PATCH 0/4] Implement multiqueue virtio-net

2010-10-27 Thread Michael S. Tsirkin
On Thu, Oct 28, 2010 at 10:44:14AM +0530, Krishna Kumar2 wrote: Michael S. Tsirkin m...@redhat.com wrote on 10/26/2010 04:39:13 PM: (merging two posts into one) I think we discussed the need for external to guest testing over 10G. For large messages we should not see any change but you