NetBSD Problem Report #51080
From www@NetBSD.org Wed Apr 20 22:18:48 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id D2F7B7A3D9
for <gnats-bugs@gnats.NetBSD.org>; Wed, 20 Apr 2016 22:18:47 +0000 (UTC)
Message-Id: <20160420221846.CA06F7AA96@mollari.NetBSD.org>
Date: Wed, 20 Apr 2016 22:18:46 +0000 (UTC)
From: pablo@polvorin.com.ar
Reply-To: pablo@polvorin.com.ar
To: gnats-bugs@NetBSD.org
Subject: Support pvfb on xen domu (patch)
X-Send-Pr-Version: www-1.0
>Number: 51080
>Category: port-xen
>Synopsis: Support pvfb on xen domu (patch)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: port-xen-maintainer
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed Apr 20 22:20:00 +0000 2016
>Last-Modified: Sat Jun 25 17:30:00 +0000 2016
>Originator: Pablo Polvorin
>Release: 7.0
>Organization:
>Environment:
>Description:
The patch is available here http://blog.polvorin.com.ar/patches/pvfb.patch
is an attempt at supporting the virtual framebuffer on xen guest
( http://wiki.netbsd.org/projects/project/xen-domu-pvfb/ )
Basic functionality is in place, but reached a point where guidance/feedback would be very welcome in order to push this forward,
this is the first piece of kernel code I attempt to write, and I'm not
that familiar with netbsd to start with.
Need to review, at least
* Memory management (conversion to frame number to pass references to xen host). Currently save/restore isn't working, but neither do it without this patch on my install.
* code just act as a kind of adapter between xenbus and genfb, wskbddev and wsmousedev, letting them attach to xenbus. Is that the way to go?
* The way I added the drivers to be used by autoconf
There is a little bit more description at http://blog.polvorin.com.ar/2016/04/20/netbsd-pvfb.html
>How-To-Repeat:
>Fix:
above patch
>Audit-Trail:
From: Manuel Bouyer <bouyer@antioche.eu.org>
To: gnats-bugs@NetBSD.org
Cc: port-xen-maintainer@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: port-xen/51080: Support pvfb on xen domu (patch)
Date: Thu, 19 May 2016 11:17:36 +0200
On Wed, Apr 20, 2016 at 10:20:00PM +0000, pablo@polvorin.com.ar wrote:
> >Description:
> The patch is available here http://blog.polvorin.com.ar/patches/pvfb.patch
>
> is an attempt at supporting the virtual framebuffer on xen guest
> ( http://wiki.netbsd.org/projects/project/xen-domu-pvfb/ )
>
> Basic functionality is in place, but reached a point where guidance/feedback would be very welcome in order to push this forward,
> this is the first piece of kernel code I attempt to write, and I'm not
> that familiar with netbsd to start with.
>
> Need to review, at least
>
> * Memory management (conversion to frame number to pass references to xen host). Currently save/restore isn't working, but neither do it without this patch on my install.
>
> * code just act as a kind of adapter between xenbus and genfb, wskbddev and wsmousedev, letting them attach to xenbus. Is that the way to go?
>
> * The way I added the drivers to be used by autoconf
Hello,
this looks good, good work !
For the framebuffer resolution/depth, how does linux do ? Is it something it
gets from the domU config file via the store ? Or via the command line ?
AFAIK NetBSD's genfb doens't have a way to change the resolution from userland.
If there's no provision to set the parameters in the xenstore you could pass
it from the kernel command line, e.g. xenfb=1280x1024x32
This will have to be parsed in xen_parse_cmdline(), which then can be called
from xfb_xenbus.c.
Are you sure the framebuffer has a protocol entry in the xenstore ?
If not, you should probably remove it from xfb_xenbus_resume().
For the race condition you mention in xfb_xenbus_attach() I don't understant
how it can happens. The
genfb framebuffer at 0xffff, size , depth, stride
line should always be there.
Are you sure it's not some uninitialised variable ?
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--
From: Pablo Polvorin <pablo@polvorin.com.ar>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: port-xen/51080: Support pvfb on xen domu (patch)
Date: Sat, 25 Jun 2016 14:31:09 -0300
On Thu, 19 May 2016 09:20:01 +0000 (UTC)
Manuel Bouyer <bouyer@antioche.eu.org> wrote:
> The following reply was made to PR port-xen/51080; it has been noted
> by GNATS.
>
> From: Manuel Bouyer <bouyer@antioche.eu.org>
> To: gnats-bugs@NetBSD.org
> Cc: port-xen-maintainer@netbsd.org, gnats-admin@netbsd.org,
> netbsd-bugs@netbsd.org
> Subject: Re: port-xen/51080: Support pvfb on xen domu (patch)
> Date: Thu, 19 May 2016 11:17:36 +0200
>
> On Wed, Apr 20, 2016 at 10:20:00PM +0000, pablo@polvorin.com.ar
> wrote:
> > >Description:
> > The patch is available here
> > http://blog.polvorin.com.ar/patches/pvfb.patch
> >
> > is an attempt at supporting the virtual framebuffer on xen guest
> > ( http://wiki.netbsd.org/projects/project/xen-domu-pvfb/ )
> >
> > Basic functionality is in place, but reached a point where
> > guidance/feedback would be very welcome in order to push this
> > forward, this is the first piece of kernel code I attempt to
> > write, and I'm not that familiar with netbsd to start with.
> >
> > Need to review, at least
> >
> > * Memory management (conversion to frame number to pass references
> > to xen host). Currently save/restore isn't working, but neither
> > do it without this patch on my install.
> >
> > * code just act as a kind of adapter between xenbus and genfb,
> > wskbddev and wsmousedev, letting them attach to xenbus. Is that
> > the way to go?
> >
> > * The way I added the drivers to be used by autoconf
>
> Hello,
> this looks good, good work !
> For the framebuffer resolution/depth, how does linux do ? Is it
> something it gets from the domU config file via the store ? Or via
> the command line ? AFAIK NetBSD's genfb doens't have a way to change
> the resolution from userland. If there's no provision to set the
> parameters in the xenstore you could pass it from the kernel command
> line, e.g. xenfb=1280x1024x32 This will have to be parsed in
> xen_parse_cmdline(), which then can be called from xfb_xenbus.c.
>
> Are you sure the framebuffer has a protocol entry in the xenstore ?
> If not, you should probably remove it from xfb_xenbus_resume().
>
> For the race condition you mention in xfb_xenbus_attach() I don't
> understant how it can happens. The
> genfb framebuffer at 0xffff, size , depth, stride
> line should always be there.
> Are you sure it's not some uninitialised variable ?
>
> --
> Manuel Bouyer <bouyer@antioche.eu.org>
> NetBSD: 26 ans d'experience feront toujours la difference
> --
>
Hello, thanks for your comments and sorry for the delay, I've been very
busy. Will probably be able to work on this again in ~1 week.
Yes AFAIK linux uses command line/user-space tools for configuring the
resolution (the xen framebuffer plugs into a general fb framework
that already has the callbacks defined for that).
I'll use your hint about the kernel command line, it will be a usable
workaround that shouldn't require much change.
> Are you sure the framebuffer has a protocol entry in the xenstore ?
> If not, you should probably remove it from xfb_xenbus_resume().
I can't find documentation about it now, but it's on the linux driver, I
probably just copied that from there.
> Are you sure it's not some uninitialised variable ?
No I'm not :) . Will try to review that again.
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.