Re: [PATCH 0/2] vhot-net: Use kvm_memslots instead of vhost_memory to translate GPA to HVA

2011-12-16 Thread Sasha Levin
On Fri, 2011-12-16 at 15:40 +0800, Zang Hongyong wrote: 于 2011/12/16,星期五 15:05, Sasha Levin 写道: On Fri, 2011-12-16 at 13:32 +0800, zanghongy...@huawei.com wrote: From: Hongyong Zangzanghongy...@huawei.com Vhost-net uses its own vhost_memory, which results from user space (qemu) info,

Re: [PATCH 0/2] vhot-net: Use kvm_memslots instead of vhost_memory to translate GPA to HVA

2011-12-16 Thread Sasha Levin
On Fri, 2011-12-16 at 09:59 +0200, Sasha Levin wrote: There has been a great deal of effort to keep vhost and kvm untangled. One example is the memory translation it has to do, another one is the eventfd/irqfd thing it does just so it could signal an IRQ in the guest instead of accessing the

Re: [PATCH 0/2] vhot-net: Use kvm_memslots instead of vhost_memory to translate GPA to HVA

2011-12-16 Thread Zang Hongyong
于 2011/12/16,星期五 15:59, Sasha Levin 写道: On Fri, 2011-12-16 at 15:40 +0800, Zang Hongyong wrote: 于 2011/12/16,星期五 15:05, Sasha Levin 写道: On Fri, 2011-12-16 at 13:32 +0800, zanghongy...@huawei.com wrote: From: Hongyong Zangzanghongy...@huawei.com Vhost-net uses its own vhost_memory, which

Re: [PATCH] kvm tools: Make the whole guest memory mergeable

2011-12-16 Thread Zang Hongyong
于 2011/12/16,星期五 15:23, Sasha Levin 写道: On Fri, 2011-12-16 at 15:02 +0800, Zang Hongyong wrote: 于 2011/12/16,星期五 13:50, Sasha Levin 写道: On Fri, 2011-12-16 at 09:01 +0800, zanghongy...@huawei.com wrote: If a guest's ram_size exceeds KVM_32BIT_GAP_START, the corresponding kvm tool's virtual

[PATCH] kvm tools: Trivial cleanup

2011-12-16 Thread Sasha Levin
Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/disk/qcow.c | 26 -- tools/kvm/ioport.c |7 ++- tools/kvm/pci.c|6 -- tools/kvm/symbol.c | 18 +- tools/kvm/term.c |1 -

Re: [PATCH] kvm tools: Make the whole guest memory mergeable

2011-12-16 Thread Sasha Levin
On Fri, 2011-12-16 at 16:36 +0800, Zang Hongyong wrote: 于 2011/12/16,星期五 15:23, Sasha Levin 写道: On Fri, 2011-12-16 at 15:02 +0800, Zang Hongyong wrote: 于 2011/12/16,星期五 13:50, Sasha Levin 写道: On Fri, 2011-12-16 at 09:01 +0800, zanghongy...@huawei.com wrote: If a guest's ram_size exceeds

Re: [PATCH] kvm tools: Trivial cleanup

2011-12-16 Thread Cyrill Gorcunov
On Fri, Dec 16, 2011 at 10:40:06AM +0200, Sasha Levin wrote: Signed-off-by: Sasha Levin levinsasha...@gmail.com --- Thanks, Sasha! Cyrill -- 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

[PATCH] kvm tools: Fix 'make kvmconfig'

2011-12-16 Thread Sasha Levin
Set features which depend on the config we select to make 'make kvmconfig' non-interactive. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- arch/x86/Kconfig |1 + scripts/kconfig/Makefile |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/x86/Kconfig

Re: [PATCH] kvm tools: Fix 'make kvmconfig'

2011-12-16 Thread Ingo Molnar
* Sasha Levin levinsasha...@gmail.com wrote: Set features which depend on the config we select to make 'make kvmconfig' non-interactive. Signed-off-by: Sasha Levin levinsasha...@gmail.com Acked-by: Ingo Molnar mi...@elte.hu Thanks, Ingo -- To unsubscribe from this list: send the

Re: [PATCH] kvm tools: Make the whole guest memory mergeable

2011-12-16 Thread Zang Hongyong
于 2011/12/16,星期五 16:45, Sasha Levin 写道: On Fri, 2011-12-16 at 16:36 +0800, Zang Hongyong wrote: 于 2011/12/16,星期五 15:23, Sasha Levin 写道: On Fri, 2011-12-16 at 15:02 +0800, Zang Hongyong wrote: 于 2011/12/16,星期五 13:50, Sasha Levin 写道: On Fri, 2011-12-16 at 09:01 +0800, zanghongy...@huawei.com

Re: [Qemu-devel] [PATCH] virtio-serial: Allow one MSI-X vector per virtqueue

2011-12-16 Thread Amit Shah
On (Fri) 16 Dec 2011 [09:14:26], zanghongy...@huawei.com wrote: From: Hongyong Zang zanghongy...@huawei.com In pci_enable_msix(), the guest's virtio-serial driver tries to set msi-x with one vector per queue. But it fails and eventually all virtio-serial ports share one MSI-X vector. Because

Re: [PATCH] kvm tools: Make the whole guest memory mergeable

2011-12-16 Thread Sasha Levin
On Fri, 2011-12-16 at 17:33 +0800, Zang Hongyong wrote: Do you see an issue with increasing kvm-ram_size? Yes, it will cause some problems after simply increase the kvm-ram_size. For examples: In kvm__init_ram() code we use kvm-ram_size to calculate the size of the second RAM range from

[PATCH 0/8] KVM: MMU: reduce the size of shadow page structure and some cleanup

2011-12-16 Thread Xiao Guangrong
In this patchset, we observably reduce the size of struct kvm_mmu_page and let the code more simple. And this patchset have already tested by unittest and RHEL.6.1 setup/boot/reboot/shutdown. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

[PATCH 1/8] KVM: MMU: combine unsync and unsync_children

2011-12-16 Thread Xiao Guangrong
unsync is only used for the page of level == 1 and unsync_children is only used in the upper page, so combine them to reduce the size of shadow page structure Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- Documentation/virtual/kvm/mmu.txt |5 ++-

[PATCH 2/8] KVM: MMU: set the dirty bit for the upper shadow page

2011-12-16 Thread Xiao Guangrong
Upper page do not need to be tracked the status bit, it is safe to set the dirty and let cpu to happily prefetch it Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c | 13 + 1 files changed, 5 insertions(+), 8 deletions(-) diff --git

[PATCH 3/8] KVM: MMU: do not add a nonpresent spte to rmaps of its child

2011-12-16 Thread Xiao Guangrong
Set the spte before adding it to the rmap of its child so that all parent spte are valid when propagate unsync bit from a usnync page / children page And this feature is needed by the later patch Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c |

[PATCH 4/8] KVM: MMU: drop unsync_child_bitmap

2011-12-16 Thread Xiao Guangrong
unsync_child_bitmap is used to record which spte has unsync page or unsync children, we can set a free bit in the spte instead of it Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- Documentation/virtual/kvm/mmu.txt |4 -- arch/x86/include/asm/kvm_host.h |1 -

[PATCH 5/8] KVM: MMU: optimize walking unsync shadow page

2011-12-16 Thread Xiao Guangrong
Exactly, unysnc_children is the number of unsync sptes, we can use to avoid unnecessary spte fetching Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/mmu.c

[PATCH 6/8] KVM: MMU: optimize handing invlpg

2011-12-16 Thread Xiao Guangrong
Use unsync bit to see if the spte is point to unsync child Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/paging_tmpl.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index

[PATCH 7/8] KVM: MMU: remove the redundant get_written_sptes

2011-12-16 Thread Xiao Guangrong
get_written_sptes is called twice in kvm_mmu_pte_write, one of them can be removed Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index

[PATCH 8/8] KVM: MMU: remove PT64_SECOND_AVAIL_BITS_SHIFT

2011-12-16 Thread Xiao Guangrong
It is not used, remove it Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 5d0f0e3..234a32e 100644 --- a/arch/x86/kvm/mmu.c +++

Re: [PATCH v4] kvm: make vcpu life cycle separated from kvm instance

2011-12-16 Thread Marcelo Tosatti
On Thu, Dec 15, 2011 at 03:48:38PM +0900, Takuya Yoshikawa wrote: (2011/12/15 13:28), Liu Ping Fan wrote: From: Liu Ping Fanpingf...@linux.vnet.ibm.com Currently, vcpu can be destructed only when kvm instance destroyed. Change this to vcpu's destruction before kvm instance, so vcpu MUST

Re: [PATCH 0/5 V5] Avoid soft lockup message when KVM is stopped by host

2011-12-16 Thread Marcelo Tosatti
On Thu, Dec 15, 2011 at 12:21:16PM +0200, Avi Kivity wrote: On 12/14/2011 08:21 PM, Marcelo Tosatti wrote: On Wed, Dec 14, 2011 at 04:39:56PM +0200, Avi Kivity wrote: On 12/14/2011 02:16 PM, Marcelo Tosatti wrote: Having this controlled from userspace means it doesn't work for

Re: [PATCH 4/4] KVM: MMU: Make mmu_shrink() scan nr_to_scan shadow pages

2011-12-16 Thread Marcelo Tosatti
On Mon, Dec 12, 2011 at 07:26:47AM +0900, Takuya Yoshikawa wrote: From: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp Currently, mmu_shrink() tries to free a shadow page from one kvm and does not use nr_to_scan correctly. This patch fixes this by making it try to free some shadow pages

Re: [PATCH 4/4] KVM: MMU: Make mmu_shrink() scan nr_to_scan shadow pages

2011-12-16 Thread Takuya Yoshikawa
On Fri, 16 Dec 2011 09:06:11 -0200 Marcelo Tosatti mtosa...@redhat.com wrote: On Mon, Dec 12, 2011 at 07:26:47AM +0900, Takuya Yoshikawa wrote: From: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp Currently, mmu_shrink() tries to free a shadow page from one kvm and does not use

Re: [PATCH 2/2] kvm tools: Submit multiple virtio-blk requests in parallel

2011-12-16 Thread Asias He
On 12/15/2011 08:15 PM, Sasha Levin wrote: When using AIO, submit all requests which exists in the vring in a single io_submit instead of one io_submit for each descriptor. Benchmarks: Short version: 15%+ increase in IOPS, small increase in BW. Read IOPS: Before: vda: ios=291792/0,

Re: [PATCH 0/4 V7] Avoid soft lockup message when KVM is stopped by host

2011-12-16 Thread Arnd Bergmann
On Thursday 15 December 2011, Eric B Munson wrote: Documentation/virtual/kvm/api.txt | 12 arch/ia64/include/asm/kvm_para.h|5 + arch/powerpc/include/asm/kvm_para.h |5 + arch/s390/include/asm/kvm_para.h|5 + arch/x86/include/asm/kvm_host.h

Re: [PATCH 3.2] KVM: Make KVM_INTEL depend on CPU_SUP_INTEL

2011-12-16 Thread Randy Dunlap
On 12/14/2011 02:27 AM, Avi Kivity wrote: PMU virtualization needs to talk to Intel-specific bits of perf; these are only available when CPU_SUP_INTEL=y. Fixes arch/x86/built-in.o: In function `atomic_switch_perf_msrs': vmx.c:(.text+0x6b1d4): undefined reference to

Re: [RFT PATCH] blkio: alloc per cpu data from worker thread context( Re: kvm deadlock)

2011-12-16 Thread Nate Custer
On Dec 15, 2011, at 1:47 PM, Vivek Goyal wrote: Ok, I continued to develop on the patch which tries to allocate per cpu stats from worker thread context. Here is the patch. Can the reporter please try out the patch and see if it helps. I am not sure if deadlock was because of mutex issue or

Re: [RFT PATCH] blkio: alloc per cpu data from worker thread context( Re: kvm deadlock)

2011-12-16 Thread Vivek Goyal
On Fri, Dec 16, 2011 at 12:43:52PM -0600, Nate Custer wrote: On Dec 15, 2011, at 1:47 PM, Vivek Goyal wrote: Ok, I continued to develop on the patch which tries to allocate per cpu stats from worker thread context. Here is the patch. Can the reporter please try out the patch and see if

[PATCH v5] kvm: make vcpu life cycle separated from kvm instance

2011-12-16 Thread Liu Ping Fan
From: Liu Ping Fan pingf...@linux.vnet.ibm.com Currently, vcpu can be destructed only when kvm instance destroyed. Change this to vcpu's destruction before kvm instance, so vcpu MUST and CAN be destroyed before kvm's destroy. Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com ---

Re: [PATCH v4] kvm: make vcpu life cycle separated from kvm instance

2011-12-16 Thread Liu ping fan
2011/12/15 Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp: (2011/12/15 13:28), Liu Ping Fan wrote: From: Liu Ping Fanpingf...@linux.vnet.ibm.com Currently, vcpu can be destructed only when kvm instance destroyed. Change this to vcpu's destruction before kvm instance, so vcpu MUST and CAN be