git: a1642451ce25 - main - bhyve: Move kernemu to amd64/
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 04 Oct 2023 16:53:58 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=a1642451ce25bb0e2d01765a8dedda69c5029d48
commit a1642451ce25bb0e2d01765a8dedda69c5029d48
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-10-04 16:22:41 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-10-04 16:53:16 +0000
bhyve: Move kernemu to amd64/
This code handles instruction emulation for accesses to various
amd64-specific MMIO regions.
No functional change intended.
Reviewed by: corvink, jhb, emaste
MFC after: 1 week
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D40554
---
usr.sbin/bhyve/Makefile | 3 ---
usr.sbin/bhyve/amd64/Makefile.inc | 4 +++-
usr.sbin/bhyve/{ => amd64}/kernemu_dev.c | 0
usr.sbin/bhyve/{ => amd64}/kernemu_dev.h | 0
usr.sbin/bhyve/bhyverun.c | 6 +++++-
5 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile
index 499c0d1bb89d..c2ccd60790ae 100644
--- a/usr.sbin/bhyve/Makefile
+++ b/usr.sbin/bhyve/Makefile
@@ -33,7 +33,6 @@ SRCS= \
inout.c \
ioapic.c \
iov.c \
- kernemu_dev.c \
mem.c \
mevent.c \
net_backends.c \
@@ -85,8 +84,6 @@ SRCS+= snapshot.c
.include "${MACHINE_CPUARCH}/Makefile.inc"
-CFLAGS.kernemu_dev.c+= -I${SRCTOP}/sys/amd64
-
CFLAGS+=-I${.CURDIR} \
-I${.CURDIR}/../../contrib/lib9p \
-I${SRCTOP}/sys
diff --git a/usr.sbin/bhyve/amd64/Makefile.inc b/usr.sbin/bhyve/amd64/Makefile.inc
index e0cb84e32b85..6843cec4919f 100644
--- a/usr.sbin/bhyve/amd64/Makefile.inc
+++ b/usr.sbin/bhyve/amd64/Makefile.inc
@@ -2,14 +2,16 @@ SRCS+= \
atkbdc.c \
e820.c \
fwctl.c \
+ kernemu_dev.c \
mptbl.c \
post.c \
ps2kbd.c \
ps2mouse.c \
task_switch.c
-
.PATH: ${BHYVE_SYSDIR}/sys/amd64/vmm
SRCS+= vmm_instruction_emul.c
+CFLAGS.kernemu_dev.c+= -I${SRCTOP}/sys/amd64
+
SUBDIR+= kbdlayout
diff --git a/usr.sbin/bhyve/kernemu_dev.c b/usr.sbin/bhyve/amd64/kernemu_dev.c
similarity index 100%
rename from usr.sbin/bhyve/kernemu_dev.c
rename to usr.sbin/bhyve/amd64/kernemu_dev.c
diff --git a/usr.sbin/bhyve/kernemu_dev.h b/usr.sbin/bhyve/amd64/kernemu_dev.h
similarity index 100%
rename from usr.sbin/bhyve/kernemu_dev.h
rename to usr.sbin/bhyve/amd64/kernemu_dev.h
diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c
index 7672c577da66..df40c7a7cc2a 100644
--- a/usr.sbin/bhyve/bhyverun.c
+++ b/usr.sbin/bhyve/bhyverun.c
@@ -95,7 +95,9 @@
#endif
#include "gdb.h"
#include "ioapic.h"
-#include "kernemu_dev.h"
+#ifdef __amd64__
+#include "amd64/kernemu_dev.h"
+#endif
#include "mem.h"
#include "mevent.h"
#ifdef __amd64__
@@ -1457,7 +1459,9 @@ main(int argc, char *argv[])
init_mem(guest_ncpus);
init_inout();
+#ifdef __amd64__
kernemu_dev_init();
+#endif
init_bootrom(ctx);
#ifdef __amd64__
atkbdc_init(ctx);