Commit 398e712c authored by Michael Neuling's avatar Michael Neuling Committed by Michael Ellerman

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: default avatarMichael Neuling <mikey@neuling.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 9bc2bd5d
...@@ -741,6 +741,8 @@ static int kvmppc_h_set_mode(struct kvm_vcpu *vcpu, unsigned long mflags, ...@@ -741,6 +741,8 @@ static int kvmppc_h_set_mode(struct kvm_vcpu *vcpu, unsigned long mflags,
case H_SET_MODE_RESOURCE_SET_DAWR: case H_SET_MODE_RESOURCE_SET_DAWR:
if (!kvmppc_power8_compatible(vcpu)) if (!kvmppc_power8_compatible(vcpu))
return H_P2; return H_P2;
if (!ppc_breakpoint_available())
return H_P2;
if (mflags) if (mflags)
return H_UNSUPPORTED_FLAG_START; return H_UNSUPPORTED_FLAG_START;
if (value2 & DABRX_HYP) if (value2 & DABRX_HYP)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment