Re: [PATCH v10 09/10] virtio-iommu: Set supported page size mask

2020-10-30 Thread Michael S. Tsirkin
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

Re: [PATCH v10 09/10] virtio-iommu: Set supported page size mask

2020-10-27 Thread Jean-Philippe Brucker
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

Re: [PATCH v10 09/10] virtio-iommu: Set supported page size mask

2020-10-23 Thread Peter Xu
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

Re: [PATCH v10 09/10] virtio-iommu: Set supported page size mask

2020-10-23 Thread Jean-Philippe Brucker
On Thu, Oct 22, 2020 at 04:56:16PM -0400, Peter Xu wrote: > On Thu, Oct 22, 2020 at 06:39:37PM +0200, Jean-Philippe Brucker wrote: > > So what I'd like to do for next version: > > > > * Set qemu_real_host_page_mask as the default page mask, instead of the > > rather arbitrary TARGET_PAGE_MASK.

Re: [PATCH v10 09/10] virtio-iommu: Set supported page size mask

2020-10-22 Thread Peter Xu
On Thu, Oct 22, 2020 at 06:39:37PM +0200, Jean-Philippe Brucker wrote: > So what I'd like to do for next version: > > * Set qemu_real_host_page_mask as the default page mask, instead of the > rather arbitrary TARGET_PAGE_MASK. Oh, I thought TARGET_PAGE_MASK was intended - kernel committ

Re: [PATCH v10 09/10] virtio-iommu: Set supported page size mask

2020-10-22 Thread Jean-Philippe Brucker
On Fri, Oct 16, 2020 at 03:08:03PM +0200, Auger Eric wrote: > > +static int virtio_iommu_set_page_size_mask(IOMMUMemoryRegion *mr, > > + uint64_t page_size_mask, > > + Error **errp) > > +{ > > +int new_granule,

Re: [PATCH v10 09/10] virtio-iommu: Set supported page size mask

2020-10-22 Thread Jean-Philippe Brucker
On Mon, Oct 19, 2020 at 05:35:39PM -0400, Peter Xu wrote: > > +/* > > + * Disallow shrinking the page size. For example if an endpoint only > > + * supports 64kB pages, we can't globally enable 4kB pages. But that > > + * shouldn't happen, the host is unlikely to setup differing

Re: [PATCH v10 09/10] virtio-iommu: Set supported page size mask

2020-10-19 Thread Peter Xu
On Thu, Oct 08, 2020 at 07:15:57PM +0200, Jean-Philippe Brucker wrote: > From: Bharat Bhushan > > The virtio-iommu device can deal with arbitrary page sizes for virtual > endpoints, but for endpoints assigned with VFIO it must follow the page > granule used by the host IOMMU driver. > >

Re: [PATCH v10 09/10] virtio-iommu: Set supported page size mask

2020-10-16 Thread Auger Eric
Hi Jean, On 10/8/20 7:15 PM, Jean-Philippe Brucker wrote: > From: Bharat Bhushan > > The virtio-iommu device can deal with arbitrary page sizes for virtual > endpoints, but for endpoints assigned with VFIO it must follow the page > granule used by the host IOMMU driver. > > Implement the