
Part1: Make CPU ID registers writable by userspace ----------------------------------------------------------------- Patch#1 KVM: arm64: Allow userspace to get the writable masks for feature ID registers Patch#2 KVM: arm64: Document KVM_ARM_GET_REG_WRITABLE_MASKS Patch#3 KVM: arm64: Use guest ID register values for the sake of emulation Patch#4 KVM: arm64: Advertise selected DebugVer in DBGDIDR.Version Patch#5 KVM: arm64: Reject attempts to set invalid debug arch version Patch#6 KVM: arm64: Bump up the default KVM sanitised debug version to v8p8 Patch#7 KVM: arm64: Allow userspace to change ID_AA64ISAR{0-2}_EL1 Patch#8 KVM: arm64: Allow userspace to change ID_AA64MMFR{0-2}_EL1 Patch#9 KVM: arm64: Allow userspace to change ID_AA64PFR0_EL1 Patch#10 KVM: arm64: Allow userspace to change ID_AA64ZFR0_EL1 Patch#11 KVM: arm64: Document vCPU feature selection UAPIs Patch#12 KVM: arm64: Make the exposed feature bits in AA64DFR0_EL1 writable from userspace Patch#13 KVM: arm64: Disable MPAM visibility by default and ignore VMM writes Patch#14 KVM: arm64: Rename is_id_reg() to imply VM scope Patch#15 KVM: arm64: Reset VM feature ID regs from kvm_reset_sys_regs() Patch#16 KVM: arm64: Only reset vCPU-scoped feature ID regs once Patch#17 KVM: arm64: Use read-only helper for reading VM ID registers Patch#18 KVM: arm64: Add helper for writing ID regs Patch#19 KVM: arm64: Treat CTR_EL0 as a VM feature ID register Patch#20 KVM: arm64: rename functions for invariant sys regs Patch#21 KVM: arm64: Make the L1Ip feature bits in CTR_EL0 writable from userspace Patch#22 KVM: arm64: show writable masks for feature registers Patch#23 KVM: arm64: Make HCX writable from userspace Patch#24 KVM: arm64: Remove duplicated AA64MMFR1_EL1 XNX Patch#25 arm64: Add support for HIP09 Spectre-BHB mitigation Patch#26 arm64: add cnp verification on Hisilicon erratum 162100125 Patch#27 KVM: arm64: use KABI_EXTEND to revert struct kvm kabi change Patch#28 KVM: arm64: Do not allow ID_AA64MMFR0_EL1.ASIDbits to be overridden Patch#29 KVM: arm64: Sanitise ID_AA64MMFR3_EL1 Patch#30 KVM: arm64: Expose S1PIE to guests Patch#31 KVM: arm64: Expose Spec_FPACC to guests Patch#32 KVM: arm64: Select default PMU in KVM_ARM_VCPU_INIT handler Patch#33 KVM: arm64: Make AA64PFR1_EL1.NMI writeable Part2: Writable MIDR/REVIDR (and associated baggage) ----------------------------------------------------------------- Patch#34 KVM: arm64: Set HCR_EL2.TID1 unconditionally Patch#35 KVM: arm64: Maintain per-VM copy of implementation ID regs Patch#36 KVM: arm64: Load VPIDR_EL2 with the VM's MIDR_EL1 value Patch#37 KVM: arm64: Allow userspace to change the implementation ID registers Part3: Errata management for VM Live migration ----------------------------------------------------------------- Patch#38 arm64: Modify _midr_range() functions to read MIDR/REVIDR internally Patch#39 KVM: arm64: Specify hypercall ABI for retrieving target implementations Patch#40 KVM: arm64: Introduce KVM_REG_ARM_VENDOR_HYP_BMAP_2 Patch#41 arm64: Make _midr_in_range_list() an exported function Patch#42 smccc/kvm_guest: Enable errata based on implementation CPUs Patch#43 smccc: kvm_guest: Align with DISCOVER_IMPL_CPUS ABI Patch#44 smccc: kvm_guest: Fix kernel builds for 32 bit arm James Morse (1): KVM: arm64: Disable MPAM visibility by default and ignore VMM writes Jing Zhang (5): KVM: arm64: Allow userspace to get the writable masks for feature ID registers KVM: arm64: Document KVM_ARM_GET_REG_WRITABLE_MASKS KVM: arm64: Use guest ID register values for the sake of emulation KVM: arm64: Allow userspace to change ID_AA64MMFR{0-2}_EL1 KVM: arm64: Allow userspace to change ID_AA64PFR0_EL1 Jinqian Yang (2): KVM: arm64: Expose Spec_FPACC to guests KVM: arm64: Make AA64PFR1_EL1.NMI writeable KVM: arm64: Make HCX writable from userspace arm64: Add support for HIP09 Spectre-BHB mitigation arm64: add cnp verification on Hisilicon erratum 162100125 KVM: arm64: use KABI_EXTEND to revert struct kvm kabi change Joey Gouly (1): KVM: arm64: Sanitise ID_AA64MMFR3_EL1 Marc Zyngier (1): KVM: arm64: Do not allow ID_AA64MMFR0_EL1.ASIDbits to be overridden Mark Brown (1): KVM: arm64: Expose S1PIE to guests Oliver Upton (14): KVM: arm64: Advertise selected DebugVer in DBGDIDR.Version KVM: arm64: Reject attempts to set invalid debug arch version KVM: arm64: Bump up the default KVM sanitised debug version to v8p8 KVM: arm64: Allow userspace to change ID_AA64ISAR{0-2}_EL1 KVM: arm64: Allow userspace to change ID_AA64ZFR0_EL1 KVM: arm64: Document vCPU feature selection UAPIs KVM: arm64: Rename is_id_reg() to imply VM scope KVM: arm64: Reset VM feature ID regs from kvm_reset_sys_regs() KVM: arm64: Only reset vCPU-scoped feature ID regs once KVM: arm64: Use read-only helper for reading VM ID registers KVM: arm64: Add helper for writing ID regs KVM: arm64: Set HCR_EL2.TID1 unconditionally KVM: arm64: Load VPIDR_EL2 with the VM's MIDR_EL1 value smccc: kvm_guest: Align with DISCOVER_IMPL_CPUS ABI Reiji Watanabe (1): KVM: arm64: Select default PMU in KVM_ARM_VCPU_INIT handler Russell King (1): KVM: arm64: Remove duplicated AA64MMFR1_EL1 XNX Sebastian Ott (5): KVM: arm64: Treat CTR_EL0 as a VM feature ID register KVM: arm64: rename functions for invariant sys regs KVM: arm64: show writable masks for feature registers KVM: arm64: Maintain per-VM copy of implementation ID regs KVM: arm64: Allow userspace to change the implementation ID registers Shameer Kolothum (8): KVM: arm64: Make the exposed feature bits in AA64DFR0_EL1 writable from userspace KVM: arm64: Make the L1Ip feature bits in CTR_EL0 writable from userspace arm64: Modify _midr_range() functions to read MIDR/REVIDR internally KVM: arm64: Specify hypercall ABI for retrieving target implementations KVM: arm64: Introduce KVM_REG_ARM_VENDOR_HYP_BMAP_2 arm64: Make _midr_in_range_list() an exported function smccc/kvm_guest: Enable errata based on implementation CPUs smccc: kvm_guest: Fix kernel builds for 32 bit arm Documentation/virt/kvm/api.rst | 70 +++ Documentation/virt/kvm/arm/index.rst | 1 + Documentation/virt/kvm/arm/vcpu-features.rst | 48 ++ arch/arm64/include/asm/cache.h | 2 +- arch/arm64/include/asm/cpufeature.h | 14 + arch/arm64/include/asm/cputype.h | 40 +- arch/arm64/include/asm/hypervisor.h | 1 + arch/arm64/include/asm/kvm_arm.h | 4 +- arch/arm64/include/asm/kvm_emulate.h | 3 +- arch/arm64/include/asm/kvm_host.h | 36 ++ arch/arm64/include/uapi/asm/kvm.h | 44 ++ arch/arm64/kernel/cpu_errata.c | 88 ++- arch/arm64/kernel/cpufeature.c | 12 +- arch/arm64/kernel/image-vars.h | 4 +- arch/arm64/kernel/proton-pack.c | 21 +- arch/arm64/kvm/arm.c | 43 +- arch/arm64/kvm/hyp/include/hyp/sysreg-sr.h | 30 +- arch/arm64/kvm/hyp/nvhe/sysreg-sr.c | 4 +- arch/arm64/kvm/hyp/vhe/sysreg-sr.c | 2 +- arch/arm64/kvm/hypercalls.c | 13 + arch/arm64/kvm/pmu-emul.c | 18 +- arch/arm64/kvm/sys_regs.c | 589 +++++++++++++------ arch/arm64/kvm/vgic/vgic-v3.c | 2 +- drivers/clocksource/arm_arch_timer.c | 2 +- drivers/firmware/smccc/kvm_guest.c | 66 +++ drivers/perf/arm_pmuv3.c | 2 +- include/kvm/arm_pmu.h | 6 + include/linux/arm-smccc.h | 16 + include/uapi/linux/kvm.h | 5 + 29 files changed, 931 insertions(+), 255 deletions(-) create mode 100644 Documentation/virt/kvm/arm/vcpu-features.rst -- 2.33.0