From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: Peter Xu <peterx@redhat.com>, qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Aleksandar Rikalo" <aleksandar.rikalo@syrmia.com>,
"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
"Laurent Vivier" <laurent@vivier.eu>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Alexander Bulekov" <alxndr@bu.edu>,
"Hervé Poussineau" <hpoussin@reactos.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Edgar E . Iglesias" <edgar.iglesias@gmail.com>,
"Aurelien Jarno" <aurelien@aurel32.net>
Subject: [PATCH 2/2] NOTFORMERGE memory: Ensure AddressSpace physical base address is zero
Date: Wed, 10 Mar 2021 20:12:55 +0100 [thread overview]
Message-ID: <20210310191255.1229848-2-f4bug@amsat.org> (raw)
In-Reply-To: <20210310191255.1229848-1-f4bug@amsat.org>
AddressSpaces aren't suppose to have a physical base address.
Add an assertion to demostrate the problem:
$ echo info mtree | qemu-system-mips64el -M magnum -S -monitor stdio
QEMU 5.2.50 monitor - type 'help' for more information
(qemu) info mtree
address-space: memory
0000000000000000-ffffffffffffffff (prio 0, i/o): system
0000000000000000-0000000007ffffff (prio 0, ram): mips_jazz.ram
000000001fc00000-000000001fc7dfff (prio 0, rom): mips_jazz.bios
0000000040000000-00000000407fffff (prio 0, ram): vram
0000000060000000-000000006007ffff (prio 0, rom): g364fb.rom
0000000060080000-00000000601fffff (prio 0, i/o): ctrl
0000000080000000-00000000800002ff (prio 0, i/o): rc4030.chipset
0000000080001000-00000000800010ff (prio 0, i/o): dp8393x-regs
0000000080002000-000000008000200f (prio 0, i/o): esp-regs
0000000080003000-0000000080003007 (prio 0, i/o): fdc
0000000080004000-0000000080004fff (prio 0, i/o): rtc
0000000080005000-0000000080005fff (prio 0, i/o): i8042
0000000080006000-0000000080006007 (prio 0, i/o): serial
0000000080008000-0000000080008007 (prio 0, i/o): parallel
0000000080009000-000000008000afff (prio 0, i/o): nvram
000000008000b000-000000008000bfff (prio 0, rom): dp8393x-prom
000000008000d000-000000008000dfff (prio 0, i/o): dummy_dma
000000008000f000-000000008000f000 (prio 0, i/o): led
0000000090000000-000000009000ffff (prio 0, i/o): io
0000000090000000-0000000090000007 (prio 0, i/o): dma-chan
0000000090000008-000000009000000f (prio 0, i/o): dma-cont
0000000090000020-0000000090000021 (prio 0, i/o): pic
0000000090000040-0000000090000043 (prio 0, i/o): pit
0000000090000061-0000000090000061 (prio 0, i/o): pcspk
0000000090000070-0000000090000071 (prio 0, i/o): rtc
0000000090000070-0000000090000070 (prio 0, i/o): rtc-index
0000000090000081-0000000090000083 (prio 0, i/o): dma-page
0000000090000087-0000000090000087 (prio 0, i/o): dma-page
0000000090000089-000000009000008b (prio 0, i/o): dma-page
000000009000008f-000000009000008f (prio 0, i/o): dma-page
00000000900000a0-00000000900000a1 (prio 0, i/o): pic
00000000900000c0-00000000900000cf (prio 0, i/o): dma-chan
00000000900000d0-00000000900000df (prio 0, i/o): dma-cont
00000000900004d0-00000000900004d0 (prio 0, i/o): elcr
00000000900004d1-00000000900004d1 (prio 0, i/o): elcr
0000000091000000-0000000091ffffff (prio 0, i/o): isa-mem
00000000f0000000-00000000f0000fff (prio 0, i/o): rc4030.jazzio
00000000fff00000-00000000fff7dfff (prio 0, rom): alias mips_jazz.bios @mips_jazz.bios 0000000000000000-000000000007dfff
address-space: I/O
0000000090000000-000000009000ffff (prio 0, i/o): io
0000000090000000-0000000090000007 (prio 0, i/o): dma-chan
0000000090000008-000000009000000f (prio 0, i/o): dma-cont
0000000090000020-0000000090000021 (prio 0, i/o): pic
0000000090000040-0000000090000043 (prio 0, i/o): pit
0000000090000061-0000000090000061 (prio 0, i/o): pcspk
0000000090000070-0000000090000071 (prio 0, i/o): rtc
0000000090000070-0000000090000070 (prio 0, i/o): rtc-index
0000000090000081-0000000090000083 (prio 0, i/o): dma-page
0000000090000087-0000000090000087 (prio 0, i/o): dma-page
0000000090000089-000000009000008b (prio 0, i/o): dma-page
000000009000008f-000000009000008f (prio 0, i/o): dma-page
00000000900000a0-00000000900000a1 (prio 0, i/o): pic
00000000900000c0-00000000900000cf (prio 0, i/o): dma-chan
00000000900000d0-00000000900000df (prio 0, i/o): dma-cont
00000000900004d0-00000000900004d0 (prio 0, i/o): elcr
00000000900004d1-00000000900004d1 (prio 0, i/o): elcr
qemu-system-mips64el: softmmu/memory.c:3193: mtree_info: Assertion `!as->root->addr' failed.
Aborted (core dumped)
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
softmmu/memory.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/softmmu/memory.c b/softmmu/memory.c
index 874a8fccdee..164e7971e5b 100644
--- a/softmmu/memory.c
+++ b/softmmu/memory.c
@@ -3190,6 +3190,8 @@ void mtree_info(bool flatview, bool dispatch_tree, bool owner, bool disabled)
qemu_printf("address-space: %s\n", as->name);
mtree_print_mr(as->root, 1, 0, &ml_head, owner, disabled);
qemu_printf("\n");
+ /* address spaces aren't suppose to have a physical base address */
+ assert(!as->root->addr);
}
/* print aliased regions */
--
2.26.2
next prev parent reply other threads:[~2021-03-10 19:16 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-05 23:54 [PATCH 0/3] memory: Display AddressSpace zero-based in 'info mtree' Philippe Mathieu-Daudé
2021-03-05 23:54 ` [PATCH 1/3] memory: Better name 'offset' argument in mtree_print_mr() Philippe Mathieu-Daudé
2021-03-05 23:54 ` [PATCH 2/3] memory: Provide 'base address' argument to mtree_print_mr() Philippe Mathieu-Daudé
2021-03-08 23:40 ` Peter Xu
2021-03-09 9:39 ` Philippe Mathieu-Daudé
2021-03-09 21:54 ` Philippe Mathieu-Daudé
2021-03-10 17:06 ` Peter Xu
2021-03-10 19:09 ` Philippe Mathieu-Daudé
2021-03-10 19:12 ` [PATCH 1/2] hw/mips/jazz: Use generic I/O bus via get_system_io() Philippe Mathieu-Daudé
2021-03-10 19:12 ` Philippe Mathieu-Daudé [this message]
2021-03-10 19:49 ` Peter Xu
2021-03-10 20:11 ` Philippe Mathieu-Daudé
2021-03-10 20:29 ` Peter Xu
2021-03-11 12:18 ` Philippe Mathieu-Daudé
2021-03-11 16:21 ` Philippe Mathieu-Daudé
2021-03-11 17:27 ` Peter Xu
2021-03-11 17:59 ` Philippe Mathieu-Daudé
2021-03-12 9:08 ` Cédric Le Goater
2021-03-11 17:27 ` Peter Xu
2021-03-11 17:41 ` Philippe Mathieu-Daudé
2021-03-11 0:48 ` Jiaxun Yang
2021-03-10 19:31 ` [PATCH 2/3] memory: Provide 'base address' argument to mtree_print_mr() Peter Xu
2021-03-10 22:00 ` Mark Cave-Ayland
2021-03-05 23:54 ` [PATCH 3/3] memory: Make memory_region_to_absolute_addr() take a const MemoryRegion Philippe Mathieu-Daudé
2021-03-11 12:19 ` Philippe Mathieu-Daudé
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=20210310191255.1229848-2-f4bug@amsat.org \
--to=f4bug@amsat.org \
--cc=aleksandar.rikalo@syrmia.com \
--cc=alxndr@bu.edu \
--cc=aurelien@aurel32.net \
--cc=edgar.iglesias@gmail.com \
--cc=hpoussin@reactos.org \
--cc=laurent@vivier.eu \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=peterx@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.