[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <171932922715.2215.13368774215942312273.tip-bot2@tip-bot2>
Date: Tue, 25 Jun 2024 15:27:07 -0000
From: "tip-bot2 for Alexey Makhalov" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Alexey Makhalov <alexey.makhalov@...adcom.com>,
"Borislav Petkov (AMD)" <bp@...en8.de>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: x86/vmware] x86/vmware: Correct macro names
The following commit has been merged into the x86/vmware branch of tip:
Commit-ID: 86cb65448d07fe516e18d9512ae5786cd90db9bf
Gitweb: https://git.kernel.org/tip/86cb65448d07fe516e18d9512ae5786cd90db9bf
Author: Alexey Makhalov <alexey.makhalov@...adcom.com>
AuthorDate: Thu, 13 Jun 2024 12:16:48 -07:00
Committer: Borislav Petkov (AMD) <bp@...en8.de>
CommitterDate: Tue, 25 Jun 2024 17:15:48 +02:00
x86/vmware: Correct macro names
VCPU_RESERVED and LEGACY_X2APIC are not VMware hypercall commands. These are
bits in the return value of the VMWARE_CMD_GETVCPU_INFO command. Change
VMWARE_CMD_ prefix to GETVCPU_INFO_ one. And move the bit-shift
operation into the macro body.
Fixes: 4cca6ea04d31c ("x86/apic: Allow x2apic without IR on VMware platform")
Signed-off-by: Alexey Makhalov <alexey.makhalov@...adcom.com>
Signed-off-by: Borislav Petkov (AMD) <bp@...en8.de>
Link: https://lore.kernel.org/r/20240613191650.9913-7-alexey.makhalov@broadcom.com
---
arch/x86/kernel/cpu/vmware.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c
index 24d6fd8..fc1b3f6 100644
--- a/arch/x86/kernel/cpu/vmware.c
+++ b/arch/x86/kernel/cpu/vmware.c
@@ -42,8 +42,8 @@
#define CPUID_VMWARE_INFO_LEAF 0x40000000
#define CPUID_VMWARE_FEATURES_LEAF 0x40000010
-#define VMWARE_CMD_LEGACY_X2APIC 3
-#define VMWARE_CMD_VCPU_RESERVED 31
+#define GETVCPU_INFO_LEGACY_X2APIC BIT(3)
+#define GETVCPU_INFO_VCPU_RESERVED BIT(31)
#define STEALCLOCK_NOT_AVAILABLE (-1)
#define STEALCLOCK_DISABLED 0
@@ -485,8 +485,8 @@ static bool __init vmware_legacy_x2apic_available(void)
u32 eax;
eax = vmware_hypercall1(VMWARE_CMD_GETVCPU_INFO, 0);
- return !(eax & BIT(VMWARE_CMD_VCPU_RESERVED)) &&
- (eax & BIT(VMWARE_CMD_LEGACY_X2APIC));
+ return !(eax & GETVCPU_INFO_VCPU_RESERVED) &&
+ (eax & GETVCPU_INFO_LEGACY_X2APIC);
}
#ifdef CONFIG_AMD_MEM_ENCRYPT
Powered by blists - more mailing lists