[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] memory: simple memory tree printer

From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH v2] memory: simple memory tree printer
Date: Sun, 18 Sep 2011 17:26:10 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2

On 09/18/2011 05:07 PM, Blue Swirl wrote:
On Sun, Sep 18, 2011 at 1:53 PM, Avi Kivity<address@hidden>  wrote:
>  On 09/17/2011 10:27 PM, Blue Swirl wrote:
>>  Add a monitor command 'info mtree' to show the memory hierarchy
>>  much like /proc/iomem in Linux.
>  Still missing alias support.  PCI would be invisible on a PC (or any machine
>  which has PCI holes implemented properly).

Yes, that annoyed me too when debugging the PPC patch. But how should
that look like? Consider for example that in the PPC case, range 0 to
0x80000000 is RAM from CPU point of view but only PCI MMIO space when
looking after the PCI bridge. I/O shouldn't need separate handling if
the CPU does not have PIO instructions, but instead PIO space is
mapped as MMIO as on Sparc64 and PPC. I/O should be visible there.

Have some notation for a reference.  Example for PC:

00000000-7fffffffffffffff system-memory container
  00000000-0009ffff alias @ram 00000000-0009ffff
  000a0000-000bffff alias @pci 000a0000-000bffff
  e0000000-ffffffff alias @pci e0000000-ffffffff

00000000-ffffffffff pci container
  000a0000-000bffff alias @vgam 00000000-0001ffff
  e0000000-e1ffffff alias @vram 00000000-01ffffff
  e2000000-e2001000 e1000-mmio

00000000-01ffffff vram ram

(each time you encounter a new alias target, add it to the print queue, it should work itself out naturally)

>  Maybe we need to dump both the memory tree and the flat view - the memory
>  tree for the logical hierarchy and the flat view to see what actually
>  happens (I have an address, where does it go?)

I have some trouble thinking about how to print fully converted,
per-CPU memory trees. Also, if the memory API is fully embraced and
extended to handle DMA and IOMMUs, each device could have a different
view on the system memory. Perhaps the tool should take a device ID
(also CPU ID) as a parameter to give it a starting point.

The possibilities are endless.

error compiling committee.c: too many arguments to function

reply via email to

[Prev in Thread] Current Thread [Next in Thread]