Re: [RFC v2 27/32] x86/tdx: Exclude Shared bit from __PHYSICAL_MASK

From: Kuppuswamy, Sathyanarayanan
Date: Thu May 20 2021 - 14:57:02 EST




On 5/20/21 11:48 AM, Kuppuswamy, Sathyanarayanan wrote:
BTW, do you find it confusing that the subject says: '__PHYSICAL_MASK'
and yet the code only modifies 'physical_mask'?

"physical_mask" is defined as __PHYSICAL_MASK in page_types.h. MM code seems to
use __PHYSICAL_MASK for common usage. But for our use case, if it makes it more
readable, I am fine with using "physical_mask".

arch/x86/include/asm/page_types.h:57:#define __PHYSICAL_MASK physical_mask
arch/x86/mm/pat/memtype.c:560: return address & __PHYSICAL_MASK;

--
Sathyanarayanan Kuppuswamy
Linux Kernel Developer