From: Aurelien Jarno <aurelien@aurel32.net>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: aliguori@us.ibm.com, aik@ozlabs.ru, jan.kiszka@siemens.com,
qemu-devel@nongnu.org, agraf@suse.de, hpoussin@reactos.org
Subject: Re: [Qemu-devel] [PATCH 08/28] mips_malta: do not use isa_mmio
Date: Wed, 28 Aug 2013 13:03:01 +0200 [thread overview]
Message-ID: <20130828110301.GD5908@ohm.aurel32.net> (raw)
In-Reply-To: <1374501278-31549-9-git-send-email-pbonzini@redhat.com>
On Mon, Jul 22, 2013 at 03:54:18PM +0200, Paolo Bonzini wrote:
> This fixes endianness bugs in I/O port access.
It looks like it actually did the reverse, ie introducing endianness
bugs. With this patch, the pcnet-pci NIC (default NIC card) doesn't work
any more on big endian Malta, while it still works on little endian
Malta.
Reverting this commit fixes the issue for the pcnet card, but it makes
the IDE controller to fail, likely due to endianness issues.
This is reproducible using the following kernel and the following line:
http://ftp.debian.org/debian/dists/wheezy/main/installer-mips/current/images/malta/netboot/vmlinux-3.2.0-4-4kc-malta
qemu-system-mips -kernel vmlinux-3.2.0-4-4kc-malta -nographic
In that case the boot log is:
| [ 0.464000] pcnet32: pcnet32.c:v1.35 21.Apr.2008 tsbogend@alpha.franken.de
| [ 0.464000] PCI: Enabling device 0000:00:0b.0 (0000 -> 0003)
| [ 0.468000] pcnet32: No access methods
Without this patch, the boot log is:
| [ 0.524000] pcnet32: pcnet32.c:v1.35 21.Apr.2008 tsbogend@alpha.franken.de
| [ 0.524000] PCI: Enabling device 0000:00:0b.0 (0000 -> 0003)
| [ 0.524000] pcnet32: PCnet/PCI II 79C970A at 0x1020, 52:54:00:12:34:56 assigned IRQ 10
| [ 0.528000] pcnet32: eth0: registered as PCnet/PCI II 79C970A
| [ 0.532000] pcnet32: 1 cards_found
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> hw/mips/gt64xxx_pci.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/mips/gt64xxx_pci.c b/hw/mips/gt64xxx_pci.c
> index 5843417..3da2e67 100644
> --- a/hw/mips/gt64xxx_pci.c
> +++ b/hw/mips/gt64xxx_pci.c
> @@ -304,7 +304,8 @@ static void gt64120_pci_mapping(GT64120State *s)
> s->PCI0IO_length = ((s->regs[GT_PCI0IOHD] + 1) - (s->regs[GT_PCI0IOLD] & 0x7f)) << 21;
> isa_mem_base = s->PCI0IO_start;
> if (s->PCI0IO_length) {
> - isa_mmio_setup(&s->PCI0IO_mem, s->PCI0IO_length);
> + memory_region_init_alias(&s->PCI0IO_mem, OBJECT(s), "isa_mmio",
> + get_system_io(), 0, s->PCI0IO_length);
> memory_region_add_subregion(get_system_memory(), s->PCI0IO_start,
> &s->PCI0IO_mem);
> }
> --
> 1.8.1.4
>
>
>
>
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
next prev parent reply other threads:[~2013-08-28 11:03 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-22 13:54 [Qemu-devel] [PATCH 00/28] Memory API for 1.6: fix I/O port endianness mess Paolo Bonzini
2013-07-22 13:54 ` [Qemu-devel] [PATCH 01/28] sh4: do not use isa_mmio Paolo Bonzini
2013-07-22 13:54 ` [Qemu-devel] [PATCH 02/28] ppc_oldworld: " Paolo Bonzini
2013-07-22 13:54 ` [Qemu-devel] [PATCH 03/28] ppc_newworld: " Paolo Bonzini
2013-07-22 13:54 ` [Qemu-devel] [PATCH 04/28] spapr_pci: remove indirection for I/O port access Paolo Bonzini
2013-07-22 13:54 ` [Qemu-devel] [PATCH 05/28] prep: fix I/O port endianness Paolo Bonzini
2013-07-22 13:54 ` [Qemu-devel] [PATCH 06/28] mips_jazz: do not use isa_mmio Paolo Bonzini
2013-07-22 13:54 ` [Qemu-devel] [PATCH 07/28] mips_r4k: " Paolo Bonzini
2013-07-22 13:54 ` [Qemu-devel] [PATCH 08/28] mips_malta: " Paolo Bonzini
2013-08-28 11:03 ` Aurelien Jarno [this message]
2013-08-28 11:13 ` Aurelien Jarno
2013-08-28 11:30 ` Paolo Bonzini
2013-07-22 13:54 ` [Qemu-devel] [PATCH 09/28] ppc440_bamboo: " Paolo Bonzini
2013-07-22 13:54 ` [Qemu-devel] [PATCH 10/28] mipssim: " Paolo Bonzini
2013-07-22 13:54 ` [Qemu-devel] [PATCH 11/28] mips_fulong2e: " Paolo Bonzini
2013-07-22 13:54 ` [Qemu-devel] [PATCH 12/28] sparc64: remove indirection for I/O port access Paolo Bonzini
2013-07-22 13:54 ` [Qemu-devel] [PATCH 13/28] ebus: do not use isa_mmio Paolo Bonzini
2013-07-22 13:54 ` [Qemu-devel] [PATCH 14/28] isa_mmio: delete Paolo Bonzini
2013-07-22 13:54 ` [Qemu-devel] [PATCH 15/28] Revert "ioport: remove LITTLE_ENDIAN mark for portio" Paolo Bonzini
2013-07-22 13:54 ` [Qemu-devel] [PATCH 16/28] pc-testdev: support 8 and 16-bit accesses to 0xe0 Paolo Bonzini
2013-07-22 13:54 ` [Qemu-devel] [PATCH 17/28] pc-testdev: remove useless cpu_to_le64/le64_to_cpu Paolo Bonzini
2013-07-22 13:54 ` [Qemu-devel] [PATCH 18/28] mips: degrade BIOS error to warning Paolo Bonzini
2013-07-22 13:54 ` [Qemu-devel] [PATCH 19/28] sh4: unbreak r2d Paolo Bonzini
2013-07-22 13:54 ` [Qemu-devel] [PATCH 20/28] sparc64: unbreak Paolo Bonzini
2013-07-22 15:32 ` Andreas Färber
2013-07-22 13:54 ` [Qemu-devel] [PATCH 21/28] default-configs: add test device to all machines supporting ISA Paolo Bonzini
2013-07-22 13:54 ` [Qemu-devel] [PATCH 22/28] default-configs: add SuperIO to SH4 Paolo Bonzini
2013-07-22 13:54 ` [Qemu-devel] [PATCH 23/28] default-configs/ppc64: add all components of i82378 SuperIO chip used by prep Paolo Bonzini
2013-07-22 13:54 ` [Qemu-devel] [PATCH 24/28] qtest: add test for ISA I/O space endianness Paolo Bonzini
2013-07-22 13:54 ` [Qemu-devel] [PATCH 25/28] memory: move functions around Paolo Bonzini
2013-07-22 13:54 ` [Qemu-devel] [PATCH 26/28] memory: pass MemoryRegion to access_with_adjusted_size Paolo Bonzini
2013-07-22 13:54 ` [Qemu-devel] [PATCH 27/28] memory: check memory region endianness, not target's Paolo Bonzini
2013-07-22 13:54 ` [Qemu-devel] [PATCH 28/28] pc-testdev: add I/O port to test memory.c auto split/combine Paolo Bonzini
2013-07-22 14:32 ` [Qemu-devel] [PATCH 00/28] Memory API for 1.6: fix I/O port endianness mess Peter Maydell
2013-07-22 14:36 ` Paolo Bonzini
2013-07-22 15:04 ` Peter Maydell
2013-07-22 15:07 ` Paolo Bonzini
2013-07-22 20:16 ` Hervé Poussineau
2013-07-22 21:22 ` Alexander Graf
2013-07-22 21:26 ` Andreas Färber
2013-07-23 9:30 ` Paolo Bonzini
2013-07-22 15:34 ` Anthony Liguori
2013-07-25 5:26 ` Benjamin Herrenschmidt
2013-07-25 5:47 ` Benjamin Herrenschmidt
2013-07-25 6:04 ` Jan Kiszka
2013-07-25 6:59 ` Alexey Kardashevskiy
2013-07-25 8:41 ` Paolo Bonzini
2013-07-25 8:40 ` Paolo Bonzini
2013-07-25 9:00 ` Benjamin Herrenschmidt
2013-07-25 9:38 ` Peter Maydell
2013-07-25 9:40 ` Paolo Bonzini
2013-07-25 10:25 ` Benjamin Herrenschmidt
2013-07-25 10:23 ` Benjamin Herrenschmidt
2013-07-25 10:25 ` Paolo Bonzini
2013-07-25 13:25 ` Anthony Liguori
2013-07-25 13:28 ` Peter Maydell
2013-07-25 13:33 ` Paolo Bonzini
2013-07-25 13:45 ` Peter Maydell
2013-07-25 14:44 ` Anthony Liguori
2013-07-25 15:16 ` Anthony Liguori
2013-07-25 13:23 ` Anthony Liguori
2013-07-25 14:19 ` Anthony Liguori
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=20130828110301.GD5908@ohm.aurel32.net \
--to=aurelien@aurel32.net \
--cc=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=aliguori@us.ibm.com \
--cc=hpoussin@reactos.org \
--cc=jan.kiszka@siemens.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.