[PATCH 0/3] virtio-iommu: Support VIRTIO_IOMMU_F_BYPASS_CONFIG

Jean-Philippe Brucker posted 3 patches 4 years, 4 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210930185050.262759-1-jean-philippe@linaro.org
Maintainers: Eric Auger <eric.auger@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>
There is a newer version of this series
include/hw/virtio/virtio-iommu.h              |  1 +
include/standard-headers/linux/virtio_iommu.h | 10 +++-
hw/virtio/virtio-iommu.c                      | 60 ++++++++++++++++---
hw/virtio/trace-events                        |  4 +-
4 files changed, 64 insertions(+), 11 deletions(-)
[PATCH 0/3] virtio-iommu: Support VIRTIO_IOMMU_F_BYPASS_CONFIG
Posted by Jean-Philippe Brucker 4 years, 4 months ago
Replace the VIRTIO_IOMMU_F_BYPASS feature with
VIRTIO_IOMMU_F_BYPASS_CONFIG, which enables a config space bit to switch
global bypass on and off.

Add a boot-bypass option, which defaults to 'on' to be in line with
other vIOMMUs and to allow running firmware/bootloader that are unaware
of the IOMMU.

See the spec change for more rationale
https://lists.oasis-open.org/archives/virtio-dev/202109/msg00137.html

Jean-Philippe Brucker (3):
  NOMERGE: virtio-iommu: Add definitions for
    VIRTIO_IOMMU_F_BYPASS_CONFIG
  virtio-iommu: Default to bypass during boot
  virtio-iommu: Support bypass domain

 include/hw/virtio/virtio-iommu.h              |  1 +
 include/standard-headers/linux/virtio_iommu.h | 10 +++-
 hw/virtio/virtio-iommu.c                      | 60 ++++++++++++++++---
 hw/virtio/trace-events                        |  4 +-
 4 files changed, 64 insertions(+), 11 deletions(-)

-- 
2.33.0


Re: [PATCH 0/3] virtio-iommu: Support VIRTIO_IOMMU_F_BYPASS_CONFIG
Posted by Eric Auger 4 years ago
Hi Jean, Michael,

On 9/30/21 8:50 PM, Jean-Philippe Brucker wrote:
> Replace the VIRTIO_IOMMU_F_BYPASS feature with
> VIRTIO_IOMMU_F_BYPASS_CONFIG, which enables a config space bit to switch
> global bypass on and off.
>
> Add a boot-bypass option, which defaults to 'on' to be in line with
> other vIOMMUs and to allow running firmware/bootloader that are unaware
> of the IOMMU.
>
> See the spec change for more rationale
> https://lists.oasis-open.org/archives/virtio-dev/202109/msg00137.html

I guess the kernel bits should be merged in 5.17?

Thanks

Eric
>
> Jean-Philippe Brucker (3):
>   NOMERGE: virtio-iommu: Add definitions for
>     VIRTIO_IOMMU_F_BYPASS_CONFIG
>   virtio-iommu: Default to bypass during boot
>   virtio-iommu: Support bypass domain
>
>  include/hw/virtio/virtio-iommu.h              |  1 +
>  include/standard-headers/linux/virtio_iommu.h | 10 +++-
>  hw/virtio/virtio-iommu.c                      | 60 ++++++++++++++++---
>  hw/virtio/trace-events                        |  4 +-
>  4 files changed, 64 insertions(+), 11 deletions(-)
>


Re: [PATCH 0/3] virtio-iommu: Support VIRTIO_IOMMU_F_BYPASS_CONFIG
Posted by Michael S. Tsirkin 4 years ago
On Tue, Jan 11, 2022 at 10:02:12AM +0100, Eric Auger wrote:
> Hi Jean, Michael,
> 
> On 9/30/21 8:50 PM, Jean-Philippe Brucker wrote:
> > Replace the VIRTIO_IOMMU_F_BYPASS feature with
> > VIRTIO_IOMMU_F_BYPASS_CONFIG, which enables a config space bit to switch
> > global bypass on and off.
> >
> > Add a boot-bypass option, which defaults to 'on' to be in line with
> > other vIOMMUs and to allow running firmware/bootloader that are unaware
> > of the IOMMU.
> >
> > See the spec change for more rationale
> > https://lists.oasis-open.org/archives/virtio-dev/202109/msg00137.html
> 
> I guess the kernel bits should be merged in 5.17?
> 
> Thanks
> 
> Eric

They are in fact in my tree and set to go into 5.16.
They've been in linux-next for a whole cycle now.
But if you feel I'm rushing things, pls let me know.
Also, pls let me know whether my tree actually works well for you!

> >
> > Jean-Philippe Brucker (3):
> >   NOMERGE: virtio-iommu: Add definitions for
> >     VIRTIO_IOMMU_F_BYPASS_CONFIG
> >   virtio-iommu: Default to bypass during boot
> >   virtio-iommu: Support bypass domain
> >
> >  include/hw/virtio/virtio-iommu.h              |  1 +
> >  include/standard-headers/linux/virtio_iommu.h | 10 +++-
> >  hw/virtio/virtio-iommu.c                      | 60 ++++++++++++++++---
> >  hw/virtio/trace-events                        |  4 +-
> >  4 files changed, 64 insertions(+), 11 deletions(-)
> >


Re: [PATCH 0/3] virtio-iommu: Support VIRTIO_IOMMU_F_BYPASS_CONFIG
Posted by Jean-Philippe Brucker 4 years ago
Hi Michael,

On Tue, Jan 11, 2022 at 10:40:28AM -0500, Michael S. Tsirkin wrote:
> On Tue, Jan 11, 2022 at 10:02:12AM +0100, Eric Auger wrote:
> > Hi Jean, Michael,
> > 
> > On 9/30/21 8:50 PM, Jean-Philippe Brucker wrote:
> > > Replace the VIRTIO_IOMMU_F_BYPASS feature with
> > > VIRTIO_IOMMU_F_BYPASS_CONFIG, which enables a config space bit to switch
> > > global bypass on and off.
> > >
> > > Add a boot-bypass option, which defaults to 'on' to be in line with
> > > other vIOMMUs and to allow running firmware/bootloader that are unaware
> > > of the IOMMU.
> > >
> > > See the spec change for more rationale
> > > https://lists.oasis-open.org/archives/virtio-dev/202109/msg00137.html
> > 
> > I guess the kernel bits should be merged in 5.17?
> > 
> > Thanks
> > 
> > Eric
> 
> They are in fact in my tree and set to go into 5.16.
> They've been in linux-next for a whole cycle now.
> But if you feel I'm rushing things, pls let me know.
> Also, pls let me know whether my tree actually works well for you!

Thanks, unfortunately I just noticed that those patches are from an older
version of the series, the latest being v3
https://lore.kernel.org/linux-iommu/20211201173323.1045819-1-jean-philippe@linaro.org/

Since Joerg picked the latest one in his tree [1], I was wondering if you
could drop those patches?

51a4c54f35ae iommu/virtio: Support identity-mapped domains
523e55a406aa iommu/virtio: Pass end address to viommu_add_mapping()
97301219dfb2 iommu/virtio: Sort reserved regions
720552613526 iommu/virtio: Support bypass domains
01444b9c772f iommu/virtio: Add definitions for VIRTIO_IOMMU_F_BYPASS_CONFIG

Thanks,
Jean

[1] https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git/