[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Memory API: handling unassigned physical memory
From: |
Mark Cave-Ayland |
Subject: |
[Qemu-devel] Memory API: handling unassigned physical memory |
Date: |
Sun, 29 Apr 2012 18:25:18 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20120317 Icedove/3.0.11 |
Hi all,
I've been having a look at handling SBUS probes within qemu-system-sparc
when I came across a very simple crash bug with git master trying to
access unassigned physical addresses:
(qemu) info mtree
memory
0000000000000000-7ffffffffffffffe (prio 0, RW): system
0000000000000000-0000000007ffffff (prio 0, RW): sun4m.ram
0000000008000000-000000000fffffff (prio 0, RW): empty-slot
0000000010000000-0000000010003fff (prio 0, RW): iommu
0000000010004000-000000001fffefff (prio 0, RW): empty-slot
0000000050200000-000000005020000f (prio 0, RW): tcx.dac
...
...
AFAICT the devices are mapped to physical addresses (uandsing
sysbus_mmio_map) so the xp monitor command should be able to at least
read these regions:
(qemu) xp 0x50200000
0000000050200000: 0x00000000
(qemu) xp 0x501ffff0
Segmentation fault
There is definitely a QEMU bug here in that an incorrect physical memory
access shouldn't segfault QEMU. However some off-list discussions with
Blue suggested that it may be possible to defer this behaviour to the
memory API (rather than in exec.c) by allowing boards to register a
simple device to handle unassigned memory accesses, e.g. like the
empty_slot device used to trap certain memory accesses within SPARC.
This would enable us to easily solve the problem for SPARC since we
could create a parent memory region for the entire physical address
space that would simply update the status register and raise the
required IRQ. Is this the best way to solve the problem or is there
something else that I've missed?
Many thanks,
Mark.
- [Qemu-devel] Memory API: handling unassigned physical memory,
Mark Cave-Ayland <=
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Anthony Liguori, 2012/04/29
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Blue Swirl, 2012/04/29
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Avi Kivity, 2012/04/30
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Mark Cave-Ayland, 2012/04/30
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Avi Kivity, 2012/04/30
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Peter Maydell, 2012/04/30
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Avi Kivity, 2012/04/30
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Peter Maydell, 2012/04/30
- Re: [Qemu-devel] Memory API: handling unassigned physical memory, Anthony Liguori, 2012/04/30