[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [PATCH] memory-region: Report if region is read-only
Re: [Qemu-trivial] [PATCH] memory-region: Report if region is read-only on info mtree
Sat, 04 Feb 2012 15:51:43 +0100
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:184.108.40.206) Gecko/20080226 SUSE/220.127.116.11-1.1 Thunderbird/18.104.22.168 Mnenhy/0.7.5.666
On 2012-02-04 13:32, Blue Swirl wrote:
> On Sat, Feb 4, 2012 at 12:23, Jan Kiszka <address@hidden> wrote:
>> On 2012-02-04 13:12, Blue Swirl wrote:
>>> On Fri, Feb 3, 2012 at 12:02, Jan Kiszka <address@hidden> wrote:
>>>> Helpful to understand guest configurations of things like the i440FX's
>>>> Signed-off-by: Jan Kiszka <address@hidden>
>>>> memory.c | 6 ++++--
>>>> 1 files changed, 4 insertions(+), 2 deletions(-)
>>>> diff --git a/memory.c b/memory.c
>>>> index ee4c98a..ea4adda 100644
>>>> --- a/memory.c
>>>> +++ b/memory.c
>>>> @@ -1608,23 +1608,25 @@ static void mtree_print_mr(fprintf_function
>>>> mon_printf, void *f,
>>>> ml->printed = false;
>>>> QTAILQ_INSERT_TAIL(alias_print_queue, ml, queue);
>>>> - mon_printf(f, TARGET_FMT_plx "-" TARGET_FMT_plx " (prio %d):
>>>> alias %s @%s "
>>>> + mon_printf(f, TARGET_FMT_plx "-" TARGET_FMT_plx " (prio %d, %s):
>>>> alias %s @%s "
>>>> TARGET_FMT_plx "-" TARGET_FMT_plx "\n",
>>>> base + mr->addr,
>>>> base + mr->addr
>>>> + (target_phys_addr_t)int128_get64(mr->size) - 1,
>>>> + mr->readonly ? "RO" : "RW",
>>> I think the reserved regions which are unreadable and unwritable
>>> should be shown as well. Then the output should be a combination of
>>> 'R', 'W' or neither ('-').
>> Reserved regions are in the hand of some other device model (so far only
>> the KVM kernel). That says nothing about their R/W property. If we ever
>> have a reserved region that is not writable, the owner could still set
>> the corresponding flag for documentation purposes.
> OK. But it's also possible for a region to have readable == false
> while readonly == false, which would imply 'WO' or '-W'. That also
> supports separate 'R', 'W' and '-' flags.
Yep, I encoded the ROM device state as well. And this revealed a
regression of the memory region conversion of the cfi02. Gave up
counting how often I fixed this type of bug in the flash code.
Description: OpenPGP digital signature