Message ID | 20201020172428.2220726-1-philmd@redhat.com |
---|---|
Headers | show |
Series | util/vfio-helpers: Allow using multiple MSIX IRQs | expand |
On Tue, Oct 20, 2020 at 07:24:14PM +0200, Philippe Mathieu-Daudé wrote: > Change the confuse "VFIO IOMMU check failed" error message by > the explicit "VFIO IOMMU Type1 is not supported" once. > > Example on POWER: > > $ qemu-system-ppc64 -drive if=none,id=nvme0,file=nvme://0001:01:00.0/1,format=raw > qemu-system-ppc64: -drive if=none,id=nvme0,file=nvme://0001:01:00.0/1,format=raw: VFIO IOMMU Type1 is not supported > > Suggested-by: Alex Williamson <alex.williamson@redhat.com> > Reviewed-by: Fam Zheng <fam@euphon.net> > Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> > --- > util/vfio-helpers.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
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 = MAX(min_page_size, 1u << (12 + NVME_CAP_MPSMIN(cap))); Is there a guarantee that the NVMe drive supports our min_page_size? Stefan
On Tue, Oct 20, 2020 at 07:24:18PM +0200, Philippe Mathieu-Daudé wrote: > For debug purpose, trace BAR regions info. > > Reviewed-by: Fam Zheng <fam@euphon.net> > Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> > --- > util/vfio-helpers.c | 8 ++++++++ > util/trace-events | 1 + > 2 files changed, 9 insertions(+) Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
On Tue, Oct 20, 2020 at 07:24:24PM +0200, Philippe Mathieu-Daudé wrote: > Instead of displaying the error on stderr, use error_report() > which also report to the monitor. > > Reviewed-by: Fam Zheng <fam@euphon.net> > Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> > --- > util/vfio-helpers.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
On Tue, Oct 20, 2020 at 07:24:27PM +0200, Philippe Mathieu-Daudé wrote: > In preparation of using multiple IRQs, switch to using the recently > introduced MSIX API. Instead of allocating and assigning IRQ in > a single step, we now have to use two distinct calls. > > Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> > --- > block/nvme.c | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
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 + NVME_CAP_MPSMIN(cap))); >> + s->page_size = MAX(min_page_size, 1u << (12 + NVME_CAP_MPSMIN(cap))); > > Is there a guarantee that the NVMe drive supports our min_page_size? No, good point! > > Stefan >