diff options
| author | Mark Johnston <markj@FreeBSD.org> | 2026-01-08 21:54:16 +0000 |
|---|---|---|
| committer | Mark Johnston <markj@FreeBSD.org> | 2026-01-08 21:54:16 +0000 |
| commit | 5f13d6b60740c021951ae0e4d096903cfa1679e2 (patch) | |
| tree | 87b90aa4be5486a6a77edee9a1aa0cf1c1eaeb12 /sys/arm64 | |
| parent | ed85203fb7a0334041db6da07e45ddda4caef13d (diff) | |
Diffstat (limited to 'sys/arm64')
| -rw-r--r-- | sys/arm64/include/vmm.h | 29 | ||||
| -rw-r--r-- | sys/arm64/vmm/io/vtimer.c | 2 | ||||
| -rw-r--r-- | sys/arm64/vmm/vmm.c | 37 | ||||
| -rw-r--r-- | sys/arm64/vmm/vmm_reset.c | 2 |
4 files changed, 5 insertions, 65 deletions
diff --git a/sys/arm64/include/vmm.h b/sys/arm64/include/vmm.h index 14b4d1be10a3..f076bd07f323 100644 --- a/sys/arm64/include/vmm.h +++ b/sys/arm64/include/vmm.h @@ -135,16 +135,11 @@ struct vmm_special_reg { }; #define VM_MAX_SPECIAL_REGS 16 -struct vm_eventinfo { - void *rptr; /* rendezvous cookie */ - int *sptr; /* suspend cookie */ - int *iptr; /* reqidle cookie */ -}; - #define DECLARE_VMMOPS_FUNC(ret_type, opname, args) \ ret_type vmmops_##opname args struct vm; +struct vm_eventinfo; struct vm_exception; struct vm_exit; struct vm_run; @@ -181,16 +176,11 @@ DECLARE_VMMOPS_FUNC(int, restore_tsc, (void *vcpui, uint64_t now)); #endif #endif -const char *vm_name(struct vm *vm); - int vm_get_register(struct vcpu *vcpu, int reg, uint64_t *retval); int vm_set_register(struct vcpu *vcpu, int reg, uint64_t val); int vm_run(struct vcpu *vcpu); void* vm_get_cookie(struct vm *vm); -int vcpu_vcpuid(struct vcpu *vcpu); void *vcpu_get_cookie(struct vcpu *vcpu); -struct vm *vcpu_vm(struct vcpu *vcpu); -struct vcpu *vm_vcpu(struct vm *vm, int cpu); int vm_get_capability(struct vcpu *vcpu, int type, int *val); int vm_set_capability(struct vcpu *vcpu, int type, int val); int vm_inject_exception(struct vcpu *vcpu, uint64_t esr, uint64_t far); @@ -204,23 +194,6 @@ void vm_exit_suspended(struct vcpu *vcpu, uint64_t pc); void vm_exit_debug(struct vcpu *vcpu, uint64_t pc); void vm_exit_astpending(struct vcpu *vcpu, uint64_t pc); -static __inline int -vcpu_rendezvous_pending(struct vm_eventinfo *info) -{ - - return (*((uintptr_t *)(info->rptr)) != 0); -} - -static __inline int -vcpu_suspended(struct vm_eventinfo *info) -{ - - return (*info->sptr); -} - -void *vcpu_stats(struct vcpu *vcpu); -struct vm_mem *vm_mem(struct vm *vm); - struct vm_copyinfo { uint64_t gpa; size_t len; diff --git a/sys/arm64/vmm/io/vtimer.c b/sys/arm64/vmm/io/vtimer.c index 7c7fbb49e691..d1c489463882 100644 --- a/sys/arm64/vmm/io/vtimer.c +++ b/sys/arm64/vmm/io/vtimer.c @@ -47,6 +47,8 @@ #include <arm64/vmm/arm64.h> +#include <dev/vmm/vmm_vm.h> + #include "vgic.h" #include "vtimer.h" diff --git a/sys/arm64/vmm/vmm.c b/sys/arm64/vmm/vmm.c index 92500aa9febc..031400f3f1d0 100644 --- a/sys/arm64/vmm/vmm.c +++ b/sys/arm64/vmm/vmm.c @@ -399,12 +399,6 @@ vm_reset(struct vm *vm) vm_init(vm, false); } -const char * -vm_name(struct vm *vm) -{ - return (vm->name); -} - int vm_gla2gpa_nofault(struct vcpu *vcpu, struct vm_guest_paging *paging, uint64_t gla, int prot, uint64_t *gpa, int *is_fault) @@ -720,19 +714,6 @@ vm_exit_debug(struct vcpu *vcpu, uint64_t pc) vmexit->exitcode = VM_EXITCODE_DEBUG; } -void * -vcpu_stats(struct vcpu *vcpu) -{ - - return (vcpu->stats); -} - -struct vm_mem * -vm_mem(struct vm *vm) -{ - return (&vm->mem); -} - static void restore_guest_fpustate(struct vcpu *vcpu) { @@ -805,30 +786,12 @@ vm_set_capability(struct vcpu *vcpu, int type, int val) return (vmmops_setcap(vcpu->cookie, type, val)); } -struct vm * -vcpu_vm(struct vcpu *vcpu) -{ - return (vcpu->vm); -} - -int -vcpu_vcpuid(struct vcpu *vcpu) -{ - return (vcpu->vcpuid); -} - void * vcpu_get_cookie(struct vcpu *vcpu) { return (vcpu->cookie); } -struct vcpu * -vm_vcpu(struct vm *vm, int vcpuid) -{ - return (vm->vcpu[vcpuid]); -} - int vm_get_register(struct vcpu *vcpu, int reg, uint64_t *retval) { diff --git a/sys/arm64/vmm/vmm_reset.c b/sys/arm64/vmm/vmm_reset.c index 0e4910ea87b4..06ac6dec5af8 100644 --- a/sys/arm64/vmm/vmm_reset.c +++ b/sys/arm64/vmm/vmm_reset.c @@ -34,6 +34,8 @@ #include <machine/cpu.h> #include <machine/hypervisor.h> +#include <dev/vmm/vmm_vm.h> + #include "arm64.h" #include "reset.h" |
