On 2026/06/26 5:34, Paolo Bonzini wrote:
On 6/22/26 16:36, Akihiko Odaki wrote:
I think we can stack follow-up patches that reject accesses to
MemoryRegions owned by unrealized devices. That would make this a more
complete solution.
No, that would be *the only necessary part* of the solution.
Embedded objects are just fine. I know that *right now* there are
issues, but they are with unplug and not with embedded objects; the same
issues would exist even with non-embedded objects.
I still do not understand what these patches can fix or simplify.
The problem with embedded objects is that object_ref() on an embedded
object does not keep the containing object alive. This is inherent in
QOM and is therefore independent of unplug, which is a qdev concept.
qdev has a separate quirk: a memory region may still be accessed after
its owner has been unrealized. That issue is orthogonal.
Regards,
Akihiko Odaki
Paolo
Accessing an unrealized device is an unsafe corner case anyway, so it
is better to close it explicitly.