On 23/02/2017 11:48, Fam Zheng wrote:
>>
>> The first three patches add the driver, the others are to make qemu-img more
>> efficient with the new driver.
> Paolo, I wanted to also make ram_block_notifier_add notify existing ram
> blocks,
> so that hot plugging of nvme:// will work as expected, but I don't know how to
> write the code. Any suggestions? Or do you have a patch for that already?
I don't :) but it shouldn't be hard to do using qemu_ram_foreach_block:
typedef int (RAMBlockIterFunc)(const char *block_name, void *host_addr,
ram_addr_t offset, ram_addr_t length, void *opaque);
int qemu_ram_foreach_block(RAMBlockIterFunc func, void *opaque);
Paolo