From: Paolo Bonzini Date: Wed, 13 Nov 2024 11:33:00 +0000 (-0500) Subject: Merge tag 'kvm-x86-misc-6.13' of https://github.com/kvm-x86/linux into HEAD X-Git-Tag: v6.13-rc1~13^2~13 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=bb4409a9e78aa5f70d4cf6c2ca2d771c5a77313f;p=linux-block.git Merge tag 'kvm-x86-misc-6.13' of https://github.com/kvm-x86/linux into HEAD KVM x86 misc changes for 6.13 - Clean up and optimize KVM's handling of writes to MSR_IA32_APICBASE. - Quirk KVM's misguided behavior of initialized certain feature MSRs to their maximum supported feature set, which can result in KVM creating invalid vCPU state. E.g. initializing PERF_CAPABILITIES to a non-zero value results in the vCPU having invalid state if userspace hides PDCM from the guest, which can lead to save/restore failures. - Fix KVM's handling of non-canonical checks for vCPUs that support LA57 to better follow the "architecture", in quotes because the actual behavior is poorly documented. E.g. most MSR writes and descriptor table loads ignore CR4.LA57 and operate purely on whether the CPU supports LA57. - Bypass the register cache when querying CPL from kvm_sched_out(), as filling the cache from IRQ context is generally unsafe, and harden the cache accessors to try to prevent similar issues from occuring in the future. - Advertise AMD_IBPB_RET to userspace, and fix a related bug where KVM over-advertises SPEC_CTRL when trying to support cross-vendor VMs. - Minor cleanups --- bb4409a9e78aa5f70d4cf6c2ca2d771c5a77313f