WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

[Xen-ia64-devel] RE: [PATCH] pv_ops/xen: elf note based xen startup

To: "Isaku Yamahata" <yamahata@xxxxxxxxxxxxx>
Subject: [Xen-ia64-devel] RE: [PATCH] pv_ops/xen: elf note based xen startup
From: "He, Qing" <qing.he@xxxxxxxxx>
Date: Wed, 7 May 2008 11:01:59 +0800
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 06 May 2008 20:02:22 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20080507021720.GB16718%yamahata@xxxxxxxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <37E52D09333DE2469A03574C88DBF40F01D0776B@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20080507021720.GB16718%yamahata@xxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Aciv6H6jHlNkXXNQRfq7/AvQCzjIrgAAp9vw
Thread-topic: [PATCH] pv_ops/xen: elf note based xen startup

>-----Original Message-----
>From: Isaku Yamahata [mailto:yamahata@xxxxxxxxxxxxx]
>Sent: 2008年5月7日 10:17
>To: He, Qing
>Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
>Subject: Re: [PATCH] pv_ops/xen: elf note based xen startup
>
>On Tue, May 06, 2008 at 04:37:11PM +0800, He, Qing wrote:
>> This patch enables elf note based xen startup for IA-64, which gives the
>> kernel an early hint for running on xen instead of relying on psr.cpl.
>> It is also an extension for possible support of future hypervisors.
>
>Thank you for the patch.
>Basically it looks good, but some comments.
>
>- It looks unnecessary to define PARAVIRT_HYPERVISOR_TYPE_xxx,
>  hypervisor_type and hypervisor_setup_hooks array.
>  Only just one hook looks necessary.
>  Do you intended to use hypervisor type later?
>  If so, probably pv_info->name should be used or add a new member
>  to pv_info.
>
>  C-like pseudo code:
>  head.S
>  void (*paravirt_setup_hook) = NULL
>  ...
>  _start:
>
>  if (*paravirt_setup_hook != NULL)
>    (*paravirt_setup_hook)()
>  ...
>
>  xensetup.S
>  startup_xen:
>  *paravirt_setup_hook = &xen_setup_hook
>  ...
>  branch _start
>
>  ...
>  xen_setup_hook:
>  ...
>
>  Thus the weak symbol trick also goes away.

The patch uses a similar way as x86 pv_ops does. One advantage of using a 
branch table is that it is viable for a future `single entry, CPUID based pv 
setup branching'. Anyway, both approaches are fine for the current code.

With this idea, the xen specific entry is just a stub. It is one of (future 
possible) ways of letting the kernel know what hypervisor it runs on. Also, at 
the very early stage like startup_xen (psr.dt==0), I'd think avoid touching 
structs using asm-offset would be preferable.

I don't really like the macro PARAVIRT_HYPERVISOR_TYPE_xxx very much, since any 
modification requires manual sync up in two files, but I just hate magic 
numbers more...

>
>- Please split it into two parts, xen specific part
>  (modification to xensetup.S) and common part (modification to head.S).
>  If you don't mind, I'll do it keeping your signed off by.

I'm OK with that. Thank you for the comments.

>
>thanks.
>--
>yamahata

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