[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCH 6/9] plat/kvm: streamline Firecracker early boot
This patch looks good. Reviewed-by: Haibo Xu <haibo.xu@xxxxxxx> On 2019/6/3 22:56, Florian Schmidt wrote: > There are several pieces in the early boot code that are unnecessary > when building for Firecracker: namely, the multiboot header is not > required; and the 32-bit setup which forms the very earliest steps of > the boot process can be skipped because Firecracker drops us off in long > mode. However, move the page table setup code into the 64-bit part to > make sure that it is executed. > > Signed-off-by: Florian Schmidt <florian.schmidt@xxxxxxxxx> > --- > plat/kvm/x86/entry64.S | 23 ++++++++++++++--------- > 1 file changed, 14 insertions(+), 9 deletions(-) > > diff --git a/plat/kvm/x86/entry64.S b/plat/kvm/x86/entry64.S > index 274ab0b3..186f6ce4 100644 > --- a/plat/kvm/x86/entry64.S > +++ b/plat/kvm/x86/entry64.S > @@ -27,6 +27,7 @@ > * SUCH DAMAGE. > */ > > +#include <uk/config.h> > #include <x86/cpu_defs.h> > #include <kvm-x86/traps.h> > #include <kvm-x86/multiboot_defs.h> > @@ -37,6 +38,7 @@ > #define MYMULTIBOOT_FLAGS \ > (MULTIBOOT_PAGE_ALIGN | MULTIBOOT_MEMORY_INFO | MULTIBOOT_AOUT_KLUDGE) > > +#if KVMQPLAT > .section .data.boot > > .align 4 > @@ -50,11 +52,13 @@ _multiboot_header: > .long _end /* bss end addr */ > .long _libkvmplat_start32 /* entry addr */ > > +#endif > .section .bss > > .space 4096 > bootstack: > > +#if KVMQPLAT > /* > * Bootloader entry point. > * > @@ -90,15 +94,6 @@ ENTRY(_libkvmplat_start32) > orl $X86_EFER_LME, %eax > wrmsr > > - /* 3: load pml4 pointer */ > - movl $cpu_pml4, %eax > - movl %eax, %cr3 > - > - /* 4: enable paging */ > - movl %cr0, %eax > - orl $X86_CR0_PG, %eax > - movl %eax, %cr0 > - > jmp _libkvmplat_start64 > > /* NOTREACHED */ > @@ -111,6 +106,7 @@ haltme: > hlt > jmp haltme > END(_libkvmplat_start32) > +#endif > > /* > * amd64 programmer's manual: > @@ -149,6 +145,15 @@ mxcsr_ptr: > .section .text.boot > > ENTRY(_libkvmplat_start64) > + /* load pml4 pointer */ > + movq $cpu_pml4, %rax > + movq %rax, %cr3 > + > + /* enable paging */ > + movq %cr0, %rax > + orl $X86_CR0_PG, %eax > + movq %rax, %cr0 > + > /* set up the boot stack */ > movq $bootstack, %rsp > xorq %rbp, %rbp > IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |