From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53572) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmFug-00041c-Ib for qemu-devel@nongnu.org; Tue, 20 Sep 2016 03:56:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmFuc-0003V3-GZ for qemu-devel@nongnu.org; Tue, 20 Sep 2016 03:56:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37412) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmFuc-0003Ux-6G for qemu-devel@nongnu.org; Tue, 20 Sep 2016 03:56:18 -0400 References: <4ccdfc3c-4796-cf1f-61a1-724ac560aa37@gmx.de> <609310f6-55ad-caa9-b01e-94cee8c69d9f@redhat.com> From: Paolo Bonzini Message-ID: <5d2c6042-821b-bc94-34e1-62102c21bcc4@redhat.com> Date: Tue, 20 Sep 2016 09:56:04 +0200 MIME-Version: 1.0 In-Reply-To: <609310f6-55ad-caa9-b01e-94cee8c69d9f@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="83hO6Wr44KdsSwveUj7guPENu69ur8fjN" Subject: Re: [Qemu-devel] [PATCH] hmp: Improve 'info mtree' with optional parm for mapinfo List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek , Thorsten Kohfeldt , armbru@redhat.com, lcapitulino@redhat.com, alex.williamson@redhat.com, peter.maydell@linaro.org Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --83hO6Wr44KdsSwveUj7guPENu69ur8fjN From: Paolo Bonzini To: Laszlo Ersek , Thorsten Kohfeldt , armbru@redhat.com, lcapitulino@redhat.com, alex.williamson@redhat.com, peter.maydell@linaro.org Cc: qemu-devel@nongnu.org Message-ID: <5d2c6042-821b-bc94-34e1-62102c21bcc4@redhat.com> Subject: Re: [PATCH] hmp: Improve 'info mtree' with optional parm for mapinfo References: <4ccdfc3c-4796-cf1f-61a1-724ac560aa37@gmx.de> <609310f6-55ad-caa9-b01e-94cee8c69d9f@redhat.com> In-Reply-To: <609310f6-55ad-caa9-b01e-94cee8c69d9f@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 20/09/2016 02:51, Laszlo Ersek wrote: > Here's an example, from one of your sample outputs: you currently have >=20 > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00= 000000000c0000-00000000000c3fff (prio 1, RW): alias pam-ram @pc.ram 00000= 000000c0000-00000000000c3fff [disabled] > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00= 000000000c0000-00000000000c3fff (prio 1, RW): alias pam-pci @pc.ram 00000= 000000c0000-00000000000c3fff [disabled] > @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 00= 000000000c0000-00000000000c3fff (prio 1, R-): alias pam-rom @pc.ram 00000= 000000c0000-00000000000c3fff > ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo 00= 000000000c0000-00000000000c3fff (prio 1, RW): alias pam-pci @pci 00000000= 000c0000-00000000000c3fff [disabled] >=20 > with >=20 > @: alias region mapped at sample > ~: alias region mappable but disabled at sample > o: region occluded by some other region at sample >=20 > If you have an address in the c0000-c3fff range, you have to consult al= l four lines to see which region will match. >=20 > Working off of the FlatView, first I think you would find the right res= olution for the output "for free" (you wouldn't need a user sample size -= - the interval c0000-c3fff would neither need further subdivision nor be = blurred by over-coarse resolution). You could represent the c0000-c3fff i= nterval (and every other interval too) with a single letter, such as P, w= here P would stand for "alias pam-rom @pc.ram 00000000000c0000-0000000000= 0c3fff". >=20 > Second, given an address in c0000-c3fff, there would be only one range = to consult (same as QEMU itself does with FlatView), and you'd find the M= emoryRegion visible in that range at once. >=20 > ... I hope Paolo will correct me if I misunderstood his suggestion. Yes, this would work. Alternatively, dumping the flat-view would give you something much simpler: 0000000000000000-000000000009ffff (RW): pc.ram 00000000000a0000-00000000000bffff (RW): vga-lowmem 00000000000c0000-00000000000fffff (R-): pc.ram @ 00000000000c0000 0000000000100000-0000000007ffffff (RW): pc.ram @ 0000000000100000 00000000fd000000-00000000fdffffff (RW): vga.vram 00000000febc0000-00000000febdffff (RW): e1000-mmio 00000000febf0000-00000000febf0fff (RW): vga.mmio 00000000febf0400-00000000febf041f (RW): vga ioports remapped 00000000febf0500-00000000febf0515 (RW): bochs dispi interface 00000000febf0600-00000000febf0607 (RW): qemu extended regs 00000000fec00000-00000000fec00fff (RW): ioapic 00000000fed00000-00000000fed003ff (RW): hpet 00000000fee00000-00000000feefffff (RW): apic-msi 00000000fffc0000-00000000ffffffff (R-): pc.bios This is less information of course, but it may good idea depending on _why_ you're doing that. Paolo --83hO6Wr44KdsSwveUj7guPENu69ur8fjN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJX4OuVAAoJEL/70l94x66DVRAIAJuHwgKhUZVs6Mgzlby/AXez paVw8xjkk/0CkdSfFQX0xGxe++hA/Lv9fqiTJnZlorVwQs/2Bd4rZTiuwuehchJQ UfShlq0YKfJGdtaiGFfIzf8kJZ0LvmfGWRthLbght4CteATGuv7zBtUO+cRt7Jj8 Dx92GgDgB8I7z3XKFZ6mU2SCx79yphL4jljFCiN3npuJ4a42qHj5SNCg8/0yYgOp nkuK/btV6rBZkvvp1o5t4XC3DOnC35IOavu8FNp4rI5w8+Ftf/8n9CgaRR+AP7DJ Qgr8+Ux0w1+dvyfZ7jwEZjKCEfsnOcDj7yvFoBbCzvgTH106J7fQHTm/+OYlEW0= =0n3Q -----END PGP SIGNATURE----- --83hO6Wr44KdsSwveUj7guPENu69ur8fjN--