diff options
author | Marc Zyngier <maz@kernel.org> | 2023-11-13 00:05:14 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2023-12-19 12:51:00 +0300 |
commit | 3ed0b5123cd5a2a4f1fe4e594e7bf319e9eaf1da (patch) | |
tree | e43bc4b6b8f5bf4f286593d4f5ba251f210d979d /arch/arm64/include/asm/kvm_host.h | |
parent | 111903d1f5b9334d1100e1c6ee08e740fa374d91 (diff) | |
download | linux-3ed0b5123cd5a2a4f1fe4e594e7bf319e9eaf1da.tar.xz |
KVM: arm64: nv: Compute NV view of idregs as a one-off
Now that we have a full copy of the idregs for each VM, there is
no point in repainting the sysregs on each access. Instead, we
can simply perform the transmation as a one-off and be done
with it.
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'arch/arm64/include/asm/kvm_host.h')
-rw-r--r-- | arch/arm64/include/asm/kvm_host.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h index 4103a12ecaaf..fce2e5f583a7 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h @@ -306,6 +306,7 @@ struct kvm_arch { * Atomic access to multiple idregs are guarded by kvm_arch.config_lock. */ #define IDREG_IDX(id) (((sys_reg_CRm(id) - 1) << 3) | sys_reg_Op2(id)) +#define IDX_IDREG(idx) sys_reg(3, 0, 0, ((idx) >> 3) + 1, (idx) & Op2_mask) #define IDREG(kvm, id) ((kvm)->arch.id_regs[IDREG_IDX(id)]) #define KVM_ARM_ID_REG_NUM (IDREG_IDX(sys_reg(3, 0, 0, 7, 7)) + 1) u64 id_regs[KVM_ARM_ID_REG_NUM]; |