qemu-arm
[Top][All Lists]
Advanced

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

Re: [Qemu-arm] [PATCH v4 0/5] virtio-iommu: VFIO integration


From: Peter Xu
Subject: Re: [Qemu-arm] [PATCH v4 0/5] virtio-iommu: VFIO integration
Date: Wed, 27 Sep 2017 15:01:33 +0800
User-agent: Mutt/1.5.24 (2015-08-30)

On Wed, Sep 27, 2017 at 06:46:18AM +0000, Bharat Bhushan wrote:
> Hi Peter,

Hi, Bharat!

> 
> While vfio with virtio-iommu I observed one issue,  When virtio-iommu device 
> exists but guest kernel does not have virtio-iommu driver (not enabled in 
> Config) then IOMMU faults are reported on host.
> 
> This is because no mapping is created in IOMMU, not even default
guest-physical to real-physical. While looking at vfio_listener_region_add(), 
it does not create initial mapping in IOMMU and relies on guest to create 
mapping. Is this something known or I am missing something?

For VT-d, the trick is played using dynamic IOMMU memory region.
Please refer to commit 558e0024a428 ("intel_iommu: allow dynamic
switch of IOMMU region") for more information.

The whole idea is that, the IOMMU region will not be enabled only if
the guest enables that explicitly for the device.  Otherwise (for your
case, when guest driver is not loaded at all), the IOMMU region is by
default off, then the default GPA region will be used to build up the
mapping (just like when we don't have vIOMMU at all).  Thanks,

-- 
Peter Xu



reply via email to

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