Re: git: d8be3d523dd5 - main - vmm: Use struct vcpu in the rendezvous code.

From: Andrew Turner <andrew_at_fubar.geek.nz>
Date: Fri, 25 Nov 2022 11:21:12 UTC

> On 18 Nov 2022, at 18:26, John Baldwin <jhb@freebsd.org> wrote:
> 
> The branch main has been updated by jhb:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=d8be3d523dd50a17f48957c1bb2e0cd7bbf02cab
> 
> commit d8be3d523dd50a17f48957c1bb2e0cd7bbf02cab
> Author:     John Baldwin <jhb@FreeBSD.org>
> AuthorDate: 2022-11-18 18:03:34 +0000
> Commit:     John Baldwin <jhb@FreeBSD.org>
> CommitDate: 2022-11-18 18:25:37 +0000
> 
>    vmm: Use struct vcpu in the rendezvous code.
> 
>    Reviewed by:    corvink, markj
>    Differential Revision:  https://reviews.freebsd.org/D37165
> ---
> sys/amd64/include/vmm.h    |  4 ++--
> sys/amd64/vmm/io/vioapic.c | 11 +++++------
> sys/amd64/vmm/io/vlapic.c  | 10 +++++-----
> sys/amd64/vmm/io/vlapic.h  |  2 +-
> sys/amd64/vmm/vmm.c        | 36 +++++++++++++++++-------------------
> 5 files changed, 30 insertions(+), 33 deletions(-)
> 
> diff --git a/sys/amd64/include/vmm.h b/sys/amd64/include/vmm.h
> index 2f9a8776bb39..1c68181f5ff4 100644
> --- a/sys/amd64/include/vmm.h
> +++ b/sys/amd64/include/vmm.h
> @@ -313,8 +313,8 @@ int vm_restore_time(struct vm *vm);
>  * by 'dest' to be stalled. The caller should not rely on any vcpus making
>  * forward progress when the rendezvous is in progress.
>  */
> -typedef void (*vm_rendezvous_func_t)(struct vm *vm, int vcpuid, void *arg);
> -int vm_smp_rendezvous(struct vm *vm, int vcpuid, cpuset_t dest,
> +typedef void (*vm_rendezvous_func_t)(struct vcpu *vcpu, void *arg);
> +int vm_smp_rendezvous(struct vcpu *vcpu, cpuset_t dest,
>     vm_rendezvous_func_t func, void *arg);

The comment above vm_rendezvous_func_t should be updated for the removal of vcpuid.

Andrew