Re: [PATCH 05/12] KVM: SVM: Add clean-bit for interrupt state

2010-12-07 Thread Joerg Roedel
On Mon, Dec 06, 2010 at 05:29:24PM -0200, Marcelo Tosatti wrote: On Fri, Dec 03, 2010 at 11:45:52AM +0100, Joerg Roedel wrote: This patch implements the clean-bit for all interrupt related state in the vmcb. This corresponds to vmcb offset 0x60-0x67. Signed-off-by: Joerg Roedel

Re: [PATCH 0/12] KVM: SVM: Add support for VMCB state caching

2010-12-07 Thread Joerg Roedel
On Mon, Dec 06, 2010 at 05:49:55PM -0200, Marcelo Tosatti wrote: On Fri, Dec 03, 2010 at 11:45:47AM +0100, Joerg Roedel wrote: Hi Avi, Hi Marcelo, here is a patch-set which adds support for VMCB state caching to KVM. This is a new CPU feature where software can mark certain parts of the

Re: KVM call minutes for Nov 30

2010-12-07 Thread Avi Kivity
On 12/06/2010 09:39 PM, Nadav Har'El wrote: On Wed, Dec 01, 2010, Nadav Har'El wrote about Re: KVM call minutes for Nov 30: Specifically, in the last review I was asked to make sure that shadow-on-EPT works so that users do not need to remember to add the ept=0 module option on L0.

Re: [PATCH 07/15] ftrace: fix event alignment: kvm:kvm_hv_hypercall

2010-12-07 Thread Avi Kivity
On 12/06/2010 10:38 PM, David Sharp wrote: On Sat, Dec 4, 2010 at 12:11 AM, Avi Kivitya...@redhat.com wrote: On 12/04/2010 02:13 AM, David Sharp wrote: Signed-off-by: David Sharpdhsh...@google.com --- arch/x86/kvm/trace.h |8 1 files changed, 4 insertions(+), 4

Re: [PATCH] KVM: SVM: Add xsetbv intercept

2010-12-07 Thread Avi Kivity
On 12/06/2010 07:48 PM, Roedel, Joerg wrote: On Mon, Dec 06, 2010 at 11:10:46AM -0500, Avi Kivity wrote: On 12/03/2010 06:42 PM, Joerg Roedel wrote: This patch implements the xsetbv intercept to the AMD part of KVM. This makes AVX usable in a save way for the guest on AVX capable

Re: [PATCH 0/12] KVM: SVM: Add support for VMCB state caching

2010-12-07 Thread Avi Kivity
On 12/03/2010 12:45 PM, Joerg Roedel wrote: Hi Avi, Hi Marcelo, here is a patch-set which adds support for VMCB state caching to KVM. This is a new CPU feature where software can mark certain parts of the VMCB as unchanged since the last vmexit and the hardware can then avoid reloading these

Re: [PATCH v5 1/3] KVM: MMU: rename 'no_apf' to 'prefault'

2010-12-07 Thread Avi Kivity
On 12/07/2010 04:33 AM, Xiao Guangrong wrote: It's the speculative path if 'no_apf = 1' and we will specially handle this speculative path in the later patch, so 'prefault' is better to fit the sense Applied all, thanks. -- error compiling committee.c: too many arguments to function -- To

Re: [PATCH 0/3] KVM: SVM: Add support Flush-By-ASID feature

2010-12-07 Thread Avi Kivity
On 12/03/2010 04:25 PM, Joerg Roedel wrote: Hi Avi, Hi Marcelo, here is the patch-set to add support for the Flush-By-ASID feature to KVM on AMD. Patches 1 and 2 clean up the code a little bit and patch 3 implements the feature itself. Applied, thanks. -- error compiling committee.c: too

[PATCH 2/5] kvm/svm: enhance MOV CR intercept handler

2010-12-07 Thread Andre Przywara
Newer SVM implementations provide the GPR number in the VMCB, so that the emulation path is no longer necesarry to handle CR register access intercepts. Implement the handling in svm.c and use it when the info is provided. Signed-off-by: Andre Przywara andre.przyw...@amd.com ---

[PATCH 3/5] kvm/svm: enhance mov DR intercept handler

2010-12-07 Thread Andre Przywara
Newer SVM implementations provide the GPR number in the VMCB, so that the emulation path is no longer necesarry to handle debug register access intercepts. Implement the handling in svm.c and use it when the info is provided. Signed-off-by: Andre Przywara andre.przyw...@amd.com ---

Re: [PATCH 3/5] kvm/svm: enhance mov DR intercept handler

2010-12-07 Thread Alexander Graf
On 07.12.2010, at 11:59, Andre Przywara wrote: Newer SVM implementations provide the GPR number in the VMCB, so that the emulation path is no longer necesarry to handle debug register access intercepts. Implement the handling in svm.c and use it when the info is provided. Signed-off-by:

[PATCH 1/5] kvm/svm: add new SVM feature bit names

2010-12-07 Thread Andre Przywara
the recent APM Vol.2 and the recent AMD CPUID specification describe new CPUID features bits for SVM. Name them here for later usage. Signed-off-by: Andre Przywara andre.przyw...@amd.com --- arch/x86/kvm/svm.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git

[PATCH 5/5] kvm/svm: copy instruction bytes from VMCB

2010-12-07 Thread Andre Przywara
In case of a nested page fault or an intercepted #PF newer SVM implementations provide a copy of the faulting instruction bytes in the VMCB. Use these bytes to feed the instruction emulator and avoid the costly guest instruction fetch in this case. Signed-off-by: Andre Przywara

[PATCH 4/5] kvm/svm: implement enhanced INVLPG intercept

2010-12-07 Thread Andre Przywara
When the DecodeAssist feature is available, the linear address is provided in the VMCB on INVLPG intercepts. Use it directly to avoid any decoding and emulation. This is only useful for shadow paging, though. Signed-off-by: Andre Przywara andre.przyw...@amd.com --- arch/x86/kvm/svm.c |7

[PATCH 0/5] kvm/svm: implement new DecodeAssist features

2010-12-07 Thread Andre Przywara
Hi, upcoming AMD CPUs will have a SVM enhancement called DecodeAssist which will provide more information when intercepting certain events. These information allows to skip the instruction fetching and decoding and handle the intercept immediately. This patch set implements all the features which

Re: KVM call minutes for Nov 30

2010-12-07 Thread Nadav Har'El
On Tue, Dec 07, 2010, Avi Kivity wrote about Re: KVM call minutes for Nov 30: ... All it requires is a kvm_set_cr3() which will load the PDPTEs into the PDPTRs if PAE is enabled. You may need to order the loading of CR0, CR3, CR4, and EFER to achieve the desired effect. I did this more

Re: KVM call minutes for Nov 30

2010-12-07 Thread Avi Kivity
On 12/07/2010 02:49 PM, Nadav Har'El wrote: On Tue, Dec 07, 2010, Avi Kivity wrote about Re: KVM call minutes for Nov 30: ... All it requires is a kvm_set_cr3() which will load the PDPTEs into the PDPTRs if PAE is enabled. You may need to order the loading of CR0, CR3, CR4, and EFER to

Re: [PATCH 3/5] kvm/svm: enhance mov DR intercept handler

2010-12-07 Thread Avi Kivity
On 12/07/2010 01:02 PM, Alexander Graf wrote: On 07.12.2010, at 11:59, Andre Przywara wrote: Newer SVM implementations provide the GPR number in the VMCB, so that the emulation path is no longer necesarry to handle debug register access intercepts. Implement the handling in svm.c and

Re: [PATCH 2/5] kvm/svm: enhance MOV CR intercept handler

2010-12-07 Thread Avi Kivity
On 12/07/2010 12:59 PM, Andre Przywara wrote: Newer SVM implementations provide the GPR number in the VMCB, so that the emulation path is no longer necesarry to handle CR register access intercepts. Implement the handling in svm.c and use it when the info is provided. Signed-off-by: Andre

Re: [PATCH 3/5] kvm/svm: enhance mov DR intercept handler

2010-12-07 Thread Avi Kivity
On 12/07/2010 12:59 PM, Andre Przywara wrote: Newer SVM implementations provide the GPR number in the VMCB, so that the emulation path is no longer necesarry to handle debug register access intercepts. Implement the handling in svm.c and use it when the info is provided. +static int

Re: [PATCH 4/5] kvm/svm: implement enhanced INVLPG intercept

2010-12-07 Thread Avi Kivity
On 12/07/2010 12:59 PM, Andre Przywara wrote: When the DecodeAssist feature is available, the linear address is provided in the VMCB on INVLPG intercepts. Use it directly to avoid any decoding and emulation. This is only useful for shadow paging, though. Signed-off-by: Andre

Re: [PATCH 5/5] kvm/svm: copy instruction bytes from VMCB

2010-12-07 Thread Avi Kivity
On 12/07/2010 12:59 PM, Andre Przywara wrote: In case of a nested page fault or an intercepted #PF newer SVM implementations provide a copy of the faulting instruction bytes in the VMCB. Use these bytes to feed the instruction emulator and avoid the costly guest instruction fetch in this case.

Re: [PATCH 2/2 v2] KVM: MMU: Make the way of accessing lpage_info more generic

2010-12-07 Thread Avi Kivity
On 12/07/2010 05:59 AM, Takuya Yoshikawa wrote: Well, you can give it a name. Meanwhile I've applied patch 1, thanks. How about this? Looks good, applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH 2/5] kvm/svm: enhance MOV CR intercept handler

2010-12-07 Thread Andre Przywara
Avi Kivity wrote: On 12/07/2010 12:59 PM, Andre Przywara wrote: Newer SVM implementations provide the GPR number in the VMCB, so that the emulation path is no longer necesarry to handle CR register access intercepts. Implement the handling in svm.c and use it when the info is provided.

Re: [PATCH 2/5] kvm/svm: enhance MOV CR intercept handler

2010-12-07 Thread Avi Kivity
On 12/07/2010 04:30 PM, Andre Przywara wrote: Avi Kivity wrote: On 12/07/2010 12:59 PM, Andre Przywara wrote: Newer SVM implementations provide the GPR number in the VMCB, so that the emulation path is no longer necesarry to handle CR register access intercepts. Implement the handling in svm.c

Re: [Qemu-devel] KVM call agenda for Dec 7

2010-12-07 Thread Jes Sorensen
On 12/07/10 00:51, Chris Wright wrote: Please send in any agenda items you are interested in covering. thanks, -chris No agenda, no replies Call canceled I presume? Jes -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

Re: [Qemu-devel] KVM call agenda for Dec 7

2010-12-07 Thread Chris Wright
* Jes Sorensen (jes.soren...@redhat.com) wrote: On 12/07/10 00:51, Chris Wright wrote: Please send in any agenda items you are interested in covering. thanks, -chris No agenda, no replies Call canceled I presume? Indeed, next week, then pick up next year... -- To

Re: [PATCH] KVM: SVM: Add xsetbv intercept

2010-12-07 Thread Roedel, Joerg
On Tue, Dec 07, 2010 at 04:34:33AM -0500, Avi Kivity wrote: On 12/06/2010 07:48 PM, Roedel, Joerg wrote: On Mon, Dec 06, 2010 at 11:10:46AM -0500, Avi Kivity wrote: On 12/03/2010 06:42 PM, Joerg Roedel wrote: This patch implements the xsetbv intercept to the AMD part of KVM.

[PATCH 2/2] KVM: SVM: Add xsetbv intercept

2010-12-07 Thread Joerg Roedel
This patch implements the xsetbv intercept to the AMD part of KVM. This makes AVX usable in a save way for the guest on AVX capable AMD hardware. The patch is tested by using AVX in the guest and host in parallel and checking for data corruption. I also used the KVM xsave unit-tests and they all

[PATCH 1/2] KVM: SVM: Do not report xsave in supported cpuid

2010-12-07 Thread Joerg Roedel
To support xsave properly for the guest the SVM module need software support for it. As long as this is not present do not report the xsave as supported feature in cpuid. As a side-effect this patch moves the bit() helper function into the x86.h file so that it can be used in svm.c too. Cc:

[RFC PATCH] KVM: Fix missing lock for kvm_io_bus_unregister_dev()

2010-12-07 Thread Takuya Yoshikawa
Memo: - kvm_io_bus_register_dev() was protected as far as I checked. - kvm_create_pit() was commented like Caller must hold slots_lock but kvm_free_pit() was not. So I don't know if I should protect the whole kvm_free_pit(). What is the best fix? -- or I misread something? Thanks,

Re: [PATCH v2 1/2] Do not register kvmclock savevm section if kvmclock is disabled.

2010-12-07 Thread Glauber Costa
On Mon, 2010-12-06 at 19:04 -0200, Marcelo Tosatti wrote: On Mon, Dec 06, 2010 at 09:03:46AM -0500, Glauber Costa wrote: Usually nobody usually thinks about that scenario (me included and specially), but kvmclock can be actually disabled in the host. It happens in two scenarios: 1.

Re: [PATCH 07/15] ftrace: fix event alignment: kvm:kvm_hv_hypercall

2010-12-07 Thread David Sharp
On Tue, Dec 7, 2010 at 1:22 AM, Avi Kivity a...@redhat.com wrote: On 12/06/2010 10:38 PM, David Sharp wrote: On Sat, Dec 4, 2010 at 12:11 AM, Avi Kivitya...@redhat.com  wrote:  On 12/04/2010 02:13 AM, David Sharp wrote:  Signed-off-by: David Sharpdhsh...@google.com  ---    

Does KVM use one EPT table per Guest CR3?

2010-12-07 Thread Lok Kwong Yan
After some testing and digging around the 2.6.32-26 Kernel, Ubuntu port, , it seems to me that KVM creates a separate EPT table for each separate guest CR3 value. So, if there are 100 guest processes, there are essentially 100 EPT tables. Is this correct? If so, can someone please tell me where

Re: Does KVM use one EPT table per Guest CR3?

2010-12-07 Thread Anthony Liguori
On 12/07/2010 03:47 PM, Lok Kwong Yan wrote: After some testing and digging around the 2.6.32-26 Kernel, Ubuntu port, , it seems to me that KVM creates a separate EPT table for each separate guest CR3 value. So, if there are 100 guest processes, there are essentially 100 EPT tables. Is this

RE: Does KVM use one EPT table per Guest CR3?

2010-12-07 Thread Lok Kwong Yan
Thanks for the quick response. It is greatly appreciated. Can you please point me in the right direction on finding out why the EPTP (EPT_POINTER mmu.root_hpa) have so many different values? Thanks again. From: Anthony Liguori [anth...@codemonkey.ws]

Re: Does KVM use one EPT table per Guest CR3?

2010-12-07 Thread Anthony Liguori
On 12/07/2010 04:00 PM, Lok Kwong Yan wrote: Thanks for the quick response. It is greatly appreciated. Can you please point me in the right direction on finding out why the EPTP (EPT_POINTER mmu.root_hpa) have so many different values? The table is built dynamically as memory is faulted

RE: Transcendent Memory and KVM

2010-12-07 Thread Dan Magenheimer
At the 2010 Linux Plumber's Conference Virtualization Mini-Conference earlier this month, I did a presentation about physical memory utilization and Transcendent Memory (tmem). I mentioned that I am developing an in- kernel version of tmem that might be suitable, with small modifications,

[PATCH] [RFC] Turn KVM test subtest loading mechanism into infrastructure

2010-12-07 Thread Lucas Meneghel Rodrigues
We found out that any client side test that has to implement a substantial amount of code in the form of sub-tests could benefit from having the KVM test mechanism of loading subtests available. So in order to maximize reuse, turn the mechanism into a class, called subtest_loader. Any client side

[PATCH] KVM: Fix OSXSAVE after migration

2010-12-07 Thread Sheng Yang
CPUID's OSXSAVE is a mirror of CR4.OSXSAVE bit. We need to update the CPUID after migration. Cc: sta...@kernel.org Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/kvm/x86.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/x86.c

Re: [Qemu-devel] [PATCH 06/21] vl: add a tmp pointer so that a handler can delete the entry to which it belongs.

2010-12-07 Thread Isaku Yamahata
QLIST_FOREACH_SAFE? On Thu, Nov 25, 2010 at 03:06:45PM +0900, Yoshiaki Tamura wrote: By copying the next entry to a tmp pointer, qemu_del_vm_change_state_handler() can be called in the handler. Signed-off-by: Yoshiaki Tamura tamura.yoshi...@lab.ntt.co.jp --- vl.c |5 +++-- 1 files

RE: kvm ppc timing stats

2010-12-07 Thread Yoder Stuart-B08248
I figure out what is going on here. The timing stats convert exit durations into microseconds. The problem is that any exits that take less than 1us will wind up having a duration of 0. After to changing to count timebase ticks instead, the numbers add up. By the way-- there aren't any