]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
KVM: x86: Inject #GP on x2APIC WRMSR that sets reserved bits 63:32
authorSean Christopherson <seanjc@google.com>
Sat, 7 Jan 2023 01:10:21 +0000 (01:10 +0000)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 14 Mar 2023 15:47:26 +0000 (16:47 +0100)
commitfcce7bdfd1216c433061512389c4beb8660e7266
tree15653980e6b9f5b380582c56e7617cdc745f6cff
parent034b56f89020adfbb298131b022725019cc1961b
KVM: x86: Inject #GP on x2APIC WRMSR that sets reserved bits 63:32

BugLink: https://bugs.launchpad.net/bugs/2011425
commit ab52be1b310bcb39e6745d34a8f0e8475d67381a upstream.

Reject attempts to set bits 63:32 for 32-bit x2APIC registers, i.e. all
x2APIC registers except ICR.  Per Intel's SDM:

  Non-zero writes (by WRMSR instruction) to reserved bits to these
  registers will raise a general protection fault exception

Opportunistically fix a typo in a nearby comment.

Reported-by: Marc Orr <marcorr@google.com>
Cc: stable@vger.kernel.org
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Link: https://lore.kernel.org/r/20230107011025.565472-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
arch/x86/kvm/lapic.c