[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 074/136] exec: drop bogus mem_path from qemu_ram_alloc_from_fd()
From: |
Paolo Bonzini |
Subject: |
[PULL 074/136] exec: drop bogus mem_path from qemu_ram_alloc_from_fd() |
Date: |
Tue, 25 Feb 2020 12:50:04 +0100 |
From: Igor Mammedov <address@hidden>
Function will report error that will mention global mem_path,
which was valid the only if legacy -mem-path was used and
only in case of main RAM.
However it doesn't work with hostmem backends
(for example:
"
qemu: -object memory-backend-file,id=ram0,size=128M,mem-path=foo:
backing store (null) size 0x200000 does not match 'size' option 0x8000000
")
and couldn't possibly work in general FD case the function
is supposed to handle.
Taking in account that main RAM was converted into
memory-backend-foo object, there is no point in printing
file name (from inappropriate place) as failing path is
a part of backend's error message.
Hence drop bogus mem_path usage from qemu_ram_alloc_from_fd(),
it's a job of its user to add file name to error message if applicable.
Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
---
exec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/exec.c b/exec.c
index d85a868..6ebff8b 100644
--- a/exec.c
+++ b/exec.c
@@ -2307,9 +2307,9 @@ RAMBlock *qemu_ram_alloc_from_fd(ram_addr_t size,
MemoryRegion *mr,
size = HOST_PAGE_ALIGN(size);
file_size = get_file_size(fd);
if (file_size > 0 && file_size < size) {
- error_setg(errp, "backing store %s size 0x%" PRIx64
+ error_setg(errp, "backing store size 0x%" PRIx64
" does not match 'size' option 0x" RAM_ADDR_FMT,
- mem_path, file_size, size);
+ file_size, size);
return NULL;
}
--
1.8.3.1
- [PULL 062/136] ppc/pnv: use memdev for RAM, (continued)
- [PULL 062/136] ppc/pnv: use memdev for RAM, Paolo Bonzini, 2020/02/25
- [PULL 058/136] ppc/e500: drop RAM size fixup, Paolo Bonzini, 2020/02/25
- [PULL 065/136] ppc/{ppc440_bamboo, sam460ex}: drop RAM size fixup, Paolo Bonzini, 2020/02/25
- [PULL 066/136] ppc/{ppc440_bamboo, sam460ex}: use memdev for RAM, Paolo Bonzini, 2020/02/25
- [PULL 061/136] ppc/mac_oldworld: use memdev for RAM, Paolo Bonzini, 2020/02/25
- [PULL 060/136] ppc/mac_newworld: use memdev for RAM, Paolo Bonzini, 2020/02/25
- [PULL 071/136] sparc/niagara: use memdev for RAM, Paolo Bonzini, 2020/02/25
- [PULL 069/136] sparc/leon3: use memdev for RAM, Paolo Bonzini, 2020/02/25
- [PULL 076/136] hostmem: introduce "prealloc-threads" property, Paolo Bonzini, 2020/02/25
- [PULL 078/136] tests/numa-test: make top level args dynamic and g_autofree(cli) cleanups, Paolo Bonzini, 2020/02/25
- [PULL 074/136] exec: drop bogus mem_path from qemu_ram_alloc_from_fd(),
Paolo Bonzini <=
- [PULL 068/136] ppc/virtex_ml507: use memdev for RAM, Paolo Bonzini, 2020/02/25
- [PULL 075/136] make mem_path local variable, Paolo Bonzini, 2020/02/25
- [PULL 081/136] hw: Remove unnecessary cast when calling dma_memory_read(), Paolo Bonzini, 2020/02/25
- [PULL 083/136] exec: Let flatview API take void pointer arguments, Paolo Bonzini, 2020/02/25
- [PULL 085/136] hw/net: Avoid casting non-const pointer, use address_space_write(), Paolo Bonzini, 2020/02/25
- [PULL 077/136] hostmem: fix strict bind policy, Paolo Bonzini, 2020/02/25
- [PULL 073/136] exec: cleanup qemu_minrampagesize()/qemu_maxrampagesize(), Paolo Bonzini, 2020/02/25
- [PULL 079/136] tests:numa-test: use explicit memdev to specify node RAM, Paolo Bonzini, 2020/02/25
- [PULL 070/136] sparc/sun4m: use memdev for RAM, Paolo Bonzini, 2020/02/25
- [PULL 072/136] remove no longer used memory_region_allocate_system_memory(), Paolo Bonzini, 2020/02/25