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

Re: [Xen-devel] [PATCH ARM v5 17/20] mini-os: headers for ARM



On 26 June 2014 17:26, Julien Grall <julien.grall@xxxxxxxxxx> wrote:
> Hi Thomas,
>
> On 06/26/2014 12:28 PM, Thomas Leonard wrote:
>> diff --git a/extras/mini-os/include/arm/hypercall-arm.h 
>> b/extras/mini-os/include/arm/hypercall-arm.h
>> new file mode 100644
>> index 0000000..6d862ff
>> --- /dev/null
>> +++ b/extras/mini-os/include/arm/hypercall-arm.h
>> +#ifndef __HYPERCALL_ARM_H__
>> +#define __HYPERCALL_ARM_H__
>> +
>> +#include <xen/xen.h>
>> +#include <xen/sched.h>
>> +#include <xen/xsm/flask_op.h>
>> +#include <mini-os/mm.h>
>
> Does all those includes relevant for hypercall-arm?

Removing any line except xen.h makes Mini-OS not compile.

hypercall-arm.h is normally included via hypervisor.h, which includes
xen.h itself, so that's perhaps not necessary, but it doesn't do any
harm.

Note that the x86 versions have the same include. There are a couple
of places where I've included other files in the ARM version of an
include just because the corresponding x86 file had it. Otherwise,
code that compiles on x86 may fail on ARM.

>> diff --git a/extras/mini-os/include/arm/os.h 
>> b/extras/mini-os/include/arm/os.h
>> new file mode 100644
>> index 0000000..bde8796
>> --- /dev/null
>> +++ b/extras/mini-os/include/arm/os.h
>
> [..]
>
>> +#define BUG() while(1){}
>
> It looks odd to use onely while (1). Shouldn't you call do_exit as x86 does?

Note that patch #20 changes this to dump the registers and stack.

[ also, exiting on BUG is annoying because you may lose the console
output if the VM dies before xl attaches to it. ]


-- 
Dr Thomas Leonard        http://0install.net/
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1
GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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