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

Re: [Minios-devel] [UNIKRAFT PATCH 1/3] plat/kvm: cleanup - remove setup.h



Reviewed-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>

On 05.04.2018 17:21, Costin Lupu wrote:
Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
---
  plat/kvm/include/kvm/setup.h | 48 --------------------------------------------
  plat/kvm/x86/setup.c         | 10 ++++-----
  2 files changed, 5 insertions(+), 53 deletions(-)
  delete mode 100644 plat/kvm/include/kvm/setup.h

diff --git a/plat/kvm/include/kvm/setup.h b/plat/kvm/include/kvm/setup.h
deleted file mode 100644
index d664ee4..0000000
--- a/plat/kvm/include/kvm/setup.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* SPDX-License-Identifier: ISC */
-/*
- * Authors: Dan Williams
- *          Ricardo Koller
- *          Martin Lucina
- *          Wei Chen
- *          Felipe Huici <felipe.huici@xxxxxxxxx>
- *
- * Copyright (c) 2015-2017 IBM
- * Copyright (c) 2016-2017 Docker, Inc.
- * Copyright (c) 2017 ARM Ltd.
- * Copyright (c) 2017 NEC Europe Ltd., NEC Corporation
- *
- * Permission to use, copy, modify, and/or distribute this software
- * for any purpose with or without fee is hereby granted, provided
- * that the above copyright notice and this permission notice appear
- * in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
- * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
- * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
- * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include <inttypes.h>
-#include <uk/assert.h>
-#include <uk/essentials.h>
-
-/* alignment macros */
-#define ALIGN_4K __align(0x1000)
-#define ALIGN_64_BIT __align(0x8)
-
-/* convenient macro stringification */
-#define STR_EXPAND(y) #y
-#define STR(x) STR_EXPAND(x)
-
-#define assert(e) UK_ASSERT(e)
-#define PANIC(s) assert(e) //kludge!
-
-/* platform.c: platform includes */
-void platform_init(void *arg);
-char *platform_cmdline(void);
-uint64_t platform_mem_size(void);
-void platform_exit(void) __attribute__((noreturn));
diff --git a/plat/kvm/x86/setup.c b/plat/kvm/x86/setup.c
index 6895f29..96d80e9 100644
--- a/plat/kvm/x86/setup.c
+++ b/plat/kvm/x86/setup.c
@@ -27,12 +27,12 @@
   */
#include <string.h>
-#include <kvm/setup.h>
  #include <kvm/console.h>
  #include <kvm-x86/multiboot.h>
  #include <kvm-x86/multiboot_defs.h>
  #include <kvm-x86/cpu_x86_64.h>
  #include <uk/arch/limits.h>
+#include <uk/arch/types.h>
  #include <uk/plat/console.h>
  #include <uk/assert.h>
  #include <uk/essentials.h>
@@ -47,7 +47,7 @@ void *_libkvmplat_heap_start;
  void *_libkvmplat_stack_top;
  void *_libkvmplat_mem_end;
-extern void _libkvmplat_newstack(uint64_t stack_start, void (*tramp)(void *),
+extern void _libkvmplat_newstack(__u64 stack_start, void (*tramp)(void *),
                                void *arg);
static inline void _mb_get_cmdline(struct multiboot_info *mi, char *cmdline,
@@ -57,7 +57,7 @@ static inline void _mb_get_cmdline(struct multiboot_info *mi, 
char *cmdline,
        char *mi_cmdline;
if (mi->flags & MULTIBOOT_INFO_CMDLINE) {
-               mi_cmdline = (char *)(uint64_t)mi->cmdline;
+               mi_cmdline = (char *)(__u64)mi->cmdline;
                cmdline_len = strlen(mi_cmdline);
if (cmdline_len >= maxlen) {
@@ -87,7 +87,7 @@ static inline void _mb_init_mem(struct multiboot_info *mi)
         */
        for (offset = 0; offset < mi->mmap_length;
             offset += m->size + sizeof(m->size)) {
-               m = (void *)(uintptr_t)(mi->mmap_addr + offset);
+               m = (void *)(__uptr)(mi->mmap_addr + offset);
                if (m->addr == PLATFORM_MEM_START
                    && m->type == MULTIBOOT_MEMORY_AVAILABLE) {
                        break;
@@ -154,6 +154,6 @@ void _libkvmplat_entry(void *arg)
         */
        uk_printd(DLVL_INFO, "Switch from bootstrap stack to stack @%p\n",
                                _libkvmplat_mem_end);
-       _libkvmplat_newstack((uint64_t) _libkvmplat_mem_end,
+       _libkvmplat_newstack((__u64) _libkvmplat_mem_end,
                                _libkvmplat_entry2, 0);
  }


_______________________________________________
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®.