Commit 8539d3f0 authored by Sean Christopherson's avatar Sean Christopherson Committed by Borislav Petkov
Browse files

x86/asm: Drop unused RDPID macro



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

  6a3ea3e6 ("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: default avatarSean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20201027214532.1792-1-sean.j.christopherson@intel.com
parent ab09b58e
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -143,21 +143,6 @@
	.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