diff options
author | Oliver Upton <[email protected]> | 2024-06-19 17:40:30 +0000 |
---|---|---|
committer | Oliver Upton <[email protected]> | 2024-06-20 17:16:44 +0000 |
commit | d7508d27dd8878eb09e470855a546d96e0cfd4d3 (patch) | |
tree | 83ad779d725d8060381727ce62f32f8cfaccf39f /arch/arm64/kvm/nested.c | |
parent | 97ca3fcc15cc0b19ccacb56d25545f1df080fbc0 (diff) |
KVM: arm64: Add helper for writing ID regs
Replace the remaining usage of IDREG() with a new helper for setting the
value of a feature ID register, with the benefit of cramming in some
extra sanity checks.
Reviewed-by: Sebastian Ott <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Oliver Upton <[email protected]>
Diffstat (limited to 'arch/arm64/kvm/nested.c')
-rw-r--r-- | arch/arm64/kvm/nested.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm64/kvm/nested.c b/arch/arm64/kvm/nested.c index 6813c7c7f00a..5db5bc9dd290 100644 --- a/arch/arm64/kvm/nested.c +++ b/arch/arm64/kvm/nested.c @@ -203,8 +203,8 @@ int kvm_init_nv_sysregs(struct kvm *kvm) } for (int i = 0; i < KVM_ARM_ID_REG_NUM; i++) - kvm->arch.id_regs[i] = limit_nv_id_reg(IDX_IDREG(i), - kvm->arch.id_regs[i]); + kvm_set_vm_id_reg(kvm, IDX_IDREG(i), limit_nv_id_reg(IDX_IDREG(i), + kvm->arch.id_regs[i])); /* VTTBR_EL2 */ res0 = res1 = 0; |