All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: PPC: Book3S HV: relax check on H_SVM_INIT_ABORT
@ 2020-05-20 16:51 ` Laurent Dufour
  0 siblings, 0 replies; 24+ messages in thread
From: Laurent Dufour @ 2020-05-20 16:51 UTC (permalink / raw)
  To: kvm-ppc, linuxppc-dev, linux-kernel, paulus; +Cc: mpe, sukadev, linuxram

The commit 8c47b6ff29e3 ("KVM: PPC: Book3S HV: Check caller of H_SVM_*
Hcalls") added checks of secure bit of SRR1 to filter out the Hcall
reserved to the Ultravisor.

However, the Hcall H_SVM_INIT_ABORT is made by the Ultravisor passing the
context of the VM calling UV_ESM. This allows the Hypervisor to return to
the guest without going through the Ultravisor. Thus the Secure bit of SRR1
is not set in that particular case.

In the case a regular VM is calling H_SVM_INIT_ABORT, this hcall will be
filtered out in kvmppc_h_svm_init_abort() because kvm->arch.secure_guest is
not set in that case.

Fixes: 8c47b6ff29e3 ("KVM: PPC: Book3S HV: Check caller of H_SVM_* Hcalls")
Signed-off-by: Laurent Dufour <ldufour@linux.ibm.com>
---
 arch/powerpc/kvm/book3s_hv.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
index 93493f0cbfe8..eb1f96cb7b72 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -1099,9 +1099,7 @@ int kvmppc_pseries_do_hcall(struct kvm_vcpu *vcpu)
 			ret = kvmppc_h_svm_init_done(vcpu->kvm);
 		break;
 	case H_SVM_INIT_ABORT:
-		ret = H_UNSUPPORTED;
-		if (kvmppc_get_srr1(vcpu) & MSR_S)
-			ret = kvmppc_h_svm_init_abort(vcpu->kvm);
+		ret = kvmppc_h_svm_init_abort(vcpu->kvm);
 		break;
 
 	default:
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2020-05-27  9:25 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-20 16:51 [PATCH] KVM: PPC: Book3S HV: relax check on H_SVM_INIT_ABORT Laurent Dufour
2020-05-20 16:51 ` Laurent Dufour
2020-05-20 16:51 ` Laurent Dufour
2020-05-20 17:32 ` Greg Kurz
2020-05-20 17:32   ` Greg Kurz
2020-05-20 17:32   ` Greg Kurz
2020-05-20 17:35   ` Laurent Dufour
2020-05-20 17:35     ` Laurent Dufour
2020-05-20 17:35     ` Laurent Dufour
2020-05-20 17:43   ` [PATCH v2] " Laurent Dufour
2020-05-20 17:43     ` Laurent Dufour
2020-05-20 17:43     ` Laurent Dufour
2020-05-20 18:23     ` Greg Kurz
2020-05-20 18:23       ` Greg Kurz
2020-05-20 18:23       ` Greg Kurz
2020-05-21  6:08     ` Ram Pai
2020-05-21  6:08       ` Ram Pai
2020-05-21  6:08       ` Ram Pai
2020-05-27  4:16     ` Paul Mackerras
2020-05-27  4:16       ` Paul Mackerras
2020-05-27  4:16       ` Paul Mackerras
2020-05-27  9:23       ` Laurent Dufour
2020-05-27  9:23         ` Laurent Dufour
2020-05-27  9:23         ` Laurent Dufour

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.