[PATCH v6 0/7] KVM: arm64: Hide unsupported MPAM from the guest
Oliver Upton
oliver.upton at linux.dev
Wed Oct 30 19:38:15 PDT 2024
Hi,
Thanks for respinning this Joey.
On Wed, Oct 30, 2024 at 04:03:10PM +0000, Joey Gouly wrote:
> Hi,
>
> changes since v5 [1]:
> - Removed Kconfig option, the KVM traps shouldn't rely on host kernel support
> - Renamed cpus_support_* to system_supports_* since that matches other functions
> - Replace static branch arm64_mpam_has_hcr with a normal cpufeature capability
> - Add MPAM*_EL2 regs to KVM (undef_access)
> - Use constants in the test, instead of hardcoded values
> - Added R-b and T-b tags
> - Rebased on v6.12-rc5
>
> James wrote:
> This series fixes up a long standing bug where MPAM was accidentally exposed
> to a guest, but the feature was not otherwise trapped or context switched.
> This could result in KVM warning about unexpected traps, and injecting an
> undef into the guest contradicting the ID registers.
> This would prevent an MPAM aware kernel from booting - fortunately, there
> aren't any of those.
>
> Ideally, we'd take the MPAM feature away from the ID registers, but that
> would leave existing guests unable to migrate to a newer kernel. Instead,
> just ignore that field when it matches the hardware. KVM wasn't going to
> expose MPAM anyway. The guest will not see MPAM in the id registers.
>
> This series includes the head.S and KVM changes to enable/disable traps. If
> MPAM is neither enabled nor emulated by EL3 firmware, these system register
> accesses will trap to EL3.
> If your kernel doesn't boot, and the problem bisects here - please update
> your firmware. MPAM has been supported by trusted firmware since v1.6 in
> 2018. (also noted on patch 3).
This is looking pretty good to me, and I'd really like to have it in for
6.13.
Will/Catalin, first 3 patches look OK to you?
--
Thanks,
Oliver
More information about the linux-arm-kernel
mailing list