ia64/xen-unstable

changeset 8251:198828cc103b

The Mini-OS build once again broke, this time since vcpu_data became vcpu_info
and that XEN_VER in the __xen_guest section changed slightly. I've modified
the mini-os so that it at least compiles and boots again.

Signed-off-by: Simon Kagstrom <simon.kagstrom@bth.se>
author kaf24@firebug.cl.cam.ac.uk
date Tue Dec 06 16:05:31 2005 +0100 (2005-12-06)
parents 002a8b5c98bb
children 06b80b837c92
files extras/mini-os/events.c extras/mini-os/hypervisor.c extras/mini-os/include/os.h extras/mini-os/time.c extras/mini-os/x86_32.S
line diff
     1.1 --- a/extras/mini-os/events.c	Tue Dec 06 15:52:51 2005 +0100
     1.2 +++ b/extras/mini-os/events.c	Tue Dec 06 16:05:31 2005 +0100
     1.3 @@ -77,6 +77,7 @@ int bind_virq( u32 virq, void (*handler)
     1.4  	/* Try to bind the virq to a port */
     1.5  	op.cmd = EVTCHNOP_bind_virq;
     1.6  	op.u.bind_virq.virq = virq;
     1.7 +	op.u.bind_virq.vcpu = smp_processor_id();
     1.8  
     1.9  	if ( HYPERVISOR_event_channel_op(&op) != 0 )
    1.10  	{
     2.1 --- a/extras/mini-os/hypervisor.c	Tue Dec 06 15:52:51 2005 +0100
     2.2 +++ b/extras/mini-os/hypervisor.c	Tue Dec 06 16:05:31 2005 +0100
     2.3 @@ -39,7 +39,7 @@ void do_hypervisor_callback(struct pt_re
     2.4      unsigned int   l1i, l2i, port;
     2.5      int            cpu = 0;
     2.6      shared_info_t *s = HYPERVISOR_shared_info;
     2.7 -    vcpu_info_t   *vcpu_info = &s->vcpu_data[cpu];
     2.8 +    vcpu_info_t   *vcpu_info = &s->vcpu_info[cpu];
     2.9  
    2.10      vcpu_info->evtchn_upcall_pending = 0;
    2.11      
    2.12 @@ -71,7 +71,7 @@ inline void mask_evtchn(u32 port)
    2.13  inline void unmask_evtchn(u32 port)
    2.14  {
    2.15      shared_info_t *s = HYPERVISOR_shared_info;
    2.16 -    vcpu_info_t *vcpu_info = &s->vcpu_data[smp_processor_id()];
    2.17 +    vcpu_info_t *vcpu_info = &s->vcpu_info[smp_processor_id()];
    2.18  
    2.19      synch_clear_bit(port, &s->evtchn_mask[0]);
    2.20  
     3.1 --- a/extras/mini-os/include/os.h	Tue Dec 06 15:52:51 2005 +0100
     3.2 +++ b/extras/mini-os/include/os.h	Tue Dec 06 16:05:31 2005 +0100
     3.3 @@ -70,7 +70,7 @@ void trap_init(void);
     3.4  #define __cli()								\
     3.5  do {									\
     3.6  	vcpu_info_t *_vcpu;						\
     3.7 -	_vcpu = &HYPERVISOR_shared_info->vcpu_data[smp_processor_id()];	\
     3.8 +	_vcpu = &HYPERVISOR_shared_info->vcpu_info[smp_processor_id()];	\
     3.9  	_vcpu->evtchn_upcall_mask = 1;					\
    3.10  	barrier();							\
    3.11  } while (0)
    3.12 @@ -79,7 +79,7 @@ do {									\
    3.13  do {									\
    3.14  	vcpu_info_t *_vcpu;						\
    3.15  	barrier();							\
    3.16 -	_vcpu = &HYPERVISOR_shared_info->vcpu_data[smp_processor_id()];	\
    3.17 +	_vcpu = &HYPERVISOR_shared_info->vcpu_info[smp_processor_id()];	\
    3.18  	_vcpu->evtchn_upcall_mask = 0;					\
    3.19  	barrier(); /* unmask then check (avoid races) */		\
    3.20  	if ( unlikely(_vcpu->evtchn_upcall_pending) )			\
    3.21 @@ -89,7 +89,7 @@ do {									\
    3.22  #define __save_flags(x)							\
    3.23  do {									\
    3.24  	vcpu_info_t *_vcpu;						\
    3.25 -	_vcpu = &HYPERVISOR_shared_info->vcpu_data[smp_processor_id()];	\
    3.26 +	_vcpu = &HYPERVISOR_shared_info->vcpu_info[smp_processor_id()];	\
    3.27  	(x) = _vcpu->evtchn_upcall_mask;				\
    3.28  } while (0)
    3.29  
    3.30 @@ -97,7 +97,7 @@ do {									\
    3.31  do {									\
    3.32  	vcpu_info_t *_vcpu;						\
    3.33  	barrier();							\
    3.34 -	_vcpu = &HYPERVISOR_shared_info->vcpu_data[smp_processor_id()];	\
    3.35 +	_vcpu = &HYPERVISOR_shared_info->vcpu_info[smp_processor_id()];	\
    3.36  	if ((_vcpu->evtchn_upcall_mask = (x)) == 0) {			\
    3.37  		barrier(); /* unmask then check (avoid races) */	\
    3.38  		if ( unlikely(_vcpu->evtchn_upcall_pending) )		\
    3.39 @@ -110,7 +110,7 @@ do {									\
    3.40  #define __save_and_cli(x)						\
    3.41  do {									\
    3.42  	vcpu_info_t *_vcpu;						\
    3.43 -	_vcpu = &HYPERVISOR_shared_info->vcpu_data[smp_processor_id()];	\
    3.44 +	_vcpu = &HYPERVISOR_shared_info->vcpu_info[smp_processor_id()];	\
    3.45  	(x) = _vcpu->evtchn_upcall_mask;				\
    3.46  	_vcpu->evtchn_upcall_mask = 1;					\
    3.47  	barrier();							\
    3.48 @@ -123,7 +123,7 @@ do {									\
    3.49  #define local_irq_enable()	__sti()
    3.50  
    3.51  #define irqs_disabled()			\
    3.52 -    HYPERVISOR_shared_info->vcpu_data[smp_processor_id()].evtchn_upcall_mask
    3.53 +    HYPERVISOR_shared_info->vcpu_info[smp_processor_id()].evtchn_upcall_mask
    3.54  
    3.55  /* This is a barrier for the compiler only, NOT the processor! */
    3.56  #define barrier() __asm__ __volatile__("": : :"memory")
     4.1 --- a/extras/mini-os/time.c	Tue Dec 06 15:52:51 2005 +0100
     4.2 +++ b/extras/mini-os/time.c	Tue Dec 06 16:05:31 2005 +0100
     4.3 @@ -73,7 +73,7 @@ static struct shadow_time_info shadow;
     4.4  
     4.5  static inline int time_values_up_to_date(void)
     4.6  {
     4.7 -	struct vcpu_time_info *src = &HYPERVISOR_shared_info->vcpu_time[0]; 
     4.8 +	struct vcpu_time_info *src = &HYPERVISOR_shared_info->vcpu_info[0].time; 
     4.9  
    4.10  	return (shadow.version == src->version);
    4.11  }
    4.12 @@ -127,7 +127,7 @@ static unsigned long get_nsec_offset(voi
    4.13  
    4.14  static void get_time_values_from_xen(void)
    4.15  {
    4.16 -	struct vcpu_time_info    *src = &HYPERVISOR_shared_info->vcpu_time[0];
    4.17 +	struct vcpu_time_info    *src = &HYPERVISOR_shared_info->vcpu_info[0].time;
    4.18  
    4.19   	do {
    4.20  		shadow.version = src->version;
     5.1 --- a/extras/mini-os/x86_32.S	Tue Dec 06 15:52:51 2005 +0100
     5.2 +++ b/extras/mini-os/x86_32.S	Tue Dec 06 16:05:31 2005 +0100
     5.3 @@ -3,7 +3,11 @@
     5.4  
     5.5  
     5.6  .section __xen_guest
     5.7 -        .asciz  "XEN_VER=3.0,LOADER=generic,PT_MODE_WRITABLE"
     5.8 +	.ascii	"GUEST_OS=Mini-OS"
     5.9 +	.ascii	",XEN_VER=xen-3.0"
    5.10 +	.ascii	",LOADER=generic"
    5.11 +	.ascii	",PT_MODE_WRITABLE"
    5.12 +	.byte	0
    5.13  .text
    5.14  
    5.15  .globl _start, shared_info