On 30/5/23 13:38, David Hildenbrand wrote:
Let's use our new helper and stop always allocating ms->device_memory.
Once allcoated, we're sure that the size > 0 and that the base was
initialized.
Adjust the code in pc_memory_init() to check for machine->device_memory
instead of pcmc->has_reserved_memory and machine->device_memory->base.
Cc: Paolo Bonzini <[email protected]>
Cc: Richard Henderson <[email protected]>
Cc: Eduardo Habkost <[email protected]>
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Marcel Apfelbaum <[email protected]>
Signed-off-by: David Hildenbrand <[email protected]>
---
hw/i386/pc.c | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>