Re: [PATCH 03/16] util/vfio-helpers: Pass minimum page size to qemu_vfio_open_pci()

2020-10-24 Thread Philippe Mathieu-Daudé
On 10/22/20 4:00 PM, Stefan Hajnoczi wrote: On Tue, Oct 20, 2020 at 07:24:15PM +0200, Philippe Mathieu-Daudé wrote: @@ -724,7 +725,7 @@ static int nvme_init(BlockDriverState *bs, const char *device, int namespace, goto out; } -s->page_size = MAX(4096, 1u << (12 +

Re: [PATCH 03/16] util/vfio-helpers: Pass minimum page size to qemu_vfio_open_pci()

2020-10-22 Thread Stefan Hajnoczi
On Tue, Oct 20, 2020 at 07:24:15PM +0200, Philippe Mathieu-Daudé wrote: > @@ -724,7 +725,7 @@ static int nvme_init(BlockDriverState *bs, const char > *device, int namespace, > goto out; > } > > -s->page_size = MAX(4096, 1u << (12 + NVME_CAP_MPSMIN(cap))); > +s->page_size =

[PATCH 03/16] util/vfio-helpers: Pass minimum page size to qemu_vfio_open_pci()

2020-10-20 Thread Philippe Mathieu-Daudé
The block driver asks for a minimum page size, but it might not match the minimum IOMMU requirement. In the next commit qemu_vfio_init_pci() will be able to report the minimum IOMMU page size back to the block driver. In preparation, pass the minimum page size as argument to qemu_vfio_open_pci().