* [PATCH] powerpc/kvm: Fix "PR" KVM implementation of H_CEDE
@ 2012-07-10 8:48 Benjamin Herrenschmidt
0 siblings, 0 replies; only message in thread
From: Benjamin Herrenschmidt @ 2012-07-10 8:48 UTC (permalink / raw)
To: Alexander Graf; +Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.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>
---
Alex, you probably want that in -now- (and maybe even in stable).
Without that, bad things happen in guests, especially after Linus pulls
what I'm about to send him to fix more issues with the way pseries
handles H_CEDE vs. lazy IRQ disabling (it will hang in PR KVM without
that fix).
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++;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-07-10 8:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-10 8:48 [PATCH] powerpc/kvm: Fix "PR" KVM implementation of H_CEDE Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox