Re: [kvm-unit-tests PATCH 5/8] s390x: uv-host: Explain why we set up the home space and remove the space change

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

 



On 8/13/21 10:45 AM, Claudio Imbrenda wrote:
> On Fri, 13 Aug 2021 07:36:12 +0000
> Janosch Frank <frankja@xxxxxxxxxxxxx> wrote:
> 
>> UV home addresses don't require us to be in home space but we need to
>> have it set up so hw/fw can use the home asce to translate home
>> virtual addresses.
>>
>> Hence we add a comment why we're setting up the home asce and remove
>> the address space since it's unneeded.
> 
> oh, we actually never use it?

Yes, as I said, those addresses are not relative to your PSW DAT
settings, they are defined to be home space addresses.

>> Signed-off-by: Janosch Frank <frankja@xxxxxxxxxxxxx>
> 
> Reviewed-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>

Thanks!

> 
>> ---
>>  s390x/uv-host.c | 11 ++++++++---
>>  1 file changed, 8 insertions(+), 3 deletions(-)
>>
>> diff --git a/s390x/uv-host.c b/s390x/uv-host.c
>> index 426a67f6..28035707 100644
>> --- a/s390x/uv-host.c
>> +++ b/s390x/uv-host.c
>> @@ -444,13 +444,18 @@ static void test_clear(void)
>>  
>>  static void setup_vmem(void)
>>  {
>> -	uint64_t asce, mask;
>> +	uint64_t asce;
>>  
>>  	setup_mmu(get_max_ram_size(), NULL);
>> +	/*
>> +	 * setup_mmu() will enable DAT and set the primary address
>> +	 * space but we need to have a valid home space since UV
>> calls
>> +	 * take home space virtual addresses.
>> +	 *
>> +	 * Hence we just copy the primary asce into the home space.
>> +	 */
>>  	asce = stctg(1);
>>  	lctlg(13, asce);
>> -	mask = extract_psw_mask() | 0x0000C00000000000UL;
>> -	load_psw_mask(mask);
>>  }
>>  
>>  int main(void)
> 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux