Re: [PATCH 1/2] drm/vmwgfx: Fix missing HYPERVISOR_GUEST dependency

2024-06-17 Thread Alexey Makhalov
On 6/17/24 2:17 PM, Borislav Petkov wrote: On Mon, Jun 17, 2024 at 01:51:23PM -0700, Alexey Makhalov wrote: Not really a gcc related, but the matter of a config file. It is reproducible if CONFIG_HYPERVISOR_GUEST not set, but CONFIG_DRM_VMWGFX=y. And this combination was allowed before the

Re: [PATCH 2/2] iio: dac: Fix dependencies of AD9739A

2024-06-17 Thread Alexey Makhalov
Haha, got it! On Mon, Jun 17, 2024 at 2:02 PM Borislav Petkov wrote: > On Mon, Jun 17, 2024 at 01:48:38PM -0700, Alexey Makhalov wrote: > > > Don't get discouraged, though, when fixing something that is not in our > > > immediate area of interest! > > > &

Re: [PATCH 1/2] drm/vmwgfx: Fix missing HYPERVISOR_GUEST dependency

2024-06-17 Thread Alexey Makhalov
On 6/17/24 2:07 AM, Borislav Petkov wrote: On Sat, Jun 15, 2024 at 06:25:10PM -0700, Alexey Makhalov wrote: VMWARE_HYPERCALL alternative will not work as intended without VMware guest code initialization. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all

Re: [PATCH 2/2] iio: dac: Fix dependencies of AD9739A

2024-06-17 Thread Alexey Makhalov
On 6/17/24 2:04 AM, Borislav Petkov wrote: On Sat, Jun 15, 2024 at 06:25:11PM -0700, Alexey Makhalov wrote: 0-DAY CI Kernel Test automation reported an issue: ld: drivers/base/regmap/regmap-spi.o: in function `regmap_spi_read': regmap-spi.c:(.text+0xf): undefined referen

[PATCH 2/2] iio: dac: Fix dependencies of AD9739A

2024-06-15 Thread Alexey Makhalov
f REGMAP_SPI. Fixes: e77603d5468b ("iio: dac: support the ad9739a RF DAC") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406152104.fxakp1mb-...@intel.com/ Signed-off-by: Alexey Makhalov --- drivers/iio/dac/Kconfig | 4 ++-- 1 file changed, 2 insertion

[PATCH 1/2] drm/vmwgfx: Fix missing HYPERVISOR_GUEST dependency

2024-06-15 Thread Alexey Makhalov
VMWARE_HYPERCALL alternative will not work as intended without VMware guest code initialization. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406152104.fxakp1mb-...@intel.com/ Signed-off-by: Alexey Makhalov --- drivers/gpu/drm/vmwgfx/Kconfig | 2 +- 1 file

Re: [PATCH v11 8/8] x86/vmware: Add TDX hypercall support

2024-06-14 Thread Alexey Makhalov
On 6/14/24 12:09 PM, Borislav Petkov wrote: On Fri, Jun 14, 2024 at 11:32:16AM -0700, Alexey Makhalov wrote: On 6/14/24 9:19 AM, Dave Hansen wrote: On 6/14/24 09:14, Borislav Petkov wrote: On Fri, Jun 14, 2024 at 09:03:22AM -0700, Dave Hansen wrote: ... You need to zero out all of

Re: [PATCH v11 8/8] x86/vmware: Add TDX hypercall support

2024-06-14 Thread Alexey Makhalov
On 6/14/24 9:19 AM, Dave Hansen wrote: On 6/14/24 09:14, Borislav Petkov wrote: On Fri, Jun 14, 2024 at 09:03:22AM -0700, Dave Hansen wrote: ... You need to zero out all of 'args' somehow. You mean like this: struct tdx_module_args args = {}; ? Yes, or do all the assignments w

[PATCH v11 5/8] x86/vmware: Use VMware hypercall API

2024-06-13 Thread Alexey Makhalov
Remove VMWARE_CMD macro and move to vmware_hypercall API. No functional changes intended. Use u32/u64 instead of uint32_t/uint64_t across the file Signed-off-by: Alexey Makhalov --- arch/x86/kernel/cpu/vmware.c | 95 ++-- 1 file changed, 25 insertions(+), 70

[PATCH v11 2/8] ptp/vmware: Use VMware hypercall API

2024-06-13 Thread Alexey Makhalov
Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. No functional changes intended. Signed-off-by: Alexey Makhalov --- drivers/ptp/ptp_vmw.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/ptp/ptp_vmw.c b/drivers/ptp

[PATCH v11 0/8] VMware hypercalls enhancements

2024-06-13 Thread Alexey Makhalov
atches. - Added Ack from Dmitry Torokhov in patch 4. No fixes regarding reported by Simon Horman gcc error in this patch. Alexey Makhalov (8): x86/vmware: Introduce VMware hypercall API ptp/vmware: Use VMware hypercall API input/vmmouse: Use VMware hypercall API drm/vmwgfx: Use VMware

[PATCH v11 8/8] x86/vmware: Add TDX hypercall support

2024-06-13 Thread Alexey Makhalov
VMware hypercalls use I/O port, VMCALL or VMMCALL instructions. Add __tdx_hypercall path to support TDX guests. No change in high bandwidth hypercalls, as only low bandwidth ones are supported for TDX guests. Co-developed-by: Tim Merrifield Signed-off-by: Tim Merrifield Signed-off-by: Alexey

[PATCH v11 7/8] x86/vmware: Remove legacy VMWARE_HYPERCALL* macros

2024-06-13 Thread Alexey Makhalov
No more direct use of these macros should be allowed. vmware_hypercallX api still use new implementation of VMWARE_HYPERCALL macro internally, but it is not exposed outside of the vmware.h. Signed-off-by: Alexey Makhalov --- arch/x86/include/asm/vmware.h | 26 -- 1 file

[PATCH v11 6/8] x86/vmware: Correct macro names

2024-06-13 Thread Alexey Makhalov
Mware platform") Signed-off-by: Alexey Makhalov --- 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 c0a3ffa9e023..d24ba03b30b8 100644 --- a/arch/x86/kernel/cpu/vmware.c

[PATCH v11 4/8] drm/vmwgfx: Use VMware hypercall API

2024-06-13 Thread Alexey Makhalov
Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. drivers/gpu/drm/vmwgfx/vmwgfx_msg_arm64.h: implement arm64 variant of vmware_hypercall. And keep it here until introduction of ARM64 VMWare hypervisor interface. Signed-off-by: Alexey Makhalov --- drivers

[PATCH v11 3/8] input/vmmouse: Use VMware hypercall API

2024-06-13 Thread Alexey Makhalov
Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. No functional changes intended. Signed-off-by: Alexey Makhalov --- drivers/input/mouse/vmmouse.c | 76 ++- 1 file changed, 22 insertions(+), 54 deletions(-) diff --git a

[PATCH v11 1/8] x86/vmware: Introduce VMware hypercall API

2024-06-13 Thread Alexey Makhalov
Signed-off-by: Alexey Makhalov --- arch/x86/include/asm/vmware.h | 279 -- arch/x86/kernel/cpu/vmware.c | 58 ++- 2 files changed, 315 insertions(+), 22 deletions(-) diff --git a/arch/x86/include/asm/vmware.h b/arch/x86/include/asm/vmware.h index ac

Re: [PATCH v11 1/8] x86/vmware: Introduce VMware hypercall API

2024-06-12 Thread Alexey Makhalov
Borislav, please review v11 implementation of 1/8 based on your proposal. I'm waiting for your feedback before sending full v11 patchset. Thanks, --Alexey On 6/6/24 4:23 PM, Alexey Makhalov wrote: Introduce vmware_hypercall family of functions. It is a common implementation to be used b

[PATCH v11 1/8] x86/vmware: Introduce VMware hypercall API

2024-06-06 Thread Alexey Makhalov
Signed-off-by: Alexey Makhalov --- arch/x86/include/asm/vmware.h | 279 -- arch/x86/kernel/cpu/vmware.c | 58 ++- 2 files changed, 315 insertions(+), 22 deletions(-) diff --git a/arch/x86/include/asm/vmware.h b/arch/x86/include/asm/vmware.h index ac

Re: [PATCH v10 1/8] x86/vmware: Introduce VMware hypercall API

2024-06-06 Thread Alexey Makhalov
On 6/3/24 10:58 AM, Borislav Petkov wrote: On Wed, May 29, 2024 at 05:44:32PM -0700, Alexey Makhalov wrote: While most of the vmware_hypercall callers are executed after alternative patching applied, there are small amount of hypercalls running before that. Only for them we have the logic of

Re: [PATCH v10 6/8] x86/vmware: Correct macro names

2024-05-29 Thread Alexey Makhalov
On 5/25/24 8:53 AM, Markus Elfring wrote: VCPU_RESERVED and LEGACY_X2APIC are not VMware hypercall commands. These are bits in return value of VMWARE_CMD_GETVCPU_INFO command. Change VMWARE_CMD_ prefix to GETVCPU_INFO_ one. … Can such information be relevant for the addition of the tag “Fixe

Re: [PATCH v10 1/8] x86/vmware: Introduce VMware hypercall API

2024-05-29 Thread Alexey Makhalov
On 5/27/24 10:07 AM, Borislav Petkov wrote: On Thu, May 23, 2024 at 12:14:39PM -0700, Alexey Makhalov wrote: +#define VMWARE_HYPERCALL \ + ALTERNATIVE_3("", \ +

[PATCH v10 7/8] x86/vmware: Remove legacy VMWARE_HYPERCALL* macros

2024-05-23 Thread Alexey Makhalov
No more direct use of these macros should be allowed. vmware_hypercallX api still use new implementation of VMWARE_HYPERCALL macro internally, but it is not exposed outside of the vmware.h. Signed-off-by: Alexey Makhalov --- arch/x86/include/asm/vmware.h | 26 -- 1 file

[PATCH v10 8/8] x86/vmware: Add TDX hypercall support

2024-05-23 Thread Alexey Makhalov
VMware hypercalls use I/O port, VMCALL or VMMCALL instructions. Add __tdx_hypercall path to support TDX guests. No change in high bandwidth hypercalls, as only low bandwidth ones are supported for TDX guests. Co-developed-by: Tim Merrifield Signed-off-by: Tim Merrifield Signed-off-by: Alexey

[PATCH v10 6/8] x86/vmware: Correct macro names

2024-05-23 Thread Alexey Makhalov
VCPU_RESERVED and LEGACY_X2APIC are not VMware hypercall commands. These are bits in return value of VMWARE_CMD_GETVCPU_INFO command. Change VMWARE_CMD_ prefix to GETVCPU_INFO_ one. And move bit-shift operation to the macro body. Signed-off-by: Alexey Makhalov --- arch/x86/kernel/cpu/vmware.c

[PATCH v10 4/8] drm/vmwgfx: Use VMware hypercall API

2024-05-23 Thread Alexey Makhalov
Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. drivers/gpu/drm/vmwgfx/vmwgfx_msg_arm64.h: implement arm64 variant of vmware_hypercall. And keep it here until introduction of ARM64 VMWare hypervisor interface. Signed-off-by: Alexey Makhalov --- drivers

[PATCH v10 3/8] input/vmmouse: Use VMware hypercall API

2024-05-23 Thread Alexey Makhalov
Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. No functional changes intended. Signed-off-by: Alexey Makhalov --- drivers/input/mouse/vmmouse.c | 76 ++- 1 file changed, 22 insertions(+), 54 deletions(-) diff --git a

[PATCH v10 2/8] ptp/vmware: Use VMware hypercall API

2024-05-23 Thread Alexey Makhalov
Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. No functional changes intended. Signed-off-by: Alexey Makhalov --- drivers/ptp/ptp_vmw.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/ptp/ptp_vmw.c b/drivers/ptp

[PATCH v10 5/8] x86/vmware: Use VMware hypercall API

2024-05-23 Thread Alexey Makhalov
Remove VMWARE_CMD macro and move to vmware_hypercall API. No functional changes intended. Use u32/u64 instead of uint32_t/uint64_t across the file Signed-off-by: Alexey Makhalov --- arch/x86/kernel/cpu/vmware.c | 95 ++-- 1 file changed, 25 insertions(+), 70

[PATCH v10 1/8] x86/vmware: Introduce VMware hypercall API

2024-05-23 Thread Alexey Makhalov
e.h. Make vmware_hypercall_mode a global variable. Signed-off-by: Alexey Makhalov --- arch/x86/include/asm/vmware.h | 274 -- arch/x86/kernel/cpu/vmware.c | 11 +- 2 files changed, 262 insertions(+), 23 deletions(-) diff --git a/arch/x86/include/asm/vmware.h b/arch/x86/i

[PATCH v10 0/8] VMware hypercalls enhancements

2024-05-23 Thread Alexey Makhalov
4. No fixes regarding reported by Simon Horman gcc error in this patch. Alexey Makhalov (8): x86/vmware: Introduce VMware hypercall API ptp/vmware: Use VMware hypercall API input/vmmouse: Use VMware hypercall API drm/vmwgfx: Use VMware hypercall API x86/vmware: Use VMware hypercal

Re: [PATCH v9 3/8] x86/vmware: Introduce VMware hypercall API

2024-05-22 Thread Alexey Makhalov
Hi Simon, apologize for long delay On 5/11/24 8:02 AM, Simon Horman wrote: diff --git a/arch/x86/include/asm/vmware.h b/arch/x86/include/asm/vmware.h ... +static inline +unsigned long vmware_hypercall3(unsigned long cmd, unsigned long in1, + uint32_t *out1, uint

Re: [PATCH v9 3/8] x86/vmware: Introduce VMware hypercall API

2024-05-09 Thread Alexey Makhalov
On 5/7/24 2:58 AM, Borislav Petkov wrote: On Mon, May 06, 2024 at 02:53:00PM -0700, Alexey Makhalov wrote: +#define VMWARE_HYPERCALL \ + ALTERNATIVE_3("

Re: [PATCH v9 1/8] x86/vmware: Move common macros to vmware.h

2024-05-09 Thread Alexey Makhalov
On 5/7/24 2:14 AM, Borislav Petkov wrote: On Mon, May 06, 2024 at 02:52:58PM -0700, Alexey Makhalov wrote: +#define VMWARE_HYPERVISOR_PORT 0x5658 +#define VMWARE_HYPERVISOR_PORT_HB (VMWARE_HYPERVISOR_PORT | \ +VMWARE_HYPERVISOR_HB) You

[PATCH v9 7/8] x86/vmware: Undefine VMWARE_HYPERCALL

2024-05-06 Thread Alexey Makhalov
No more direct use of VMWARE_HYPERCALL macro should be allowed. Signed-off-by: Alexey Makhalov --- arch/x86/include/asm/vmware.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/vmware.h b/arch/x86/include/asm/vmware.h index 2ac87068184a..84a31f579a30 100644 --- a/arch

[PATCH v9 8/8] x86/vmware: Add TDX hypercall support

2024-05-06 Thread Alexey Makhalov
VMware hypercalls use I/O port, VMCALL or VMMCALL instructions. Add __tdx_hypercall path to support TDX guests. No change in high bandwidth hypercalls, as only low bandwidth ones are supported for TDX guests. Co-developed-by: Tim Merrifield Signed-off-by: Tim Merrifield Signed-off-by: Alexey

[PATCH v9 6/8] drm/vmwgfx: Use VMware hypercall API

2024-05-06 Thread Alexey Makhalov
Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. drivers/gpu/drm/vmwgfx/vmwgfx_msg_arm64.h: implement arm64 variant of vmware_hypercall. And keep it here until introduction of ARM64 VMWare hypervisor interface. Signed-off-by: Alexey Makhalov Reviewed-by

[PATCH v9 5/8] input/vmmouse: Use VMware hypercall API

2024-05-06 Thread Alexey Makhalov
Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. No functional changes intended. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit Reviewed-by: Zack Rusin Acked-by: Dmitry Torokhov --- drivers/input/mouse/vmmouse.c | 78

[PATCH v9 4/8] ptp/vmware: Use VMware hypercall API

2024-05-06 Thread Alexey Makhalov
Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. No functional changes intended. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit Reviewed-by: Jeff Sipek --- drivers/ptp/ptp_vmw.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions

[PATCH v9 3/8] x86/vmware: Introduce VMware hypercall API

2024-05-06 Thread Alexey Makhalov
to reduce excessive nop alignment once alternatives are applied. Total default code size is 26 bytes, in worse case (3 bytes alternative) remaining 23 bytes will be aligned by only 3 long NOP instructions. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit Reviewed-by: Jeff Sipek --- arch/x

[PATCH v9 1/8] x86/vmware: Move common macros to vmware.h

2024-05-06 Thread Alexey Makhalov
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. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit --- arch/x86/include/asm/vmware.h | 72

[PATCH v9 2/8] x86/vmware: Correct macro names

2024-05-06 Thread Alexey Makhalov
VCPU_RESERVED and LEGACY_X2APIC are not VMware hypercall commands. These are bits in return value of VMWARE_CMD_GETVCPU_INFO command. Change VMWARE_CMD_ prefix to GETVCPU_INFO_ one. And move bit-shift operation to the macro body. Signed-off-by: Alexey Makhalov --- arch/x86/kernel/cpu/vmware.c

[PATCH v9 0/8] VMware hypercalls enhancements

2024-05-06 Thread Alexey Makhalov
ch 4. No fixes regarding reported by Simon Horman gcc error in this patch. Alexey Makhalov (8): x86/vmware: Move common macros to vmware.h x86/vmware: Correct macro names x86/vmware: Introduce VMware hypercall API ptp/vmware: Use VMware hypercall API input/vmmouse: Use VMware hypercall A

Re: [PATCH v9 1/8] x86/vmware: Correct macro names

2024-04-25 Thread Alexey Makhalov
On 4/25/24 8:21 AM, Borislav Petkov wrote: On Wed, Apr 24, 2024 at 04:14:06PM -0700, Alexey Makhalov wrote: VCPU_RESERVED and LEGACY_X2APIC are not VMware hypercall commands. These are bits in return value of VMWARE_CMD_GETVCPU_INFO command. Change VMWARE_CMD_ prefix to GETVCPU_INFO_ one

[PATCH v9 2/8] x86/vmware: Move common macros to vmware.h

2024-04-24 Thread Alexey Makhalov
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. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit --- arch/x86/include/asm/vmware.h | 72

[PATCH v9 1/8] x86/vmware: Correct macro names

2024-04-24 Thread Alexey Makhalov
VCPU_RESERVED and LEGACY_X2APIC are not VMware hypercall commands. These are bits in return value of VMWARE_CMD_GETVCPU_INFO command. Change VMWARE_CMD_ prefix to GETVCPU_INFO_ one. And move bit-shift operation to the macro body. Signed-off-by: Alexey Makhalov --- arch/x86/kernel/cpu/vmware.c

Re: [PATCH v8 1/7] x86/vmware: Move common macros to vmware.h

2024-04-24 Thread Alexey Makhalov
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

[PATCH v8 7/7] x86/vmware: Add TDX hypercall support

2024-04-22 Thread Alexey Makhalov
VMware hypercalls use I/O port, VMCALL or VMMCALL instructions. Add __tdx_hypercall path to support TDX guests. No change in high bandwidth hypercalls, as only low bandwidth ones are supported for TDX guests. Co-developed-by: Tim Merrifield Signed-off-by: Tim Merrifield Signed-off-by: Alexey

[PATCH v8 5/7] drm/vmwgfx: Use VMware hypercall API

2024-04-22 Thread Alexey Makhalov
Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. drivers/gpu/drm/vmwgfx/vmwgfx_msg_arm64.h: implement arm64 variant of vmware_hypercall. And keep it here until introduction of ARM64 VMWare hypervisor interface. Signed-off-by: Alexey Makhalov Reviewed-by

[PATCH v8 6/7] x86/vmware: Undefine VMWARE_HYPERCALL

2024-04-22 Thread Alexey Makhalov
No more direct use of VMWARE_HYPERCALL macro should be allowed. Signed-off-by: Alexey Makhalov --- arch/x86/include/asm/vmware.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/vmware.h b/arch/x86/include/asm/vmware.h index 2ac87068184a..84a31f579a30 100644 --- a/arch

[PATCH v8 4/7] input/vmmouse: Use VMware hypercall API

2024-04-22 Thread Alexey Makhalov
Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. No functional changes intended. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit Reviewed-by: Zack Rusin Acked-by: Dmitry Torokhov --- drivers/input/mouse/vmmouse.c | 78

[PATCH v8 2/7] x86/vmware: Introduce VMware hypercall API

2024-04-22 Thread Alexey Makhalov
to reduce excessive nop alignment once alternatives are applied. Total default code size is 26 bytes, in worse case (3 bytes alternative) remaining 23 bytes will be aligned by only 3 long NOP instructions. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit Reviewed-by: Jeff Sipek --- arch/x

[PATCH v8 3/7] ptp/vmware: Use VMware hypercall API

2024-04-22 Thread Alexey Makhalov
Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. No functional changes intended. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit Reviewed-by: Jeff Sipek --- drivers/ptp/ptp_vmw.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions

[PATCH v8 1/7] x86/vmware: Move common macros to vmware.h

2024-04-22 Thread Alexey Makhalov
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. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit --- arch/x86/include/asm/vmware.h | 72

[PATCH v8 0/7] VMware hypercalls enhancements

2024-04-22 Thread Alexey Makhalov
st specific. v1->v2 changes (no functional changes): - Improved commit message in patches 2 and 5. - Added Reviewed-by for all patches. - Added Ack from Dmitry Torokhov in patch 4. No fixes regarding reported by Simon Horman gcc error in this patch. Alexey Makhalov (7): x86/vmware: Move

Re: [PATCH v7 0/7] VMware hypercalls enhancements

2024-04-04 Thread Alexey Makhalov
Peter, can you please review version 7 of "x86/vmware: Add TDX hypercall support" patch. It addresses the concern you had in previous version. Thanks.

[PATCH v7 4/7] input/vmmouse: Use VMware hypercall API

2024-03-07 Thread Alexey Makhalov
From: Alexey Makhalov Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. No functional changes intended. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit Reviewed-by: Zack Rusin Acked-by: Dmitry Torokhov --- drivers/input/mouse/vmmouse.c | 78

[PATCH v7 5/7] drm/vmwgfx: Use VMware hypercall API

2024-03-07 Thread Alexey Makhalov
From: Alexey Makhalov Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. drivers/gpu/drm/vmwgfx/vmwgfx_msg_arm64.h: implement arm64 variant of vmware_hypercall. And keep it here until introduction of ARM64 VMWare hypervisor interface. Signed-off-by

[PATCH v7 7/7] x86/vmware: Add TDX hypercall support

2024-03-07 Thread Alexey Makhalov
From: Alexey Makhalov VMware hypercalls use I/O port, VMCALL or VMMCALL instructions. Add __tdx_hypercall path to support TDX guests. No change in high bandwidth hypercalls, as only low bandwidth ones are supported for TDX guests. Co-developed-by: Tim Merrifield Signed-off-by: Tim Merrifield

[PATCH v7 6/7] x86/vmware: Undefine VMWARE_HYPERCALL

2024-03-07 Thread Alexey Makhalov
From: Alexey Makhalov No more direct use of VMWARE_HYPERCALL macro should be allowed. Signed-off-by: Alexey Makhalov --- arch/x86/include/asm/vmware.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/vmware.h b/arch/x86/include/asm/vmware.h index 2ac87068184a

[PATCH v7 3/7] ptp/vmware: Use VMware hypercall API

2024-03-07 Thread Alexey Makhalov
From: Alexey Makhalov Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. No functional changes intended. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit Reviewed-by: Jeff Sipek --- drivers/ptp/ptp_vmw.c | 14 +++--- 1 file changed, 3

[PATCH v7 2/7] x86/vmware: Introduce VMware hypercall API

2024-03-07 Thread Alexey Makhalov
From: Alexey Makhalov Introduce vmware_hypercall family of functions. It is a common implementation to be used by the VMware guest code and virtual device drivers in architecture independent manner. The API consists of vmware_hypercallX and vmware_hypercall_hb_{out,in} set of functions by

[PATCH v7 1/7] x86/vmware: Move common macros to vmware.h

2024-03-07 Thread Alexey Makhalov
From: Alexey Makhalov 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. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit --- arch/x86/include/asm/vmware.h

[PATCH v7 0/7] VMware hypercalls enhancements

2024-03-07 Thread Alexey Makhalov
mon Horman gcc error in this patch. Alexey Makhalov (7): x86/vmware: Move common macros to vmware.h x86/vmware: Introduce VMware hypercall API ptp/vmware: Use VMware hypercall API input/vmmouse: Use VMware hypercall API drm/vmwgfx: Use VMware hypercall API x86/vmware: Undefine VMWARE_HYP

Re: [PATCH v6 7/7] x86/vmware: Add TDX hypercall support

2024-01-25 Thread Alexey Makhalov
On 1/22/24 4:17 PM, H. Peter Anvin wrote: On January 22, 2024 4:04:33 PM PST, Alexey Makhalov wrote: On 1/22/24 10:28 AM, H. Peter Anvin wrote: On January 22, 2024 8:32:22 AM PST, Dave Hansen wrote: On 1/9/24 00:40, Alexey Makhalov wrote: +#ifdef CONFIG_INTEL_TDX_GUEST +unsigned long

Re: [PATCH v6 7/7] x86/vmware: Add TDX hypercall support

2024-01-22 Thread Alexey Makhalov
On 1/22/24 10:28 AM, H. Peter Anvin wrote: On January 22, 2024 8:32:22 AM PST, Dave Hansen wrote: On 1/9/24 00:40, Alexey Makhalov wrote: +#ifdef CONFIG_INTEL_TDX_GUEST +unsigned long vmware_tdx_hypercall(unsigned long cmd, + struct tdx_module_args *args

[PATCH v6 7/7] x86/vmware: Add TDX hypercall support

2024-01-09 Thread Alexey Makhalov
VMware hypercalls use I/O port, VMCALL or VMMCALL instructions. Add __tdx_hypercall path to support TDX guests. No change in high bandwidth hypercalls, as only low bandwidth ones are supported for TDX guests. Co-developed-by: Tim Merrifield Signed-off-by: Tim Merrifield Signed-off-by: Alexey

[PATCH v6 6/7] x86/vmware: Undefine VMWARE_HYPERCALL

2024-01-09 Thread Alexey Makhalov
No more direct use of VMWARE_HYPERCALL macro should be allowed. Signed-off-by: Alexey Makhalov --- arch/x86/include/asm/vmware.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/vmware.h b/arch/x86/include/asm/vmware.h index 2ac87068184a..84a31f579a30 100644 --- a/arch

[PATCH v6 5/7] drm/vmwgfx: Use VMware hypercall API

2024-01-09 Thread Alexey Makhalov
Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. drivers/gpu/drm/vmwgfx/vmwgfx_msg_arm64.h: implement arm64 variant of vmware_hypercall. And keep it here until introduction of ARM64 VMWare hypervisor interface. Signed-off-by: Alexey Makhalov Reviewed-by

[PATCH v6 4/7] input/vmmouse: Use VMware hypercall API

2024-01-09 Thread Alexey Makhalov
Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. No functional changes intended. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit Reviewed-by: Zack Rusin Acked-by: Dmitry Torokhov --- drivers/input/mouse/vmmouse.c | 78

[PATCH v6 3/7] ptp/vmware: Use VMware hypercall API

2024-01-09 Thread Alexey Makhalov
Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. No functional changes intended. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit Reviewed-by: Jeff Sipek --- drivers/ptp/ptp_vmw.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions

[PATCH v6 2/7] x86/vmware: Introduce VMware hypercall API

2024-01-09 Thread Alexey Makhalov
to reduce excessive nop alignment once alternatives are applied. Total default code size is 26 bytes, in worse case (3 bytes alternative) remaining 23 bytes will be aligned by only 3 long NOP instructions. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit Reviewed-by: Jeff Sipek --- arch/x

[PATCH v6 1/7] x86/vmware: Move common macros to vmware.h

2024-01-09 Thread Alexey Makhalov
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. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit --- arch/x86/include/asm/vmware.h | 72

[PATCH v6 0/7] VMware hypercalls enhancements

2024-01-09 Thread Alexey Makhalov
rding reported by Simon Horman gcc error in this patch. Alexey Makhalov (7): x86/vmware: Move common macros to vmware.h x86/vmware: Introduce VMware hypercall API ptp/vmware: Use VMware hypercall API input/vmmouse: Use VMware hypercall API drm/vmwgfx: Use VMware hypercall API x86/vmware:

[PATCH v5 7/7] x86/vmware: Add TDX hypercall support

2024-01-08 Thread Alexey Makhalov
VMware hypercalls use I/O port, VMCALL or VMMCALL instructions. Add __tdx_hypercall path to support TDX guests. No change in high bandwidth hypercalls, as only low bandwidth ones are supported for TDX guests. Co-developed-by: Tim Merrifield Signed-off-by: Tim Merrifield Signed-off-by: Alexey

[PATCH v5 6/7] x86/vmware: Undefine VMWARE_HYPERCALL

2024-01-08 Thread Alexey Makhalov
No more direct use of VMWARE_HYPERCALL macro should be allowed. Signed-off-by: Alexey Makhalov --- arch/x86/include/asm/vmware.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/vmware.h b/arch/x86/include/asm/vmware.h index 2ac87068184a..84a31f579a30 100644 --- a/arch

[PATCH v5 5/7] drm/vmwgfx: Use VMware hypercall API

2024-01-08 Thread Alexey Makhalov
Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. drivers/gpu/drm/vmwgfx/vmwgfx_msg_arm64.h: implement arm64 variant of vmware_hypercall. And keep it here until introduction of ARM64 VMWare hypervisor interface. Signed-off-by: Alexey Makhalov Reviewed-by

[PATCH v5 4/7] input/vmmouse: Use VMware hypercall API

2024-01-08 Thread Alexey Makhalov
Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. No functional changes intended. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit Reviewed-by: Zack Rusin Acked-by: Dmitry Torokhov --- drivers/input/mouse/vmmouse.c | 78

[PATCH v5 3/7] ptp/vmware: Use VMware hypercall API

2024-01-08 Thread Alexey Makhalov
Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. No functional changes intended. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit Reviewed-by: Jeff Sipek --- drivers/ptp/ptp_vmw.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions

[PATCH v5 2/7] x86/vmware: Introduce VMware hypercall API

2024-01-08 Thread Alexey Makhalov
to reduce excessive nop alignment once alternatives are applied. Total default code size is 26 bytes, in worse case (3 bytes alternative) remaining 23 bytes will be aligned by only 3 long NOP instructions. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit Reviewed-by: Jeff Sipek --- arch/x

[PATCH v5 1/7] x86/vmware: Move common macros to vmware.h

2024-01-08 Thread Alexey Makhalov
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. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit --- arch/x86/include/asm/vmware.h | 72

[PATCH v5 0/7] VMware hypercalls enhancements

2024-01-08 Thread Alexey Makhalov
mware_tdx_hypercall VMWare guest specific. v1->v2 changes (no functional changes): - Improved commit message in patches 2 and 5. - Added Reviewed-by for all patches. - Added Ack from Dmitry Torokhov in patch 4. No fixes regarding reported by Simon Horman gcc error in this patch. Alexey Makh

[PATCH v4 6/6] x86/vmware: Add TDX hypercall support

2023-12-28 Thread Alexey Makhalov
From: Alexey Makhalov VMware hypercalls use I/O port, VMCALL or VMMCALL instructions. Add __tdx_hypercall path to support TDX guests. No change in high bandwidth hypercalls, as only low bandwidth ones are supported for TDX guests. Co-developed-by: Tim Merrifield Signed-off-by: Tim Merrifield

[PATCH v4 4/6] input/vmmouse: Use VMware hypercall API

2023-12-28 Thread Alexey Makhalov
From: Alexey Makhalov Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. No functional changes intended. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit Reviewed-by: Zack Rusin Acked-by: Dmitry Torokhov --- drivers/input/mouse/vmmouse.c | 76

[PATCH v4 5/6] drm/vmwgfx: Use VMware hypercall API

2023-12-28 Thread Alexey Makhalov
From: Alexey Makhalov Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. drivers/gpu/drm/vmwgfx/vmwgfx_msg_arm64.h: implement arm64 variant of vmware_hypercall. And keep it here until introduction of ARM64 VMWare hypervisor interface. Signed-off-by

[PATCH v4 2/6] x86/vmware: Introduce VMware hypercall API

2023-12-28 Thread Alexey Makhalov
From: Alexey Makhalov Introduce vmware_hypercall family of functions. It is a common implementation to be used by the VMware guest code and virtual device drivers in architecture independent manner. The API consists of vmware_hypercallX and vmware_hypercall_hb_{out,in} set of functions by

[PATCH v4 1/6] x86/vmware: Move common macros to vmware.h

2023-12-28 Thread Alexey Makhalov
From: Alexey Makhalov 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. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit --- arch/x86/include/asm/vmware.h

[PATCH v4 3/6] ptp/vmware: Use VMware hypercall API

2023-12-28 Thread Alexey Makhalov
From: Alexey Makhalov Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. No functional changes intended. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit Reviewed-by: Jeff Sipek --- drivers/ptp/ptp_vmw.c | 12 +++- 1 file changed, 3

[PATCH v4 0/6] VMware hypercalls enhancements

2023-12-28 Thread Alexey Makhalov
ge in patches 2 and 5. - Added Reviewed-by for all patches. - Added Ack from Dmitry Torokhov in patch 4. No fixes regarding reported by Simon Horman gcc error in this patch. Alexey Makhalov (6): x86/vmware: Move common macros to vmware.h x86/vmware: Introduce VMware hypercall API ptp

Re: [PATCH v3 2/6] x86/vmware: Introduce vmware_hypercall API

2023-12-19 Thread Alexey Makhalov
On 12/19/23 4:51 PM, kirill.shute...@linux.intel.com wrote: On Tue, Dec 19, 2023 at 04:17:40PM -0800, Alexey Makhalov wrote: On 12/19/23 3:20 PM, kirill.shute...@linux.intel.com wrote: On Tue, Dec 19, 2023 at 01:57:47PM -0800, Alexey Makhalov wrote: +static inline +unsigned long

Re: [PATCH v3 6/6] x86/vmware: Add TDX hypercall support

2023-12-19 Thread Alexey Makhalov
On 12/19/23 5:00 PM, kirill.shute...@linux.intel.com wrote: On Tue, Dec 19, 2023 at 04:27:51PM -0800, Alexey Makhalov wrote: On 12/19/23 3:23 PM, kirill.shute...@linux.intel.com wrote: On Tue, Dec 19, 2023 at 01:57:51PM -0800, Alexey Makhalov wrote: diff --git a/arch/x86/kernel/cpu

Re: [PATCH v3 6/6] x86/vmware: Add TDX hypercall support

2023-12-19 Thread Alexey Makhalov
On 12/19/23 3:23 PM, kirill.shute...@linux.intel.com wrote: On Tue, Dec 19, 2023 at 01:57:51PM -0800, Alexey Makhalov wrote: diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c index 3aa1adaed18f..ef07ab7a07e1 100644 --- a/arch/x86/kernel/cpu/vmware.c +++ b/arch/x86

Re: [PATCH v3 2/6] x86/vmware: Introduce vmware_hypercall API

2023-12-19 Thread Alexey Makhalov
On 12/19/23 3:20 PM, kirill.shute...@linux.intel.com wrote: On Tue, Dec 19, 2023 at 01:57:47PM -0800, Alexey Makhalov wrote: +static inline +unsigned long vmware_hypercall1(unsigned long cmd, unsigned long in1) ... +static inline +unsigned long vmware_hypercall3(unsigned long cmd, unsigned

[PATCH v3 4/6] input/vmmouse: Use vmware_hypercall API

2023-12-19 Thread Alexey Makhalov
From: Alexey Makhalov Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. No functional changes intended. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit Reviewed-by: Zack Rusin Acked-by: Dmitry Torokhov --- drivers/input/mouse/vmmouse.c | 76

[PATCH v3 6/6] x86/vmware: Add TDX hypercall support

2023-12-19 Thread Alexey Makhalov
From: Alexey Makhalov VMware hypercalls use I/O port, VMCALL or VMMCALL instructions. Add __tdx_hypercall path to support TDX guests. No change in high bandwidth hypercalls, as only low bandwidth ones are supported for TDX guests. Co-developed-by: Tim Merrifield Signed-off-by: Tim Merrifield

[PATCH v3 2/6] x86/vmware: Introduce vmware_hypercall API

2023-12-19 Thread Alexey Makhalov
From: Alexey Makhalov Introduce vmware_hypercall family of functions. It is a common implementation to be used by the VMware guest code and virtual device drivers in architecture independent manner. The API consists of vmware_hypercallX and vmware_hypercall_hb_{out,in} set of functions by

[PATCH v3 3/6] ptp/vmware: Use vmware_hypercall API

2023-12-19 Thread Alexey Makhalov
From: Alexey Makhalov Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. No functional changes intended. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit Reviewed-by: Jeff Sipek --- drivers/ptp/ptp_vmw.c | 12 +++- 1 file changed, 3

[PATCH v3 5/6] drm/vmwgfx: Use vmware_hypercall API

2023-12-19 Thread Alexey Makhalov
From: Alexey Makhalov Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. drivers/gpu/drm/vmwgfx/vmwgfx_msg_arm64.h: implement arm64 variant of vmware_hypercall. And keep it here until introduction of ARM64 VMWare hypervisor interface. Signed-off-by

[PATCH v3 1/6] x86/vmware: Move common macros to vmware.h

2023-12-19 Thread Alexey Makhalov
From: Alexey Makhalov 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. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit --- arch/x86/include/asm/vmware.h

[PATCH v3 0/6] VMware hypercalls enhancements

2023-12-19 Thread Alexey Makhalov
VMWare guest specific. v1->v2 changes (no functional changes): - Improved commit message in patches 2 and 5. - Added Reviewed-by for all patches. - Added Ack from Dmitry Torokhov in patch 4. No fixes regarding reported by Simon Horman gcc error in this patch. Alexey Makhalov (6): x86/v

  1   2   >