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

Re: Xen PVH domU start-of-day VCPU state



On 25/05/2020 17:42, Jürgen Groß wrote:
> On 25.05.20 18:04, Martin Lucina wrote:
>> Hi,
>>
>> I'm trying to bootstrap a new PVH-only Xen domU OS "from scratch", to
>> replace our existing use of Mini-OS for the early boot/low-level support
>> layer in MirageOS. I've done this by creating new Xen bindings for Solo5
>> [1], basing them on our existing virtio code [2].
>>
>> Unfortunately, I can't seem to get past the first few instructions on
>> VCPU
>> boot. Here's what I have at the moment (abridged):
>>
>>      .section .note.solo5.xen
>>
>>              .align  4
>>              .long   4
>>              .long   4
>>              .long   XEN_ELFNOTE_PHYS32_ENTRY
>>              .ascii "Xen\0"
>>              .long   _start32
>>
>>      /* ... */
>>
>>      .code32
>>
>>      ENTRY(_start32)
>>              cld
>>
>>              lgdt (gdt64_ptr)
>>              ljmp $0x10, $1f
>
> You need to setup virtual addressing and enable 64 bit mode before using
> 64-bit GDT.
>
> See Mini-OS source arch/x86/x86_hvm.S

Or
https://xenbits.xen.org/gitweb/?p=people/andrewcoop/xen-test-framework.git;a=blob;f=arch/x86/hvm/head.S;h=f7dc72b58ab9ec68538f0087969ab6f72d181d80;hb=HEAD

But yes - Juergen is correct.  Until you have enabled long mode, lgdt
will only load the bottom 32 bits of GDTR.base.

Is there a less abridged version to look at?

~Andrew



 


Rackspace

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