qemu-arm.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Auger Eric <eric.auger@redhat.com>
To: Tomasz Nowicki <tnowicki@caviumnetworks.com>,
	eric.auger.pro@gmail.com, peter.maydell@linaro.org,
	alex.williamson@redhat.com, mst@redhat.com, qemu-arm@nongnu.org,
	qemu-devel@nongnu.org, jean-philippe.brucker@arm.com
Cc: kevin.tian@intel.com, marc.zyngier@arm.com, will.deacon@arm.com,
	drjones@redhat.com, peterx@redhat.com, linuc.decode@gmail.com,
	bharat.bhushan@nxp.com, christoffer.dall@linaro.org
Subject: Re: [Qemu-arm] [Qemu-devel] [RFC v4 00/16] VIRTIO-IOMMU device
Date: Wed, 27 Sep 2017 17:38:47 +0200	[thread overview]
Message-ID: <25c896c5-81db-e64a-92b0-7b2e270f530e@redhat.com> (raw)
In-Reply-To: <0062ede1-54d4-7e13-2986-374ec62c0a2a@caviumnetworks.com>

Hi Tomasz

On 27/09/2017 13:07, Tomasz Nowicki wrote:
> Hi Eric,
> 
> Out of curiosity, I compared your SMMUv3 full emulation against
> virtio-iommu. For virtio-net device behind the virtio-iommu I get 50%
> performance of what I can get for SMMUv3 emulation.
> 
> Do you have similar observations? Since there is no need to emulate HW
> behaviour in QEMU I expected virtio-iommu to be faster. I will run some
> more benchmarks.

No I don't have formal comparative figures at the moment. Benchmarking
is also on the top of my todo list though.

One reason could be that virtio-iommu sends requests for each map
operations whereas this does not happen for vsmmuv3 (in non caching
mode). You could try to turn the vsmmuv3 caching-mode option and I guess
you should have more similar perf figures between virtio-iommu and
vsmuv3.

Thanks

Eric
> 
> Thanks,
> Tomasz
> 
> On 19.09.2017 09:46, Eric Auger wrote:
>> This series implements the virtio-iommu device.
>>
>> This v4 is an upgrade to v0.4 spec [1] and applies on QEMU v2.10.0.
>> - probe request support although no reserved region is returned at
>>    the moment
>> - unmap semantics less strict, as specified in v0.4
>> - device registration, attach/detach revisited
>> - split into smaller patches to ease review
>> - propose a way to inform the IOMMU mr about the page_size_mask
>>    of underlying HW IOMMU, if any
>> - remove warning associated with the translation of the MSI doorbell
>>
>> The device gets instantiated using the "-device virtio-iommu-device"
>> option. It currently works with ARM virt machine only, as the machine
>> must handle the dt binding between the virtio-mmio "iommu" node and
>> the PCI host bridge node.
>>
>> The associated VHOST/VFIO adaptation is available on the branch
>> below but is not officially delivered as part of this series.
>>
>> Best Regards
>>
>> Eric
>>
>> This series can be found at:
>> https://github.com/eauger/qemu/tree/v2.10.0-virtio-iommu-v4
>>
>> References:
>> [1] [RFC] virtio-iommu version 0.4
>>      git://linux-arm.org/virtio-iommu.git branch viommu/v0.4
>>
>> Testing:
>> - guest kernel with v0.4 virtio-iommu driver (4kB page)
>> - tested with guest using virtio-pci-net and vhost-net
>>    (,vhost=on/off,iommu_platform,disable-modern=off,disable-legacy=on  )
>> - tested with VFIO and guest assigned with 2 VFs
>> - tested with DPDK on guest with 2 assigned VFs
>>
>> Not tested:
>> - hot-plug/hot-unplug of EP: not implemented
>>
>> History:
>> v2-> v4:
>> - see above
>>
>> v2 -> v3:
>> - rebase on top of 2.10-rc0 and especially
>>    [PATCH qemu v9 0/2] memory/iommu: QOM'fy IOMMU MemoryRegion
>> - add mutex init
>> - fix as->mappings deletion using g_tree_ref/unref
>> - when a dev is attached whereas it is already attached to
>>    another address space, first detach it
>> - fix some error values
>> - page_sizes = TARGET_PAGE_MASK;
>> - I haven't changed the unmap() semantics yet, waiting for the
>>    next virtio-iommu spec revision.
>>
>> v1 -> v2:
>> - fix redifinition of viommu_as typedef
>>
>> Eric Auger (16):
>>    update-linux-headers: import virtio_iommu.h
>>    linux-headers: Update for virtio-iommu
>>    virtio-iommu: add skeleton
>>    virtio-iommu: Decode the command payload
>>    virtio-iommu: Add the iommu regions
>>    virtio-iommu: Register attached devices
>>    virtio-iommu: Implement attach/detach command
>>    virtio-iommu: Implement map/unmap
>>    virtio-iommu: Implement translate
>>    virtio-iommu: Implement probe request
>>    hw/arm/virt: Add 2.11 machine type
>>    hw/arm/virt: Add virtio-iommu to the virt board
>>    memory.h: Add set_page_size_mask IOMMUMemoryRegion callback
>>    hw/vfio/common: Set the IOMMUMemoryRegion supported page sizes
>>    virtio-iommu: Implement set_page_size_mask
>>    hw/vfio/common: Do not print error when viommu translates into an mmio
>>      region
>>
>>   hw/arm/virt.c                                 | 115 +++-
>>   hw/vfio/common.c                              |   7 +-
>>   hw/virtio/Makefile.objs                       |   1 +
>>   hw/virtio/trace-events                        |  24 +
>>   hw/virtio/virtio-iommu.c                      | 923
>> ++++++++++++++++++++++++++
>>   include/exec/memory.h                         |   4 +
>>   include/hw/arm/virt.h                         |   5 +
>>   include/hw/vfio/vfio-common.h                 |   1 +
>>   include/hw/virtio/virtio-iommu.h              |  61 ++
>>   include/standard-headers/linux/virtio_ids.h   |   1 +
>>   include/standard-headers/linux/virtio_iommu.h | 177 +++++
>>   linux-headers/linux/virtio_iommu.h            |   1 +
>>   scripts/update-linux-headers.sh               |   3 +
>>   13 files changed, 1312 insertions(+), 11 deletions(-)
>>   create mode 100644 hw/virtio/virtio-iommu.c
>>   create mode 100644 include/hw/virtio/virtio-iommu.h
>>   create mode 100644 include/standard-headers/linux/virtio_iommu.h
>>   create mode 100644 linux-headers/linux/virtio_iommu.h
>>
> 

  reply	other threads:[~2017-09-27 15:39 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-19  7:46 [Qemu-arm] [RFC v4 00/16] VIRTIO-IOMMU device Eric Auger
2017-09-19  7:46 ` [Qemu-arm] [RFC v4 01/16] update-linux-headers: import virtio_iommu.h Eric Auger
2017-09-19  7:46 ` [Qemu-arm] [RFC v4 02/16] linux-headers: Update for virtio-iommu Eric Auger
2017-09-19  7:46 ` [Qemu-arm] [RFC v4 03/16] virtio-iommu: add skeleton Eric Auger
2017-09-19  7:46 ` [Qemu-arm] [RFC v4 04/16] virtio-iommu: Decode the command payload Eric Auger
2017-09-19  7:46 ` [Qemu-arm] [RFC v4 05/16] virtio-iommu: Add the iommu regions Eric Auger
2017-09-19  7:46 ` [Qemu-arm] [RFC v4 06/16] virtio-iommu: Register attached devices Eric Auger
2017-09-22  7:29   ` Bharat Bhushan
2017-09-19  7:46 ` [Qemu-devel] [RFC v4 07/16] virtio-iommu: Implement attach/detach command Eric Auger
2017-09-19  7:46 ` [Qemu-arm] [RFC v4 08/16] virtio-iommu: Implement map/unmap Eric Auger
2017-09-19  7:46 ` [Qemu-devel] [RFC v4 09/16] virtio-iommu: Implement translate Eric Auger
2017-09-22  6:52   ` [Qemu-arm] " Bharat Bhushan
2017-09-19  7:46 ` [Qemu-arm] [RFC v4 10/16] virtio-iommu: Implement probe request Eric Auger
2017-09-27 10:53   ` Tomasz Nowicki
2017-09-27 11:00     ` Bharat Bhushan
2017-09-27 15:44       ` [Qemu-arm] [Qemu-devel] " Auger Eric
2017-09-27 15:40     ` Auger Eric
2017-09-19  7:46 ` [Qemu-devel] [RFC v4 11/16] hw/arm/virt: Add 2.11 machine type Eric Auger
2017-09-19  7:46 ` [Qemu-arm] [RFC v4 12/16] hw/arm/virt: Add virtio-iommu to the virt board Eric Auger
2017-09-19  7:46 ` [Qemu-devel] [RFC v4 13/16] memory.h: Add set_page_size_mask IOMMUMemoryRegion callback Eric Auger
2017-09-19  7:46 ` [Qemu-devel] [RFC v4 14/16] hw/vfio/common: Set the IOMMUMemoryRegion supported page sizes Eric Auger
2017-09-19  7:46 ` [Qemu-arm] [RFC v4 15/16] virtio-iommu: Implement set_page_size_mask Eric Auger
2017-09-19  7:46 ` [Qemu-devel] [RFC v4 16/16] hw/vfio/common: Do not print error when viommu translates into an mmio region Eric Auger
2017-09-27 11:07 ` [Qemu-arm] [RFC v4 00/16] VIRTIO-IOMMU device Tomasz Nowicki
2017-09-27 15:38   ` Auger Eric [this message]
2017-10-11 14:56 ` [Qemu-devel] " Peter Maydell
2017-10-11 16:08   ` [Qemu-arm] " Auger Eric
2017-10-12  9:54     ` Peter Maydell
2017-10-12 10:09       ` Auger Eric
2017-10-12 10:46         ` [Qemu-arm] " Jean-Philippe Brucker
2017-10-13  7:01         ` Tian, Kevin
2017-10-13  7:43           ` [Qemu-arm] " Auger Eric

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=25c896c5-81db-e64a-92b0-7b2e270f530e@redhat.com \
    --to=eric.auger@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=bharat.bhushan@nxp.com \
    --cc=christoffer.dall@linaro.org \
    --cc=drjones@redhat.com \
    --cc=eric.auger.pro@gmail.com \
    --cc=jean-philippe.brucker@arm.com \
    --cc=kevin.tian@intel.com \
    --cc=linuc.decode@gmail.com \
    --cc=marc.zyngier@arm.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=peterx@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=tnowicki@caviumnetworks.com \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).