Patchwork [1/1] powerpc/kvm: Fix "PR" KVM implementation of H_CEDE

login
register
mail settings
Submitter Alexander Graf
Date July 11, 2012, 3:38 p.m.
Message ID <1342021106-20000-2-git-send-email-agraf@suse.de>
Download mbox | patch
Permalink /patch/170485/
State New
Headers show

Comments

Alexander Graf - July 11, 2012, 3:38 p.m.
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>

H_CEDE should enable the vcpu's MSR:EE bit. It does on "HV" KVM (it's
burried in the assembly code though) and as far as I can tell, qemu
does it as well.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
 arch/powerpc/kvm/book3s_pr_papr.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Patch

diff --git a/arch/powerpc/kvm/book3s_pr_papr.c b/arch/powerpc/kvm/book3s_pr_papr.c
index 3ff9013..ee02b30 100644
--- a/arch/powerpc/kvm/book3s_pr_papr.c
+++ b/arch/powerpc/kvm/book3s_pr_papr.c
@@ -241,6 +241,7 @@  int kvmppc_h_pr(struct kvm_vcpu *vcpu, unsigned long cmd)
 	case H_PUT_TCE:
 		return kvmppc_h_pr_put_tce(vcpu);
 	case H_CEDE:
+		vcpu->arch.shared->msr |= MSR_EE;
 		kvm_vcpu_block(vcpu);
 		clear_bit(KVM_REQ_UNHALT, &vcpu->requests);
 		vcpu->stat.halt_wakeup++;