Message ID | 20240712110230.4098056-3-edgar.iglesias@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [PULL,v1,1/3] MAINTAINERS: add Edgar as Xen maintainer | expand |
diff --git a/system/physmem.c b/system/physmem.c index 14aa025d41..2154432cb6 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -2277,6 +2277,10 @@ RAMBlock *qemu_ram_block_from_host(void *ptr, bool round_offset, ram_addr_t ram_addr; RCU_READ_LOCK_GUARD(); ram_addr = xen_ram_addr_from_mapcache(ptr); + if (ram_addr == RAM_ADDR_INVALID) { + return NULL; + } + block = qemu_get_ram_block(ram_addr); if (block) { *offset = ram_addr - block->offset;