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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 arch/powerpc/kvm/powerpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux