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: Linu Cherian
Subject: Re: [Qemu-arm] [PATCH v4 0/5] virtio-iommu: VFIO integration
Date: Wed, 27 Sep 2017 14:35:55 +0530
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed Sep 27, 2017 at 10:55:07AM +0200, Auger Eric wrote:
> Hi Linu,
> 
> On 27/09/2017 10:30, Bharat Bhushan wrote:
> > Hi,
> > 
> >> -----Original Message-----
> >> From: Linu Cherian [mailto:address@hidden
> >> Sent: Wednesday, September 27, 2017 1:11 PM
> >> To: Bharat Bhushan <address@hidden>
> >> Cc: address@hidden; address@hidden;
> >> address@hidden; address@hidden; address@hidden;
> >> address@hidden; address@hidden; address@hidden;
> >> address@hidden; address@hidden; address@hidden;
> >> address@hidden; address@hidden; address@hidden;
> >> address@hidden
> >> Subject: Re: [Qemu-arm] [PATCH v4 0/5] virtio-iommu: VFIO integration
> >>
> >> Hi,
> >>
> >> On Wed Sep 27, 2017 at 12:03:15PM +0530, Bharat Bhushan wrote:
> >>> This patch series integrates VFIO/VHOST with virtio-iommu.
> >>>
> >>> This version is mainly about rebasing on v4 version on virtio-iommu
> >>> device framework from Eric Augur and addresing review comments.
> >>>
> >>> This patch series allows PCI pass-through using virtio-iommu.
> >>>
> >>> This series is based on:
> >>>  - virtio-iommu kernel driver by Jean-Philippe Brucker
> >>>     [1] [RFC] virtio-iommu version 0.4
> >>>     git://linux-arm.org/virtio-iommu.git branch viommu/v0.4
> 
> Just to make sure, do you use the v0.4 virtio-iommu driver from above
> branch?

Yes, Eric i have that.

>From guest kernel,
  0.000000] Linux version 4.13.0-rc1-gd1949df
.
.
] virtio_iommu virtio0: aperture: 0x0-0xffffffffffffffff
[    0.927886] virtio_iommu virtio0: page mask: 0x40201000
[    0.931682] virtio_iommu virtio0: probe successful


Guest kernel source is on this commit,

commit d1949dfbf5c0d181b290625c28c5359284686e3a
Author: Jean-Philippe Brucker <address@hidden>
Date:   Mon Jul 17 19:01:07 2017 +0100

    iommu/virtio-iommu: add MSI window probe
    
    Using the probe request, extract RESV_MEM information. When we encounter a
    MSI doorbell region, set it up as a IOMMU_RESV_MSI region. This will tell
    other subsystems that there is no need to map the MSI doorbell in the
    virtio-iommu, because MSIs bypass it.
    
    Signed-off-by: Jean-Philippe Brucker <address@hidden>

with CONFIG_VIRTIO_IOMMU=y in config.

> 
> Thanks
> 
> Eric
> >>>
> >>>  - virtio-iommu device emulation by Eric Augur.
> >>>    [RFC v4 00/16] VIRTIO-IOMMU device
> >>>    https://github.com/eauger/qemu/tree/v2.10.0-virtio-iommu-v4
> >>>
> >>> Changes are available at : https://github.com/bharaty/qemu.git
> >>> virtio-iommu-vfio-integration-v4
> >>>
> >>
> >> # With the above sources, was trying to test the vfio-pci device assigned 
> >> to
> >>   guest using Qemu.
> >> # Both guest and host kernels are configured with 4k as page size.
> >> # releavant qemu command snippet,
> >>   -device virtio-iommu-device -device virtio-blk-device,drive=hd0 \
> >>   -net none -device vfio-pci,host=xxx
> >>
> >>
> >> On guest booting, observed mutliple messages as below,
> >>
> >> qemu-system-aarch64: iommu has granularity incompatible with target AS
> >>
> >> # On adding necessary prints, 0x5000 is len, 0x4fff is address mask
> >>   and the code expects the address mask to be 0xfff.
> > 
> > I have not seen these errors, I am also using 4K page-size on both host and 
> > guest. Can you share compete qemu command and log. 
> > 
> > Thanks
> > -Bharat
> > 
> >>
> >> if (len & iotlb->addr_mask) {
> >>         error_report
> >>
> >> # vfio_dma_map is failing due to this error.
> >>
> >> Any pointers ?
> >>
> >>
> >>> v3->v4:
> >>>  - Rebase to v4 version from Eric
> >>>  - Fixes from Eric with DPDK in VM
> >>>  - Logical division in multiple patches
> >>>
> >>> v2->v3:
> >>>  - This series is based on "[RFC v3 0/8] VIRTIO-IOMMU device"
> >>>    Which is based on top of v2.10-rc0 that
> >>>  - Fixed issue with two PCI devices
> >>>  - Addressed review comments
> >>>
> >>> v1->v2:
> >>>   - Added trace events
> >>>   - removed vSMMU3 link in patch description
> >>>
> >>> Bharat Bhushan (5):
> >>>   target/arm/kvm: Translate the MSI doorbell in
> >> kvm_arch_fixup_msi_route
> >>>   virtio-iommu: Add iommu notifier for map/unmap
> >>>   virtio-iommu: Call iommu notifier for attach/detach
> >>>   virtio-iommu: add iommu replay
> >>>   virtio-iommu: add iommu notifier memory-region
> >>>
> >>>  hw/virtio/trace-events           |   5 ++
> >>>  hw/virtio/virtio-iommu.c         | 181
> >> ++++++++++++++++++++++++++++++++++++++-
> >>>  include/hw/virtio/virtio-iommu.h |   6 ++
> >>>  target/arm/kvm.c                 |  27 ++++++
> >>>  target/arm/trace-events          |   3 +
> >>>  5 files changed, 219 insertions(+), 3 deletions(-)
> >>>
> >>> --
> >>> 1.9.3
> >>>
> >>>
> >>
> >> --
> >> Linu cherian

-- 
Linu cherian



reply via email to

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