From: Alexander Graf Date: Sun, 22 Jun 2014 21:23:14 +0000 Subject: [PATCH 10/33] KVM: PPC: Make critical section detection conditional Message-Id: <1403472217-22263-11-git-send-email-agraf@suse.de> List-Id: References: <1403472217-22263-1-git-send-email-agraf@suse.de> In-Reply-To: <1403472217-22263-1-git-send-email-agraf@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ppc@vger.kernel.org Cc: kvm@vger.kernel.org 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 --- 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