qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH v3 0/2] spapr: Use vIOMMU translation for virtio by default


From: Greg Kurz
Subject: Re: [PATCH v3 0/2] spapr: Use vIOMMU translation for virtio by default
Date: Wed, 11 Mar 2020 18:19:41 +0100

On Thu,  5 Mar 2020 15:30:07 +1100
David Gibson <address@hidden> wrote:

> Upcoming Secure VM support for pSeries machines introduces some
> complications for virtio, since the transfer buffers need to be
> explicitly shared so that the hypervisor can access them.
> 
> While it's not strictly speaking dependent on it, the fact that virtio
> devices bypass normal platform IOMMU translation complicates the issue
> on the guest side.  Since there are some significan downsides to
> bypassing the vIOMMU anyway, let's just disable that.
> 
> There's already a flag to do this in virtio, just turn it on by
> default for forthcoming pseries machine types.
> 
> Any opinions on whether dropping support for the older guest kernels
> is acceptable at this point?
> 
> Changes since v2:
>  * Rebase and improve some comments
> Changes since v1:
>  * Added information on which guest kernel versions will no longer
>    work with these changes
>  * Use Michael Tsirkin's suggested better way of handling the machine
>    type change
> 
> David Gibson (2):
>   spapr: Disable legacy virtio devices for pseries-5.0 and later

This disables legacy AND transitional devices. IIUC this first patch
is needed because only non-transitional (pure virtio-1) devices
support iommu_platform=on, ie. this check in virtio_pci_device_plugged():

    if (legacy) {
        if (virtio_host_has_feature(vdev, VIRTIO_F_IOMMU_PLATFORM)) {
            error_setg(errp, "VIRTIO_F_IOMMU_PLATFORM was supported by"
                       " neither legacy nor transitional device");
            return ;
        }

It certainly looks right for legacy devices but what about
transitional ones ? I couldn't find any indication in the
spec or in the QEMU archives that explains why IOMMU should
only be used with non-transitional devices...

Jason or Michael, can you explain ?

>   spapr: Enable virtio iommu_platform=on by default
> 
>  hw/ppc/spapr.c | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 




reply via email to

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