Skip to content

Commit

Permalink
solo5-kernel-ukvm: patch to avoid #include <asm/msr-index.h>, no long…
Browse files Browse the repository at this point in the history
…er shipped with linux-libc-dev (by @mato)
  • Loading branch information
hannesm committed Oct 5, 2017
1 parent b0ae925 commit dfaa746
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- a/ukvm/ukvm-core.c
+++ b/ukvm/ukvm-core.c
@@ -36,7 +36,6 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <linux/const.h>
-#include <asm/msr-index.h>
#include <elf.h>
#include <errno.h>
#include <assert.h>
--- a/ukvm/ukvm-cpu.h
+++ b/ukvm/ukvm-cpu.h
@@ -133,4 +133,7 @@ struct _kvm_segment {
seg.avl = GDT_GET_AVL(gdt_ent); \
} while (0)

+#define EFER_LME_BIT 8 /* Long mode enable (R/W) */
+#define EFER_LME _BITUL(EFER_LME_BIT)
+
#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- a/ukvm/ukvm-configure.old 2017-10-03 16:48:43.791431000 +0100
+++ b/ukvm/ukvm-configure 2017-10-03 16:49:10.818253000 +0100
--- a/ukvm/ukvm-configure
+++ b/ukvm/ukvm-configure
@@ -40,7 +40,7 @@

UKVM_CC?=cc
Expand All @@ -9,8 +9,8 @@
UKVM_OBJS=_build-ukvm/ukvm-core.o \$(UKVM_MODULE_OBJS)
ifdef UKVM_STATIC
UKVM_LDFLAGS=-static
--- a/Makefile.common.old 2017-10-03 16:48:50.438800000 +0100
+++ b/Makefile.common 2017-10-03 16:49:18.165099000 +0100
--- a/Makefile.common
+++ b/Makefile.common
@@ -32,4 +32,4 @@
# Likewise.
LDFLAGS=-nostdlib -z max-page-size=0x1000 -static
Expand Down
2 changes: 1 addition & 1 deletion packages/solo5-kernel-ukvm/solo5-kernel-ukvm.0.2.2-1/opam
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ depexts: [
]
conflicts: "solo5-kernel-virtio"
available: [ocaml-version >= "4.02.3" & arch = "x86_64" & os = "linux"]
patches: [ "solo5-no-werror.diff" ]
patches: [ "solo5-no-werror.diff" ; "solo5-no-asm-msr-index.diff" ]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- a/ukvm/ukvm-configure.old 2017-10-03 16:48:43.791431000 +0100
+++ b/ukvm/ukvm-configure 2017-10-03 16:49:10.818253000 +0100
--- a/ukvm/ukvm-configure
+++ b/ukvm/ukvm-configure
@@ -40,7 +40,7 @@

UKVM_CC?=cc
Expand All @@ -9,8 +9,8 @@
UKVM_OBJS=_build-ukvm/ukvm-core.o \$(UKVM_MODULE_OBJS)
ifdef UKVM_STATIC
UKVM_LDFLAGS=-static
--- a/Makefile.common.old 2017-10-03 16:48:50.438800000 +0100
+++ b/Makefile.common 2017-10-03 16:49:18.165099000 +0100
--- a/Makefile.common
+++ b/Makefile.common
@@ -32,4 +32,4 @@
# Likewise.
LDFLAGS=-nostdlib -z max-page-size=0x1000 -static
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ available: [
ocaml-version >= "4.02.3" & (arch = "x86_64" | arch = "amd64") &
os != "darwin"
]
patches: [ "solo5-no-werror.diff" ]
patches: [ "solo5-no-werror.diff" ]

0 comments on commit dfaa746

Please sign in to comment.