All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-trivial <qemu-trivial@nongnu.org>,
	qemu-devel <qemu-devel@nongnu.org>, Avi Kivity <avi@redhat.com>
Subject: Re: [Qemu-trivial] [PATCH] memory-region: Report if region is read-only on info mtree
Date: Sat, 04 Feb 2012 15:51:43 +0100	[thread overview]
Message-ID: <4F2D45FF.9070204@web.de> (raw)
In-Reply-To: <CAAu8pHvBnW2v-q9YG57m0SH9BShbeyor+NY-TjGiT6Cj=f9kRQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2184 bytes --]

On 2012-02-04 13:32, Blue Swirl wrote:
> On Sat, Feb 4, 2012 at 12:23, Jan Kiszka <jan.kiszka@web.de> wrote:
>> On 2012-02-04 13:12, Blue Swirl wrote:
>>> On Fri, Feb 3, 2012 at 12:02, Jan Kiszka <jan.kiszka@siemens.com> wrote:
>>>> Helpful to understand guest configurations of things like the i440FX's
>>>> PAM.
>>>>
>>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>> ---
>>>>  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->priority,
>>>> +                   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.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Jan Kiszka <jan.kiszka@web.de>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-trivial <qemu-trivial@nongnu.org>,
	qemu-devel <qemu-devel@nongnu.org>, Avi Kivity <avi@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] memory-region: Report if region is read-only on info mtree
Date: Sat, 04 Feb 2012 15:51:43 +0100	[thread overview]
Message-ID: <4F2D45FF.9070204@web.de> (raw)
In-Reply-To: <CAAu8pHvBnW2v-q9YG57m0SH9BShbeyor+NY-TjGiT6Cj=f9kRQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2184 bytes --]

On 2012-02-04 13:32, Blue Swirl wrote:
> On Sat, Feb 4, 2012 at 12:23, Jan Kiszka <jan.kiszka@web.de> wrote:
>> On 2012-02-04 13:12, Blue Swirl wrote:
>>> On Fri, Feb 3, 2012 at 12:02, Jan Kiszka <jan.kiszka@siemens.com> wrote:
>>>> Helpful to understand guest configurations of things like the i440FX's
>>>> PAM.
>>>>
>>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>> ---
>>>>  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->priority,
>>>> +                   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.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  reply	other threads:[~2012-02-04 14:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-03 12:02 [Qemu-trivial] [PATCH] memory-region: Report if region is read-only on info mtree Jan Kiszka
2012-02-03 12:02 ` [Qemu-devel] " Jan Kiszka
2012-02-04 12:12 ` [Qemu-trivial] " Blue Swirl
2012-02-04 12:12   ` [Qemu-devel] " Blue Swirl
2012-02-04 12:23   ` [Qemu-trivial] " Jan Kiszka
2012-02-04 12:23     ` [Qemu-devel] " Jan Kiszka
2012-02-04 12:32     ` [Qemu-trivial] " Blue Swirl
2012-02-04 12:32       ` [Qemu-devel] " Blue Swirl
2012-02-04 14:51       ` Jan Kiszka [this message]
2012-02-04 14:51         ` Jan Kiszka
2012-02-09  8:35         ` [Qemu-trivial] " Stefan Hajnoczi
2012-02-09  8:35           ` [Qemu-devel] " Stefan Hajnoczi
2012-02-09 10:08           ` Jan Kiszka
2012-02-09 10:08             ` [Qemu-devel] " Jan Kiszka
2012-02-09 11:54             ` Stefan Hajnoczi
2012-02-09 11:54               ` [Qemu-devel] " Stefan Hajnoczi
2012-02-04 14:57 ` [Qemu-devel] [PATCH v2] memory-region: Report if region is read-only or write-only " Jan Kiszka
2012-02-04 15:04   ` Blue Swirl
2012-02-04 15:25     ` [Qemu-devel] [PATCH v3] " Jan Kiszka
2012-02-11 11:09       ` Blue Swirl

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=4F2D45FF.9070204@web.de \
    --to=jan.kiszka@web.de \
    --cc=avi@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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.