Messages in this thread | | | Date | Tue, 22 Feb 2022 14:37:27 +0100 | From | Borislav Petkov <> | Subject | Re: [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
| |