qemu-devel
[Top][All Lists]
Advanced

[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
> > 




reply via email to

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