diff mbox

[10/33] KVM: PPC: Make critical section detection conditional

Message ID 1403472217-22263-11-git-send-email-agraf@suse.de (mailing list archive)
State New, archived
Headers show

Commit Message

Alexander Graf June 22, 2014, 9:23 p.m. UTC
We only ever support critical sections when we also support the magic page.
Without magic page support the guest can't ever get into a critical section
condition.

With this condition we cover both the book3s HV/PR case as well as the BookE
HV/PR one.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 arch/powerpc/kvm/powerpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index 2269799..230b2bc 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -63,7 +63,7 @@  bool kvmppc_critical_section(struct kvm_vcpu *vcpu)
 	ulong crit_r1;
 	bool crit;
 
-	if (is_kvmppc_hv_enabled(vcpu->kvm))
+	if (!kvmppc_supports_magic_page(vcpu))
 		return false;
 
 	crit_raw = kvmppc_get_critical(vcpu);