Re: [PATCH 1/2] kvm tools: set the HYPERVISOR flag in cpuid

2012-06-20 Thread Pekka Enberg
On Fri, 15 Jun 2012, Cyrill Gorcunov wrote: On Fri, Jun 15, 2012 at 01:34:16PM +0200, Sasha Levin wrote: We need to set the HYPERVISOR flag to let the kernel know we're running under a hypervisor. This makes the kernel enable all sorts of para-virtualization options such as kvm-clock.

Re: [PATCH 2/2] kvm tools: support 9p flush command

2012-06-20 Thread Pekka Enberg
On Fri, 15 Jun 2012, Sasha Levin wrote: While we process 9p requests serially, so there's no point for implementing flush, we still need to answer it to prevent guest kernel from hanging waiting for it. Signed-off-by: Sasha Levin levinsasha...@gmail.com Applied, thanks! -- To unsubscribe

Re: [PATCH 1/2] kvm tools: set the HYPERVISOR flag in cpuid

2012-06-20 Thread Cyrill Gorcunov
On Wed, Jun 20, 2012 at 10:23:06AM +0300, Pekka Enberg wrote: On Fri, 15 Jun 2012, Cyrill Gorcunov wrote: On Fri, Jun 15, 2012 at 01:34:16PM +0200, Sasha Levin wrote: We need to set the HYPERVISOR flag to let the kernel know we're running under a hypervisor. This makes the kernel

[PATCH v7 00/10] KVM: MMU: fast page fault

2012-06-20 Thread Xiao Guangrong
Changlog: - always atomicly update the spte if it can be updated out of mmu-lock - rename spte_can_be_writable() to spte_is_locklessly_modifiable() - cleanup and comment spte_write_protect() Performance result: (The benchmark can be found at: http://www.spinics.net/lists/kvm/msg73011.html)

[PATCH v7 01/10] KVM: MMU: return bool in __rmap_write_protect

2012-06-20 Thread Xiao Guangrong
The reture value of __rmap_write_protect is either 1 or 0, use true/false instead of these Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/x86/kvm/mmu.c

[PATCH v7 02/10] KVM: MMU: abstract spte write-protect

2012-06-20 Thread Xiao Guangrong
Introduce a common function to abstract spte write-protect to cleanup the code Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c | 58 +++ 1 files changed, 31 insertions(+), 27 deletions(-) diff --git

[PATCH v7 03/10] KVM: MMU: cleanup spte_write_protect

2012-06-20 Thread Xiao Guangrong
Use __drop_large_spte to cleanup this function and comment spte_write_protect Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c | 45 + 1 files changed, 29 insertions(+), 16 deletions(-) diff --git

[PATCH v7 04/10] KVM: VMX: export PFEC.P bit on ept

2012-06-20 Thread Xiao Guangrong
Export the present bit of page fault error code, the later patch will use it Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/vmx.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index

[PATCH v7 05/10] KVM: MMU: fold tlb flush judgement into mmu_spte_update

2012-06-20 Thread Xiao Guangrong
mmu_spte_update() is the common function, we can easily audit the path Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c | 33 - 1 files changed, 20 insertions(+), 13 deletions(-) diff --git a/arch/x86/kvm/mmu.c

Re: [PATCH 1/2] kvm tools: set the HYPERVISOR flag in cpuid

2012-06-20 Thread Pekka Enberg
On Wed, Jun 20, 2012 at 10:37 AM, Cyrill Gorcunov gorcu...@openvz.org wrote: From: Sasha Levin levinsasha...@gmail.com Subject: [PATCH] kvm tools: set the HYPERVISOR flag in cpuid We need to set the HYPERVISOR flag to let the kernel know we're running under a hypervisor. This makes the

[PATCH v7 06/10] KVM: MMU: introduce SPTE_MMU_WRITEABLE bit

2012-06-20 Thread Xiao Guangrong
This bit indicates whether the spte can be writable on MMU, that means the corresponding gpte is writable and the corresponding gfn is not protected by shadow page protection In the later path, SPTE_MMU_WRITEABLE will indicates whether the spte can be locklessly updated Signed-off-by: Xiao

[PATCH v7 08/10] KVM: MMU: trace fast page fault

2012-06-20 Thread Xiao Guangrong
To see what happen on this path and help us to optimize it Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c |2 ++ arch/x86/kvm/mmutrace.h | 38 ++ 2 files changed, 40 insertions(+), 0 deletions(-) diff --git

[PATCH v7 07/10] KVM: MMU: fast path of handling guest page fault

2012-06-20 Thread Xiao Guangrong
If the the present bit of page fault error code is set, it indicates the shadow page is populated on all levels, it means what we do is only modify the access bit which can be done out of mmu-lock Currently, in order to simplify the code, we only fix the page fault caused by write-protect on the

[PATCH v7 10/10] KVM: MMU: document mmu-lock and fast page fault

2012-06-20 Thread Xiao Guangrong
Document fast page fault and mmu-lock in locking.txt Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- Documentation/virtual/kvm/locking.txt | 130 - 1 files changed, 129 insertions(+), 1 deletions(-) diff --git

[PATCH v7 09/10] KVM: MMU: fix kvm_mmu_pagetable_walk tracepoint

2012-06-20 Thread Xiao Guangrong
The P bit of page fault error code is missed in this tracepoint, fix it by passing the full error code Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmutrace.h|7 +++ arch/x86/kvm/paging_tmpl.h |3 +-- 2 files changed, 4 insertions(+), 6

Re: [PATCH v7 02/10] KVM: MMU: abstract spte write-protect

2012-06-20 Thread Takuya Yoshikawa
On Wed, 20 Jun 2012 15:57:15 +0800 Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com wrote: Introduce a common function to abstract spte write-protect to cleanup the code Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com ... +/* Return true if the spte is dropped. */ +static

Re: [PATCH v7 02/10] KVM: MMU: abstract spte write-protect

2012-06-20 Thread Xiao Guangrong
On 06/20/2012 05:02 PM, Takuya Yoshikawa wrote: On Wed, 20 Jun 2012 15:57:15 +0800 Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com wrote: Introduce a common function to abstract spte write-protect to cleanup the code Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com ...

Re: Bug? 100% load on core after physically removing USB storage from host

2012-06-20 Thread Emmanuel Noobadmin
On 6/18/12, Stefan Hajnoczi stefa...@gmail.com wrote: I believe the call is coming from hw/usb/host-linux.c:async_complete() but am not using the same source tree as your qemu-kvm so I could be off. The code suggests that QEMU also logs an error message (USBDEVFS_REAPURBNDELAY: Inappropriate

Re: Bug? 100% load on core after physically removing USB storage from host

2012-06-20 Thread Stefan Hajnoczi
On Wed, Jun 20, 2012 at 10:40 AM, Emmanuel Noobadmin centos.ad...@gmail.com wrote: On 6/18/12, Stefan Hajnoczi stefa...@gmail.com wrote: I believe the call is coming from hw/usb/host-linux.c:async_complete() but am not using the same source tree as your qemu-kvm so I could be off.  The code

Re: [PATCH v7 02/10] KVM: MMU: abstract spte write-protect

2012-06-20 Thread Takuya Yoshikawa
On Wed, 20 Jun 2012 17:11:06 +0800 Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com wrote: Strange! Why do you think it is wrong? It is just debug code. kvm_mmu_slot_remove_write_access() does not use rmap but the debug code says: rmap_printk(rmap_write_protect: spte %p %llx\n, sptep,

Re: [PATCH v7 02/10] KVM: MMU: abstract spte write-protect

2012-06-20 Thread Xiao Guangrong
On 06/20/2012 08:56 PM, Takuya Yoshikawa wrote: On Wed, 20 Jun 2012 17:11:06 +0800 Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com wrote: Strange! Why do you think it is wrong? It is just debug code. kvm_mmu_slot_remove_write_access() does not use rmap but the debug code says:

Re: [PATCH v7 02/10] KVM: MMU: abstract spte write-protect

2012-06-20 Thread Takuya Yoshikawa
On Wed, 20 Jun 2012 21:21:07 +0800 Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com wrote: Again, rmap does not break the logic, the spte we handle in this function must be in rmap. I'm not saying whether this breaks some logic or not. rmap_printk(rmap_write_protect: spte %p %llx\n, sptep,

Re: VMM OSX port

2012-06-20 Thread Cole Robinson
FYI the virt-manager list is virt-tools-l...@redhat.com, CC'd. On 06/19/2012 07:33 PM, Gene Crucean wrote: Hey everyone, I just subscribed to this list so please forgive me if I goof something up. I was looking into the possibility of porting VMM to OSX. Is this on the todo list already?

Re: how to map a host virtual address (hva) to guest address space (gva/gpa/gfn)

2012-06-20 Thread sheng qiu
Thanks Mehul. On Tue, Jun 19, 2012 at 7:33 PM, Mehul Chadha mehul...@gmail.com wrote: On Tue, Jun 19, 2012 at 6:09 PM, sheng qiu herbert1984...@gmail.com wrote: Hi all, is there any existing function in KVM that can map a host virtual address (hva) to the guest address space. So that the

what is this function mean is_no_device?

2012-06-20 Thread sheng qiu
Hi all, does anyone can explain what is_no_device() and vmx_fpu_activate(vcpu) do? Thanks, Sheng -- 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: [PATCH v8 13/15] ARM: KVM: Handle guest faults in KVM

2012-06-20 Thread Christoffer Dall
On Tue, Jun 19, 2012 at 6:41 AM, Andrea Arcangeli aarca...@redhat.com wrote: On Tue, Jun 19, 2012 at 12:32:06PM +0300, Avi Kivity wrote: On 06/19/2012 01:20 AM, Christoffer Dall wrote: On Mon, Jun 18, 2012 at 9:45 AM, Avi Kivity a...@redhat.com wrote: On 06/15/2012 10:09 PM, Christoffer Dall

[PATCH 1/2] booke/bookehv: Add host crit-watchdog exception support

2012-06-20 Thread Bharat Bhushan
Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/hw_irq.h |2 ++ arch/powerpc/kvm/booke.c | 21 + 2 files changed, 23 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/include/asm/hw_irq.h

[PATCH 2/2] booke: Added crit/mc exception handler for e500v2

2012-06-20 Thread Bharat Bhushan
Watchdog is taken at critical exception level. So this patch is tested with host watchdog exception happening when guest is running. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/kvm/booke_interrupts.S | 55 +-- 1 files changed, 27

Re: [PATCH 1/2] booke/bookehv: Add host crit-watchdog exception support

2012-06-20 Thread Alexander Graf
On 20.06.2012, at 17:56, Bharat Bhushan wrote: Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com Next time, please provide a patch description. Only the subject line does not suffice generally. Thanks, applied both nevertheless. Alex -- To unsubscribe from this list: send the

Re: [PATCH v8 13/15] ARM: KVM: Handle guest faults in KVM

2012-06-20 Thread Andrea Arcangeli
On Wed, Jun 20, 2012 at 11:13:36AM -0400, Christoffer Dall wrote: ah, we don't do things right, we use gfn_to_pfn() flat out and will always break the COW :) I guess now, when change_pte is a nop, it's outright incorrect if anyone runs KSM. This has just been added to my todo-list.

Re: VMM OSX port

2012-06-20 Thread Gene Crucean
Cole, thanks for the reply! That was all very helpful. Sorry about the wrong list thing too btw. Take care guys! On Wed, Jun 20, 2012 at 7:26 AM, Cole Robinson crobi...@redhat.com wrote: FYI the virt-manager list is virt-tools-l...@redhat.com, CC'd. On 06/19/2012 07:33 PM, Gene Crucean

Re: [PATCH] kvm: handle last_boosted_vcpu = 0 case

2012-06-20 Thread Raghavendra K T
On 06/20/2012 02:21 AM, Rik van Riel wrote: On Wed, 20 Jun 2012 01:50:50 +0530 Raghavendra K Traghavendra...@linux.vnet.ibm.com wrote: In ple handler code, last_boosted_vcpu (lbv) variable is serving as reference point to start when we enter. Also statistical analysis (below) is showing

Re: [PATCH v2] Fixes related to processing of qemu's -numa option

2012-06-20 Thread Eduardo Habkost
(removed r...@hydra11.kio from CC) On Tue, Jun 19, 2012 at 03:45:27PM -0700, Chegu Vinod wrote: From: root r...@hydra11.kio Changes since v1: - Use bitmap functions that are already in qemu (instead of cpu_set_t macro's) - Added a check for endvalue = max_cpus. -

Re: [PATCH v7 02/10] KVM: MMU: abstract spte write-protect

2012-06-20 Thread Xiao Guangrong
On 06/20/2012 10:11 PM, Takuya Yoshikawa wrote: We can change the debug message later if needed. Actually, i am going to use tracepoint instead of these debug code. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More

Re: [PATCH v7 02/10] KVM: MMU: abstract spte write-protect

2012-06-20 Thread Takuya Yoshikawa
On Thu, 21 Jun 2012 09:48:05 +0800 Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com wrote: We can change the debug message later if needed. Actually, i am going to use tracepoint instead of these debug code. That's very nice! Then, please change the trace log to correspond to the new

Re: [PATCH] kvm: handle last_boosted_vcpu = 0 case

2012-06-20 Thread Rik van Riel
On 06/20/2012 04:12 PM, Raghavendra K T wrote: On 06/20/2012 02:21 AM, Rik van Riel wrote: Please let me know how it goes. Yes, have got result today, too tired to summarize. got better performance result too. will come back again tomorrow morning. have to post, randomized start point patch

[PATCH] KVM: Add brackets in gfn_to_gpa and pfn_to_hpa

2012-06-20 Thread ruan . zhengwang
From: Zhengwang Ruan ruan.zhengw...@gmail.com This patch adds brackets for shifted returned value in gfn_to_gpa and pfn_to_hpa. Signed-off-by: Zhengwang Ruan ruan.zhengw...@gmail.com --- include/linux/kvm_host.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 1/2] booke/bookehv: Add host crit-watchdog exception support

2012-06-20 Thread Bharat Bhushan
Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/hw_irq.h |2 ++ arch/powerpc/kvm/booke.c | 21 + 2 files changed, 23 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/include/asm/hw_irq.h

[PATCH 2/2] booke: Added crit/mc exception handler for e500v2

2012-06-20 Thread Bharat Bhushan
Watchdog is taken at critical exception level. So this patch is tested with host watchdog exception happening when guest is running. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/kvm/booke_interrupts.S | 55 +-- 1 files changed, 27

Re: [PATCH 1/2] booke/bookehv: Add host crit-watchdog exception support

2012-06-20 Thread Alexander Graf
On 20.06.2012, at 17:56, Bharat Bhushan wrote: Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com Next time, please provide a patch description. Only the subject line does not suffice generally. Thanks, applied both nevertheless. Alex -- To unsubscribe from this list: send the