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
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
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
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
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
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/vmware: U
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
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
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
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
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
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
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
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
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
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
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
are 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/vmware
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
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
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
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
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
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
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
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
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 Makhalov (7):
rted
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: Undefine V
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
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
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
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
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
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
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
On Nov 24, 2023, at 11:46 AM, Simon Horman wrote:
>
> On Wed, Nov 22, 2023 at 03:30:49PM -0800, Alexey Makhalov wrote:
>> Switch from VMWARE_HYPERCALL macro to vmware_hypercall API.
>> Eliminate arch specific code. No functional changes intended.
>>
>> Signed-of
On 12/5/23 1:24 PM, Dave Hansen wrote:
On 12/4/23 02:31, Borislav Petkov wrote:
On Fri, Dec 01, 2023 at 03:24:52PM -0800, Alexey Makhalov wrote:
+#ifdef CONFIG_INTEL_TDX_GUEST
+/* __tdx_hypercall() is not exported. So, export the wrapper */
+void vmware_tdx_hypercall_args(struct
On 12/5/23 3:03 PM, Dave Hansen wrote:
On 12/5/23 13:41, Alexey Makhalov wrote:
I don't really like it much. This does a generic thing (make a TDX
hypercall) with a specific name ("vmware_"). If you want to make an
argument that a certain chunk of the __tdx_hypercall() spa
On 12/5/23 12:27 PM, Borislav Petkov wrote:
On Fri, Dec 01, 2023 at 03:24:51PM -0800, Alexey Makhalov wrote:
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 here
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
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
ed by size 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
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 insertions(+), 9 deletions
From: Alexey Makhalov
VMware hypercalls invocations were all spread out across the kernel
implementing same ABI as in-place asm-inline. With encrypted memory
and confidential computing it became harder to maintain every changes
in these hypercall implementations.
Intention of this patchset
Move VMware hypercall macros to vmware.h as a preparation step
for the next commit. No functional changes besides exporting
vmware_hypercall_mode symbol.
Signed-off-by: Alexey Makhalov
Reviewed-by: Nadav Amit
---
arch/x86/include/asm/vmware.h | 69 ++-
arch/x86
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
/vmwgfx/vmwgfx_msg_{x86,arm64}.h header files will
be performed in the follow up patchset.
Signed-off-by: Alexey Makhalov
Reviewed-by: Nadav Amit
Reviewed-by: Zack Rusin
---
drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 173 +++
drivers/gpu/drm/vmwgfx/vmwgfx_msg_arm64.h | 197
Move VMware hypercall macros to vmware.h as a preparation step
for the next commit. No functional changes besides exporting
vmware_hypercall_mode symbol.
Signed-off-by: Alexey Makhalov
---
arch/x86/include/asm/vmware.h | 69 ++-
arch/x86/kernel/cpu/vmware.c | 57
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
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 here. To be moved to arch/arm64/include/asm/vmware.h
later.
Signed-off-by: Alexey Makhalov
---
drivers/gpu/drm/vmwgfx
Move VMware hypercall macros to vmware.h as a preparation step
for the next commit. No functional changes besides exporting
vmware_hypercall_mode symbol.
Signed-off-by: Alexey Makhalov
---
arch/x86/include/asm/vmware.h | 69 ++-
arch/x86/kernel/cpu/vmware.c | 57
essive 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
---
arch/x86/include/asm/vmware.h | 262 ++
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
/ptp_vmw.c
Alexey Makhalov (6):
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: Add TDX hypercall support
arch/x86/include/asm
essive 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
---
arch/x86/include/asm/vmware.h | 262 ++
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
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
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 here. To be moved to arch/arm64/include/asm/vmware.h
later.
Signed-off-by: Alexey Makhalov
---
drivers/gpu/drm/vmwgfx
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
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
/ptp_vmw.c
Alexey Makhalov (6):
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: Add TDX hypercall support
arch/x86/include/asm
On 12/7/23 9:12 AM, Dave Hansen wrote:
On 12/5/23 23:15, Alexey Makhalov wrote:
+#ifdef CONFIG_INTEL_TDX_GUEST
+/* Export tdx hypercall and allow it only for VMware guests. */
+void vmware_tdx_hypercall_args(struct tdx_module_args *args)
+{
+ if (hypervisor_is_type(X86_HYPER_VMWARE
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
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
c.
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 common mac
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
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
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
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
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
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
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
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
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
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
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
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("
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
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
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
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
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
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
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
o 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 API
drm/v
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
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
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
n 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_HYPERCALL
x
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
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
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
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
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
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
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.
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,
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
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
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
1 - 100 of 110 matches
Mail list logo