From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= Subject: Re: pvgrub2 is merged Date: Wed, 18 Dec 2013 21:20:34 +0100 Message-ID: <52B20392.9090001@gmail.com> References: <527EA084.6000706@gmail.com> <529617B7.2020507@gmail.com> <52961CD5.1040009@m2r.biz> <20131127213552.3120f5e5@opensuse.site> <52973FF8.7040502@m2r.biz> <52974D98.3090608@gmail.com> <5297508C.40607@m2r.biz> <52987A43.9070806@m2r.biz> <52987D7F.3050006@gmail.com> <52988F86.6050008@m2r.biz> <529DB2F1.4080509@m2r.biz> <529DB363.7080003@gmail.com> <529DBED9.80105@m2r.biz> <529DC07E.8000201@gmail.com> <529DE3FD.90002@m2r.biz> <529DF9D5.2060301@gmail.com> <529E03FB.90603@m2r.biz> <52A1B0CB.3000705@m2r.biz> <52A1B5E8.5090709@gmail.com> <52A1E2CD.9030002@m2r.biz> <52A1E56E.3070105@gmail.com> <52A1EBAB.5090006@m2r.biz> <52A2F341.9010606@gmail.com> <52A5961A.2010608@m2r.biz> <52B02B13.1000103@m2r.biz> <52B02F84.6070403@gmail.com> <52B04D6E.3070700@m2r.biz> <52B0527C.40104@gmail.com> <52B057BD.8070701@m2r.biz> <52B05AF1.1040508@gmail.com> <52B05B5C.1080901@m2r.biz> <52B06131.8040809@m2r.biz> <52B1B82D.9050501@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5885426330329238494==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: The development of GRUB 2 , Fabio Fantoni , xen-devel List-Id: xen-devel@lists.xenproject.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============5885426330329238494== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3NQIxOjKlqUTK4abjHJiGlTJm2eeGkuXd" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3NQIxOjKlqUTK4abjHJiGlTJm2eeGkuXd Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 18.12.2013 20:39, Stefano Stabellini wrote: > On Wed, 18 Dec 2013, Vladimir '=CF=86-coder/phcoder' Serbinenko wrote: >> On 17.12.2013 15:35, Fabio Fantoni wrote: >>> Il 17/12/2013 15:10, Fabio Fantoni ha scritto: >>>> Il 17/12/2013 15:08, Vladimir '=CF=86-coder/phcoder' Serbinenko ha s= critto: >>>>>> Thanks. >>>>>> Now there is another error, probably introduced by xenfb support: >>>>>> >>>>> doesn't look like related to xenfb. Is it 64-bit or PAE guest? >>>> >>>> 64 bit >>> >>> I did "git reset --hard" to commit "Remove grub_bios_interrupt on >>> coreboot." and then I applied only >>> "grub-core/lib/x86_64/xen/relocator.S: Fix hypercall ABI violation." >>> commit. >>> Now the Sid domU boot correctly, therefore the regression is caused b= y >>> "xenfb" or "xen grants to v1" commit, should I find the exact commit >>> that causes that problem or these informations are enough for you? >> >> It's because of vfb. Apparently vfb framebuffer stays mapped as rw eve= n >> after vfb shutdown >> phcoder@debian:15:52:40:~/grub2$ sudo xenstore-ls >> /local/domain/54/device/vfb >> 0 =3D "" >> backend =3D "/local/domain/0/backend/vfb/54/0" >> backend-id =3D "0" >> state =3D "1" >> phcoder@debian:15:52:51:~/grub2$ sudo xenstore-ls >> /local/domain/0/backend/vfb/54/0 >> frontend =3D "/local/domain/54/device/vfb/0" >> frontend-id =3D "54" >> online =3D "1" >> state =3D "2" >> domain =3D "grub" >> vnc =3D "1" >> vnclisten =3D "127.0.0.1" >> vncdisplay =3D "0" >> vncunused =3D "1" >> sdl =3D "0" >> opengl =3D "0" >> feature-resize =3D "1" >> hotplug-status =3D "connected" >> >> When I do "dry vfb": do everything except writing vfb state problem >> disappears. So my question would be: >> - how can I inspect how backend maps framebuffer pages? >=20 > There is only one xenfb backend: hw/display/xenfb.c in the QEMU source > tree. >=20 >=20 >> - Why does it map as rw and not ro? It doesn't need to write to frameb= uffer? >=20 > Actually it is mapping it RO, see hw/display/xenfb.c:xenfb_map_fb >=20 =2E/tools/qemu-xen-dir-remote/hw/xenfb.c: xenfb->pixels =3D xc_map_foreign_pages(xen_xc, xenfb->c.xendev.dom, PROT_READ | PROT_WRITE, fbmfns, xenfb->fbpages); >=20 >> - How do I force it to drop the mapping? >=20 > Theoretically QEMU should drop the mapping at disconnect time: >=20 > hw/display/xenfb.c:fb_disconnect >=20 > /* > * FIXME: qemu can't un-init gfx display (yet?). > * Replacing the framebuffer with anonymous shared memory > * instead. This releases the guest pages and keeps qemu happy. > */ > fb->pixels =3D mmap(fb->pixels, fb->fbpages * XC_PAGE_SIZE, > PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, > -1, 0); >=20 Could this fail? --3NQIxOjKlqUTK4abjHJiGlTJm2eeGkuXd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iF4EAREKAAYFAlKyA5IACgkQmBXlbbo5nOt6eQD8D7USNOu9YOzsrUj8Ikd13sBt fMH5Wqy0tCcjf9GK8N4A/ib0PlUE1Ylvi7vmqDoNjigw16D/8/MkmL5skNp7WDjE =S0xW -----END PGP SIGNATURE----- --3NQIxOjKlqUTK4abjHJiGlTJm2eeGkuXd-- --===============5885426330329238494== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============5885426330329238494==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VtNcA-0001bF-5K for mharc-grub-devel@gnu.org; Wed, 18 Dec 2013 15:21:06 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtNbs-0001CU-MF for grub-devel@gnu.org; Wed, 18 Dec 2013 15:20:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VtNbj-0003vJ-9u for grub-devel@gnu.org; Wed, 18 Dec 2013 15:20:48 -0500 Received: from mail-ee0-x230.google.com ([2a00:1450:4013:c00::230]:39971) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtNbi-0003uy-7w for grub-devel@gnu.org; Wed, 18 Dec 2013 15:20:38 -0500 Received: by mail-ee0-f48.google.com with SMTP id e49so62441eek.21 for ; Wed, 18 Dec 2013 12:20:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=36MlM5U8bg95n321ZMJ/I3PnACXjARalTUOOkLCd0e8=; b=VtrTEEmzGvaRpU5EDbuLDJRQK/U0SZgvPCU3O4FwPmwu5dFU/ivyyrkQFBadC+qDhb OvpU2vb757wuLYUU/ofn16k3HWUII+21HhebVqhPIT7wRoA87cxc6LpvQuWneVni56tJ BKb4PJCoQ6SLrjlsnVZGsRlEJmKbbO743GTDgIFWV8QDD+VAI++yalVyAWIy2tMYfwzP xe52MmIaIS3oexVW/+Tr1rHk4YLoZ+zb3EnCd79oSKmfdrjWslAguCAdNil3U/bMIk8Z ZkmH0FurDhWLKr3HZigI9glVhH8niaA/a3diW8LPizvuOcDKoZfm5hWCiMiBi0UW6mlF 4WEw== X-Received: by 10.14.204.135 with SMTP id h7mr23130580eeo.104.1387398037434; Wed, 18 Dec 2013 12:20:37 -0800 (PST) Received: from [192.168.1.16] (85-188.196-178.cust.bluewin.ch. [178.196.188.85]) by mx.google.com with ESMTPSA id o47sm3075055eem.21.2013.12.18.12.20.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Dec 2013 12:20:36 -0800 (PST) Message-ID: <52B20392.9090001@gmail.com> Date: Wed, 18 Dec 2013 21:20:34 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10 MIME-Version: 1.0 To: Stefano Stabellini Subject: Re: [Xen-devel] pvgrub2 is merged References: <527EA084.6000706@gmail.com> <529617B7.2020507@gmail.com> <52961CD5.1040009@m2r.biz> <20131127213552.3120f5e5@opensuse.site> <52973FF8.7040502@m2r.biz> <52974D98.3090608@gmail.com> <5297508C.40607@m2r.biz> <52987A43.9070806@m2r.biz> <52987D7F.3050006@gmail.com> <52988F86.6050008@m2r.biz> <529DB2F1.4080509@m2r.biz> <529DB363.7080003@gmail.com> <529DBED9.80105@m2r.biz> <529DC07E.8000201@gmail.com> <529DE3FD.90002@m2r.biz> <529DF9D5.2060301@gmail.com> <529E03FB.90603@m2r.biz> <52A1B0CB.3000705@m2r.biz> <52A1B5E8.5090709@gmail.com> <52A1E2CD.9030002@m2r.biz> <52A1E56E.3070105@gmail.com> <52A1EBAB.5090006@m2r.biz> <52A2F341.9010606@gmail.com> <52A5961A.2010608@m2r.biz> <52B02B13.1000103@m2r.biz> <52B02F84.6070403@gmail.com> <52B04D6E.3070700@m2r.biz> <52B0527C.40104@gmail.com> <52B057BD.8070701@m2r.biz> <52B05AF1.1040508@gmail.com> <52B05B5C.1080901@m2r.biz> <52B06131.8040809@m2r.biz> <52B1B82D.9050501@gmail.com> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3NQIxOjKlqUTK4abjHJiGlTJm2eeGkuXd" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c00::230 Cc: The development of GRUB 2 , Fabio Fantoni , xen-devel X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Dec 2013 20:20:57 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3NQIxOjKlqUTK4abjHJiGlTJm2eeGkuXd Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 18.12.2013 20:39, Stefano Stabellini wrote: > On Wed, 18 Dec 2013, Vladimir '=CF=86-coder/phcoder' Serbinenko wrote: >> On 17.12.2013 15:35, Fabio Fantoni wrote: >>> Il 17/12/2013 15:10, Fabio Fantoni ha scritto: >>>> Il 17/12/2013 15:08, Vladimir '=CF=86-coder/phcoder' Serbinenko ha s= critto: >>>>>> Thanks. >>>>>> Now there is another error, probably introduced by xenfb support: >>>>>> >>>>> doesn't look like related to xenfb. Is it 64-bit or PAE guest? >>>> >>>> 64 bit >>> >>> I did "git reset --hard" to commit "Remove grub_bios_interrupt on >>> coreboot." and then I applied only >>> "grub-core/lib/x86_64/xen/relocator.S: Fix hypercall ABI violation." >>> commit. >>> Now the Sid domU boot correctly, therefore the regression is caused b= y >>> "xenfb" or "xen grants to v1" commit, should I find the exact commit >>> that causes that problem or these informations are enough for you? >> >> It's because of vfb. Apparently vfb framebuffer stays mapped as rw eve= n >> after vfb shutdown >> phcoder@debian:15:52:40:~/grub2$ sudo xenstore-ls >> /local/domain/54/device/vfb >> 0 =3D "" >> backend =3D "/local/domain/0/backend/vfb/54/0" >> backend-id =3D "0" >> state =3D "1" >> phcoder@debian:15:52:51:~/grub2$ sudo xenstore-ls >> /local/domain/0/backend/vfb/54/0 >> frontend =3D "/local/domain/54/device/vfb/0" >> frontend-id =3D "54" >> online =3D "1" >> state =3D "2" >> domain =3D "grub" >> vnc =3D "1" >> vnclisten =3D "127.0.0.1" >> vncdisplay =3D "0" >> vncunused =3D "1" >> sdl =3D "0" >> opengl =3D "0" >> feature-resize =3D "1" >> hotplug-status =3D "connected" >> >> When I do "dry vfb": do everything except writing vfb state problem >> disappears. So my question would be: >> - how can I inspect how backend maps framebuffer pages? >=20 > There is only one xenfb backend: hw/display/xenfb.c in the QEMU source > tree. >=20 >=20 >> - Why does it map as rw and not ro? It doesn't need to write to frameb= uffer? >=20 > Actually it is mapping it RO, see hw/display/xenfb.c:xenfb_map_fb >=20 =2E/tools/qemu-xen-dir-remote/hw/xenfb.c: xenfb->pixels =3D xc_map_foreign_pages(xen_xc, xenfb->c.xendev.dom, PROT_READ | PROT_WRITE, fbmfns, xenfb->fbpages); >=20 >> - How do I force it to drop the mapping? >=20 > Theoretically QEMU should drop the mapping at disconnect time: >=20 > hw/display/xenfb.c:fb_disconnect >=20 > /* > * FIXME: qemu can't un-init gfx display (yet?). > * Replacing the framebuffer with anonymous shared memory > * instead. This releases the guest pages and keeps qemu happy. > */ > fb->pixels =3D mmap(fb->pixels, fb->fbpages * XC_PAGE_SIZE, > PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, > -1, 0); >=20 Could this fail? --3NQIxOjKlqUTK4abjHJiGlTJm2eeGkuXd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iF4EAREKAAYFAlKyA5IACgkQmBXlbbo5nOt6eQD8D7USNOu9YOzsrUj8Ikd13sBt fMH5Wqy0tCcjf9GK8N4A/ib0PlUE1Ylvi7vmqDoNjigw16D/8/MkmL5skNp7WDjE =S0xW -----END PGP SIGNATURE----- --3NQIxOjKlqUTK4abjHJiGlTJm2eeGkuXd--