qemu-devel
[Top][All Lists]
Advanced

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

Re: [kvm-unit-tests PATCH v7 06/13] arm/arm64: ITS: Introspection tests


From: Auger Eric
Subject: Re: [kvm-unit-tests PATCH v7 06/13] arm/arm64: ITS: Introspection tests
Date: Mon, 30 Mar 2020 10:46:57 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

Hi Zenghui,

On 3/30/20 10:30 AM, Zenghui Yu wrote:
> Hi Eric,
> 
> On 2020/3/20 17:24, Eric Auger wrote:
>> +static void its_cmd_queue_init(void)
>> +{
>> +    unsigned long order = get_order(SZ_64K >> PAGE_SHIFT);
>> +    u64 cbaser;
>> +
>> +    its_data.cmd_base = (void *)virt_to_phys(alloc_pages(order));
> 
> Shouldn't the cmd_base (and the cmd_write) be set as a GVA?
yes it should
> 
> Otherwise I think we will end-up with memory corruption when writing
> the command queue.  But it seems that everything just works fine ...
> So I'm really confused here :-/
I was told by Paolo that the VA/PA memory map is flat in kvmunit test.

> 
>> +
>> +    cbaser = ((u64)its_data.cmd_base | (SZ_64K / SZ_4K - 1)    |
>> GITS_CBASER_VALID);
>> +
>> +    writeq(cbaser, its_data.base + GITS_CBASER);
>> +
>> +    its_data.cmd_write = its_data.cmd_base;
>> +    writeq(0, its_data.base + GITS_CWRITER);
>> +}
> 
> Otherwise this looks good,
> Reviewed-by: Zenghui Yu <address@hidden>
Thanks!

Eric
> 
> 
> Thanks
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]