Skip to content

Commit 398e712

Browse files
mikeympe
authored andcommitted
KVM: PPC: Book3S HV: Return error from h_set_mode(SET_DAWR) on POWER9
Return H_P2 on a h_set_mode(SET_DAWR) on POWER9 where the DAWR is disabled. Current Linux guests ignore this error, so they will silently not get the DAWR (sigh). The same error code is being used by POWERVM in this case. Signed-off-by: Michael Neuling <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
1 parent 9bc2bd5 commit 398e712

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/powerpc/kvm/book3s_hv.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,8 @@ static int kvmppc_h_set_mode(struct kvm_vcpu *vcpu, unsigned long mflags,
741741
case H_SET_MODE_RESOURCE_SET_DAWR:
742742
if (!kvmppc_power8_compatible(vcpu))
743743
return H_P2;
744+
if (!ppc_breakpoint_available())
745+
return H_P2;
744746
if (mflags)
745747
return H_UNSUPPORTED_FLAG_START;
746748
if (value2 & DABRX_HYP)

0 commit comments

Comments
 (0)