x86/asm: Drop unused RDPID macro
authorSean Christopherson <sean.j.christopherson@intel.com>
Tue, 27 Oct 2020 21:45:32 +0000 (14:45 -0700)
committerBorislav Petkov <bp@suse.de>
Thu, 26 Nov 2020 11:58:56 +0000 (12:58 +0100)
Drop the GAS-compatible RDPID macro. RDPID is unsafe in the kernel
because KVM loads guest's TSC_AUX on VM-entry and may not restore the
host's value until the CPU returns to userspace.

See

  6a3ea3e68b8a ("x86/entry/64: Do not use RDPID in paranoid entry to accomodate KVM")

for details.

It can always be resurrected from git history, if needed.

 [ bp: Massage commit message. ]

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20201027214532.1792-1-sean.j.christopherson@intel.com
arch/x86/include/asm/inst.h

index bd7f02480ca1d1dbd45392bbc1f2bd753dc968a6..438ccd4f3cc450d60223bc5956ca65c3995c3b21 100644 (file)
        .macro MODRM mod opd1 opd2
        .byte \mod | (\opd1 & 7) | ((\opd2 & 7) << 3)
        .endm
-
-.macro RDPID opd
-       REG_TYPE rdpid_opd_type \opd
-       .if rdpid_opd_type == REG_TYPE_R64
-       R64_NUM rdpid_opd \opd
-       .else
-       R32_NUM rdpid_opd \opd
-       .endif
-       .byte 0xf3
-       .if rdpid_opd > 7
-       PFX_REX rdpid_opd 0
-       .endif
-       .byte 0x0f, 0xc7
-       MODRM 0xc0 rdpid_opd 0x7
-.endm
 #endif
 
 #endif