mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Alexey Makhalov" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Alexey Makhalov <alexey.makhalov@broadcom.com>,
	"Borislav Petkov (AMD)" <bp@alien8.de>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/vmware] x86/vmware: Correct macro names
Date: Sat, 15 Jun 2024 08:21:45 -0000	[thread overview]
Message-ID: <171843970589.10875.891286825871783055.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20240613191650.9913-7-alexey.makhalov@broadcom.com>

The following commit has been merged into the x86/vmware branch of tip:

Commit-ID:     ad85151d88ee6725550b856d2567bf7f3d3370e0
Gitweb:        https://git.kernel.org/tip/ad85151d88ee6725550b856d2567bf7f3d3370e0
Author:        Alexey Makhalov <alexey.makhalov@broadcom.com>
AuthorDate:    Thu, 13 Jun 2024 12:16:48 -07:00
Committer:     Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Fri, 14 Jun 2024 18:01:21 +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@broadcom.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.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 c0a3ffa..d24ba03 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
@@ -473,8 +473,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

  reply	other threads:[~2024-06-15  8:21 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-13 19:16 [PATCH v11 0/8] VMware hypercalls enhancements Alexey Makhalov
2024-06-13 19:16 ` [PATCH v11 1/8] x86/vmware: Introduce VMware hypercall API Alexey Makhalov
2024-06-15  8:21   ` [tip: x86/vmware] " tip-bot2 for Alexey Makhalov
2024-06-24 17:14   ` tip-bot2 for Alexey Makhalov
2024-06-25 15:27   ` tip-bot2 for Alexey Makhalov
2024-06-13 19:16 ` [PATCH v11 2/8] ptp/vmware: Use " Alexey Makhalov
2024-06-15  8:21   ` [tip: x86/vmware] " tip-bot2 for Alexey Makhalov
2024-06-24 17:14   ` tip-bot2 for Alexey Makhalov
2024-06-25 15:27   ` tip-bot2 for Alexey Makhalov
2024-06-13 19:16 ` [PATCH v11 3/8] input/vmmouse: " Alexey Makhalov
2024-06-15  8:21   ` [tip: x86/vmware] " tip-bot2 for Alexey Makhalov
2024-06-24 17:14   ` tip-bot2 for Alexey Makhalov
2024-06-25 15:27   ` tip-bot2 for Alexey Makhalov
2024-06-13 19:16 ` [PATCH v11 4/8] drm/vmwgfx: " Alexey Makhalov
2024-06-15  8:21   ` [tip: x86/vmware] " tip-bot2 for Alexey Makhalov
2024-06-24 17:14   ` tip-bot2 for Alexey Makhalov
2024-06-25 15:27   ` tip-bot2 for Alexey Makhalov
2024-06-13 19:16 ` [PATCH v11 5/8] x86/vmware: " Alexey Makhalov
2024-06-15  8:21   ` [tip: x86/vmware] " tip-bot2 for Alexey Makhalov
2024-06-24 17:14   ` tip-bot2 for Alexey Makhalov
2024-06-25 15:27   ` tip-bot2 for Alexey Makhalov
2024-06-13 19:16 ` [PATCH v11 6/8] x86/vmware: Correct macro names Alexey Makhalov
2024-06-15  8:21   ` tip-bot2 for Alexey Makhalov [this message]
2024-06-24 17:14   ` [tip: x86/vmware] " tip-bot2 for Alexey Makhalov
2024-06-25 15:27   ` tip-bot2 for Alexey Makhalov
2024-06-13 19:16 ` [PATCH v11 7/8] x86/vmware: Remove legacy VMWARE_HYPERCALL* macros Alexey Makhalov
2024-06-15  8:21   ` [tip: x86/vmware] " tip-bot2 for Alexey Makhalov
2024-06-24 17:14   ` tip-bot2 for Alexey Makhalov
2024-06-25 15:27   ` tip-bot2 for Alexey Makhalov
2024-06-13 19:16 ` [PATCH v11 8/8] x86/vmware: Add TDX hypercall support Alexey Makhalov
2024-06-14 16:03   ` Dave Hansen
2024-06-14 16:14     ` Borislav Petkov
2024-06-14 16:19       ` Dave Hansen
2024-06-14 18:32         ` Alexey Makhalov
2024-06-14 19:09           ` Borislav Petkov
2024-06-14 22:00             ` Alexey Makhalov
2024-06-15  8:21   ` [tip: x86/vmware] " tip-bot2 for Alexey Makhalov
2024-06-24 17:14   ` tip-bot2 for Alexey Makhalov
2024-06-25 15:27   ` tip-bot2 for Alexey Makhalov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=171843970589.10875.891286825871783055.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=alexey.makhalov@broadcom.com \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®