diff options
| author | Andriy Gapon <avg@FreeBSD.org> | 2019-10-19 07:10:15 +0000 |
|---|---|---|
| committer | Andriy Gapon <avg@FreeBSD.org> | 2019-10-19 07:10:15 +0000 |
| commit | 869dbab7ba30e07c3374ee98bc4e560734a3e72a (patch) | |
| tree | 425c54b6e350920597c3ddad3a9e3246edaaa75e /sys | |
| parent | f1d4707c31331408125525e79a135cc4eac1704d (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/amd64/vmm/vmm.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c index 1e825f3a832f..d786fc4679d7 100644 --- a/sys/amd64/vmm/vmm.c +++ b/sys/amd64/vmm/vmm.c @@ -1235,22 +1235,6 @@ vcpu_require_state_locked(struct vm *vm, int vcpuid, enum vcpu_state newstate) panic("Error %d setting state to %d", error, newstate); } -static void -vm_set_rendezvous_func(struct vm *vm, vm_rendezvous_func_t func) -{ - - KASSERT(mtx_owned(&vm->rendezvous_mtx), ("rendezvous_mtx not locked")); - - /* - * Update 'rendezvous_func' and execute a write memory barrier to - * ensure that it is visible across all host cpus. This is not needed - * for correctness but it does ensure that all the vcpus will notice - * that the rendezvous is requested immediately. - */ - vm->rendezvous_func = func; - wmb(); -} - #define RENDEZVOUS_CTR0(vm, vcpuid, fmt) \ do { \ if (vcpuid >= 0) \ @@ -1281,7 +1265,7 @@ vm_handle_rendezvous(struct vm *vm, int vcpuid) if (CPU_CMP(&vm->rendezvous_req_cpus, &vm->rendezvous_done_cpus) == 0) { VCPU_CTR0(vm, vcpuid, "Rendezvous completed"); - vm_set_rendezvous_func(vm, NULL); + vm->rendezvous_func = NULL; wakeup(&vm->rendezvous_func); break; } @@ -2535,7 +2519,7 @@ restart: vm->rendezvous_req_cpus = dest; CPU_ZERO(&vm->rendezvous_done_cpus); vm->rendezvous_arg = arg; - vm_set_rendezvous_func(vm, func); + vm->rendezvous_func = func; mtx_unlock(&vm->rendezvous_mtx); /* |
