[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v10 09/10] virtio-iommu: Set supported page size mask
From: |
Michael S. Tsirkin |
Subject: |
Re: [PATCH v10 09/10] virtio-iommu: Set supported page size mask |
Date: |
Fri, 30 Oct 2020 06:24:24 -0400 |
On Tue, Oct 27, 2020 at 06:38:40PM +0100, Jean-Philippe Brucker wrote:
> On Fri, Oct 23, 2020 at 12:47:02PM -0400, Peter Xu wrote:
> > On Fri, Oct 23, 2020 at 09:48:58AM +0200, Jean-Philippe Brucker wrote:
> > > Arm CPUs and SMMU support 4k, 16k and 64k page sizes. I don't think 16k is
> > > used anywhere but some distributions chose 64k (RHEL, I think?), others
> > > 4k, so we need to support both.
> > >
> > > Unfortunately as noted above host64k-guest4k is not possible without
> > > adding a negotiation mechanism to virtio-iommu, host VFIO and IOMMU
> > > driver.
> >
> > I see. Then it seems we would still need to support host4k-guest64k.
> >
> > Maybe for assigned case, we can simply AND all the psize_masks of all the
> > vfio
> > containers that supported to replace the default psize mask
> > (TARGET_PAGE_SIZE)
> > without caring about whether it's shrinking or not? Note that current patch
> > only update config.psize_mask to the new one, but I think we need to
> > calculate
> > the subset of all containers rather than a simply update.
>
> Yes I think an AND is the right operation. We'll return an error if the
> resulting mask is 0. Then for hotplug, I think I'll keep the current "best
> effort" code from this patch. If necessary we could later add a parameter
> to set a default mask and guarantee hotplug success.
>
> Thanks,
> Jean
So I should expect a new version with that?
> > Then with the help
> > of 39b3b3c9cac1 imho we'll gracefully fail the probe if the psize is not
> > suitable anyway, e.g., host64k-guest4k.
> >
> > Thanks,
> >
> > --
> > Peter Xu
> >
- Re: [PATCH v10 07/10] memory: Add interface to set iommu page size mask, (continued)
- [PATCH v10 09/10] virtio-iommu: Set supported page size mask, Jean-Philippe Brucker, 2020/10/08
- Re: [PATCH v10 09/10] virtio-iommu: Set supported page size mask, Auger Eric, 2020/10/16
- Re: [PATCH v10 09/10] virtio-iommu: Set supported page size mask, Peter Xu, 2020/10/19
- Re: [PATCH v10 09/10] virtio-iommu: Set supported page size mask, Jean-Philippe Brucker, 2020/10/22
- Re: [PATCH v10 09/10] virtio-iommu: Set supported page size mask, Peter Xu, 2020/10/22
- Re: [PATCH v10 09/10] virtio-iommu: Set supported page size mask, Jean-Philippe Brucker, 2020/10/23
- Re: [PATCH v10 09/10] virtio-iommu: Set supported page size mask, Peter Xu, 2020/10/23
- Re: [PATCH v10 09/10] virtio-iommu: Set supported page size mask, Jean-Philippe Brucker, 2020/10/27
- Re: [PATCH v10 09/10] virtio-iommu: Set supported page size mask,
Michael S. Tsirkin <=
[PATCH v10 08/10] vfio: Set IOMMU page size as per host supported page size, Jean-Philippe Brucker, 2020/10/08
Re: [PATCH v10 08/10] vfio: Set IOMMU page size as per host supported page size, Auger Eric, 2020/10/16
[PATCH v10 10/10] vfio: Don't issue full 2^64 unmap, Jean-Philippe Brucker, 2020/10/08