diff options
| author | Marc Zyngier <[email protected]> | 2025-05-14 10:34:51 +0000 |
|---|---|---|
| committer | Marc Zyngier <[email protected]> | 2025-05-19 06:59:46 +0000 |
| commit | 6fb75733f148ecd6c1898df0098b37f70a80f002 (patch) | |
| tree | 9568db12c327ed917f93fb7ca56ad79f8badd680 /arch/arm64/kvm/nested.c | |
| parent | KVM: arm64: nv: Add pseudo-TLB backing VNCR_EL2 (diff) | |
| download | kernel-6fb75733f148ecd6c1898df0098b37f70a80f002.tar.gz kernel-6fb75733f148ecd6c1898df0098b37f70a80f002.zip | |
KVM: arm64: nv: Add userspace and guest handling of VNCR_EL2
Plug VNCR_EL2 in the vcpu_sysreg enum, define its RES0/RES1 bits,
and make it accessible to userspace when the VM is configured to
support FEAT_NV2.
Reviewed-by: Oliver Upton <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Marc Zyngier <[email protected]>
Diffstat (limited to 'arch/arm64/kvm/nested.c')
| -rw-r--r-- | arch/arm64/kvm/nested.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm64/kvm/nested.c b/arch/arm64/kvm/nested.c index 806e9cf6049a..32ea6e362bab 100644 --- a/arch/arm64/kvm/nested.c +++ b/arch/arm64/kvm/nested.c @@ -1400,6 +1400,9 @@ int kvm_init_nv_sysregs(struct kvm_vcpu *vcpu) res0 |= ICH_HCR_EL2_DVIM | ICH_HCR_EL2_vSGIEOICount; set_sysreg_masks(kvm, ICH_HCR_EL2, res0, res1); + /* VNCR_EL2 */ + set_sysreg_masks(kvm, VNCR_EL2, VNCR_EL2_RES0, VNCR_EL2_RES1); + out: for (enum vcpu_sysreg sr = __SANITISED_REG_START__; sr < NR_SYS_REGS; sr++) (void)__vcpu_sys_reg(vcpu, sr); |
