Skip to contentSkip to conversation

hax: Support for Linux hosts

PATCH New Alexandro Sanchez Bach 1 participant 1 message Nov 8, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hax: Support for Linux hosts

---
 target/i386/Makefile.objs                 |  5 ++++-
 target/i386/hax-i386.h                    | 10 +++++++++-
 target/i386/{hax-darwin.c => hax-posix.c} |  0
 target/i386/{hax-darwin.h => hax-posix.h} |  0
 4 files changed, 13 insertions(+), 2 deletions(-)
 rename target/i386/{hax-darwin.c => hax-posix.c} (100%)
 rename target/i386/{hax-darwin.h => hax-posix.h} (100%)
target/i386/Makefile.objs +4 -1
index 04678f5503..be36d31d23 100644
@@ -12,8 +12,11 @@ obj-$(call lnot,$(CONFIG_SEV)) += sev-stub.o
 ifdef CONFIG_WIN32
 obj-$(CONFIG_HAX) += hax-all.o hax-mem.o hax-windows.o
 endif
+ifdef CONFIG_LINUX
+obj-$(CONFIG_HAX) += hax-all.o hax-mem.o hax-posix.o
+endif
 ifdef CONFIG_DARWIN
-obj-$(CONFIG_HAX) += hax-all.o hax-mem.o hax-darwin.o
+obj-$(CONFIG_HAX) += hax-all.o hax-mem.o hax-posix.o
 obj-$(CONFIG_HVF) += hvf/
 endif
 obj-$(CONFIG_WHPX) += whpx-all.o
target/i386/hax-i386.h +9 -1
index 6abc156f88..f87a64c9df 100644
@@ -20,6 +20,10 @@
 typedef int hax_fd;
 #endif
 
+#ifdef CONFIG_LINUX
+typedef int hax_fd;
+#endif
+
 #ifdef CONFIG_WIN32
 typedef HANDLE hax_fd;
 #endif
@@ -83,7 +87,11 @@ void hax_memory_init(void);
 
 
 #ifdef CONFIG_DARWIN
-#include "target/i386/hax-darwin.h"
+#include "target/i386/hax-posix.h"
+#endif
+
+#ifdef CONFIG_LINUX
+#include "target/i386/hax-posix.h"
 #endif
 
 #ifdef CONFIG_WIN32
target/i386/hax-posix.c renamed from target/i386/hax-darwin.c +0 -0
similarity index 100%
rename from target/i386/hax-darwin.c
rename to target/i386/hax-posix.c
target/i386/hax-posix.h renamed from target/i386/hax-darwin.h +0 -0
similarity index 100%
rename from target/i386/hax-darwin.h
rename to target/i386/hax-posix.h
Signature · 1 line
2.19.1