[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <adcbfb9a-a4e1-4a32-b786-6c204d941e9f@broadcom.com>
Date: Wed, 24 Apr 2024 16:12:22 -0700
From: Alexey Makhalov <alexey.makhalov@...adcom.com>
To: Borislav Petkov <bp@...en8.de>
Cc: linux-kernel@...r.kernel.org, virtualization@...ts.linux.dev,
hpa@...or.com, dave.hansen@...ux.intel.com, mingo@...hat.com,
tglx@...utronix.de, x86@...nel.org, netdev@...r.kernel.org,
richardcochran@...il.com, linux-input@...r.kernel.org,
dmitry.torokhov@...il.com, zackr@...are.com,
linux-graphics-maintainer@...are.com, pv-drivers@...are.com,
timothym@...are.com, akaher@...are.com, dri-devel@...ts.freedesktop.org,
daniel@...ll.ch, airlied@...il.com, tzimmermann@...e.de, mripard@...nel.org,
maarten.lankhorst@...ux.intel.com, horms@...nel.org,
kirill.shutemov@...ux.intel.com, Nadav Amit <nadav.amit@...il.com>
Subject: Re: [PATCH v8 1/7] x86/vmware: Move common macros to vmware.h
On 4/24/24 9:06 AM, Borislav Petkov wrote:
> On Mon, Apr 22, 2024 at 03:56:50PM -0700, Alexey Makhalov wrote:
>> Move VMware hypercall macros to vmware.h. This is a prerequisite for
>> the introduction of vmware_hypercall API. No functional changes besides
>> exporting vmware_hypercall_mode symbol.
>
> Well, I see more.
>
> So code movement patches should be done this way:
>
> * first patch: sole code movement, no changes whatsoever
>
> * follow-on patches: add changes and explain them
>
> Because... (follow me down)...
>
>> @@ -476,8 +431,8 @@ static bool __init vmware_legacy_x2apic_available(void)
>> {
>> uint32_t eax, ebx, ecx, edx;
>> VMWARE_CMD(GETVCPU_INFO, eax, ebx, ecx, edx);
>> - return !(eax & BIT(VMWARE_CMD_VCPU_RESERVED)) &&
>> - (eax & BIT(VMWARE_CMD_LEGACY_X2APIC));
>> + return !(eax & BIT(VCPU_RESERVED)) &&
>> + (eax & BIT(VCPU_LEGACY_X2APIC));
>
> ... what is that change for?
>
> Those bit definitions are clearly vmware-specific. So why are you
> changing them to something generic-ish?
>
> In any case, this patch needs to be split as outlined above.
Thanks for prompt review. The concern is valid.
I've split this patch on 2 pieces:
1. Macro renaming - to use proper prefix GETVCPU_INFO_ instead of
incorrect VMWARE_CMD_.
2. Code movement - the original idea of the patch.
Remaining patches will remain intact.
Thanks,
--Alexey
Powered by blists - more mailing lists