Re: [PATCH] x86/tdx: Enhance code generation for TDCALL and SEAMCALL wrappers

2024-09-11 Thread Sean Christopherson
On Wed, Aug 28, 2024, Rick P Edgecombe wrote: > On Tue, 2024-06-04 at 12:34 -0700, Sean Christopherson wrote: > > > > If we're willing to suffer a few gnarly macros, I think we get a > > satisfactory mix of standardized arguments and explicit operands, and > > generate vastly better code. > > Hi

Re: [PATCH] x86/tdx: Enhance code generation for TDCALL and SEAMCALL wrappers

2024-08-28 Thread Edgecombe, Rick P
On Tue, 2024-06-04 at 12:34 -0700, Sean Christopherson wrote: > > If we're willing to suffer a few gnarly macros, I think we get a satisfactory > mix > of standardized arguments and explicit operands, and generate vastly better > code. Hi Sean, We are kind of stuck on improving the code generati

Re: [PATCH] x86/tdx: Enhance code generation for TDCALL and SEAMCALL wrappers

2024-06-04 Thread Sean Christopherson
On Tue, Jun 04, 2024, Kirill A. Shutemov wrote: > On Mon, Jun 03, 2024 at 06:37:45AM -0700, Dave Hansen wrote: > > On 6/2/24 04:54, Kirill A. Shutemov wrote: > > > Sean observed that the compiler is generating inefficient code to clear > > > the tdx_module_args struct for TDCALL and SEAMCALL wrappe

Re: [PATCH] x86/tdx: Enhance code generation for TDCALL and SEAMCALL wrappers

2024-06-04 Thread Kirill A. Shutemov
On Mon, Jun 03, 2024 at 06:37:45AM -0700, Dave Hansen wrote: > On 6/2/24 04:54, Kirill A. Shutemov wrote: > > Sean observed that the compiler is generating inefficient code to clear > > the tdx_module_args struct for TDCALL and SEAMCALL wrappers. The > > compiler is generating numerous instructions

Re: [PATCH] x86/tdx: Enhance code generation for TDCALL and SEAMCALL wrappers

2024-06-03 Thread Dave Hansen
On 6/2/24 04:54, Kirill A. Shutemov wrote: > Sean observed that the compiler is generating inefficient code to clear > the tdx_module_args struct for TDCALL and SEAMCALL wrappers. The > compiler is generating numerous instructions at each call site to clear > the unused fields of the structure. >

[PATCH] x86/tdx: Enhance code generation for TDCALL and SEAMCALL wrappers

2024-06-02 Thread Kirill A. Shutemov
Sean observed that the compiler is generating inefficient code to clear the tdx_module_args struct for TDCALL and SEAMCALL wrappers. The compiler is generating numerous instructions at each call site to clear the unused fields of the structure. To address this issue, avoid using C99-initializer an