[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC] qapi: New command query-mtree
From: |
Marc Marí |
Subject: |
Re: [Qemu-devel] [RFC] qapi: New command query-mtree |
Date: |
Thu, 21 Aug 2014 11:18:10 +0200 |
El Thu, 21 Aug 2014 11:06:51 +0200
Paolo Bonzini <address@hidden> escribió:
> Il 20/08/2014 19:46, Marc Marí ha scritto:
> > Add command query-mtree to get the memory tree of the guest.
> >
> > As we were looking for a flexible solution on accessing the guest
> > memory from qtests, Stefan came with the idea to implement this new
> > qmp command.
> >
> > This way, the result can be parsed, and the RAM direction
> > extracted, so only a generic qtest malloc is necessary and not one
> > per machine, as it is implemented at the moment (malloc-pc uses
> > fw_cfg).
> >
> > The actual output is this: http://pastebin.com/nHAH9Jie
> > Which corresponds to this info mtree: http://pastebin.com/B5vw8DDf
>
> I don't like this idea very much. libqos should be using the real
> memory map information from the machine. In the case of x86, that
> means fw_cfg; in the case of ARM, that would mean using the device
> tree. Getting the information from an out-of-band channel (such as
> QMP) is basically cheating. :)
As we were looking at how to access the device tree, we found that the
device tree is saved in memory with the bootloader or the kernel. So
tests should be using a kernel every time a ARM machine is booted
(and /dev/null, at least in virt machine, does not work). Do you have
any better idea on how to do it?
> If you had a memory map abstraction in libqos, malloc could be
> generic. Perhaps you can start doing that for PC?
Do you mean, start implementing malloc using this "query-mtree"? Or you
have another idea in mind?
Marc