[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
- [Qemu-arm] [PATCH v4 0/5] virtio-iommu: VFIO integration, Bharat Bhushan, 2017/09/27
- [Qemu-arm] [PATCH v4 1/5] target/arm/kvm: Translate the MSI doorbell in kvm_arch_fixup_msi_route, Bharat Bhushan, 2017/09/27
- [Qemu-arm] [PATCH v4 2/5] virtio-iommu: Add iommu notifier for map/unmap, Bharat Bhushan, 2017/09/27
- [Qemu-arm] [PATCH v4 3/5] virtio-iommu: Call iommu notifier for attach/detach, Bharat Bhushan, 2017/09/27
- [Qemu-arm] [PATCH v4 4/5] virtio-iommu: add iommu replay, Bharat Bhushan, 2017/09/27
- [Qemu-arm] [PATCH v4 5/5] virtio-iommu: add iommu notifier memory-region, Bharat Bhushan, 2017/09/27
- Re: [Qemu-arm] [PATCH v4 0/5] virtio-iommu: VFIO integration, Bharat Bhushan, 2017/09/27
- Re: [Qemu-arm] [PATCH v4 0/5] virtio-iommu: VFIO integration,
Peter Xu <=
- Re: [Qemu-arm] [PATCH v4 0/5] virtio-iommu: VFIO integration, Linu Cherian, 2017/09/27
- Re: [Qemu-arm] [PATCH v4 0/5] virtio-iommu: VFIO integration, Linu Cherian, 2017/09/27