diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2019-10-02 08:00:25 +0200 |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2019-10-22 07:29:02 +0200 |
commit | 55d7004299eb917767761f01a208d50afad4f535 (patch) | |
tree | 8f8abe1646e758012d8f11a094b86a6020e6707e /arch | |
parent | KVM: PPC: Book3S HV: Implement LPCR[AIL]=3 mode for injected interrupts (diff) | |
download | linux-55d7004299eb917767761f01a208d50afad4f535.tar.xz linux-55d7004299eb917767761f01a208d50afad4f535.zip |
KVM: PPC: Book3S HV: Reject mflags=2 (LPCR[AIL]=2) ADDR_TRANS_MODE mode
AIL=2 mode has no known users, so is not well tested or supported.
Disallow guests from selecting this mode because it may become
deprecated in future versions of the architecture.
This policy decision is not left to QEMU because KVM support is
required for AIL=2 (when injecting interrupts).
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kvm/book3s_hv.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index c340d416dce3..ec5c0379296a 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -779,6 +779,11 @@ static int kvmppc_h_set_mode(struct kvm_vcpu *vcpu, unsigned long mflags, vcpu->arch.dawr = value1; vcpu->arch.dawrx = value2; return H_SUCCESS; + case H_SET_MODE_RESOURCE_ADDR_TRANS_MODE: + /* KVM does not support mflags=2 (AIL=2) */ + if (mflags != 0 && mflags != 3) + return H_UNSUPPORTED_FLAG_START; + return H_TOO_HARD; default: return H_TOO_HARD; } |