Re: [PATCH 4/5] KVM: PPC: BOOKE: Clear guest dbsr in userspace exit KVM_EXIT_DEBUG

2014-08-04 Thread Scott Wood
On Mon, 2014-08-04 at 13:22 +0530, Bharat Bhushan wrote: > Dbsr is not visible to userspace and we do not think any need to > expose this to userspace because: > Userspace cannot inject debug interrupt to guest (as this > does not know guest ability to handle debug interrupt), so > userspace

Re: [PATCH 5/5 v2] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-08-04 Thread Scott Wood
On Mon, 2014-08-04 at 13:32 +0530, Bharat Bhushan wrote: > @@ -735,7 +745,27 @@ static int kvmppc_handle_debug(struct kvm_run *run, > struct kvm_vcpu *vcpu) > struct debug_reg *dbg_reg = &(vcpu->arch.shadow_dbg_reg); > u32 dbsr = vcpu->arch.dbsr; > > - /* Clear guest dbsr (vcpu->

Re: [PATCH v2] kvm: x86: fix stale mmio cache bug

2014-08-04 Thread Wanpeng Li
Hi David, On Mon, Aug 04, 2014 at 02:10:20PM -0700, David Matlack wrote: >The following events can lead to an incorrect KVM_EXIT_MMIO bubbling >up to userspace: > >(1) Guest accesses gpa X without a memory slot. The gfn is cached in >struct kvm_vcpu_arch (mmio_gfn). On Intel EPT-enabled hosts, KVM

KVM on ARM64

2014-08-04 Thread Mathew Li
Hi, I have a quick question. How do we add a hard disk to the qemu ARM VM? I tried: qemu-system-aarch64 -machine virt -hda disk.img -kernel image -initrd initrd.img qemu-system-aarch64 -machine virt -sd disk.img -kernel image -initrd initrd.img qemu-system-aarch64 -machine virt -mtdblock disk.

RE: [PATCH 4/5] KVM: PPC: BOOKE: Clear guest dbsr in userspace exit KVM_EXIT_DEBUG

2014-08-04 Thread bharat.bhus...@freescale.com
> -Original Message- > From: Wood Scott-B07421 > Sent: Tuesday, August 05, 2014 4:17 AM > To: Bhushan Bharat-R65777 > Cc: ag...@suse.de; kvm-...@vger.kernel.org; kvm@vger.kernel.org; Yoder Stuart- > B08248 > Subject: Re: [PATCH 4/5] KVM: PPC: BOOKE: Clear guest dbsr in userspace exit > KV

Re: [PATCH 4/5] KVM: PPC: BOOKE: Clear guest dbsr in userspace exit KVM_EXIT_DEBUG

2014-08-04 Thread Scott Wood
On Mon, 2014-08-04 at 22:33 -0500, Bhushan Bharat-R65777 wrote: > > > -Original Message- > > From: Wood Scott-B07421 > > Sent: Tuesday, August 05, 2014 4:17 AM > > To: Bhushan Bharat-R65777 > > Cc: ag...@suse.de; kvm-...@vger.kernel.org; kvm@vger.kernel.org; Yoder > > Stuart- > > B08248 >

Re: [PATCH v2] kvm: x86: fix stale mmio cache bug

2014-08-04 Thread Xiao Guangrong
On 08/05/2014 05:10 AM, David Matlack wrote: > The following events can lead to an incorrect KVM_EXIT_MMIO bubbling > up to userspace: > > (1) Guest accesses gpa X without a memory slot. The gfn is cached in > struct kvm_vcpu_arch (mmio_gfn). On Intel EPT-enabled hosts, KVM sets > the SPTE write-e

RE: [PATCH 5/5 v2] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-08-04 Thread bharat.bhus...@freescale.com
> -Original Message- > From: Wood Scott-B07421 > Sent: Tuesday, August 05, 2014 4:23 AM > To: Bhushan Bharat-R65777 > Cc: ag...@suse.de; kvm-...@vger.kernel.org; kvm@vger.kernel.org; Yoder Stuart- > B08248 > Subject: Re: [PATCH 5/5 v2] KVM: PPC: BOOKE: Emulate debug registers and > except

Re: [PATCH] KVM: MMU: Use hashtable for MMU page hash

2014-08-04 Thread Xiao Guangrong
On 08/05/2014 04:54 AM, Sasha Levin wrote: > Use the kernel hashtable interface instead of the hlist interface. > This allows us to eliminate some unneeded code and make the code > simpler. The side effect is that the hash function is changed, the current way is: gfn & ((1 << KVM_MMU_HASH_

[PATCH v2 2/2] KVM: nVMX: fix acknowledge interrupt on exit when APICv is in use

2014-08-04 Thread Wanpeng Li
After commit 77b0f5d (KVM: nVMX: Ack and write vector info to intr_info if L1 asks us to), "Acknowledge interrupt on exit" behavior can be emulated. To do so, KVM will ask the APIC for the interrupt vector if during a nested vmexit if VM_EXIT_ACK_INTR_ON_EXIT is set. With APICv, kvm_get_apic_inter

[PATCH v2 1/2] KVM: nVMX: Fix nested vmexit ack intr before load vmcs01

2014-08-04 Thread Wanpeng Li
External interrupt will cause L1 vmexit w/ reason external interrupt when L2 is running. Then L1 will pick up the interrupt through vmcs12 if L1 set the ack interrupt bit. Commit 77b0f5d (KVM: nVMX: Ack and write vector info to intr_info if L1 asks us to) get intr that belongs to L1 before load v

Re: [PATCH 1/2] KVM: nVMX: Fix nested vmexit ack intr before load vmcs01

2014-08-04 Thread Wanpeng Li
Hi Davidlohr, On Mon, Aug 04, 2014 at 12:56:36PM -0700, Davidlohr Bueso wrote: >On Fri, 2014-08-01 at 16:12 +0800, Wanpeng Li wrote: >> External interrupt will cause L1 vmexit w/ reason external interrupt when L2 >> is >> running. Then L1 will pick up the interrupt through vmcs12 if L1 set the ac

Re: KVM on ARM64

2014-08-04 Thread Wei Huang
On 08/04/2014 07:35 PM, Mathew Li wrote: Hi, I have a quick question. How do we add a hard disk to the qemu ARM VM? I tried: qemu-system-aarch64 -machine virt -hda disk.img -kernel image -initrd initrd.img qemu-system-aarch64 -machine virt -sd disk.img -kernel image -initrd initrd.img qemu

<    1   2