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

[Xen-changelog] The Mini-OS build once again broke, this time since vcpu_data became vcpu_info



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 198828cc103b78c75da6a3a083d2d633c85df39b
# Parent  002a8b5c98bbabd7a459b980f87b4a93b5c8f8bd
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@xxxxxx>

diff -r 002a8b5c98bb -r 198828cc103b extras/mini-os/events.c
--- a/extras/mini-os/events.c   Tue Dec  6 14:52:51 2005
+++ b/extras/mini-os/events.c   Tue Dec  6 15:05:31 2005
@@ -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 )
        {
diff -r 002a8b5c98bb -r 198828cc103b extras/mini-os/hypervisor.c
--- a/extras/mini-os/hypervisor.c       Tue Dec  6 14:52:51 2005
+++ b/extras/mini-os/hypervisor.c       Tue Dec  6 15:05:31 2005
@@ -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]);
 
diff -r 002a8b5c98bb -r 198828cc103b extras/mini-os/include/os.h
--- a/extras/mini-os/include/os.h       Tue Dec  6 14:52:51 2005
+++ b/extras/mini-os/include/os.h       Tue Dec  6 15:05:31 2005
@@ -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")
diff -r 002a8b5c98bb -r 198828cc103b extras/mini-os/time.c
--- a/extras/mini-os/time.c     Tue Dec  6 14:52:51 2005
+++ b/extras/mini-os/time.c     Tue Dec  6 15:05:31 2005
@@ -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;
diff -r 002a8b5c98bb -r 198828cc103b extras/mini-os/x86_32.S
--- a/extras/mini-os/x86_32.S   Tue Dec  6 14:52:51 2005
+++ b/extras/mini-os/x86_32.S   Tue Dec  6 15:05:31 2005
@@ -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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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