hv: mmio_dev: add hypercall to support mmio device pass through

Add two hypercalls to support MMIO device pass through for post-launched VM.
And when we support MMIO pass through for pre-launched VM, we could re-use
the code in mmio_dev.c

Tracked-On: #5053
Signed-off-by: Li Fei1 <fei1.li@intel.com>
This commit is contained in:
Li Fei1
2020-07-16 13:45:06 +08:00
committed by wenlingz
parent 5034087a4f
commit baf77a79ad
7 changed files with 184 additions and 0 deletions

View File

@@ -160,6 +160,20 @@ static int32_t dispatch_sos_hypercall(const struct acrn_vcpu *vcpu)
}
break;
case HC_ASSIGN_MMIODEV:
/* param1: relative vmid to sos, vm_id: absolute vmid */
if (vmid_is_valid) {
ret = hcall_assign_mmiodev(sos_vm, vm_id, param2);
}
break;
case HC_DEASSIGN_MMIODEV:
/* param1: relative vmid to sos, vm_id: absolute vmid */
if (vmid_is_valid) {
ret = hcall_deassign_mmiodev(sos_vm, vm_id, param2);
}
break;
case HC_SET_PTDEV_INTR_INFO:
/* param1: relative vmid to sos, vm_id: absolute vmid */
if (vmid_is_valid) {