lkml.org 
[lkml]   [2021]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH Part1 RFC v4 05/36] x86/sev: Define the Linux specific guest termination reasons
From
Date


On 8/10/21 6:33 AM, Borislav Petkov wrote:
> On Wed, Jul 07, 2021 at 01:14:35PM -0500, Brijesh Singh wrote:
>> diff --git a/arch/x86/include/asm/sev-common.h b/arch/x86/include/asm/sev-common.h
>> index 23929a3010df..e75e29c05f59 100644
>> --- a/arch/x86/include/asm/sev-common.h
>> +++ b/arch/x86/include/asm/sev-common.h
>> @@ -63,9 +63,17 @@
>> (((((u64)reason_set) & GHCB_MSR_TERM_REASON_SET_MASK) << GHCB_MSR_TERM_REASON_SET_POS) | \
>> ((((u64)reason_val) & GHCB_MSR_TERM_REASON_MASK) << GHCB_MSR_TERM_REASON_POS))
>>
>> +/* Error code from reason set 0 */
>
> ... Error codes...
>
Noted.

>> +#define SEV_TERM_SET_GEN 0
>> #define GHCB_SEV_ES_GEN_REQ 0
>> #define GHCB_SEV_ES_PROT_UNSUPPORTED 1
>>
>> #define GHCB_RESP_CODE(v) ((v) & GHCB_MSR_INFO_MASK)
>>
>> +/* Linux specific reason codes (used with reason set 1) */
>
> ... Linux-specific ...

Noted.

>
>> +#define SEV_TERM_SET_LINUX 1
>
> GHCB doc says:
>
> "This document defines and owns reason code set 0x0"
>
> Should it also say, reason code set 1 is allocated for Linux guest use?
> I don't see why not...
> > Tom?
>

If Tom is okay with it then maybe in next version of the GHCB doc can
add this text.

\
 
 \ /
  Last update: 2021-08-10 17:01    [W:0.093 / U:0.980 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site