Created
February 6, 2026 04:14
-
-
Save mischief/cf85fd86a69683249e3e2bb71bb822c1 to your computer and use it in GitHub Desktop.
fix vmd 'invalid fault_type 2'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/usr.sbin/vmd/vm.c b/usr.sbin/vmd/vm.c | |
| index 6d571ce90fc..141ecdb80a7 100644 | |
| --- a/usr.sbin/vmd/vm.c | |
| +++ b/usr.sbin/vmd/vm.c | |
| @@ -42,8 +42,6 @@ | |
| #include "virtio.h" | |
| #include "vmd.h" | |
| -#define MMIO_NOTYET 0 | |
| - | |
| static int run_vm(struct vmd_vm *, struct vcpu_reg_state *); | |
| static void vm_dispatch_vmm(int, short, void *); | |
| static void *event_thread(void *); | |
| diff --git a/usr.sbin/vmd/x86_vm.c b/usr.sbin/vmd/x86_vm.c | |
| index 8647ec35e40..fe5cc587111 100644 | |
| --- a/usr.sbin/vmd/x86_vm.c | |
| +++ b/usr.sbin/vmd/x86_vm.c | |
| @@ -17,6 +17,7 @@ | |
| #include <sys/stat.h> | |
| #include <sys/types.h> | |
| +#include <sys/param.h> | |
| #include <dev/ic/i8253reg.h> | |
| #include <dev/isa/isareg.h> | |
| @@ -40,10 +41,12 @@ | |
| #include "ns8250.h" | |
| #include "pci.h" | |
| #include "virtio.h" | |
| +#include "mmio.h" | |
| typedef uint8_t (*io_fn_t)(struct vm_run_params *); | |
| #define MAX_PORTS 65536 | |
| +#define MMIO_NOTYET 1 | |
| io_fn_t ioports_map[MAX_PORTS]; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment