| Date | Wed, 13 Mar 2024 14:50:37 +0530 | From | Srivatsa Vaddagiri <> | Subject | Re: [PATCH v17 13/35] gunyah: vm_mgr: Add framework for VM Functions |
| |
* Elliot Berman <quic_eberman@quicinc.com> [2024-02-22 15:16:36]:
> Introduce a framework for Gunyah userspace to install VM functions. VM > functions are optional interfaces to the virtual machine. vCPUs, > ioeventfs, and irqfds are examples of such VM functions and are > implemented in subsequent patches. > > A generic framework is implemented instead of individual ioctls to > create vCPUs, irqfds, etc., in order to simplify the VM manager core > implementation and allow dynamic loading of VM function modules. > > Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Minor nit below. LGTM otherwise
Reviewed-by: Srivatsa Vaddagiri <quic_svaddagi@quicinc.com>
> +static struct gunyah_vm_function *gunyah_vm_get_function(u32 type) > +{ > + struct gunyah_vm_function *fn; > + > + fn = xa_load(&gunyah_vm_functions, type); > + if (!fn) { > + request_module("ghfunc:%d", type);
s/%d/%u
> + > + fn = xa_load(&gunyah_vm_functions, type); > + } > + > + if (!fn || !try_module_get(fn->mod)) > + fn = ERR_PTR(-ENOENT); > + > + return fn; > +}
|