qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] vfio: Fix handling VFIO_IOMMU_GET_INFO results


From: Pavel Fedin
Subject: Re: [Qemu-devel] [PATCH] vfio: Fix handling VFIO_IOMMU_GET_INFO results
Date: Fri, 13 Nov 2015 12:33:09 +0300

 Hello!

> >  If we fix qemu, it will automatically start working with all
> > available kernels which are there in the wild. If we fix kernel, older
> > versions will still not work, however they can.
> >  That's why i think that we should adapt qemu to what already exists.
> > But, well, you are The Boss, so you can just say "i don't care". So,
> > just let me now if you strongly disagree with this.
> 
> I do care, in fact I care enough about the ABI that I'm suggesting what
> I think is the correct fix rather than taking the quick and dirty
> solution.  It's an unfortunate bug, but it's not worth changing the ABI
> and removing the kernel's ability to indicate whether the pgsize bitmap
> field is valid IMO.

 Ok, i see your point...
 But what about fix, which would work both with future kernels, which do 
provide this flag, as well as would be compatible with already existing 
kernels, which set flags == 0?
 We could check for ((info.flags == 0) || (info.flags & 
VFIO_IOMMU_INFO_PGSIZES)). This would conform to both behaviors:
 a) All current kernels set flags = 0 and report page sizes.
 b) Some future kernels could have set some flags, but not reported page sizes 
and not set VFIO_IOMMI_PGSIZES

 What would you say about this? Yes, this would be a "workaround" instead of 
"fix".

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia





reply via email to

[Prev in Thread] Current Thread [Next in Thread]