Skip to content

Commit 54ec2bd

Browse files
Gautam Menghanimpe
authored andcommitted
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: 19d31c5 ("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]
1 parent 55dfb8b commit 54ec2bd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

arch/powerpc/kvm/book3s_hv.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4187,6 +4187,11 @@ static int kvmhv_vcpu_entry_nestedv2(struct kvm_vcpu *vcpu, u64 time_limit,
41874187
int trap;
41884188
long rc;
41894189

4190+
if (vcpu->arch.doorbell_request) {
4191+
vcpu->arch.doorbell_request = 0;
4192+
kvmppc_set_dpdes(vcpu, 1);
4193+
}
4194+
41904195
io = &vcpu->arch.nestedv2_io;
41914196

41924197
msr = mfmsr();

0 commit comments

Comments
 (0)