[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


  • To: "minios-devel@xxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxx>
  • From: "Haibo Xu (Arm Technology China)" <Haibo.Xu@xxxxxxx>
  • Date: Mon, 14 Oct 2019 08:05:00 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BkZ8V7NwXfXFR6TCI/zqL6FtNjSoaWP+LNxKpR7lH6Y=; b=fgPiJIX6NumXEo3NQxlWG4/64h2qI5Jqy0jMJdeSAmQy7grpoP3LLPjvLXDW7D5Zfx1EMZfYIoD3f/6srPSIwmqSDn6QgShxVleBZ+3nHqMSTYTycvx/yndLNun/OFT1+diBeUlPWkkZpE0VB2B6Gpy3PPjxscAAiUytAwTbBBt5kpfW5xFCPR+jCF0HKRUjiZGMwQmvehg9aEe+3hmX/sTN3745gkWtZmu0mdRU6uknMnabyVsTB22Es51YbpFn9UiXUwYuohMEFf1AsAPUb+fK+Jetq1uOn0WVGfOabl3pxljuQzgcTqaNN/k7ZgIEMi3T8phf5PtKfCo0aWCizA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NchzoHaPg5LNmGgQ2h4LFA4wmPOkdcgu0yrBpBMhAxBsHAEatA/+2qPFeARz1xXxNbOuenBfcdcM6DcOc5Rsj7B3ru84aiR0GGb4Gtmbpab65wTk7PCQsGffn1DAvoWCCuGAzPL3O5JCS9ws3mDkgUHTimp+CPTBzSsJSuWMfmSB/kY2TLAgt/4Dea5/bCG5hG43n8kuZ/I5ma7pDrUgyDEKtHeE/k0bIsBc3tz0nMkLrqzhzOnTFptphfEX4q0KaYmD78W4t3XP21yWu+YtJtx6lriWjEAHopI2DgdwPbP/zxSNNTVBkD0WLHI/iuBKvSjbNdTazCKvkYNYB/KXkA==
  • Authentication-results: spf=temperror (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; lists.xen.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;lists.xen.org; dmarc=none action=none header.from=arm.com;
  • Authentication-results-original: spf=none (sender IP is ) smtp.mailfrom=Haibo.Xu@xxxxxxx;
  • Cc: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
  • Delivery-date: Mon, 14 Oct 2019 08:05:17 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Original-authentication-results: spf=none (sender IP is ) smtp.mailfrom=Haibo.Xu@xxxxxxx;
  • Thread-index: AQHVgmYTaNKu4kpYvUGfrmar1O/+ow==
  • Thread-topic: [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

 


Rackspace

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