[Top][All Lists]

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

Re: QOM address space handling

From: Paolo Bonzini
Subject: Re: QOM address space handling
Date: Tue, 10 Nov 2020 12:40:18 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

On 10/11/20 12:14, Mark Cave-Ayland wrote:
There are 2 possible solutions here: 1) ensure QOM objects that add address spaces during instance init have a corresponding instance finalize function to remove them or 2) move the creation of address spaces from instance init to realize.

Does anyone have any arguments for which solution is preferred?

I slightly prefer (1) because there could be cases where you also create subdevices using that address space, and in order to set properties of subdevices before realize, you would have to create the subdevices in instance_init as well.



As part of this work I hacked up an address_space_count() function in memory.c that returns the size of the address_spaces QTAILQ and added a printf() to display the value during instance init and finalize which demonstrates the problem nicely. This means it should be possible to add a similar to check to device-introspect-test in future to prevent similar errors from happening again.

reply via email to

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