qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 00/11] Make memory_region_init_ram() and friends


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCH 00/11] Make memory_region_init_ram() and friends handle migration
Date: Sat, 22 Jul 2017 01:47:43 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

Hi Peter,

On 07/07/2017 11:42 AM, Peter Maydell wrote:
This patchset changes the memory region functions
  - memory_region_init_ram()
  - memory_region_init_rom()
  - memory_region_init_rom_device()
to all automatically register the backing memory they allocate
for migration using vmstate_register_ram(). Renamed functions
  - memory_region_init_ram_nomigrate()
  - memory_region_init_rom_nomigrate()
  - memory_region_init_rom_device_nomigrate()
are provided which only do the MR init, for the oddball
cases which want to manage migration of the backing memory
themselves (and to avoid behavioural changes for callers
which weren't managing correctly migration themselves...)
[...]

I'm seeing memleaks using the malta machine, they come from the smbus_eeprom_init() in hw/i2c/smbus_eeprom.c which does:

uint8_t *eeprom_buf = g_malloc0(8 * 256); /* XXX: make this persistent */

Question for 2.11: is this device a candidate to use one of the function you enumerated? My guess is memory_region_init_rom_device()

Question for 2.10: does that mean than the malta machine is not migratable?

Thanks!

Phil.



reply via email to

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