Re: [PATCH] KVM-test: Add a qemu-img commit test

2010-12-21 Thread tangchen
Hi, Thanks, Lucas. I have tested the patch you re-sent and it works well :) Cheers! On 12/22/2010 03:43 AM, Lucas Meneghel Rodrigues wrote: I happen to see that the "qemu-img commit" subcommand test in qemu_img.py is empty, and it is "pass" by default. I'm not very sure why it has not been imp

buildbot failure in kvm on next-x86_64

2010-12-21 Thread kvm
The Buildbot has detected a new failure of next-x86_64 on kvm. Full details are available at: http://buildbot.b1-systems.de/kvm/builders/next-x86_64/builds/23 Buildbot URL: http://buildbot.b1-systems.de/kvm/ Buildslave for this Build: b1_kvm_1 Build Reason: The Nightly scheduler named 'nightly_

buildbot failure in kvm on next-ppc64

2010-12-21 Thread kvm
The Buildbot has detected a new failure of next-ppc64 on kvm. Full details are available at: http://buildbot.b1-systems.de/kvm/builders/next-ppc64/builds/24 Buildbot URL: http://buildbot.b1-systems.de/kvm/ Buildslave for this Build: b1_kvm_1 Build Reason: The Nightly scheduler named 'nightly_ne

buildbot failure in kvm on next-s390

2010-12-21 Thread kvm
The Buildbot has detected a new failure of next-s390 on kvm. Full details are available at: http://buildbot.b1-systems.de/kvm/builders/next-s390/builds/25 Buildbot URL: http://buildbot.b1-systems.de/kvm/ Buildslave for this Build: b1_kvm_1 Build Reason: The Nightly scheduler named 'nightly_next

buildbot failure in kvm on next-i386

2010-12-21 Thread kvm
The Buildbot has detected a new failure of next-i386 on kvm. Full details are available at: http://buildbot.b1-systems.de/kvm/builders/next-i386/builds/23 Buildbot URL: http://buildbot.b1-systems.de/kvm/ Buildslave for this Build: b1_kvm_1 Build Reason: The Nightly scheduler named 'nightly_next

buildbot failure in kvm on next-ppc44x

2010-12-21 Thread kvm
The Buildbot has detected a new failure of next-ppc44x on kvm. Full details are available at: http://buildbot.b1-systems.de/kvm/builders/next-ppc44x/builds/23 Buildbot URL: http://buildbot.b1-systems.de/kvm/ Buildslave for this Build: b1_kvm_1 Build Reason: The Nightly scheduler named 'nightly_

buildbot failure in kvm on next-ia64

2010-12-21 Thread kvm
The Buildbot has detected a new failure of next-ia64 on kvm. Full details are available at: http://buildbot.b1-systems.de/kvm/builders/next-ia64/builds/24 Buildbot URL: http://buildbot.b1-systems.de/kvm/ Buildslave for this Build: b1_kvm_1 Build Reason: The Nightly scheduler named 'nightly_next

[PATCH 3/3] kvm, x86: introduce kvm_inject_x86_mce_on

2010-12-21 Thread Jin Dongming
Pass a table instead of multiple args. Note: kvm_inject_x86_mce(env, bank, status, mcg_status, addr, misc, abort_on_error); is equal to: struct kvm_x86_mce mce = { .bank = bank, .status = status, .mcg_status = mcg_status, .addr = ad

[PATCH 2/3] kvm, x86: kvm_mce_inj_* subroutins for templated error injections

2010-12-21 Thread Jin Dongming
Refactor codes for maintainability. Signed-off-by: Hidetoshi Seto Signed-off-by: Jin Dongming --- target-i386/kvm.c | 111 ++--- 1 files changed, 71 insertions(+), 40 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 5a699fc.

[PATCH 1/3] kvm, x86: introduce kvm_mce_in_progress

2010-12-21 Thread Jin Dongming
Hi, Marcelo-san I modified the patches sent before and made them work well on origin/uq/master tree. Resend the patches. Best Regards, Jin Dongming --- Share same error handing, and rename this function after MCIP (Machine Check In Prog

[RFC 2/3] KVM, Replace is_hwpoison_address with get_user_pages_hwpoison

2010-12-21 Thread Huang Ying
is_hwpoison_address only checks whether the page table entry is hwpoisoned, regardless the memory page mapped. While get_user_pages_hwpoison will check both. In a following patch, we will introduce unpoison_address, which will clear the poisoned page table entry to make it possible to allocate a

QEMU, MCE, unpoison memory address across reboot

2010-12-21 Thread Huang Ying
In Linux kernel HWPoison processing implementation, the virtual address in processes mapping the error physical memory page is marked as HWPoison. So that, the further accessing to the virtual address will kill corresponding processes with SIGBUS. If the error physical memory page is used by a KV

[RFC 3/3] KVM, HWPoison, unpoison address across rebooting

2010-12-21 Thread Huang Ying
In HWPoison processing code, not only the struct page corresponding the error physical memory page is marked as HWPoison, but also the virtual address in processes mapping the error physical memory page is marked as HWPoison. So that, the further accessing to the virtual address will kill correspo

[RFC 0/3] KVM, HWPoison, unpoison address across rebooting

2010-12-21 Thread Huang Ying
Unpoison address across rebooting, to make it possible that a new memory page can be allocated, so that guest system can successfully reboot. [RFC 1/3] mm, Make __get_user_pages return -EHWPOISON for HWPOISON page optionally [RFC 2/3] KVM, Replace is_hwpoison_address with get_user_pages_hwpoison

[RFC 1/3] mm, Make __get_user_pages return -EHWPOISON for HWPOISON page optionally

2010-12-21 Thread Huang Ying
Make __get_user_pages return -EHWPOISON for HWPOISON page only if FOLL_HWPOISON is specified. With this patch, the interested callers can distinguish HWPOISON page from general FAULT page, while other callers will still get -EFAULT for pages, so the user space interface need not to be changed. ge

buildbot failure in qemu-kvm on disable_kvm_i386_out_of_tree

2010-12-21 Thread qemu-kvm
The Buildbot has detected a new failure of disable_kvm_i386_out_of_tree on qemu-kvm. Full details are available at: http://buildbot.b1-systems.de/qemu-kvm/builders/disable_kvm_i386_out_of_tree/builds/636 Buildbot URL: http://buildbot.b1-systems.de/qemu-kvm/ Buildslave for this Build: b1_qemu_k

buildbot failure in qemu-kvm on disable_kvm_x86_64_out_of_tree

2010-12-21 Thread qemu-kvm
The Buildbot has detected a new failure of disable_kvm_x86_64_out_of_tree on qemu-kvm. Full details are available at: http://buildbot.b1-systems.de/qemu-kvm/builders/disable_kvm_x86_64_out_of_tree/builds/636 Buildbot URL: http://buildbot.b1-systems.de/qemu-kvm/ Buildslave for this Build: b1_qe

buildbot failure in qemu-kvm on disable_kvm_x86_64_debian_5_0

2010-12-21 Thread qemu-kvm
The Buildbot has detected a new failure of disable_kvm_x86_64_debian_5_0 on qemu-kvm. Full details are available at: http://buildbot.b1-systems.de/qemu-kvm/builders/disable_kvm_x86_64_debian_5_0/builds/687 Buildbot URL: http://buildbot.b1-systems.de/qemu-kvm/ Buildslave for this Build: b1_qemu

buildbot failure in qemu-kvm on default_i386_debian_5_0

2010-12-21 Thread qemu-kvm
The Buildbot has detected a new failure of default_i386_debian_5_0 on qemu-kvm. Full details are available at: http://buildbot.b1-systems.de/qemu-kvm/builders/default_i386_debian_5_0/builds/699 Buildbot URL: http://buildbot.b1-systems.de/qemu-kvm/ Buildslave for this Build: b1_qemu_kvm_2 Build

Re: [ANNOUNCE] VFIO V6 & public VFIO repositorie

2010-12-21 Thread Benjamin Herrenschmidt
> It seems like vfio could still work for you. You have a restricted > iommu address space, but you can also expect your guests to make use of > hcalls to setup mappings, which gives you a way to use your resources > more sparingly. So I could imagine a model where your hcalls end up > calling i

Re: [ANNOUNCE] VFIO V6 & public VFIO repositories

2010-12-21 Thread Benjamin Herrenschmidt
On Tue, 2010-12-21 at 11:48 -0800, Tom Lyon wrote: > > Ben - I don't have any good news for you. > > DMA remappers like on Power and Sparc have been around forever, the new thing > about Intel/AMD iommus is the per-device address spaces and the protection > inherent in having separate mappings

Re: [ANNOUNCE] VFIO V6 & public VFIO repositories

2010-12-21 Thread Alex Williamson
On Tue, 2010-12-21 at 16:29 +1100, Benjamin Herrenschmidt wrote: > On Mon, 2010-11-22 at 15:21 -0800, Tom Lyon wrote: > > VFIO "driver" development has moved to a publicly accessible respository > > on github: > > > > git://github.com/pugs/vfio-linux-2.6.git > > > > This is a clone of the Lin

Re: Query on IOMMU

2010-12-21 Thread Chris Wright
* Prasad Joshi (p.g.jo...@student.reading.ac.uk) wrote: > The following condition from __attach_device() returns the error. > static int __attach_device(struct device *dev, >struct protection_domain *domain) > { > ... > if (alias_data->domain != NULL && > alias_data-

Ubuntu 10.04 LTS on hosts and quests, quest VLAN problem

2010-12-21 Thread Marcin Giedz
Hi, For the last few days we've been trying to set up ubuntu guest with vlans - until now no success. Here is the story: a) host is ubuntu 10.04 with one eth interface and bridge on it... host is called bdc1 # The primary network interface auto eth0 iface eth0 inet manual auto br0 ifa

RE: Query on IOMMU

2010-12-21 Thread Prasad Joshi
>> >> Is it okay to add a following line in section 4. unbind device from host >> kernel driver (example PCI device 01:00.0) >> >> * If the PCI Stub Driver is compiled as module, then load the module using >> modprobe pci_stub. >> >> When I compiled the kernel I selected it as a kernel module. As

Re: Query on IOMMU

2010-12-21 Thread Chris Wright
* Prasad Joshi (p.g.jo...@student.reading.ac.uk) wrote: > > From: Chris Wright [chr...@sous-sol.org] > > Sent: 21 December 2010 19:29 > > To: Prasad Joshi > > Cc: Chris Wright; kvm@vger.kernel.org; Tejun Heo > > Subject: Re: Query on IOMMU > > > * Prasad Joshi (p.g.jo...@student.reading.ac.uk) wro

RE: Query on IOMMU

2010-12-21 Thread Prasad Joshi
> From: Chris Wright [chr...@sous-sol.org] > Sent: 21 December 2010 19:29 > To: Prasad Joshi > Cc: Chris Wright; kvm@vger.kernel.org; Tejun Heo > Subject: Re: Query on IOMMU > * Prasad Joshi (p.g.jo...@student.reading.ac.uk) wrote: >> Besides when I insert the pci_stub module, it emits a messages

Re: [ANNOUNCE] VFIO V6 & public VFIO repositories

2010-12-21 Thread Tom Lyon
On Monday, December 20, 2010 09:37:33 pm Benjamin Herrenschmidt wrote: > Hi Tom, just wrote that to linux-pci in reply to your VFIO annouce, > but your email bounced. Alex gave me your ieee one instead, I'm sending > this copy to you, please feel free to reply on the list ! > > Cheers, > Ben. > >

[PATCH] KVM-test: Add a qemu-img commit test

2010-12-21 Thread Lucas Meneghel Rodrigues
I happen to see that the "qemu-img commit" subcommand test in qemu_img.py is empty, and it is "pass" by default. I'm not very sure why it has not been implemented yet. Anyway, I think this patch would be helpful. Please comment! This case is used to test "qemu-img commit" command. 1) Create a back

Re: Query on IOMMU

2010-12-21 Thread Chris Wright
* Prasad Joshi (p.g.jo...@student.reading.ac.uk) wrote: > Besides when I insert the pci_stub module, it emits a messages > [ 49.197112] pci-stub: invalid id string "" > I don't know why? It's just broken error message. The commit b439b1d ("PCI: pci-stub: add pci_stub.ids parameter") created th

RE: Query on IOMMU

2010-12-21 Thread Prasad Joshi
From: kvm-ow...@vger.kernel.org [kvm-ow...@vger.kernel.org] on behalf of Chris Wright [chr...@sous-sol.org] Sent: 21 December 2010 18:33 To: Prasad Joshi Cc: Chris Wright; kvm@vger.kernel.org Subject: Re: Query on IOMMU * Prasad Joshi (p.g.jo...@student.reading.ac.uk) wrote: > > From: kvm-ow...@v

Re: Query on IOMMU

2010-12-21 Thread Chris Wright
* Prasad Joshi (p.g.jo...@student.reading.ac.uk) wrote: > > From: kvm-ow...@vger.kernel.org [kvm-ow...@vger.kernel.org] on behalf of > > Chris Wright [chr...@sous-sol.org] > > Yes I am using AMD processor and ASUS motherboard. Both of them have the > > IOMMU support, atleast it is mentioned on th

RE: Query on IOMMU

2010-12-21 Thread Prasad Joshi
> From: kvm-ow...@vger.kernel.org [kvm-ow...@vger.kernel.org] on behalf of > Chris Wright [chr...@sous-sol.org] > Sent: 21 December 2010 17:12 > To: Prasad Joshi > Cc: Chris Wright; kvm@vger.kernel.org > Subject: Re: Query on IOMMU >>* Prasad Joshi (p.g.jo...@student.reading.ac.uk) wrote: > > Fro

Re: [Qemu-devel] Re: [PATCH] qemu-kvm: Switch to upstream -enable-kvm semantics

2010-12-21 Thread Alexander Graf
On 21.12.2010, at 17:56, Anthony Liguori wrote: > On 12/21/2010 10:07 AM, Markus Armbruster wrote: >> "Richard W.M. Jones" writes: >> >> >>> On Tue, Dec 21, 2010 at 04:41:03PM +0100, Markus Armbruster wrote: >>> Like this? upstream qemu | default |-enable-kvm --

Re: Query on IOMMU

2010-12-21 Thread Chris Wright
* Prasad Joshi (p.g.jo...@student.reading.ac.uk) wrote: > > From: Chris Wright [chr...@sous-sol.org] > > >> I have enabled IOMMU in the BIOS, but I am not sure why it is still asking > >> to enabled IOMMU in BIOS. Do I need to worry about this? > > > It's unfortunate wording. It's telling you t

Re: [Qemu-devel] Re: [PATCH] qemu-kvm: Switch to upstream -enable-kvm semantics

2010-12-21 Thread Anthony Liguori
On 12/21/2010 10:07 AM, Markus Armbruster wrote: "Richard W.M. Jones" writes: On Tue, Dec 21, 2010 at 04:41:03PM +0100, Markus Armbruster wrote: Like this? upstream qemu | default |-enable-kvm +---+--- KVM available | disabled | enabled KVM u

Re: [PATCH v2] KVM: VMX: Correct asm constraint in vmcs_load()/vmcs_clear()

2010-12-21 Thread Randy Dunlap
On 12/21/10 06:51, Avi Kivity wrote: > 'error' is byte sized, so use a byte register constraint. > > Signed-off-by: Avi Kivity Acked-by: Randy Dunlap Thanks. > --- > arch/x86/kvm/vmx.c |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/kvm/vmx.c b/arch

RE: Query on IOMMU

2010-12-21 Thread Prasad Joshi
> From: Chris Wright [chr...@sous-sol.org] > Sent: 21 December 2010 16:15 > To: Prasad Joshi > Cc: kvm@vger.kernel.org > Subject: Re: Query on IOMMU >> I have enabled IOMMU in the BIOS, but I am not sure why it is still asking >> to enabled IOMMU in BIOS. Do I need to worry about this? > It's un

[PATCH kvm-unit-tests] Honor cpuid.nx when enabling efer.nxe

2010-12-21 Thread Avi Kivity
Signed-off-by: Avi Kivity --- x86/vmexit.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/x86/vmexit.c b/x86/vmexit.c index 551083d..67746c6 100644 --- a/x86/vmexit.c +++ b/x86/vmexit.c @@ -144,7 +144,8 @@ static void do_test(struct test *test) static void enable_nx

Re: [PATCH unit-tests 1/4] Move idt.c into lib code.

2010-12-21 Thread Gleb Natapov
On Tue, Dec 21, 2010 at 02:15:05PM -0200, Marcelo Tosatti wrote: > On Tue, Dec 14, 2010 at 05:48:46PM +0200, Gleb Natapov wrote: > > diff --git a/lib/x86/idt.c b/lib/x86/idt.c > > index ed2f4b0..b3e47d4 100644 > > --- a/lib/x86/idt.c > > +++ b/lib/x86/idt.c > > There's no such file on current kvm-

Re: [PATCH unit-tests 1/4] Move idt.c into lib code.

2010-12-21 Thread Marcelo Tosatti
On Tue, Dec 14, 2010 at 05:48:46PM +0200, Gleb Natapov wrote: > diff --git a/lib/x86/idt.c b/lib/x86/idt.c > index ed2f4b0..b3e47d4 100644 > --- a/lib/x86/idt.c > +++ b/lib/x86/idt.c There's no such file on current kvm-unit-test repo. What did you generate against? -- To unsubscribe from this lis

Re: Query on IOMMU

2010-12-21 Thread Chris Wright
* Prasad Joshi (p.g.jo...@student.reading.ac.uk) wrote: > I am facing a problem with enabling the IOMMU. > > Dec 21 15:50:57 prasad-kvm kernel: [0.00] Aperture pointing to e820 > RAM. Ignoring. > Dec 21 15:50:57 prasad-kvm kernel: [0.00] Your BIOS doesn't leave a > aperture memor

Re: [PATCH] qemu-kvm: Switch to upstream -enable-kvm semantics

2010-12-21 Thread Markus Armbruster
"Richard W.M. Jones" writes: > On Tue, Dec 21, 2010 at 04:41:03PM +0100, Markus Armbruster wrote: >> Like this? >> >> upstream qemu | default |-enable-kvm >> +---+--- >> KVM available | disabled | enabled >> KVM unavailable | disabled |fail >> >> qem

Re: [PATCH] qemu-kvm: Switch to upstream -enable-kvm semantics

2010-12-21 Thread Markus Armbruster
Avi Kivity writes: > On 12/21/2010 05:41 PM, Markus Armbruster wrote: >> Avi Kivity writes: >> >> > On 12/15/2010 07:57 PM, Markus Armbruster wrote: >> >> > In the short term, it would be a good idea to modify qemu-kvm to >> >> > switch the -enable-kvm semantics to match upstream (fail if

Re: [PATCH] qemu-kvm: Switch to upstream -enable-kvm semantics

2010-12-21 Thread Richard W.M. Jones
On Tue, Dec 21, 2010 at 04:00:32PM +, Richard W.M. Jones wrote: > Markus, any idea when we might get the -accel option appearing in > released versions of qemu/KVM? Sorry, I thought this email wasn't going out to a public list. I should be more careful next time. I'll say instead: We really

Query on IOMMU

2010-12-21 Thread Prasad Joshi
Hello, I am facing a problem with enabling the IOMMU. Dec 21 15:50:57 prasad-kvm kernel: [0.00] Aperture pointing to e820 RAM. Ignoring. Dec 21 15:50:57 prasad-kvm kernel: [0.00] Your BIOS doesn't leave a aperture memory hole Dec 21 15:50:57 prasad-kvm kernel: [0.00] Ple

Re: [PATCH] qemu-kvm: Switch to upstream -enable-kvm semantics

2010-12-21 Thread Richard W.M. Jones
On Tue, Dec 21, 2010 at 04:41:03PM +0100, Markus Armbruster wrote: > Like this? > > upstream qemu | default |-enable-kvm > +---+--- > KVM available | disabled | enabled > KVM unavailable | disabled |fail > > qemu-kvm| default |-enable-kvm| -

Re: [PATCH] qemu-kvm: Switch to upstream -enable-kvm semantics

2010-12-21 Thread Avi Kivity
On 12/21/2010 05:41 PM, Markus Armbruster wrote: Avi Kivity writes: > On 12/15/2010 07:57 PM, Markus Armbruster wrote: >> > In the short term, it would be a good idea to modify qemu-kvm to >> > switch the -enable-kvm semantics to match upstream (fail if KVM isn't >> > available). >> >

Re: [PATCH] qemu-kvm: Switch to upstream -enable-kvm semantics

2010-12-21 Thread Markus Armbruster
Avi Kivity writes: > On 12/15/2010 07:57 PM, Markus Armbruster wrote: >> > In the short term, it would be a good idea to modify qemu-kvm to >> > switch the -enable-kvm semantics to match upstream (fail if KVM isn't >> > available). >> >> That's what my patch does. >> >> Additionally, it change

Re: [PATCH] qemu-kvm: Switch to upstream -enable-kvm semantics

2010-12-21 Thread Avi Kivity
On 12/15/2010 07:57 PM, Markus Armbruster wrote: > In the short term, it would be a good idea to modify qemu-kvm to > switch the -enable-kvm semantics to match upstream (fail if KVM isn't > available). That's what my patch does. Additionally, it changes the default to match upstream: KVM dis

[PATCH v2] KVM: VMX: Correct asm constraint in vmcs_load()/vmcs_clear()

2010-12-21 Thread Avi Kivity
'error' is byte sized, so use a byte register constraint. Signed-off-by: Avi Kivity --- arch/x86/kvm/vmx.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index c195260..ce7cfc5 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm

Re: KVM call agenda for Dec 21

2010-12-21 Thread Chris Wright
* Chris Wright (chr...@redhat.com) wrote: > Please send in any agenda items you are interested in covering. No agenda, today's call is cancelled. Also, given people's holiday and vacation schedules, next week's call is cancelled. Talk again after the New Year. thanks, -chris -- To unsubscribe f

[PATCH] KVM: MMU: Initialize base_role for tdp mmus

2010-12-21 Thread Avi Kivity
Signed-off-by: Avi Kivity --- arch/x86/kvm/mmu.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index c3853d5..ddb9c40 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -2884,6 +2884,7 @@ static int init_kvm_tdp_mmu(struc

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

2010-12-21 Thread Avi Kivity
On 12/21/2010 12:12 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. +static int cr_interceptio

Re: [PATCH -v3 0/8] kvm/svm: implement new DecodeAssist features

2010-12-21 Thread Avi Kivity
On 12/21/2010 12:11 PM, Andre Przywara wrote: Hi, this is version 3 of the DecodeAssist patches. I added 3 clean up patches which are not SVM specific. Changes between v2 and v3: - now includes the (unchanged) CR8 handling fix - move complete_insn_gp() helper function into x86.c - remove unneces

unable to write into Local APIC registers

2010-12-21 Thread Ravi Kumar Kulkarni
Hi all, Im using qemu 0.12.3 .I have come to a point where i have developed a small kernel (setting up the IDT, GDT n all) Im disabling 8259 and enabling Local APIC but im unable to write into Local APIC registers . can anyone tell me is there something which im missing ? Here is my piece of code

Re: [PATCH] kvm: cleanup CR8 handling

2010-12-21 Thread Avi Kivity
On 12/21/2010 12:07 PM, Andre Przywara wrote: Avi Kivity wrote: On 12/08/2010 01:27 PM, Andre Przywara wrote: The handling of CR8 writes in KVM is currently somewhat cumbersome. This patch makes it look like the other CR register handlers and fixes a possible issue in VMX, where the RIP would b

[PATCH 1/2] KVM: VMX: Add definitions for more vm entry/exit control bits

2010-12-21 Thread Avi Kivity
Signed-off-by: Avi Kivity --- arch/x86/include/asm/vmx.h |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/x86/include/asm/vmx.h b/arch/x86/include/asm/vmx.h index 9642c22..84471b8 100644 --- a/arch/x86/include/asm/vmx.h +++ b/arch/x86/include/asm/vmx.h @@ -66,1

[PATCH 2/2] KVM: VMX: Optimize atomic EFER load

2010-12-21 Thread Avi Kivity
When NX is enabled on the host but not on the guest, we use the entry/exit msr load facility, which is slow. Optimize it to use entry/exit efer load, which is ~1200 cycles faster. Signed-off-by: Avi Kivity --- arch/x86/kvm/vmx.c | 30 ++ 1 files changed, 30 inserti

[PATCH 0/2] Optimize atomic efer loading

2010-12-21 Thread Avi Kivity
In some cases we resort to loading EFER via the atomic msr load on entry/exit facility. This is incredibly slow. Use the faster entry/exit LOAD_IA32_EFER controls instead, when available. Avi Kivity (2): KVM: VMX: Add definitions for more vm entry/exit control bits KVM: VMX: Optimize atomic

Re: [PATCH] kvm: cleanup CR8 handling

2010-12-21 Thread Andre Przywara
Avi Kivity wrote: On 12/08/2010 01:27 PM, Andre Przywara wrote: The handling of CR8 writes in KVM is currently somewhat cumbersome. This patch makes it look like the other CR register handlers and fixes a possible issue in VMX, where the RIP would be incremented despite an injected #GP. unsig

[PATCH 7/8] kvm/svm: implement enhanced INVLPG intercept

2010-12-21 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 --- arch/x86/kvm/svm.c |7 ++- 1 files changed, 6

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

2010-12-21 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 --- arch/x86/include/asm/svm.h |2 + ar

[PATCH 2/8] kvm: move complete_insn_gp() into x86.c

2010-12-21 Thread Andre Przywara
move the complete_insn_gp() helper function out of the VMX part into the generic x86 part to make it usable by SVM. Signed-off-by: Andre Przywara --- arch/x86/include/asm/kvm_host.h |2 ++ arch/x86/kvm/vmx.c | 16 arch/x86/kvm/x86.c |9 +++

[PATCH 3/8] kvm: cleanup emulate_instruction

2010-12-21 Thread Andre Przywara
emulate_instruction had many callers, but only one used all parameters. One parameter was unused, another one is now hidden by a wrapper function (required for a future addition anyway), so most callers use now a shorter parameter list. Signed-off-by: Andre Przywara --- arch/x86/include/asm/kvm_

[PATCH 1/8] kvm: fix CR8 handling

2010-12-21 Thread Andre Przywara
The handling of CR8 writes in KVM is currently somewhat cumbersome. This patch makes it look like the other CR register handlers and fixes a possible issue in VMX, where the RIP would be incremented despite an injected #GP. Signed-off-by: Andre Przywara --- arch/x86/include/asm/kvm_host.h |2

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

2010-12-21 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 --- arch/x86/incl

[PATCH -v3 0/8] kvm/svm: implement new DecodeAssist features

2010-12-21 Thread Andre Przywara
Hi, this is version 3 of the DecodeAssist patches. I added 3 clean up patches which are not SVM specific. Changes between v2 and v3: - now includes the (unchanged) CR8 handling fix - move complete_insn_gp() helper function into x86.c - remove unnecessary comment - fix handling of illegal CR access

[PATCH 6/8] kvm/svm: enhance mov DR intercept handler

2010-12-21 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 --- arch/x86/kvm/svm.c | 57 ++

[PATCH 4/8] kvm/svm: add new SVM feature bit names

2010-12-21 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 --- arch/x86/kvm/svm.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm