diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-06-11 11:16:43 -0700 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-06-11 11:16:43 -0700 | 
| commit | af180b81a3f4ea925fae88878f367e676e99bf73 (patch) | |
| tree | 4082893c231312169d9e0e984dc72e036c0d728e /arch/powerpc/kvm/booke.c | |
| parent | 34376a50fb1fa095b9d0636fa41ed2e73125f214 (diff) | |
| parent | 7c11c0ccc7ba186433b2102cf3775ce6b2445453 (diff) | |
| download | olio-linux-3.10-af180b81a3f4ea925fae88878f367e676e99bf73.tar.xz olio-linux-3.10-af180b81a3f4ea925fae88878f367e676e99bf73.zip  | |
Merge branch 'fixes' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull kvm bugfixes from Gleb Natapov:
 "There is one more fix for MIPS KVM ABI here, MIPS and PPC build
  breakage fixes and a couple of PPC bug fixes"
* 'fixes' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  kvm/ppc/booke64: Fix lazy ee handling in kvmppc_handle_exit()
  kvm/ppc/booke: Hold srcu lock when calling gfn functions
  kvm/ppc/booke64: Disable e6500 support
  kvm/ppc/booke64: Fix AltiVec interrupt numbers and build breakage
  mips/kvm: Use KVM_REG_MIPS and proper size indicators for *_ONE_REG
  kvm: Add definition of KVM_REG_MIPS
  KVM: add kvm_para_available to asm-generic/kvm_para.h
Diffstat (limited to 'arch/powerpc/kvm/booke.c')
| -rw-r--r-- | arch/powerpc/kvm/booke.c | 18 | 
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 1020119226d..5cd7ad0c117 100644 --- a/arch/powerpc/kvm/booke.c +++ b/arch/powerpc/kvm/booke.c @@ -832,6 +832,18 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,  {  	int r = RESUME_HOST;  	int s; +	int idx; + +#ifdef CONFIG_PPC64 +	WARN_ON(local_paca->irq_happened != 0); +#endif + +	/* +	 * We enter with interrupts disabled in hardware, but +	 * we need to call hard_irq_disable anyway to ensure that +	 * the software state is kept in sync. +	 */ +	hard_irq_disable();  	/* update before a new last_exit_type is rewritten */  	kvmppc_update_timing_stats(vcpu); @@ -1053,6 +1065,8 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,  			break;  		} +		idx = srcu_read_lock(&vcpu->kvm->srcu); +  		gpaddr = kvmppc_mmu_xlate(vcpu, gtlb_index, eaddr);  		gfn = gpaddr >> PAGE_SHIFT; @@ -1075,6 +1089,7 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,  			kvmppc_account_exit(vcpu, MMIO_EXITS);  		} +		srcu_read_unlock(&vcpu->kvm->srcu, idx);  		break;  	} @@ -1098,6 +1113,8 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,  		kvmppc_account_exit(vcpu, ITLB_VIRT_MISS_EXITS); +		idx = srcu_read_lock(&vcpu->kvm->srcu); +  		gpaddr = kvmppc_mmu_xlate(vcpu, gtlb_index, eaddr);  		gfn = gpaddr >> PAGE_SHIFT; @@ -1114,6 +1131,7 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,  			kvmppc_booke_queue_irqprio(vcpu, BOOKE_IRQPRIO_MACHINE_CHECK);  		} +		srcu_read_unlock(&vcpu->kvm->srcu, idx);  		break;  	}  |