[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/3] hw/core: minor fixups
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-devel] [PATCH 0/3] hw/core: minor fixups |
Date: |
Tue, 27 Jun 2017 09:16:10 -0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 |
Hi Eduardo,
On 06/23/2017 04:45 PM, Eduardo Habkost wrote:
Do you have a simple way to trigger the error paths addressed by patches 1/3
and 2/3?
For 1/3 "elf-loader: warn about invalid endianess":
$ wget -q
https://people.debian.org/~aurel32/qemu/mips/vmlinux-3.2.0-4-4kc-malta
$ file vmlinux-3.2.0-4-4kc-malta
vmlinux-3.2.0-4-4kc-malta: ELF 32-bit MSB executable, MIPS, MIPS32
version 1 (SYSV), statically linked,
BuildID[sha1]=66b8748075269e8aedb91d363050f74af8a0ebdd, not stripped
$ qemu-system-mipsel -version
QEMU emulator version 2.8.1(Debian 1:2.8+dfsg-6)
Copyright (c) 2003-2016 Fabrice Bellard and the QEMU Project developers
$ qemu-system-mipsel -kernel vmlinux-3.2.0-4-4kc-malta
qemu: could not load kernel 'vmlinux-3.2.0-4-4kc-malta'
Once applied:
$ mipsel-softmmu/qemu-system-mipsel -kernel vmlinux-3.2.0-4-4kc-malta
vmlinux-3.2.0-4-4kc-malta: wrong endianess
qemu: could not load kernel 'vmlinux-3.2.0-4-4kc-malta'
It could be more verbose/nicer.
I'm doing some dual endianness tests and sometimes it happened I only
notice I'm stupid enough to load the wrong elf once stepping in gdb...
For 2/3 "fix missing return value in load_image_targphys_as()" I
extracted it from a WiP branch "unify-arm-mips-loaders" think that if I
never finish it, at least this one can still be useful for others.
No commits in this branch since 4months so I don't really remember how
it happens, but looking at rom_add_file() I see:
fprintf(stderr, "Could not open option rom '%s': %s\n",
rom->path, strerror(errno));
goto err;
...
fprintf(stderr, "rom: file %-20s: get size error: %s\n",
rom->name, strerror(errno));
goto err;
...
fprintf(stderr, "rom: file %-20s: read error: rc=%d (expected
%zd)\n",
rom->name, rc, rom->datasize);
goto err;
So my guess is again I missed something in the command line I used (used
unfinished bash auto-complete which lead to a directory? use zipped
rom?) and QEMU was still booting without using the specified rom.
I do remember single stepping there at least 2 times before realize
again how stupid I was :)
Regards,
Phil.
- [Qemu-devel] [PATCH 2/3] hw/core: fix missing return value in load_image_targphys_as(), (continued)
- [Qemu-devel] [PATCH 2/3] hw/core: fix missing return value in load_image_targphys_as(), Philippe Mathieu-Daudé, 2017/06/23
- [Qemu-devel] [PATCH 3/3] hw/core: report an error if invalid gpio is used, Philippe Mathieu-Daudé, 2017/06/23
- Re: [Qemu-devel] [PATCH 0/3] hw/core: minor fixups, Laszlo Ersek, 2017/06/23
- Re: [Qemu-devel] [PATCH 0/3] hw/core: minor fixups, Alistair Francis, 2017/06/26
- Re: [Qemu-devel] [PATCH 0/3] hw/core: minor fixups, Eduardo Habkost, 2017/06/26
- Re: [Qemu-devel] [PATCH 0/3] hw/core: minor fixups,
Philippe Mathieu-Daudé <=