Re: [PATCH v2 1/1] x86/tdx: Add __tdcall() and __tdvmcall() helper functions

2021-04-20 Thread Kuppuswamy, Sathyanarayanan
On 4/20/21 4:53 PM, Dan Williams wrote: On Tue, Apr 20, 2021 at 4:12 PM Kuppuswamy, Sathyanarayanan wrote: [..] Also, do you *REALLY* need to do this from assembly? Can't it be done in the C wrapper? Its common for all use cases of TDVMCALL (vendor specific, in/out, etc). so added it

Re: [PATCH v2 1/1] x86/tdx: Add __tdcall() and __tdvmcall() helper functions

2021-04-20 Thread Dan Williams
On Tue, Apr 20, 2021 at 4:12 PM Kuppuswamy, Sathyanarayanan wrote: [..] > >>> Also, do you *REALLY* need to do this from assembly? Can't it be done > >>> in the C wrapper? > >> Its common for all use cases of TDVMCALL (vendor specific, in/out, etc). > >> so added > >> it here. > > Can I ask a

Re: [PATCH v2 1/1] x86/tdx: Add __tdcall() and __tdvmcall() helper functions

2021-04-20 Thread Dave Hansen
On 4/20/21 4:12 PM, Kuppuswamy, Sathyanarayanan wrote: > On 4/20/21 12:59 PM, Dave Hansen wrote: >> On 4/20/21 12:20 PM, Kuppuswamy, Sathyanarayanan wrote: > approach is, it adds a few extra instructions for every > TDCALL use case when compared to distributed checks. Although > it's a

Re: [PATCH v2 1/1] x86/tdx: Add __tdcall() and __tdvmcall() helper functions

2021-04-20 Thread Kuppuswamy, Sathyanarayanan
On 4/20/21 12:59 PM, Dave Hansen wrote: On 4/20/21 12:20 PM, Kuppuswamy, Sathyanarayanan wrote: approach is, it adds a few extra instructions for every TDCALL use case when compared to distributed checks. Although it's a bit less efficient, it's worth it to make the code more readable.

Re: [PATCH v2 1/1] x86/tdx: Add __tdcall() and __tdvmcall() helper functions

2021-04-20 Thread Dave Hansen
On 4/20/21 12:20 PM, Kuppuswamy, Sathyanarayanan wrote: >>> approach is, it adds a few extra instructions for every >>> TDCALL use case when compared to distributed checks. Although >>> it's a bit less efficient, it's worth it to make the code more >>> readable. >> >> What's a "distributed check"?

Re: [PATCH v2 1/1] x86/tdx: Add __tdcall() and __tdvmcall() helper functions

2021-04-20 Thread Kuppuswamy, Sathyanarayanan
On 4/20/21 10:36 AM, Dave Hansen wrote: On 3/26/21 4:38 PM, Kuppuswamy Sathyanarayanan wrote: Implement common helper functions to communicate with the TDX Module and VMM (using TDCALL instruction). This is missing any kind of background. I'd say: Guests communicate with VMMs with

Re: [PATCH v2 1/1] x86/tdx: Add __tdcall() and __tdvmcall() helper functions

2021-04-20 Thread Dave Hansen
On 3/26/21 4:38 PM, Kuppuswamy Sathyanarayanan wrote: > Implement common helper functions to communicate with > the TDX Module and VMM (using TDCALL instruction). This is missing any kind of background. I'd say: Guests communicate with VMMs with hypercalls. Historically, these are implemented