[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c75ffa6b-181b-bc4c-9fee-5476cfbc329a@intel.com>
Date: Thu, 19 May 2022 11:35:36 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Sean Christopherson <seanjc@...gle.com>
Cc: tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
luto@...nel.org, peterz@...radead.org,
sathyanarayanan.kuppuswamy@...ux.intel.com, ak@...ux.intel.com,
dan.j.williams@...el.com, david@...hat.com, hpa@...or.com,
thomas.lendacky@....com, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/tdx: Handle load_unaligned_zeropad() page-cross to a
shared page
On 5/19/22 11:19, Kirill A. Shutemov wrote:
>>>> The SDM has a breakdown:
>>>>
>>>> 27.2.5 Information for VM Exits Due to Instruction Execution
>>>>
>>>> I didn't realize it came from VMREAD. I guess I assumed it came from
>>>> some TDX module magic. Silly me.
>>>>
>>>> The SDM makes it sound like we should be more judicious about using
>>>> 've->instr_len' though. "All VM exits other than those listed in the
>>>> above items leave this field undefined." Looking over
>>>> virt_exception_kernel(), we've got five cases from CPU instructions that
>>>> cause unconditional VMEXITs:
>> Ideally, what the SDM says wouldn't matter at all. The TDX module spec really
>> should be the authorative source in this case, but it just punts to the SDM:
>>
>> The 32-bit value that would have been saved into the VMCS as VM-exit instruction
>> length if a legacy VM exit had occurred instead of the virtualization exception.
>>
>> Even if the TDX spec wants to punt to the SDM, it would save a lot of headache and
>> SDM reading if it also said something to the effect of:
>>
>> The INSTRUCTION_LENGTH and INSTRUCTION_INFORMATION fields are valid for all
>> #VEs injected by the Intel TDX Module. The fields are undefined for #VEs
>> injected by the CPU due to EPT Violations.
> I initiated update to the spec, but it will take time.
Understood, and thanks for doing that.
For now, let's just declare what we *expect* the spec will say and show
it to the folks doing the spec itself. They will then have a chance to
balk at our interpretation if we got something wrong.
Powered by blists - more mailing lists