e425e601 | 15-Dec-2023 |
Corvin Köhne <corvink@FreeBSD.org> |
bhyve: verify OpRegion size
If the OpRegion size doesn't match the size of our igd_opregion struct, it's using a different layout than we're expecting. To avoid strange issues, we should exit hard.
bhyve: verify OpRegion size
If the OpRegion size doesn't match the size of our igd_opregion struct, it's using a different layout than we're expecting. To avoid strange issues, we should exit hard. If we see any devices in the field with a different OpRegion size, we can analyse it and fix it accordingly.
Reviewed by: markj MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D45335
show more ...
|
7228ad8d | 04-Oct-2023 |
Mark Johnston <markj@FreeBSD.org> |
bhyve: Move the vm_inject_fault() implementation to vmexit.c
This function isn't generic and has a different signature on arm64. No functional change intended.
Reviewed by: corvink, jhb MFC after:
bhyve: Move the vm_inject_fault() implementation to vmexit.c
This function isn't generic and has a different signature on arm64. No functional change intended.
Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40991
show more ...
|
f82af74c | 04-Oct-2023 |
Mark Johnston <markj@FreeBSD.org> |
bhyve: Move most early initialization into an MD routine
Prior to initializing PCI devices, main() calls a number of initialization routines, many of which are amd64-specific. Move this list of cal
bhyve: Move most early initialization into an MD routine
Prior to initializing PCI devices, main() calls a number of initialization routines, many of which are amd64-specific. Move this list of calls to bhyverun_machdep.c. Similarly, add an MD function to handle late initialization.
No functional change intended.
Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40989
show more ...
|
e20b74da | 04-Oct-2023 |
Mark Johnston <markj@FreeBSD.org> |
bhyve: Move vcpu initialization into a MD source file
- Make handling of x86 config options, like x86.x2apic, conditional to amd64. - Move fbsdrun_set_capabilities() and spinup_vcpu() to a new fil
bhyve: Move vcpu initialization into a MD source file
- Make handling of x86 config options, like x86.x2apic, conditional to amd64. - Move fbsdrun_set_capabilities() and spinup_vcpu() to a new file, bhyverun_machdep.c. The moved code is all highly x86 specific.
I'm not sure how best to handle the namespace. I'm using "bhyve_" for MD functions called from MI code. We also have "fbsdrun_" for some MI routines that are typically called from MD code. The file name is prefixed by "bhyverun_".
Reviewed by: corvink MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40987
show more ...
|
ca2cda98 | 04-Oct-2023 |
Mark Johnston <markj@FreeBSD.org> |
bhyve: Make gdb support optional
Add a BHYVE_GDB_SUPPORT make variable that can be set by per-arch makefiles. When set, BHYVE_GDB is defined and can be used as a preprocessor predicate. Use it to
bhyve: Make gdb support optional
Add a BHYVE_GDB_SUPPORT make variable that can be set by per-arch makefiles. When set, BHYVE_GDB is defined and can be used as a preprocessor predicate. Use it to guard gdb stub calls in MI code.
The arm64 bhyve port currently does not have a functional gdb stub, but that's not critical to landing the port, so this mechanism slightly reduces the friction of adding support for a new platform.
Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40986
show more ...
|
31cf78c9 | 04-Oct-2023 |
Mark Johnston <markj@FreeBSD.org> |
bhyve: Make most I/O port handling specific to amd64
- The qemu_fwcfg interface, as implemented, is I/O port-based, but QEMU implements an MMIO interface that we'll eventually want to port for a
bhyve: Make most I/O port handling specific to amd64
- The qemu_fwcfg interface, as implemented, is I/O port-based, but QEMU implements an MMIO interface that we'll eventually want to port for arm64. - Retain support for I/O space PCI BARs, simply treat them like MMIO BARs for most purposes, similar to what the arm64 kernel does. Such BARs are created by virtio devices.
Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40741
show more ...
|
61429b49 | 04-Oct-2023 |
Mark Johnston <markj@FreeBSD.org> |
bhyve: Conditionally compile framebuffer-related code
The arm64 port does not implement VGA, so move the device model sources. Compile framebuffer code only on amd64 for now, but do not move the sou
bhyve: Conditionally compile framebuffer-related code
The arm64 port does not implement VGA, so move the device model sources. Compile framebuffer code only on amd64 for now, but do not move the sources, as we ought to be able to add support later.
No functional change intended.
Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40740
show more ...
|
55c13f6e | 04-Oct-2023 |
Mark Johnston <markj@FreeBSD.org> |
bhyve: Move legacy PCI interrupt handling under amd64/
Specifically, move IO-APIC, LPC and PIRQ routing code under amd64/.
Use ifdefs to conditionally compile related code in other files. In parti
bhyve: Move legacy PCI interrupt handling under amd64/
Specifically, move IO-APIC, LPC and PIRQ routing code under amd64/.
Use ifdefs to conditionally compile related code in other files. In particular, legacy PCI interrupt handling is now compiled only on amd64. This is not too invasive, but suggestions for a more modular approach would be appreciated.
I am not sure why qemu fwcfg handling is tied to LPC, and I suspect it should be decoupled. In this commit I just apply an ifdef hammer, but we will eventually want fwcfg on arm64 as well.
No functional change intended.
Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40739
show more ...
|