[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3][4.15] x86: mirror compat argument translation area for 32-bit PV



On 25.02.2021 13:52, Andrew Cooper wrote:
> On 25/02/2021 09:30, Jan Beulich wrote:
>> --- a/xen/include/asm-x86/config.h
>> +++ b/xen/include/asm-x86/config.h
>> @@ -170,7 +170,11 @@ extern unsigned char boot_edid_info[128]
>>   *    Guest-defined use.
>>   *  0x00000000f5800000 - 0x00000000ffffffff [168MB,             PML4:0]
>>   *    Read-only machine-to-phys translation table (GUEST ACCESSIBLE).
>> - *  0x0000000100000000 - 0x00007fffffffffff [128TB-4GB,         PML4:0-255]
>> + *  0x0000000100000000 - 0x000001ffffffffff [2TB-4GB,           PML4:0-3]
>> + *    Unused / Reserved for future use.
>> + *  0x0000020000000000 - 0x0000027fffffffff [512GB, 2^39 bytes, PML4:4]
>> + *    Mirror of per-domain mappings (for argument translation area; also 
>> HVM).
>> + *  0x0000028000000000 - 0x00007fffffffffff [125.5TB,           PML4:5-255]
>>   *    Unused / Reserved for future use.
>>   */
>>  
>> @@ -207,6 +211,8 @@ extern unsigned char boot_edid_info[128]
>>  #define PERDOMAIN_SLOTS         3
>>  #define PERDOMAIN_VIRT_SLOT(s)  (PERDOMAIN_VIRT_START + (s) * \
>>                                   (PERDOMAIN_SLOT_MBYTES << 20))
>> +/* Slot 4: mirror of per-domain mappings (for compat xlat area accesses). */
>> +#define PERDOMAIN_ALT_VIRT_START PML4_ADDR(260 % 256)
> 
> 4.
> 
> 260 % 256 is pure obfuscation.

Well, that's why the comment is there. The expression is to
show why 4 isn't entirely arbitrary. But well, if there's no
way to get this in without changing to 4, I will of course do
so. Before I submit v4 - are there any other concerns?

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.