From: Igor Mammedov <imammedo@redhat.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, marcandre.lureau@redhat.com, rth@twiddle.net
Subject: Re: [PATCH REPOST v3 75/80] exec: drop bogus mem_path from qemu_ram_alloc_from_fd()
Date: Fri, 24 Jan 2020 10:35:21 +0100 [thread overview]
Message-ID: <20200124103521.7b84c569@redhat.com> (raw)
In-Reply-To: <1579779525-20065-76-git-send-email-imammedo@redhat.com>
On Thu, 23 Jan 2020 12:38:40 +0100
Igor Mammedov <imammedo@redhat.com> wrote:
> 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 <imammedo@redhat.com>
Marc-André,
git blames you as the one who introduced it,
could you take a look at this patch
probably I should add here as well
Fixes: 8d37b030fe ("exec: split file_ram_alloc()")
> ---
> CC: pbonzini@redhat.com
> CC: rth@twiddle.net
> ---
> exec.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/exec.c b/exec.c
> index 809987c..dc844fd 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -2308,9 +2308,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;
> }
>
next prev parent reply other threads:[~2020-01-24 9:36 UTC|newest]
Thread overview: 134+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-23 11:37 [PATCH REPOST v3 00/80] refactor main RAM allocation to use hostmem backend Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 01/80] numa: remove deprecated -mem-path fallback to anonymous RAM Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 02/80] machine: introduce memory-backend property Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 03/80] machine: alias -mem-path and -mem-prealloc into memory-foo backend Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 04/80] machine: introduce convenience MachineState::ram Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 05/80] initialize MachineState::ram in NUMA case Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 06/80] alpha:dp264: use memdev for RAM Igor Mammedov
2020-01-23 15:07 ` BALATON Zoltan
2020-01-24 8:13 ` Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 07/80] arm/aspeed: actually check RAM size Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 08/80] arm/aspeed: use memdev for RAM Igor Mammedov
2020-01-23 12:08 ` Joel Stanley
2020-01-23 11:37 ` [PATCH REPOST v3 09/80] arm/collie: " Igor Mammedov
2020-01-23 12:27 ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 10/80] arm/cubieboard: " Igor Mammedov
2020-01-23 12:30 ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 11/80] arm/digic_boards: " Igor Mammedov
2020-01-23 12:32 ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 12/80] arm/highbank: " Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 13/80] arm/imx25_pdk: drop RAM size fixup Igor Mammedov
2020-01-23 12:39 ` Andrew Jones
2020-01-23 14:32 ` Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 14/80] arm/imx25_pdk: use memdev for RAM Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 15/80] arm/integratorcp: " Igor Mammedov
2020-01-23 12:40 ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 16/80] arm/kzm: drop RAM size fixup Igor Mammedov
2020-01-23 22:23 ` Chubb, Peter (Data61, Kensington NSW)
2020-01-24 8:10 ` Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 17/80] arm/kzm: use memdev for RAM Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 18/80] arm/mcimx6ul-evk: " Igor Mammedov
2020-01-23 12:50 ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 19/80] arm/mcimx7d-sabre: " Igor Mammedov
2020-01-23 12:51 ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 20/80] arm/mps2-tz: " Igor Mammedov
2020-01-23 12:59 ` Andrew Jones
2020-01-23 13:39 ` Igor Mammedov
2020-01-23 14:37 ` Andrew Jones
2020-01-23 14:37 ` [PATCH v4 " Igor Mammedov
2020-01-23 14:47 ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 21/80] arm/mps2: " Igor Mammedov
2020-01-23 13:00 ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 22/80] arm/musicpal: " Igor Mammedov
2020-01-23 13:07 ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 23/80] arm/nseries: " Igor Mammedov
2020-01-23 13:09 ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 24/80] arm/omap_sx1: " Igor Mammedov
2020-01-23 13:12 ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 25/80] arm/palm: " Igor Mammedov
2020-01-23 13:13 ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 26/80] arm/raspi: " Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 27/80] arm/sabrelite: " Igor Mammedov
2020-01-23 13:15 ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 28/80] arm/sbsa-ref: " Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 29/80] arm/versatilepb: " Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 30/80] arm/vexpress: " Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 31/80] arm/virt: " Igor Mammedov
2020-01-23 13:17 ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 32/80] arm/xilinx_zynq: drop RAM size fixup Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 33/80] arm/xilinx_zynq: use memdev for RAM Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 34/80] arm/xlnx-versal-virt: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 35/80] arm/xlnx-zcu102: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 36/80] s390x/s390-virtio-ccw: " Igor Mammedov
2020-01-23 18:05 ` Cornelia Huck
2020-01-23 11:38 ` [PATCH REPOST v3 37/80] null-machine: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 38/80] cris/axis_dev88: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 39/80] hw/hppa/machine: Correctly check the firmware is in PDC range Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 40/80] hw/hppa/machine: Restrict the total memory size to 3GB Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 41/80] hw/hppa/machine: Map the PDC memory region with higher priority Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 42/80] hppa: use memdev for RAM Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 43/80] x86/microvm: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 44/80] x86/pc: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 45/80] lm32/lm32_boards: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 46/80] lm32/milkymist: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 47/80] m68k/an5206: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 48/80] m68k/mcf5208: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 49/80] m68k/next-cube: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 50/80] mips/boston-cube: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 51/80] mips/mips_fulong2e: drop RAM size fixup Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 52/80] mips/mips_fulong2e: use memdev for RAM Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 53/80] mips/mips_jazz: " Igor Mammedov
2020-01-24 17:15 ` Aleksandar Markovic
2020-01-23 11:38 ` [PATCH REPOST v3 54/80] mips/mips_malta: " Igor Mammedov
2020-01-24 17:16 ` Aleksandar Markovic
2020-01-23 11:38 ` [PATCH REPOST v3 55/80] mips/mips_mipssim: " Igor Mammedov
2020-01-24 17:17 ` Aleksandar Markovic
2020-01-23 11:38 ` [PATCH REPOST v3 56/80] mips/mips_r4k: " Igor Mammedov
2020-01-24 17:15 ` Aleksandar Markovic
2020-01-23 11:38 ` [PATCH REPOST v3 57/80] ppc/e500: drop RAM size fixup Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 58/80] ppc/e500: use memdev for RAM Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 59/80] ppc/mac_newworld: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 60/80] ppc/mac_oldworld: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 61/80] ppc/pnv: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 62/80] ppc/ppc405_boards: add RAM size checks Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 63/80] ppc/ppc405_boards: use memdev for RAM Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 64/80] ppc/{ppc440_bamboo, sam460ex}: drop RAM size fixup Igor Mammedov
2020-01-23 16:22 ` BALATON Zoltan
2020-01-27 3:39 ` [PATCH REPOST v3 64/80] ppc/{ppc440_bamboo,sam460ex}: " David Gibson
2020-01-23 11:38 ` [PATCH REPOST v3 65/80] ppc/{ppc440_bamboo, sam460ex}: use memdev for RAM Igor Mammedov
2020-01-23 16:23 ` BALATON Zoltan
2020-01-27 3:40 ` David Gibson
2020-01-23 11:38 ` [PATCH REPOST v3 66/80] ppc/prep: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 67/80] ppc/spapr: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 68/80] ppc/virtex_ml507: remove unused arguments Igor Mammedov
2020-01-24 9:40 ` David Gibson
2020-01-23 11:38 ` [PATCH REPOST v3 69/80] ppc/virtex_ml507: use memdev for RAM Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 70/80] sparc/leon3: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 71/80] sparc/sun4m: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 72/80] sparc/niagara: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 73/80] remove no longer used memory_region_allocate_system_memory() Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 74/80] exec: cleanup qemu_minrampagesize()/qemu_maxrampagesize() Igor Mammedov
2020-01-24 10:25 ` Igor Mammedov
2020-01-27 3:31 ` David Gibson
2020-01-27 8:06 ` [PATCH v3.1 " Igor Mammedov
2020-01-27 8:18 ` David Gibson
2020-01-23 11:38 ` [PATCH REPOST v3 75/80] exec: drop bogus mem_path from qemu_ram_alloc_from_fd() Igor Mammedov
2020-01-24 9:35 ` Igor Mammedov [this message]
2020-01-23 11:38 ` [PATCH REPOST v3 76/80] make mem_path local variable Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 77/80] hostmem: introduce "prealloc-threads" property Igor Mammedov
2020-01-24 9:50 ` Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 78/80] hostmem: fix strict bind policy Igor Mammedov
2020-01-24 19:17 ` Halil Pasic
2020-01-27 7:39 ` Igor Mammedov
2020-01-27 14:41 ` Halil Pasic
2020-01-28 12:07 ` Igor Mammedov
2020-01-28 12:37 ` Halil Pasic
2020-01-23 11:38 ` [PATCH REPOST v3 79/80] tests:numa-test: make top level args dynamic and g_autofree(cli) cleanups Igor Mammedov
2020-01-23 16:25 ` BALATON Zoltan
2020-01-23 16:33 ` Thomas Huth
2020-01-23 11:38 ` [PATCH REPOST v3 80/80] tests:numa-test: use explicit memdev to specify node RAM Igor Mammedov
2020-01-23 16:52 ` Thomas Huth
2020-01-23 13:04 ` [PATCH REPOST v3 00/80] refactor main RAM allocation to use hostmem backend no-reply
2020-01-23 14:45 ` Laurent Vivier
2020-01-23 16:14 ` [PATCH v4 81/80] m68k/q800: use memdev for RAM Igor Mammedov
2020-01-23 19:31 ` Laurent Vivier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200124103521.7b84c569@redhat.com \
--to=imammedo@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).