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

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



On Monday, 25.05.2020 at 17:59, Andrew Cooper wrote:
> On 25/05/2020 17:42, Jürgen Groß wrote:
> > 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.

Ah, I missed Jurgen's and your reply here.

LGDT loading only the bottom 32 bits of GDTR.base shouldn't matter.
Examining gdt_ptr some more:

    (gdb) set architecture i386
    The target architecture is assumed to be i386
    (gdb) x /xh 0x108040
    0x108040:   0x002f
    (gdb) x /xw 0x108042
    0x108042:   0x00108000
    (gdb) x /6xb 0x108040
    0x108040:   0x2f    0x00    0x00    0x80    0x10    0x00
    (gdb) x /8xb 0x108040
    0x108040:   0x2f    0x00    0x00    0x80    0x10    0x00    0x00    0x00

> Is there a less abridged version to look at?

https://github.com/mato/solo5/blob/xen/bindings/xen/boot.S

As I wrote in another reply, this boot.S is based off the virtio
(multiboot) boot.S, which has worked fine for years and should have the
same environment (32-bit flat protected mode).

-mato



 


Rackspace

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