HomeFreeBSD

bhyve: Start moving machine-dependent code into subdirectories

Description

bhyve: Start moving machine-dependent code into subdirectories

In preparation for an arm64 port, make an easy change which puts some
machine-dependent code in its own directory.

Going forward, code which is only used on one platform should live in a
MD directory. We should strive to layer modules in such a way as to
avoid polluting shared code with lots of ifdefs. For some existing
files this will take some effort.

task_switch.c and fwctl.c are an easy place to start: the former is very
x86-specific, and the latter provides an I/O port interface which can't
be used on anything other than x86. (fwcfg as implemented has the same
problem, but QEMU also supports a MMIO fwcfg interface.) So I propose
that we start by simply making those files conditional.

Reviewed by: corvink, jhb
MFC after: 1 week
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D40501

(cherry picked from commit 4f2bd4027b3261d159f6d673dc9ee9e84b4a3538)

Details

Provenance
markjAuthored on Oct 4 2023, 4:20 PM
Reviewer
corvink
Differential Revision
D40501: bhyve: Start moving machine-dependent code into subdirectories
Parents
rG24682747b437: bhyve: Improve pcifd function naming
Branches
Unknown
Tags
Unknown