All of lore.kernel.org
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@eu.citrix.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Xen Development Mailing List <xen-devel@lists.xensource.com>,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [PATCH] xenfb: make restartable
Date: Fri, 15 Aug 2008 23:23:46 +0100	[thread overview]
Message-ID: <20080815222346.GE5198@implementation> (raw)
In-Reply-To: <m3bpzubggl.fsf@crossbow.pond.sub.org>

Markus Armbruster, le Fri 15 Aug 2008 08:39:06 -0400, a écrit :
> > +	if (!strcmp(dev->devicetype, "vfb")) {
> > +	    if (dev->xenfb->pixels) {
> > +		    munmap(dev->xenfb->pixels, dev->xenfb->fb_len);
> > +		    dev->xenfb->pixels = NULL;
> > +	    }
> > +	}
> >  }
> >  
> >  
> 
> The check for vfb is ugly.  The only alternative I can see is fb ==
> dev->xenfb->fb.  Matter of taste.

Hum, that was what I had written previously actually.  I don't see why
it is "ugly", in that pixels is a device resource.  It should probably
be in xenfb->fb actually.

> > @@ -653,6 +656,16 @@ static int xenfb_on_state_change(struct 
> >  		   not much point in us continuing. */
> >  		return -1;
> >  	case XenbusStateInitialising:
> > +		if (dev->state != XenbusStateClosed)
> > +		    /* Do not let a domain make us skip the closing state */
> > +		    return 0;
> 
> Why does this work?

It's meant to not work.  If the frontend is not playing well (going
through the closing state), then ignore what it's doing until it plays
well. An alternative could be to just shut down.  In any case, we don't
want to let it drive us to remapping something else without unmapping
the previous fb.

> > +		xenfb_switch_state(dev, XenbusStateInitWait);
> > +		xs_unwatch(dev->xenfb->xsh, dev->otherend, "");
> > +		if (!strcmp(dev->devicetype, "vkbd")) {
> > +		    fprintf(stderr, "FB: Waiting for KBD backend creation\n");
> > +		    xenfb_wait_for_frontend(&dev->xenfb->kbd, xenfb_frontend_initialized_kbd);
> > +		}
> > +		break;
> 
> Man, I hate this state machine... 

I agree :)

> Gerd's new one is much clearer (I asked for that).

Then since 3.3 is about to be released, we'd probably have this change
with it.

Samuel

  reply	other threads:[~2008-08-15 22:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-14 10:38 [bug] pv-grub doesn't run on rhel5 Gerd Hoffmann
2008-08-14 11:15 ` Samuel Thibault
     [not found]   ` <48A4232B.6040500@redhat.com>
2008-08-14 12:29     ` Samuel Thibault
2008-08-14 14:18       ` Gerd Hoffmann
2008-08-14 14:28         ` Samuel Thibault
2008-08-14 15:04           ` Gerd Hoffmann
2008-08-14 15:14             ` Samuel Thibault
2008-08-14 15:36               ` Samuel Thibault
2008-08-14 16:01               ` Gerd Hoffmann
2008-08-14 18:02               ` [PATCH] xenfb: make restartable [Was: pv-grub doesn't run on rhel5] Samuel Thibault
2008-08-15  7:02                 ` Gerd Hoffmann
2008-08-15 12:39                 ` [PATCH] xenfb: make restartable Markus Armbruster
2008-08-15 22:23                   ` Samuel Thibault [this message]
2008-08-15 22:53                     ` Markus Armbruster
2008-08-16 22:33                       ` Samuel Thibault
2008-08-14 15:55           ` [bug] pv-grub doesn't run on rhel5 Jeremy Fitzhardinge
2008-08-14 16:04             ` Gerd Hoffmann
2008-08-14 12:33   ` [PATCH] compiled a 32bit pv-grub on x86_64 xen target [Was: pv-grub doesn't run on rhel5] Samuel Thibault

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=20080815222346.GE5198@implementation \
    --to=samuel.thibault@eu.citrix.com \
    --cc=armbru@redhat.com \
    --cc=kraxel@redhat.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 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.