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 +
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 =
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().