qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC 6/7] hw: arm: virt: register reserved IOVA region


From: Eric Auger
Subject: Re: [Qemu-devel] [RFC 6/7] hw: arm: virt: register reserved IOVA region
Date: Thu, 28 Jan 2016 11:20:27 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

On 01/28/2016 11:10 AM, Peter Maydell wrote:
> On 27 January 2016 at 13:51, Eric Auger <address@hidden> wrote:
>> Registers a 16x64kB reserved iova region. Currently this iova
>> region is used by the kernel to map host MSI controller frames
>> (GICv2m, GITS_TRANSLATER).
> 
> Do you mean the host kernel or the guest kernel? The host
> kernel should be keeping its paws out of the guest's
> address space, and the guest kernel can manage the memory
> and the address space any way it likes, I would have thought.
> It's not clear to me what this is for.
I meant the host kernel.

If we do not do anything, the host VFIO-PCI driver programs the PCI
device with host GICv2m MSI frame host physical address (as an example).
Since it goes through the sMMU and there is no mapping defined, this
faults. So the idea of this series is that the guest provides some
unused guest PA = IOVA. This window can be used by the host VFIO-PCI
driver to transparently create an IOVA/ host GICv2 MSI frame mapping.
That way the PCI device is programmed with this IOVA and this eventually
reaches the host GICv2m MSI frame physical page.

Hope it clarifies.

> 
>> Signed-off-by: Eric Auger <address@hidden>
>> ---
>>  hw/arm/virt.c         | 10 ++++++++++
>>  include/hw/arm/virt.h |  1 +
>>  2 files changed, 11 insertions(+)
>>
>> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
>> index 3839c68..7eaf8be 100644
>> --- a/hw/arm/virt.c
>> +++ b/hw/arm/virt.c
>> @@ -125,6 +125,7 @@ static const MemMapEntry a15memmap[] = {
>>      [VIRT_GPIO] =               { 0x09030000, 0x00001000 },
>>      [VIRT_SECURE_UART] =        { 0x09040000, 0x00001000 },
>>      [VIRT_MMIO] =               { 0x0a000000, 0x00000200 },
>> +    [VIRT_RESERVED] =           { 0x0be00000, 0x00100000 },
>>      /* ...repeating for a total of NUM_VIRTIO_TRANSPORTS, each of that size 
>> */
> 
> You've put the new entry between the VIRT_MMIO line and the comment that
> is associated with it.
sure thanks

Eric
> 
> thanks
> -- PMM
> 




reply via email to

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