On Tue, Oct 14, 2025 at 08:29:49AM -0600, Alex Williamson wrote: > > Ah - is this documented somewhere? And do you have an example of where this > > varies over the lifetime of a device currently? > > It's more the case that it's not specifically defined as static over > the lifetime of the device. I don't think we want device spontaneously > creating new regions, we have no device-check notification mechanism to > userspace to reevaluate regions, but a user initiated action defined to > create a new region seems like a fair vector where num_regions could be > updated. Also the current working idea would be that regions are only > added, not modified or deleted. > > > IOW, are these devices actually changing the num_regions value they report > > sometime after initialization (namely, can it change after > > vfio_device_prepare()) ? > > In theory, yes.
OK, thanks. So the question over whether there's an nvidia bug or not here seems to be moot, since anyway to support this kind of case, we need the region cache guardrails. This means that such "dynamic" regions are never cached, but that's not a specific issue for vfio-user at least. I will prepare a patch if you can help test it, Cédric. regards john
