From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvSad-0006Yz-VU for qemu-devel@nongnu.org; Thu, 09 Feb 2012 06:55:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvSaX-0007wB-0j for qemu-devel@nongnu.org; Thu, 09 Feb 2012 06:55:03 -0500 MIME-Version: 1.0 In-Reply-To: <4F339B0A.3070601@web.de> References: <4F2BCCBD.8050009@siemens.com> <4F2D2352.80204@web.de> <4F2D45FF.9070204@web.de> <20120209083513.GA30956@stefanha-thinkpad.localdomain> <4F339B0A.3070601@web.de> Date: Thu, 9 Feb 2012 11:54:54 +0000 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] memory-region: Report if region is read-only on info mtree List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Blue Swirl , qemu-trivial , qemu-devel , Avi Kivity On Thu, Feb 9, 2012 at 10:08 AM, Jan Kiszka wrote: > On 2012-02-09 09:35, Stefan Hajnoczi wrote: >> On Sat, Feb 04, 2012 at 03:51:43PM +0100, Jan Kiszka wrote: >>> On 2012-02-04 13:32, Blue Swirl wrote: >>>> On Sat, Feb 4, 2012 at 12:23, Jan Kiszka wrote: >>>>> On 2012-02-04 13:12, Blue Swirl wrote: >>>>>> On Fri, Feb 3, 2012 at 12:02, Jan Kiszka wr= ote: >>>>>>> Helpful to understand guest configurations of things like the i440F= X's >>>>>>> PAM. >>>>>>> >>>>>>> Signed-off-by: Jan Kiszka >>>>>>> --- >>>>>>> =A0memory.c | =A0 =A06 ++++-- >>>>>>> =A01 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, >>>>>>> =A0 =A0 =A0 =A0 =A0 =A0 ml->printed =3D false; >>>>>>> =A0 =A0 =A0 =A0 =A0 =A0 QTAILQ_INSERT_TAIL(alias_print_queue, ml, q= ueue); >>>>>>> =A0 =A0 =A0 =A0 } >>>>>>> - =A0 =A0 =A0 =A0mon_printf(f, TARGET_FMT_plx "-" TARGET_FMT_plx " = (prio %d): alias %s @%s " >>>>>>> + =A0 =A0 =A0 =A0mon_printf(f, TARGET_FMT_plx "-" TARGET_FMT_plx " = (prio %d, %s): alias %s @%s " >>>>>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0TARGET_FMT_plx "-" TARGET_FM= T_plx "\n", >>>>>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0base + mr->addr, >>>>>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0base + mr->addr >>>>>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0+ (target_phys_addr_t)int128= _get64(mr->size) - 1, >>>>>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mr->priority, >>>>>>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 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 o= nly >>>>> the KVM kernel). That says nothing about their R/W property. If we ev= er >>>>> have a reserved region that is not writable, the owner could still se= t >>>>> the corresponding flag for documentation purposes. >>>> >>>> OK. But it's also possible for a region to have readable =3D=3D false >>>> while readonly =3D=3D 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. >> >> Is this patch ready to go? =A0Seems fine to me but do you still want to >> add the 'WO' output that Blue Swirl suggested? > > There is v2 on the list, but I removed trival from CC due to the > discussion. Needs an ack from Blue, I think. Okay, I missed it. Thanks for the update! Stefan