[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [Qemu-devel] [PATCH v7 3/5] migration: API to clear bits of guest free pages from the dirty bitmap
On 06/04/2018 10:49 AM, Peter Xu wrote:
+ + for (; len > 0; len -= used_len) { + block = qemu_ram_block_from_host(addr, false, &offset); + if (unlikely(!block)) { + return;We should never reach here, should we? Assuming the callers of this function should always pass in a correct host address. If we are very sure that the host addr should be valid, could we just assert?Probably not the case, because of the corner case that the memory would be hot unplugged after the free page is reported to QEMU.Question: Do we allow to do hot plug/unplug for memory during migration?I think so. From the code, I don't find where it forbids memory hotplug during migration.I don't play with that much; do we need to do "device_add" after all? (qemu) object_add memory-backend-file,id=mem1,size=1G,mem-path=/mnt/hugepages-1GB (qemu) device_add pc-dimm,id=dimm1,memdev=mem1 If so, we may not allow that since in qdev_device_add() we don't allow that: if (!migration_is_idle()) { error_setg(errp, "device_add not allowed while migrating"); return NULL; }
OK, I missed that part, and thanks for correcting it. I'll use an assert there if no objections from others.
Best, Wei
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]