[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH RESEND 2/2] hvc_xen: implement multiconsole support



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....

>  }
> 
> -static inline void notify_daemon(void)
> +static inline void notify_daemon(struct xencons_info *cons)
>  {
>         /* Use evtchn: this is called early, before irq is set up. */
> -       if (console_evtchn == ~0ul)
> -               notify_remote_via_evtchn(xen_start_info->console.domU.evtchn);
> -       else
> -               notify_remote_via_evtchn(console_evtchn);
> +       notify_remote_via_evtchn(cons->evtchn);
>  }

Ahem, you can ignore my comment on this bit in the previous patch then!

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.