diff options
Diffstat (limited to 'arch/powerpc/kvm/book3s.c')
-rw-r--r-- | arch/powerpc/kvm/book3s.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c index 7d54f4ed6d96..3f2a8360c857 100644 --- a/arch/powerpc/kvm/book3s.c +++ b/arch/powerpc/kvm/book3s.c | |||
@@ -258,7 +258,7 @@ static bool clear_irqprio(struct kvm_vcpu *vcpu, unsigned int priority) | |||
258 | return true; | 258 | return true; |
259 | } | 259 | } |
260 | 260 | ||
261 | void kvmppc_core_prepare_to_enter(struct kvm_vcpu *vcpu) | 261 | int kvmppc_core_prepare_to_enter(struct kvm_vcpu *vcpu) |
262 | { | 262 | { |
263 | unsigned long *pending = &vcpu->arch.pending_exceptions; | 263 | unsigned long *pending = &vcpu->arch.pending_exceptions; |
264 | unsigned long old_pending = vcpu->arch.pending_exceptions; | 264 | unsigned long old_pending = vcpu->arch.pending_exceptions; |
@@ -283,12 +283,17 @@ void kvmppc_core_prepare_to_enter(struct kvm_vcpu *vcpu) | |||
283 | 283 | ||
284 | /* Tell the guest about our interrupt status */ | 284 | /* Tell the guest about our interrupt status */ |
285 | kvmppc_update_int_pending(vcpu, *pending, old_pending); | 285 | kvmppc_update_int_pending(vcpu, *pending, old_pending); |
286 | |||
287 | return 0; | ||
286 | } | 288 | } |
287 | 289 | ||
288 | pfn_t kvmppc_gfn_to_pfn(struct kvm_vcpu *vcpu, gfn_t gfn) | 290 | pfn_t kvmppc_gfn_to_pfn(struct kvm_vcpu *vcpu, gfn_t gfn) |
289 | { | 291 | { |
290 | ulong mp_pa = vcpu->arch.magic_page_pa; | 292 | ulong mp_pa = vcpu->arch.magic_page_pa; |
291 | 293 | ||
294 | if (!(vcpu->arch.shared->msr & MSR_SF)) | ||
295 | mp_pa = (uint32_t)mp_pa; | ||
296 | |||
292 | /* Magic page override */ | 297 | /* Magic page override */ |
293 | if (unlikely(mp_pa) && | 298 | if (unlikely(mp_pa) && |
294 | unlikely(((gfn << PAGE_SHIFT) & KVM_PAM) == | 299 | unlikely(((gfn << PAGE_SHIFT) & KVM_PAM) == |