Commit 26bfa9e2 authored by Elliot Berman's avatar Elliot Berman Committed by Treehugger Robot
Browse files

FROMLIST: virt: gunyah: Add proxy-scheduled vCPUs

Gunyah allows vCPUs that are configured as proxy-scheduled to be scheduled by
another virtual machine (host) that holds capabilities to those vCPUs with
suitable rights.

Gunyah also supports configuring regions of a proxy-scheduled VM's address
space to be virtualized by the host VM. This permits a host VMM to emulate MMIO
devices in the proxy-scheduled VM.

vCPUs are presented to the host as a Gunyah resource and represented to
userspace as a Gunyah VM function.

Creating the vcpu function on the VM will create a file descriptor that:
 - can handle an ioctl to run the vCPU. When called, Gunyah will directly
   context-switch to the selected vCPU and run it until one of the following
   events occurs:
    * the host vcpu's time slice ends
    * the host vcpu receives an interrupt or would have been pre-empted
      by the hypervisor
    * a fault occurs in the proxy-scheduled vcpu
    * a power management event, such as idle or cpu-off call in the vcpu
 - can be mmap'd to share the gunyah_vcpu_run structure with userspace. This
   allows the vcpu_run result codes to be accessed, and for arguments to
   vcpu_run to be passed, e.g. for resuming the vcpu when handling certain fault
   and exit cases.

Bug: 338347082
Link: https://lore.kernel.org/all/20240222-gunyah-v17-15-1e9da6763d38@quicinc.com/


Change-Id: Ia20ffc27cd57c1c205aba909f43f654e2a4c0891
Co-developed-by: default avatarPrakruthi Deepak Heragu <quic_pheragu@quicinc.com>
Signed-off-by: default avatarPrakruthi Deepak Heragu <quic_pheragu@quicinc.com>
Signed-off-by: default avatarElliot Berman <quic_eberman@quicinc.com>
parent 71fa6cfb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment