On Thu, May 16, 2024 at 7:35 PM Steven Rostedt wrote:
>
> From: "Steven Rostedt (Google)"
>
> [
>This is a treewide change. I will likely re-create this patch again in
>the second week of the merge window of v6.10 and submit it then. Hoping
>to keep the conflicts that it will cause to
On Thu, 16 May 2024 19:34:54 +0200,
Steven Rostedt wrote:
>
> From: "Steven Rostedt (Google)"
>
> [
>This is a treewide change. I will likely re-create this patch again in
>the second week of the merge window of v6.10 and submit it then. Hoping
>to keep the conflicts that it will cau
Sean noticing that the TDCALL wrappers were generating a lot of awful
code.
TDCALL calls are centralized into a few megawrappers that take the
struct tdx_module_args as input. Most of the call sites only use a few
arguments, but they have to zero out unused fields in the structure to
avoid data le
Use newly introduced TDVMCALL_0() instead of __tdx_hypercall() to handle
HLT instruction emulation.
It cuts code bloat substantially:
Function old new delta
tdx_safe_halt 58 88 +30
tdx_handle_virt_exception
Use newly introduced TDVMCALL_0() and TDVMCALL_1() instead of
__tdx_hypercall() to handle port I/O in TDX guest.
It cuts handle_io() size in half:
Function old new delta
handle_io436 202-234
Signed-off-by: Kiri
Introduce a set of macros that allow to generate wrappers for TDVMCALL
leafs. The macros uses tdvmcall_trmapoline() and provides SYSV-complaint
ABI on top of it.
There are three macros differentiated by number of return parameters.
Signed-off-by: Kirill A. Shutemov
---
arch/x86/include/asm/shar
TDCALL calls are centralized into a few megawrappers that take the
struct tdx_module_args as input. Most of the call sites only use a few
arguments, but they have to zero out unused fields in the structure to
avoid data leaks to the VMM. This leads to the compiler generating
inefficient code: dozen
Use newly introduced TDVMCALL_0() instead of __tdx_hypercall() to handle
MSR write emulation.
It cuts code bloat substantially:
Function old new delta
tdx_handle_virt_exception 19471819-128
Signed-off-by: Kirill A. Shutemov
---
Use newly introduced TDVMCALL_1() instead of __tdx_hypercall() to handle
MSR read emulation.
It cuts code bloat substantially:
Function old new delta
tdx_handle_virt_exception 20521947-105
Signed-off-by: Kirill A. Shutemov
---
Use newly introduced TDVMCALL_0() instead of __tdx_hypercall() to issue
GET_QUOTE hypercall.
It cuts code bloat substantially:
Function old new delta
tdx_hcall_get_quote 188 76-112
Signed-off-by: Kirill A. Shutemov
---
Rewrite hv_tdx_hypercall() in assembly to remove one more
__tdx_hypercall() user.
tdvmcall_trampoline() cannot be used here as Hyper-V uses R8 and RDX to
pass down parameters which is incompatible with tdvmcall_trampoline()
The rewrite cuts code bloat substantially:
Function
Use newly introduced TDVMCALL_4() instead of __tdx_hypercall() to handle
CPUID instruction emulation.
It cuts code bloat substantially:
Function old new delta
tdx_handle_virt_exception 18191747 -72
Signed-off-by: Kirill A. Shute
Use newly introduced TDVMCALL_1() instead of __tdx_hypercall() to issue
MAP_GPA hypercall.
It cuts code bloat substantially:
Function old new delta
tdx_enc_status_changed 352 242-110
tdx_kexec_finish
Introduce a set of macros that allow to generate wrappers for TDCALL
leafs.
There are three macros differentiated by number of return parameters.
Signed-off-by: Kirill A. Shutemov
---
arch/x86/include/asm/shared/tdx.h | 58 +++
1 file changed, 58 insertions(+)
diff
tdx_panic() uses REPORT_FATAL_ERROR hypercall to deliver panic message
in ealy boot. Rewrite it without using __tdx_hypercall().
REPORT_FATAL_ERROR hypercall is special. It uses pretty much all
available registers to pass down the error message. TDVMCALL macros are
not usable here.
Implement the
tdx_kvm_hypercall() issues KVM hypercall. Rewrite it without using
__tdx_hypercall(). Use tdvmcall_trampoline() instead.
It cuts code bloat substantially:
Function old new delta
tdx_kvm_hypercall160 53-107
Signed-off-
Use newly introduced TDVMCALL_0() and TDVMCALL_1() instead of
__tdx_hypercall() to handle MMIO emulation.
It cuts code bloat substantially:
Function old new delta
tdx_handle_virt_exception 17471383-364
Signed-off-by: Kirill A. S
Use newly introduced TDCALL_0() instead of __tdcall() to issue
PAGE_ACCEPT tdcall.
It cuts code bloat substantially:
Function old new delta
tdx_accept_memory592 233-359
Signed-off-by: Kirill A. Shutemov
---
arch/x86/
Use newly introduced TDCALL_5() instead of tdcall() to issue VP_INFO
tdcall.
It cuts code bloat slightly:
Function old new delta
tdx_early_init 780 744 -36
Signed-off-by: Kirill A. Shutemov
---
arch/x86/coco/tdx/td
Use newly introduced TDCALL_5() instead of tdcall() to issue
VP_VEINFO_GET tdcall.
It cuts code bloat substantially:
Function old new delta
tdx_get_ve_info 253 116-137
Signed-off-by: Kirill A. Shutemov
---
arch/x86/
Use newly introduced TDCALL_0() instead of tdcall() to issue
MR_REPORT tdcall.
It cuts code bloat substantially:
Function old new delta
tdx_mcall_get_report0229 111-118
Signed-off-by: Kirill A. Shutemov
---
arch/x86/coco
Use newly introduced TDCALL instead of tdcall() to issue VM_RD/VM_WR
tdcalls
It increase code slightly:
Function old new delta
tdx_early_init 744 776 +32
but combined with VP_INFO changes the total effect on tdx_earl
All code has been converted to new TDCALL wrappers.
Drop the old wrappers.
Signed-off-by: Kirill A. Shutemov
---
arch/x86/boot/compressed/tdx.c| 6
arch/x86/coco/tdx/tdcall.S| 60 ++-
arch/x86/coco/tdx/tdx-shared.c| 20 ---
arch/x86/coco
On 5/17/24 07:19, Kirill A. Shutemov wrote:
> arch/x86/boot/compressed/tdx.c| 32 +---
> arch/x86/coco/tdx/tdcall.S| 145 ++-
> arch/x86/coco/tdx/tdx-shared.c| 26 +--
> arch/x86/coco/tdx/tdx.c | 298 --
> arch/x86/hyperv/ivm.c
On 5/17/24 07:19, Kirill A. Shutemov wrote:
> TDCALL calls are centralized into a few megawrappers that take the
> struct tdx_module_args as input. Most of the call sites only use a few
> arguments, but they have to zero out unused fields in the structure to
> avoid data leaks to the VMM. This lead
On 5/17/24 07:19, Kirill A. Shutemov wrote:
> static inline void tdx_io_out(int size, u16 port, u32 value)
> {
> - struct tdx_module_args args = {
> - .r10 = TDX_HYPERCALL_STANDARD,
> - .r11 = hcall_func(EXIT_REASON_IO_INSTRUCTION),
> - .r12 = size,
> -
On 5/17/24 07:19, Kirill A. Shutemov wrote:
> - /*
> - * TDINFO TDX module call is used to get the TD execution environment
> - * information like GPA width, number of available vcpus, debug mode
> - * information, etc. More details about the ABI can be found in TDX
> - * Gu
Let's say you're debugging tdg_vm_rd(). You suspect someone read the
spec wrong. You pull up the spec:
https://sr71.net/~dave/intel/tdg.vm.rd.png
On 5/17/24 07:19, Kirill A. Shutemov wrote:
> static inline u64 tdg_vm_rd(u64 field, u64 *value)
> {
> - struct tdx_module_args args =
On Thu, May 16, 2024 at 01:34:54PM -0400, Steven Rostedt wrote:
> From: "Steven Rostedt (Google)"
>
> [
>This is a treewide change. I will likely re-create this patch again in
>the second week of the merge window of v6.10 and submit it then. Hoping
>to keep the conflicts that it will
On 5/17/24 16:19, Kirill A. Shutemov wrote:
Introduce a set of macros that allow to generate wrappers for TDVMCALL
leafs. The macros uses tdvmcall_trmapoline() and provides SYSV-complaint
ABI on top of it.
Not really SYSV-compliant, more like "The macros use asm() to call
tdvmcall_trampoline w
On 5/17/24 16:19, Kirill A. Shutemov wrote:
The function will be used from inline assembly to handle most TDVMCALL
cases.
Perhaps add that the calling convention is designed to allow using the
asm constraints a/b/c/d/S/D and keep the asm blocks simpler?
Paolo
On 5/17/24 16:19, Kirill A. Shutemov wrote:
Introduce a set of macros that allow to generate wrappers for TDCALL
leafs.
There are three macros differentiated by number of return parameters.
Signed-off-by: Kirill A. Shutemov
---
arch/x86/include/asm/shared/tdx.h | 58 ++
On Tue, May 14, 2024 at 5:45 PM Roman Kisel wrote:
>
> The vmbus driver uses ACPI for interrupt assignment on
> arm64 hence it won't function in the VTL mode where only
> DeviceTree can be used.
>
> Update the vmbus driver to discover interrupt configuration
> via DeviceTree.
>
> Signed-off-by: Ro
On Thu, May 16, 2024 at 01:34:54PM -0400, Steven Rostedt wrote:
> From: "Steven Rostedt (Google)"
>
> [
>This is a treewide change. I will likely re-create this patch again in
>the second week of the merge window of v6.10 and submit it then. Hoping
>to keep the conflicts that it will
On 5/17/24 17:28, Dave Hansen wrote:
On 5/17/24 07:19, Kirill A. Shutemov wrote:
static inline void tdx_io_out(int size, u16 port, u32 value)
{
- struct tdx_module_args args = {
- .r10 = TDX_HYPERCALL_STANDARD,
- .r11 = hcall_func(EXIT_REASON_IO_INSTRUCTION)
On Fri, 17 May 2024 10:36:37 -0700
Guenter Roeck wrote:
> Building csky:allmodconfig (and others) ... failed
> --
> Error log:
> In file included from include/trace/trace_events.h:419,
> from include/trace/define_trace.h:102,
> from drivers/cxl/core/t
On 5/17/24 10:48, Steven Rostedt wrote:
On Fri, 17 May 2024 10:36:37 -0700
Guenter Roeck wrote:
Building csky:allmodconfig (and others) ... failed
--
Error log:
In file included from include/trace/trace_events.h:419,
from include/trace/define_trace.h:102,
On 5/17/24 11:00, Guenter Roeck wrote:
On 5/17/24 10:48, Steven Rostedt wrote:
On Fri, 17 May 2024 10:36:37 -0700
Guenter Roeck wrote:
Building csky:allmodconfig (and others) ... failed
--
Error log:
In file included from include/trace/trace_events.h:419,
from in
38 matches
Mail list logo