Commit e182eb9d authored by kaf24's avatar kaf24

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: default avatarSimon Kagstrom <simon.kagstrom@bth.se>
parent d11992ae
......@@ -77,6 +77,7 @@ int bind_virq( u32 virq, void (*handler)(int, struct pt_regs *) )
/* 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 )
{
......
......@@ -39,7 +39,7 @@ void do_hypervisor_callback(struct pt_regs *regs)
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 mask_evtchn(u32 port)
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]);
......
......@@ -70,7 +70,7 @@ void trap_init(void);
#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 { \
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 @@ do { \
#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 { \
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 @@ do { \
#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 @@ do { \
#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")
......
......@@ -73,7 +73,7 @@ static struct shadow_time_info shadow;
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 unsigned long get_nsec_offset(void)
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;
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment