lkml.org 
[lkml]   [2022]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv3 02/32] x86/coco: Add API to handle encryption mask
On Tue, Feb 22, 2022 at 02:03:12PM +0300, Kirill A. Shutemov wrote:
> I would rather make cc_mkenc()/cc_mkdec() to operate on u64 (or
> phys_addr_t?) while pgprot_encrypted()/pgprot_decrypted() cover pgprot_t.
> It also makes set_memory cleaner:
>
> cpa.mask_set = __pgprot(enc ? cc_mkenc(0) : cc_mkdec(0));
> cpa.mask_clr = __pgprot(enc ? cc_mkdec(0) : cc_mkenc(0));
>
> Opinions?

Right, do I see it correctly that the cc_mk{enc,dec}() things should
take a u64 as an argument and return a pgprot_t, and that would be the
most optimal way for all the use cases?

--
Regards/Gruss,
Boris.

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

\
 
 \ /
  Last update: 2022-02-22 14:38    [W:2.547 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site