|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH RESEND 2/2] hvc_xen: implement multiconsole suppo
On Wed, 8 Jun 2011, Ian Campbell wrote:
> On Tue, 2011-06-07 at 17:28 +0100, Stefano Stabellini wrote:
> > From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> >
> > This patch implements support for multiple consoles:
> > consoles other than the first one are setup using the traditional xenbus
> > and grant-table based mechanism.
> > We use a list to keep track of the allocated consoles, we don't
> > expect too many of them anyway.
> >
> > Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> > ---
>
> > +static inline int xenbus_devid_to_vtermno(int devid)
> > {
> > - if (xencons_if != NULL)
> > - return xencons_if;
> > - if (console_pfn == ~0ul)
> > - return mfn_to_virt(xen_start_info->console.domU.mfn);
> > - else
> > - return __va(console_pfn << PAGE_SHIFT);
> > + return devid + HVC_COOKIE;
>
> I know this is pre-existing but what is the purpose of offsetting
> vtermno by an arbitrary number?
>
> Many other callers use 0 or a "unit_address" (which I presume to be
> non-arbitrary). The rtas backend does the same as us, but it just seems
> strange....
Yes, I just kept it the way it was.
We could #define HVC_COOKIE 0 and everything would still work.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|