On Mon, Oct 26, 2020 at 11:54:59AM +0100, Philippe Mathieu-Daudé wrote: > @@ -737,6 +738,17 @@ static int nvme_init(BlockDriverState *bs, const char > *device, int namespace, > } > > device_page_size_min = 1u << (12 + NVME_CAP_MPSMIN(cap)); > + device_page_size_max = 1u << (12 + NVME_CAP_MPSMAX(cap)); > + if (iommu_page_size_min > device_page_size_max) { > + g_autofree char *iommu_page_size_s = > size_to_str(iommu_page_size_min); > + g_autofree char *device_page_size_s = > size_to_str(device_page_size_max); > + > + error_setg(errp, "IOMMU minimum page size (%s)" > + " too big for device (max %s)", > + iommu_page_size_s, device_page_size_s); > + ret = -EINVAL; > + goto out; > + }
I thought you and Eric worked on a solution to support smaller device pages on bigger IOMMU pages? For example, 4KB device page size on 64KB IOMMU page size. Won't this check be removed again very soon? Why add it at all?
signature.asc
Description: PGP signature