xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: The development of GRUB 2 <grub-devel@gnu.org>,
	Fabio Fantoni <fabio.fantoni@m2r.biz>,
	xen-devel <xen-devel@lists.xensource.com>
Subject: Re: [Xen-devel] pvgrub2 is merged
Date: Fri, 20 Dec 2013 13:14:36 +0100	[thread overview]
Message-ID: <52B434AC.7090905@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1312191125450.8667@kaball.uk.xensource.com>


[-- Attachment #1.1: Type: text/plain, Size: 3320 bytes --]

On 19.12.2013 12:54, Stefano Stabellini wrote:
> On Wed, 18 Dec 2013, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>> On 18.12.2013 20:39, Stefano Stabellini wrote:
>>> On Wed, 18 Dec 2013, Vladimir 'φ-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 'φ-coder/phcoder' Serbinenko ha scritto:
>>>>>>>> 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 by
>>>>> "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 even
>>>> after vfb shutdown
>>>> phcoder@debian:15:52:40:~/grub2$ sudo xenstore-ls
>>>> /local/domain/54/device/vfb
>>>> 0 = ""
>>>>  backend = "/local/domain/0/backend/vfb/54/0"
>>>>  backend-id = "0"
>>>>  state = "1"
>>>> phcoder@debian:15:52:51:~/grub2$ sudo xenstore-ls
>>>> /local/domain/0/backend/vfb/54/0
>>>> frontend = "/local/domain/54/device/vfb/0"
>>>> frontend-id = "54"
>>>> online = "1"
>>>> state = "2"
>>>> domain = "grub"
>>>> vnc = "1"
>>>> vnclisten = "127.0.0.1"
>>>> vncdisplay = "0"
>>>> vncunused = "1"
>>>> sdl = "0"
>>>> opengl = "0"
>>>> feature-resize = "1"
>>>> hotplug-status = "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?
>>>
>>> There is only one xenfb backend: hw/display/xenfb.c in the QEMU source
>>> tree.
>>>
>>>
>>>> - Why does it map as rw and not ro? It doesn't need to write to framebuffer?
>>>
>>> Actually it is mapping it RO, see hw/display/xenfb.c:xenfb_map_fb
>>>
>> ./tools/qemu-xen-dir-remote/hw/xenfb.c:
>>     xenfb->pixels = xc_map_foreign_pages(xen_xc, xenfb->c.xendev.dom,
>> 					 PROT_READ | PROT_WRITE, fbmfns, xenfb->fbpages);
> 
> You are right, my bad.
> I did a quick test and it should be safe to modify it to PROT_READ only.
> 
> 
>>>> - How do I force it to drop the mapping?
>>>
>>> Theoretically QEMU should drop the mapping at disconnect time:
>>>
>>> hw/display/xenfb.c:fb_disconnect
>>>
>>>     /*
>>>      * 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 = mmap(fb->pixels, fb->fbpages * XC_PAGE_SIZE,
>>>                       PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON,
>>>                       -1, 0);
>>>
>> Could this fail?
> 
> Yes and we don't check for the return value (-1 in case of error). Well spotted!
> Do you want to submit a patch to fix both issues or should I do it?
> 
I'm fine with you doing it.


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

[-- Attachment #2: Type: text/plain, Size: 141 bytes --]

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

  reply	other threads:[~2013-12-20 12:14 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <527EA084.6000706@gmail.com>
2013-11-09 21:01 ` pvgrub2 is merged Samuel Thibault
2013-11-10  4:47 ` Andrey Borzenkov
2013-11-11 10:10 ` Ian Campbell
     [not found] ` <20131110084753.540b0107@opensuse.site>
2013-11-11 11:51   ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-13 19:06   ` M A Young
2013-11-13 20:14     ` Vladimir 'φ-coder/phcoder' Serbinenko
     [not found]     ` <5283DD8F.5080103@gmail.com>
2013-11-14 12:27       ` M A Young
     [not found]       ` <alpine.DEB.2.00.1311141213350.11266@procyon.dur.ac.uk>
2013-11-14 17:03         ` M A Young
     [not found]         ` <alpine.DEB.2.00.1311141657530.28334@procyon.dur.ac.uk>
2013-11-14 17:32           ` Vladimir 'φ-coder/phcoder' Serbinenko
     [not found]           ` <52850918.1040406@gmail.com>
2013-11-14 18:48             ` M A Young
     [not found]             ` <alpine.DEB.2.00.1311141835430.28334@procyon.dur.ac.uk>
2013-11-14 18:57               ` Vladimir 'φ-coder/phcoder' Serbinenko
     [not found]               ` <52851D28.1090905@gmail.com>
2013-11-14 18:59                 ` Vladimir 'φ-coder/phcoder' Serbinenko
     [not found]                 ` <52851D77.6060203@gmail.com>
2013-11-14 21:11                   ` M A Young
     [not found]                   ` <alpine.DEB.2.00.1311142058000.23922@procyon.dur.ac.uk>
2013-11-14 21:43                     ` Vladimir 'φ-coder/phcoder' Serbinenko
     [not found]                     ` <5285440B.2040301@gmail.com>
2013-11-25 15:56                       ` Fabio Fantoni
     [not found]                         ` <CAEaD8JOKf7J8ZRfRH_s03UQ9xw=qDziutHNoZs=NTKo3oN_vJg@mail.gmail.com>
2013-11-25 16:26                           ` Fabio Fantoni
2013-11-25 19:35                         ` M A Young
     [not found]                         ` <alpine.DEB.2.00.1311251913210.16022@procyon.dur.ac.uk>
2013-11-26 17:58                           ` Fabio Fantoni
     [not found]                           ` <5294E157.90708@m2r.biz>
2013-11-26 18:12                             ` Andrey Borzenkov
     [not found]                             ` <20131126221221.3fe316e3@opensuse.site>
2013-11-26 19:16                               ` Andrew Cooper
2013-11-27 11:32                               ` Fabio Fantoni
     [not found]                               ` <5295D867.9050306@m2r.biz>
2013-11-27 11:50                                 ` Vladimir 'φ-coder/phcoder' Serbinenko
     [not found]                                 ` <5295DCA0.2010805@gmail.com>
2013-11-27 15:59                                   ` Fabio Fantoni
     [not found]                                   ` <529616EA.4000504@m2r.biz>
2013-11-27 16:03                                     ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-27 16:10                                     ` M A Young
     [not found]                                     ` <529617B7.2020507@gmail.com>
2013-11-27 16:24                                       ` Fabio Fantoni
     [not found]                                       ` <52961CD5.1040009@m2r.biz>
2013-11-27 17:35                                         ` Andrey Borzenkov
     [not found]                                         ` <20131127213552.3120f5e5@opensuse.site>
2013-11-28 13:07                                           ` Fabio Fantoni
     [not found]                                           ` <52973FF8.7040502@m2r.biz>
2013-11-28 14:05                                             ` Vladimir 'φ-coder/phcoder' Serbinenko
     [not found]                                             ` <52974D98.3090608@gmail.com>
2013-11-28 14:17                                               ` Fabio Fantoni
     [not found]                                               ` <5297508C.40607@m2r.biz>
2013-11-29 11:28                                                 ` Fabio Fantoni
     [not found]                                                 ` <52987A43.9070806@m2r.biz>
     [not found]                                                   ` <52987D7F.3050006@gmail.com>
     [not found]                                                     ` <52988F86.6050008@m2r.biz>
2013-12-03 10:31                                                       ` [Xen-devel] " Fabio Fantoni
2013-12-03 10:33                                                         ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-03 11:22                                                           ` Fabio Fantoni
     [not found]                                                             ` <529DC07E.8000201@gmail.com>
     [not found]                                                               ` <529DE3FD.90002@m2r.biz>
     [not found]                                                                 ` <529DF9D5.2060301@gmail.com>
     [not found]                                                                   ` <529E03FB.90603@m2r.biz>
     [not found]                                                                     ` <52A1B0CB.3000705@m2r.biz>
     [not found]                                                                       ` <52A1B5E8.5090709@gmail.com>
     [not found]                                                                         ` <52A1E2CD.9030002@m2r.biz>
     [not found]                                                                           ` <52A1E56E.3070105@gmail.com>
     [not found]                                                                             ` <52A1EBAB.5090006@m2r.biz>
     [not found]                                                                               ` <52A2F341.9010606@gmail.com>
     [not found]                                                                                 ` <52A5961A.2010608@m2r.biz>
     [not found]                                                                                   ` <52B02B13.1000103@m2r.biz>
     [not found]                                                                                     ` <52B02F84.6070403@gmail.com>
     [not found]                                                                                       ` <52B04D6E.3070700@m2r.biz>
     [not found]                                                                                         ` <52B0527C.40104@gmail.com>
2013-12-17 13:55                                                                                           ` Fabio Fantoni
2013-12-17 14:08                                                                                             ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-17 14:10                                                                                               ` Fabio Fantoni
2013-12-17 14:35                                                                                                 ` Fabio Fantoni
2013-12-18 14:58                                                                                                   ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-18 19:39                                                                                                     ` Stefano Stabellini
2013-12-18 20:20                                                                                                       ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-19 11:54                                                                                                         ` [Xen-devel] " Stefano Stabellini
2013-12-20 12:14                                                                                                           ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2014-01-06 12:23                                                                                                             ` Stefano Stabellini
2014-11-07 15:20                                                                                                             ` Stefano Stabellini
2013-12-05 15:50                                                   ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-05 16:04                                                     ` Fabio Fantoni
     [not found] ` <1384164632.3189.177.camel@kazak.uk.xensource.com>
2013-11-11 11:54   ` Vladimir 'φ-coder/phcoder' Serbinenko
     [not found]   ` <5280C576.1010201@gmail.com>
2013-11-11 12:06     ` Ian Campbell
     [not found]     ` <1384171563.8909.44.camel@kazak.uk.xensource.com>
2013-11-11 12:52       ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-14  9:48   ` Dario Faggioli
2013-11-13 16:36 ` Ian Campbell
     [not found] ` <1384360619.29080.0.camel@kazak.uk.xensource.com>
2013-11-13 18:25   ` Vladimir 'φ-coder/phcoder' Serbinenko
     [not found]   ` <5283C406.7010708@gmail.com>
2013-11-14  8:37     ` Ian Campbell
     [not found]     ` <1384418221.7059.30.camel@dagon.hellion.org.uk>
2013-12-11 11:47       ` Vladimir 'φ-coder/phcoder' Serbinenko
     [not found]       ` <52A850D4.40900@gmail.com>
2013-12-11 11:51         ` Ian Campbell
     [not found]         ` <1386762709.30271.60.camel@kazak.uk.xensource.com>
2013-12-11 11:54           ` Vladimir 'φ-coder/phcoder' Serbinenko
     [not found]           ` <52A8527B.2090402@gmail.com>
2013-12-11 14:34             ` Dario Faggioli
2013-12-14 17:13             ` Leif Lindholm
2014-01-06 15:35           ` Lars Kurth
     [not found] ` <20131129132422.GC16321@riva.ucam.org>
2013-11-29 17:44   ` Andrey Borzenkov
     [not found]   ` <20131129214427.02439ae0@opensuse.site>
2013-12-02  9:48     ` Ian Campbell
     [not found]     ` <1385977687.7108.11.camel@kazak.uk.xensource.com>
2013-12-02 10:37       ` Samuel Thibault
     [not found]       ` <20131202103750.GC5756@type.mobile.lan>
2013-12-02 10:46         ` Ian Campbell
2013-12-03 17:27       ` Colin Watson
     [not found]       ` <20131203172728.GA3709@riva.ucam.org>
2013-12-03 17:41         ` Ian Campbell

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=52B434AC.7090905@gmail.com \
    --to=phcoder@gmail.com \
    --cc=fabio.fantoni@m2r.biz \
    --cc=grub-devel@gnu.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).