aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGautam Menghani <[email protected]>2024-06-05 17:09:10 +0530
committerMichael Ellerman <[email protected]>2024-06-06 22:38:34 +1000
commit54ec2bd9e0173b75daf84675d07c56584f96564b (patch)
treefa05a281a5a0d82c47224006fb54143e6f32347d
parent55dfb8bed6fe8bda390cc71cca878d11a9407099 (diff)
KVM: PPC: Book3S HV nestedv2: Fix doorbell emulation
Doorbell emulation is broken for KVM on PAPR guests as support for DPDES was not added in the initial patch series. Due to this, a KVM on PAPR guest with SMT > 1 cannot be booted with the XICS interrupt controller as doorbells are setup in the initial probe path when using XICS (pSeries_smp_probe()). Command to replicate the above bug: qemu-system-ppc64 \ -drive file=rhel.qcow2,format=qcow2 \ -m 20G \ -smp 8,cores=1,threads=8 \ -cpu host \ -nographic \ -machine pseries,ic-mode=xics -accel kvm Add doorbell state handling support in the host KVM code to fix doorbell emulation. Fixes: 19d31c5f1157 ("KVM: PPC: Add support for nestedv2 guests") Cc: [email protected] # v6.7+ Signed-off-by: Gautam Menghani <[email protected]> Reviewed-by: Nicholas Piggin <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://msgid.link/[email protected]
-rw-r--r--arch/powerpc/kvm/book3s_hv.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
index 83bd331a4ef4..9df24fb50b0e 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -4187,6 +4187,11 @@ static int kvmhv_vcpu_entry_nestedv2(struct kvm_vcpu *vcpu, u64 time_limit,
int trap;
long rc;
+ if (vcpu->arch.doorbell_request) {
+ vcpu->arch.doorbell_request = 0;
+ kvmppc_set_dpdes(vcpu, 1);
+ }
+
io = &vcpu->arch.nestedv2_io;
msr = mfmsr();