Fixed compilation of the Mini-OS
PATCH 1/1 Fixed compilation of the Mini-OS
Hello list!
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.
Signature · 1 line
// Simon
extras/mini-os/events.c +1 -0
@@ -77,6 +77,7 @@/* Try to bind the virq to a port */ op.cmd = EVTCHNOP_bind_virq; op.u.bind_virq.virq = virq; + op.u.bind_virq.vcpu =smp_processor_id ();if (HYPERVISOR_event_channel_op (&op) !=0 ) {
extras/mini-os/hypervisor.c +2 -2
@@ -39,7 +39,7 @@unsigned int l1i, l2i, port;int cpu =0 ;shared_info_t *s = HYPERVISOR_shared_info; -vcpu_info_t *vcpu_info = &s->vcpu_data[cpu]; +vcpu_info_t *vcpu_info = &s->vcpu_info[cpu]; vcpu_info->evtchn_upcall_pending =0 ;
@@ -71,7 +71,7 @@inline void unmask_evtchn (u32 port) {shared_info_t *s = HYPERVISOR_shared_info; -vcpu_info_t *vcpu_info = &s->vcpu_data[smp_processor_id ()]; +vcpu_info_t *vcpu_info = &s->vcpu_info[smp_processor_id ()];synch_clear_bit (port, &s->evtchn_mask[0 ]);
extras/mini-os/include/os.h +6 -6
@@ -70,7 +70,7 @@#define __cli () \ do { \ vcpu_info_t *_vcpu; \ - _vcpu = &HYPERVISOR_shared_info->vcpu_data[smp_processor_id()]; \ + _vcpu = &HYPERVISOR_shared_info->vcpu_info[smp_processor_id()]; \ _vcpu->evtchn_upcall_mask = 1; \ barrier(); \ } while (0)
@@ -79,7 +79,7 @@ do { \ vcpu_info_t *_vcpu; \ barrier(); \ - _vcpu = &HYPERVISOR_shared_info->vcpu_data[smp_processor_id()]; \ + _vcpu = &HYPERVISOR_shared_info->vcpu_info[smp_processor_id()]; \ _vcpu->evtchn_upcall_mask = 0; \ barrier(); /* unmask then check (avoid races) */ \ if ( unlikely(_vcpu->evtchn_upcall_pending) ) \
@@ -89,7 +89,7 @@#define __save_flags (x) \ do { \ vcpu_info_t *_vcpu; \ - _vcpu = &HYPERVISOR_shared_info->vcpu_data[smp_processor_id()]; \ + _vcpu = &HYPERVISOR_shared_info->vcpu_info[smp_processor_id()]; \ (x) = _vcpu->evtchn_upcall_mask; \ } while (0)
@@ -97,7 +97,7 @@ do { \ vcpu_info_t *_vcpu; \ barrier(); \ - _vcpu = &HYPERVISOR_shared_info->vcpu_data[smp_processor_id()]; \ + _vcpu = &HYPERVISOR_shared_info->vcpu_info[smp_processor_id()]; \ if ((_vcpu->evtchn_upcall_mask = (x)) == 0) { \ barrier(); /* unmask then check (avoid races) */ \ if ( unlikely(_vcpu->evtchn_upcall_pending) ) \
@@ -110,7 +110,7 @@#define __save_and_cli (x) \ do { \ vcpu_info_t *_vcpu; \ - _vcpu = &HYPERVISOR_shared_info->vcpu_data[smp_processor_id()]; \ + _vcpu = &HYPERVISOR_shared_info->vcpu_info[smp_processor_id()]; \ (x) = _vcpu->evtchn_upcall_mask; \ _vcpu->evtchn_upcall_mask = 1; \ barrier(); \
@@ -123,7 +123,7 @@#define local_irq_enable () __sti()#define irqs_disabled () \ - HYPERVISOR_shared_info->vcpu_data[smp_processor_id()].evtchn_upcall_mask + HYPERVISOR_shared_info->vcpu_info[smp_processor_id()].evtchn_upcall_mask/* This is a barrier for the compiler only, NOT the processor! */ #define barrier () __asm__ __volatile__("": : :"memory")
extras/mini-os/time.c +2 -2
@@ -73,7 +73,7 @@static inline int time_values_up_to_date (void ) { -struct vcpu_time_info *src = &HYPERVISOR_shared_info->vcpu_time[0 ]; +struct vcpu_time_info *src = &HYPERVISOR_shared_info->vcpu_info[0 ].time;return (shadow.version == src->version); }
@@ -127,7 +127,7 @@static void get_time_values_from_xen (void ) { -struct vcpu_time_info *src = &HYPERVISOR_shared_info->vcpu_time[0 ]; +struct vcpu_time_info *src = &HYPERVISOR_shared_info->vcpu_info[0 ].time; do { shadow.version = src->version;
extras/mini-os/x86_32.S +5 -1
@@ -3,7 +3,11 @@ .section __xen_guest - .asciz "XEN_VER=3.0,LOADER=generic,PT_MODE_WRITABLE" + .ascii "GUEST_OS=Mini-OS" + .ascii ",XEN_VER=xen-3.0" + .ascii ",LOADER=generic" + .ascii ",PT_MODE_WRITABLE" + .byte 0 .text .globl _start, shared_info
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel