[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC 7/8] exec: Don't abort when we can't allocat
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH RFC 7/8] exec: Don't abort when we can't allocate guest memory |
Date: |
Thu, 13 Jun 2013 17:21:08 +0100 |
On 13 June 2013 08:02, Markus Armbruster <address@hidden> wrote:
> #ifdef __linux__
>
> +static void no_guest_mem(RAMBlock *block)
> +{
> + fprintf(stderr, "Cannot set up guest memory '%s': %s\n",
> + block->mr->name, strerror(errno));
> + exit(1);
> +}
This new error message is inside an #ifdef __linux__...
> --- a/util/oslib-posix.c
> +++ b/util/oslib-posix.c
> @@ -112,9 +112,7 @@ void *qemu_anon_ram_alloc(size_t size)
> size_t offset = QEMU_ALIGN_UP((uintptr_t)ptr, align) - (uintptr_t)ptr;
>
> if (ptr == MAP_FAILED) {
> - fprintf(stderr, "Failed to allocate %zu B: %s\n",
> - size, strerror(errno));
> - abort();
> + return NULL;
...but this error message which got removed is not.
Shouldn't we be reporting errors in a non-host-specific
bit of code?
thanks
-- PMM
- [Qemu-devel] [PATCH RFC 1/8] exec: Fix Xen RAM allocation with unusual options, (continued)
- [Qemu-devel] [PATCH RFC 1/8] exec: Fix Xen RAM allocation with unusual options, Markus Armbruster, 2013/06/13
- [Qemu-devel] [PATCH RFC 4/8] s390: Simplify the RAM allocation hook, Markus Armbruster, 2013/06/13
- [Qemu-devel] [PATCH RFC 8/8] pc_sysfw: Fix ISA BIOS init for ridiculously big flash, Markus Armbruster, 2013/06/13
- [Qemu-devel] [PATCH RFC 7/8] exec: Don't abort when we can't allocate guest memory, Markus Armbruster, 2013/06/13
- [Qemu-devel] [PATCH RFC 5/8] s390: Make qemu_ram_remap() consistent with allocation, Markus Armbruster, 2013/06/13
- Re: [Qemu-devel] [PATCH RFC 0/8] Guest memory allocation fixes & cleanup, Markus Armbruster, 2013/06/13