From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Alexander Graf <agraf@suse.de>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
Paul Mackerras <paulus@samba.org>,
David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH] spapr-pci: remove io ports workaround
Date: Mon, 15 Jul 2013 19:44:37 +1000 [thread overview]
Message-ID: <51E3C485.1020001@ozlabs.ru> (raw)
In-Reply-To: <D76AE885-D1A8-4F57-B91E-6A32E930390D@suse.de>
On 07/15/2013 04:06 PM, Alexander Graf wrote:
>
> On 15.07.2013, at 05:24, Alexey Kardashevskiy wrote:
>
>> As it looks like all portio users have migrated to new portio api,
>> the workaround with memory access to io ports routing is no more
>> needed.
>>
>> This also fixes a bug with byte swapping as the io region was marked
>> as little endian while it should not do any swapping at all.
>>
>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>
> This patch breaks VGA with -enable-kvm (PR) for me.
I wish I could understand the memory region thingy but I cannot :-(
Without this patch, portio_list_add from vga_init adds a port to
address_space_io. With my patch, it adds a port to address_space_memory and
then port accesses cannot reach correct memoryregionops callbacks and VGA
does not work.
Networking (rtl8139, e1000, virtio) still works but in contrast to VGA,
those devices map PCI IO BARs but not individual ports.
Any idea?
Or my initial patch (where I just changed endianness from LITTLE to NATIVE)
was still correct and this is how thing are supposed to work?
Oh...
This is what I get with my patch:
info mtree
memory
0000000000000000-7ffffffffffffffe (prio 0, RW): system
0000000000000000-000000003fffffff (prio 0, RW): ppc_spapr.ram
0000010080000000-000001008000ffff (prio 0, RW): alias
pci@800000020000000.io-alias @pci@800000020000000.io
0000000000000000-000000000000ffff
00000100a0000000-00000100bfffffff (prio 0, RW): alias
pci@800000020000000.mmio-alias @pci@800000020000000.mmio
0000000080000000-000000009fffffff
0000040000000000-000004000000ffff (prio 0, RW): msi
I/O
0000000000000000-000000000000ffff (prio 0, RW): io
pci@800000020000000
0000000000000000-7fffffffffffffff (prio 0, RW): iommu-spapr
l-lan@71000002
0000000000000000-7fffffffffffffff (prio 0, RW): iommu-spapr
v-scsi@71000003
0000000000000000-7fffffffffffffff (prio 0, RW): iommu-spapr
VGA
0000000000000000-7fffffffffffffff (prio 0, RW): alias bus master
@iommu-spapr 0000000000000000-7fffffffffffffff
pci-ohci
0000000000000000-7fffffffffffffff (prio 0, RW): alias bus master
@iommu-spapr 0000000000000000-7fffffffffffffff
aliases
pci@800000020000000.io
0000000000000000-000000000000ffff (prio 0, RW): pci@800000020000000.io
00000000000001ce-00000000000001ce (prio 0, RW): vbe
00000000000001d0-00000000000001d0 (prio 0, RW): vbe
00000000000003b4-00000000000003b5 (prio 0, RW): vga
00000000000003ba-00000000000003ba (prio 0, RW): vga
00000000000003c0-00000000000003cf (prio 0, RW): vga
00000000000003d4-00000000000003d5 (prio 0, RW): vga
00000000000003da-00000000000003da (prio 0, RW): vga
pci@800000020000000.mmio
0000000000000000-7ffffffffffffffe (prio 0, RW): pci@800000020000000.mmio
00000000000a0000-00000000000bffff (prio 1, RW): vga-lowmem
0000000080000000-0000000080ffffff (prio 1, RW): vga.vram
0000000090000000-0000000090000fff (prio 1, RW): vga.mmio
0000000090000400-000000009000041f (prio 0, RW): vga ioports remapped
0000000090000500-0000000090000515 (prio 0, RW): bochs dispi interface
0000000090010000-000000009001ffff (prio 1, RW): vga.rom
0000000090020000-00000000900200ff (prio 1, RW): ohci
iommu-spapr
0000000000000000-7fffffffffffffff (prio 0, RW): iommu-spapr
And this is what I get without the patch (when VGA works). btw here
mtree_print_mr asserts in int128_get64(), had to replace assert with "if
(a.hi) return -1;"
root@erif_root:~# (qemu) info mtree
memory
0000000000000000-7ffffffffffffffe (prio 0, RW): system
0000000000000000-000000003fffffff (prio 0, RW): ppc_spapr.ram
0000010080000000-000001008000ffff (prio 0, RW): pci@800000020000000.io-alias
0000010090000000-00000100901fffff (prio 0, RW): pci@800000020000000.msi
00000100a0000000-00000100bfffffff (prio 0, RW): alias
pci@800000020000000.mmio-alias @pci@800000020000000.mmio
0000000080000000-000000009fffffff
I/O
0000000000000000-000000000000ffff (prio 0, RW): io
0000000000000000-000000000000ffff (prio 0, RW): pci@800000020000000.io
00000000000001ce-00000000000001ce (prio 0, RW): vbe
00000000000001d0-00000000000001d0 (prio 0, RW): vbe
00000000000003b4-00000000000003b5 (prio 0, RW): vga
00000000000003ba-00000000000003ba (prio 0, RW): vga
00000000000003c0-00000000000003cf (prio 0, RW): vga
00000000000003d4-00000000000003d5 (prio 0, RW): vga
00000000000003da-00000000000003da (prio 0, RW): vga
pci@800000020000000
0000000000000000-ffffffffffffffff (prio 0, RW): iommu-spapr
l-lan@71000002
0000000000000000-ffffffffffffffff (prio 0, RW): iommu-spapr
v-scsi@71000003
0000000000000000-ffffffffffffffff (prio 0, RW): iommu-spapr
VGA
0000000000000000-ffffffffffffffff (prio 0, RW): alias bus master
@iommu-spapr 0000000000000000-fffffffffffffffe
pci-ohci
0000000000000000-ffffffffffffffff (prio 0, RW): alias bus master
@iommu-spapr 0000000000000000-fffffffffffffffe
aliases
pci@800000020000000.mmio
0000000000000000-7ffffffffffffffe (prio 0, RW): pci@800000020000000.mmio
00000000000a0000-00000000000affff (prio 2, RW): alias vga.chain4
@vga.vram 0000000000000000-000000000000ffff
00000000000a0000-00000000000bffff (prio 1, RW): vga-lowmem
0000000080000000-0000000080ffffff (prio 1, RW): vga.vram
0000000090000000-0000000090000fff (prio 1, RW): vga.mmio
0000000090000400-000000009000041f (prio 0, RW): vga ioports remapped
0000000090000500-0000000090000515 (prio 0, RW): bochs dispi interface
0000000090020000-00000000900200ff (prio 1, RW): ohci
iommu-spapr
0000000000000000-ffffffffffffffff (prio 0, RW): iommu-spapr
vga.vram
0000000080000000-0000000080ffffff (prio 1, RW): vga.vram
My command line:
./qemu-system-ppc64 \
-L "qemu-ppc64-bios/" \
-trace "events=qemu_trace_events" \
-vnc :5 \
-M pseries \
-serial mon:stdio \
-enable-kvm \
-m 1G \
-machine "pseries" \
-vga "std" \
-kernel "guest.vmlinux.n" \
-initrd "1.cpio"
--
Alexey
next prev parent reply other threads:[~2013-07-15 9:47 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-15 3:24 [Qemu-devel] [PATCH] spapr-pci: remove io ports workaround Alexey Kardashevskiy
2013-07-15 6:06 ` Alexander Graf
2013-07-15 9:44 ` Alexey Kardashevskiy [this message]
2013-07-16 5:19 ` Alexey Kardashevskiy
2013-07-16 6:20 ` Paolo Bonzini
2013-07-16 8:32 ` Alexander Graf
2013-07-16 8:37 ` Alexey Kardashevskiy
2013-07-16 8:41 ` Alexander Graf
2013-07-16 8:45 ` Benjamin Herrenschmidt
2013-07-16 9:01 ` Alexander Graf
2013-07-16 9:10 ` Alexey Kardashevskiy
2013-12-09 16:33 ` Greg Kurz
2013-12-10 2:43 ` Alexey Kardashevskiy
2013-12-10 7:47 ` Greg Kurz
2013-12-11 6:47 ` Alexey Kardashevskiy
2013-12-11 7:07 ` Alexey Kardashevskiy
2013-12-17 7:52 ` Greg Kurz
2013-12-17 8:33 ` Alexey Kardashevskiy
2014-01-02 21:04 ` Alexander Graf
2014-01-02 22:08 ` Alexey Kardashevskiy
2014-01-02 22:09 ` Alexander Graf
2014-01-03 7:29 ` Alexey Kardashevskiy
2014-01-06 11:12 ` Greg Kurz
2014-01-06 23:12 ` Alexey Kardashevskiy
-- strict thread matches above, loose matches on Subject: below --
2014-02-07 13:44 Greg Kurz
2014-02-07 14:06 ` Alexander Graf
2014-02-10 5:12 ` Alexey Kardashevskiy
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=51E3C485.1020001@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=agraf@suse.de \
--cc=aliguori@us.ibm.com \
--cc=david@gibson.dropbear.id.au \
--cc=paulus@samba.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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 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).