[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8aebc35e-f1ff-e70d-2f44-54d17f6fe555@linux.intel.com>
Date: Tue, 20 Apr 2021 16:59:01 -0700
From: "Kuppuswamy, Sathyanarayanan"
<sathyanarayanan.kuppuswamy@...ux.intel.com>
To: Dan Williams <dan.j.williams@...el.com>
Cc: Dave Hansen <dave.hansen@...el.com>,
Peter Zijlstra <peterz@...radead.org>,
Andy Lutomirski <luto@...nel.org>,
Andi Kleen <ak@...ux.intel.com>,
Kirill Shutemov <kirill.shutemov@...ux.intel.com>,
Kuppuswamy Sathyanarayanan <knsathya@...nel.org>,
Raj Ashok <ashok.raj@...el.com>,
Sean Christopherson <seanjc@...gle.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/1] x86/tdx: Add __tdcall() and __tdvmcall() helper
functions
On 4/20/21 4:53 PM, Dan Williams wrote:
> On Tue, Apr 20, 2021 at 4:12 PM Kuppuswamy, Sathyanarayanan
> <sathyanarayanan.kuppuswamy@...ux.intel.com> 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 favor?
>
> Please put a line break between quoted lines and your reply.
will do
>
>>> That's not a good reason. You could just as easily have a C wrapper
>>> which all uses of TDVMCALL go through.
>
> ...because this runs together when reading otherwise.
>
>> Any reason for not preferring it in assembly code?
>> Also, using wrapper will add more complication for in/out instruction
>> substitution use case. please check the use case in following patch.
>> https://github.com/intel/tdx/commit/1b73f60aa5bb93554f3b15cd786a9b10b53c1543
>
> This commit still has open coded assembly for the TDVMCALL? I thought
> we talked about it being unified with the common definition, or has
> this patch not been reworked with that feedback yet? I expect there is
> no performance reason why in/out need to get their own custom coded
> TDVMCALL implementation. It should also be the case the failure should
> behave the same as native in/out failure i.e. all ones on read
> failure, and silent drops on write failure.
>
That link is for older version. My next version addresses your review
comments (re-uses TDVMCALL() function). Although the patch is ready, I am
waiting to fix other review comments before sending the next version. I
have just shared that link to explain about the use case.
--
Sathyanarayanan Kuppuswamy
Linux Kernel Developer
Powered by blists - more mailing lists