On Tue, Nov 03, 2020 at 05:32:34PM +0100, Jean-Philippe Brucker wrote:
> > In summary:
> > 
> >     if (qdev_hotplug) {
> >         if ((new_mask & cur_mask) == cur_mask) {
> >             /* Superset of old mask; we're good.  Keep the old mask since 
> > same */
> >             return 0;
> 
> That looks correct, but a bit too restrictive. If we start with
> cur_mask = 0xfffffffffffff000, and we hotplug a VFIO device with
> new_mask = 0x40201000 (4k page, 2M 1G blocks), then this code rejects it
> even though it would work.

Yeah I think you're right - it should be the smallest granule that matters the
most.  Thanks,

-- 
Peter Xu


Reply via email to