Hi Peter,

> -----Original Message-----
> From: Peter Xu [mailto:pet...@redhat.com]
> Sent: Wednesday, September 27, 2017 12:32 PM
> To: Bharat Bhushan <bharat.bhus...@nxp.com>
> Cc: eric.au...@redhat.com; eric.auger....@gmail.com;
> peter.mayd...@linaro.org; alex.william...@redhat.com; m...@redhat.com;
> qemu-...@nongnu.org; qemu-devel@nongnu.org; w...@redhat.com;
> kevin.t...@intel.com; marc.zyng...@arm.com; t...@semihalf.com;
> will.dea...@arm.com; drjo...@redhat.com; robin.mur...@arm.com;
> christoffer.d...@linaro.org; bharatb.ya...@gmail.com
> Subject: Re: [PATCH v4 0/5] virtio-iommu: VFIO integration
> 
> 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,

Thanks, I will analyze and see how we can use for virtio-iommu.

Regards
-Bharat

> 
> --
> Peter Xu

Reply via email to