lkml.org 
[lkml]   [2022]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv5.2 04/30] x86/tdx: Extend the confidential computing API to support TDX guests
On Thu, Mar 10, 2022 at 02:51:21AM +0300, Kirill A. Shutemov wrote:
> diff --git a/arch/x86/coco/core.c b/arch/x86/coco/core.c
> index fc1365dd927e..6529db059938 100644
> --- a/arch/x86/coco/core.c
> +++ b/arch/x86/coco/core.c
> @@ -87,9 +87,18 @@ EXPORT_SYMBOL_GPL(cc_platform_has);
>
> u64 cc_mkenc(u64 val)
> {
> + /*
> + * Both AMD and Intel use a bit in page table to indicate encryption

"... a bit in the page table ..."

> + * status of the page.
> + *
> + * - for AMD, bit *set* means the page is encrypted
> + * - for Intel *clear* means encrypted.
> + */
> switch (vendor) {
> case CC_VENDOR_AMD:
> return val | cc_mask;
> + case CC_VENDOR_INTEL:
> + return val & ~cc_mask;
> default:
> return val;
> }

With that fixed:

Reviewed-by: Borislav Petkov <bp@suse.de>

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette

\
 
 \ /
  Last update: 2022-03-15 20:44    [W:0.119 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site