diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile
index d510c32fccd0..f6db03a3358b 100644
--- a/usr.sbin/bhyve/Makefile
+++ b/usr.sbin/bhyve/Makefile
@@ -1,129 +1,128 @@
 #
 #
 
 .include <src.opts.mk>
 
 PROG=	bhyve
 PACKAGE=	bhyve
 
 MAN=	bhyve.8 bhyve_config.5
 
 BHYVE_SYSDIR?=${SRCTOP}
 
 .PATH:	${.CURDIR}/${MACHINE_CPUARCH}	\
 	${SRCTOP}/sys/libkern		\
 	${SRCTOP}/sys/cam/ctl
 
 SRCS=	\
 	acpi.c			\
 	acpi_device.c		\
 	audio.c			\
 	basl.c			\
 	bhyvegc.c		\
 	bhyverun.c		\
 	block_if.c		\
 	bootrom.c		\
 	config.c		\
 	console.c		\
 	crc16.c			\
 	ctl_scsi_all.c		\
 	ctl_util.c		\
 	gdb.c			\
 	hda_codec.c		\
 	inout.c			\
 	ioapic.c		\
 	iov.c			\
 	mem.c			\
 	mevent.c		\
 	net_backends.c		\
 	net_utils.c		\
 	pci_ahci.c		\
 	pci_e82545.c		\
 	pci_emul.c		\
 	pci_fbuf.c		\
 	pci_hda.c		\
 	pci_hostbridge.c	\
 	pci_irq.c		\
 	pci_lpc.c		\
 	pci_nvme.c		\
 	pci_passthru.c		\
 	pci_uart.c		\
 	pci_virtio_9p.c		\
 	pci_virtio_block.c	\
 	pci_virtio_console.c	\
 	pci_virtio_input.c	\
 	pci_virtio_net.c	\
 	pci_virtio_rnd.c	\
 	pci_virtio_scsi.c	\
 	pci_xhci.c		\
 	pctestdev.c		\
 	qemu_fwcfg.c		\
 	qemu_loader.c		\
 	rfb.c			\
 	smbiostbl.c		\
 	sockstream.c		\
-	spinup_ap.c		\
 	tpm_device.c		\
 	tpm_emul_passthru.c	\
 	tpm_intf_crb.c		\
 	tpm_ppi_qemu.c		\
 	uart_emul.c		\
 	usb_emul.c		\
 	usb_mouse.c		\
 	vga.c			\
 	virtio.c		\
 	vmexit.c		\
 	vmgenc.c
 
 .if ${MK_BHYVE_SNAPSHOT} != "no"
 SRCS+=	snapshot.c
 .endif
 
 .include "${MACHINE_CPUARCH}/Makefile.inc"
 
 CFLAGS+=-I${.CURDIR}		\
 	-I${.CURDIR}/../../contrib/lib9p \
 	-I${SRCTOP}/sys
 
 LIBADD=	vmmapi md nv pthread z util sbuf cam 9p
 
 .if ${MK_BHYVE_SNAPSHOT} != "no"
 LIBADD+= ucl xo
 .endif
 
 .if ${MK_INET_SUPPORT} != "no"
 CFLAGS+=-DINET
 .endif
 .if ${MK_INET6_SUPPORT} != "no"
 CFLAGS+=-DINET6
 .endif
 .if ${MK_NETGRAPH_SUPPORT} != "no"
 CFLAGS+=-DNETGRAPH
 LIBADD+=    netgraph
 .endif
 .if ${MK_OPENSSL} == "no"
 CFLAGS+=-DNO_OPENSSL
 .else
 LIBADD+=	crypto
 CFLAGS+=-DOPENSSL_API_COMPAT=0x10100000L
 .endif
 
 CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/e1000
 CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/mii
 CFLAGS+= -I${BHYVE_SYSDIR}/sys/dev/usb/controller
 .if ${MK_BHYVE_SNAPSHOT} != "no"
 CFLAGS+= -I${SRCTOP}/contrib/libucl/include
 CFLAGS+= -DBHYVE_SNAPSHOT
 .endif
 
 .ifdef GDB_LOG
 CFLAGS+=-DGDB_LOG
 .endif
 
 # Disable thread safety analysis since it only finds very simple bugs and
 # yields many false positives.
 NO_WTHREAD_SAFETY=
 
 NO_WCAST_ALIGN=
 
 .include <bsd.prog.mk>
diff --git a/usr.sbin/bhyve/amd64/Makefile.inc b/usr.sbin/bhyve/amd64/Makefile.inc
index 5caecb35a620..824f12861923 100644
--- a/usr.sbin/bhyve/amd64/Makefile.inc
+++ b/usr.sbin/bhyve/amd64/Makefile.inc
@@ -1,21 +1,22 @@
 SRCS+=	\
 	atkbdc.c	\
 	e820.c		\
 	fwctl.c		\
 	kernemu_dev.c	\
 	mptbl.c		\
 	pci_gvt-d.c	\
 	pm.c		\
 	post.c		\
 	ps2kbd.c	\
 	ps2mouse.c	\
 	rtc.c		\
+	spinup_ap.c	\
 	task_switch.c	\
 	xmsr.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/spinup_ap.c b/usr.sbin/bhyve/amd64/spinup_ap.c
similarity index 100%
rename from usr.sbin/bhyve/spinup_ap.c
rename to usr.sbin/bhyve/amd64/spinup_ap.c
diff --git a/usr.sbin/bhyve/spinup_ap.h b/usr.sbin/bhyve/amd64/spinup_ap.h
similarity index 100%
rename from usr.sbin/bhyve/spinup_ap.h
rename to usr.sbin/bhyve/amd64/spinup_ap.h