diff options
author | James Morse <james.morse@arm.com> | 2018-01-15 20:39:02 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2018-01-16 16:08:52 +0100 |
commit | c773ae2b34760a1ae409614aa31cdded81a645a5 (patch) | |
tree | 8dd3df341b5378d23b75be9f47a4ac461d443509 /arch/arm64/kvm/sys_regs.c | |
parent | KVM: arm64: Set an impdef ESR for Virtual-SError using VSESR_EL2. (diff) | |
download | linux-c773ae2b34760a1ae409614aa31cdded81a645a5.tar.xz linux-c773ae2b34760a1ae409614aa31cdded81a645a5.zip |
KVM: arm64: Save/Restore guest DISR_EL1
If we deliver a virtual SError to the guest, the guest may defer it
with an ESB instruction. The guest reads the deferred value via DISR_EL1,
but the guests view of DISR_EL1 is re-mapped to VDISR_EL2 when HCR_EL2.AMO
is set.
Add the KVM code to save/restore VDISR_EL2, and make it accessible to
userspace as DISR_EL1.
Signed-off-by: James Morse <james.morse@arm.com>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kvm/sys_regs.c')
-rw-r--r-- | arch/arm64/kvm/sys_regs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c index 1830ebc227d1..9edf4ac8a320 100644 --- a/arch/arm64/kvm/sys_regs.c +++ b/arch/arm64/kvm/sys_regs.c @@ -1169,6 +1169,7 @@ static const struct sys_reg_desc sys_reg_descs[] = { { SYS_DESC(SYS_AMAIR_EL1), access_vm_reg, reset_amair_el1, AMAIR_EL1 }, { SYS_DESC(SYS_VBAR_EL1), NULL, reset_val, VBAR_EL1, 0 }, + { SYS_DESC(SYS_DISR_EL1), NULL, reset_val, DISR_EL1, 0 }, { SYS_DESC(SYS_ICC_IAR0_EL1), write_to_read_only }, { SYS_DESC(SYS_ICC_EOIR0_EL1), read_from_write_only }, |