diff options
author | Michael Neuling <mikey@neuling.org> | 2018-03-27 06:37:20 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-03-27 14:55:32 +0200 |
commit | 398e712c007fbd0bf996d25eb6b39d8314c50db4 (patch) | |
tree | c2dfe736851d233d73410cb939c8dc4f5998528f /arch/powerpc/kvm/book3s_hv.c | |
parent | powerpc: Update xmon to use ppc_breakpoint_available() (diff) | |
download | linux-398e712c007fbd0bf996d25eb6b39d8314c50db4.tar.xz linux-398e712c007fbd0bf996d25eb6b39d8314c50db4.zip |
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 <mikey@neuling.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kvm/book3s_hv.c')
-rw-r--r-- | arch/powerpc/kvm/book3s_hv.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index a043bde4952c..55c1022733c3 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -741,6 +741,8 @@ static int kvmppc_h_set_mode(struct kvm_vcpu *vcpu, unsigned long mflags, case H_SET_MODE_RESOURCE_SET_DAWR: if (!kvmppc_power8_compatible(vcpu)) return H_P2; + if (!ppc_breakpoint_available()) + return H_P2; if (mflags) return H_UNSUPPORTED_FLAG_START; if (value2 & DABRX_HYP) |