diff options
author | Mark Johnston <markj@FreeBSD.org> | 2023-10-04 16:23:22 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2023-10-11 13:21:58 +0000 |
commit | 3f23b202e199a0a0d823ac2bbe835f2afde386c8 (patch) | |
tree | bdb8fdfb54fbdbd0775cb62e39abebd805c442a8 | |
parent | f22dc6dca625588985af6f239f4b43f0820e37e4 (diff) | |
download | src-3f23b202e199a0a0d823ac2bbe835f2afde386c8.tar.gz src-3f23b202e199a0a0d823ac2bbe835f2afde386c8.zip |
bhyve: Move MSR emulation into amd64/
No functional change intended.
Reviewed by: corvink, jhb
MFC after: 1 week
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D40733
(cherry picked from commit 548b11228f7a83785dcf6c4c8b0bbfed0284d794)
-rw-r--r-- | usr.sbin/bhyve/Makefile | 3 | ||||
-rw-r--r-- | usr.sbin/bhyve/amd64/Makefile.inc | 3 | ||||
-rw-r--r-- | usr.sbin/bhyve/amd64/xmsr.c (renamed from usr.sbin/bhyve/xmsr.c) | 0 | ||||
-rw-r--r-- | usr.sbin/bhyve/amd64/xmsr.h (renamed from usr.sbin/bhyve/xmsr.h) | 0 | ||||
-rw-r--r-- | usr.sbin/bhyve/bhyverun.c | 6 |
5 files changed, 8 insertions, 4 deletions
diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index 5f13d457d914..30ecf56ae748 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -76,8 +76,7 @@ SRCS= \ vga.c \ virtio.c \ vmexit.c \ - vmgenc.c \ - xmsr.c + vmgenc.c .if ${MK_BHYVE_SNAPSHOT} != "no" SRCS+= snapshot.c diff --git a/usr.sbin/bhyve/amd64/Makefile.inc b/usr.sbin/bhyve/amd64/Makefile.inc index 6843cec4919f..d655708210ce 100644 --- a/usr.sbin/bhyve/amd64/Makefile.inc +++ b/usr.sbin/bhyve/amd64/Makefile.inc @@ -7,7 +7,8 @@ SRCS+= \ post.c \ ps2kbd.c \ ps2mouse.c \ - task_switch.c + task_switch.c \ + xmsr.c .PATH: ${BHYVE_SYSDIR}/sys/amd64/vmm SRCS+= vmm_instruction_emul.c diff --git a/usr.sbin/bhyve/xmsr.c b/usr.sbin/bhyve/amd64/xmsr.c index 99e758e84fff..99e758e84fff 100644 --- a/usr.sbin/bhyve/xmsr.c +++ b/usr.sbin/bhyve/amd64/xmsr.c diff --git a/usr.sbin/bhyve/xmsr.h b/usr.sbin/bhyve/amd64/xmsr.h index e0b3492559d5..e0b3492559d5 100644 --- a/usr.sbin/bhyve/xmsr.h +++ b/usr.sbin/bhyve/amd64/xmsr.h diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index 31fda7028569..005acec77a93 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -106,7 +106,9 @@ #include "rtc.h" #include "vmgenc.h" #include "vmexit.h" -#include "xmsr.h" +#ifdef __amd64__ +#include "amd64/xmsr.h" +#endif #define MB (1024UL * 1024) #define GB (1024UL * MB) @@ -1011,11 +1013,13 @@ main(int argc, char *argv[]) exit(4); } +#ifdef __amd64__ error = init_msr(); if (error) { fprintf(stderr, "init_msr error %d", error); exit(4); } +#endif init_mem(guest_ncpus); init_inout(); |