+ /* Ram device is remapped in new QEMU */
+ if (memory_region_is_ram_device(mr)) {
+ return true;
+ }
+
+ /* Named files are remapped in new QEMU, same contents if shared (no COW)
*/
+ if (qemu_ram_is_shared(rb) && qemu_ram_is_named_file(rb)) {
+ return true;
+ }
+
+ /* A file descriptor is remapped in new QEMU */
+ if (rb->fd >= 0 && qemu_ram_is_shared(rb)) {
+ return true;
+ }
Sorry, I was not fast enough to reply to your v3 reply.
This is now essentially:
if (qemu_ram_is_shared(rb) &&
(qemu_ram_is_named_file(rb) || rb->fd >= 0)) {
return true;
}
But what is the purpose of the "name file" check then, if rb->fd
essentially allows for any files?
So either the "fd >= 0" check is insufficient or the
qemu_ram_is_named_file() check us superfluous.
--
Cheers,
David / dhildenb