mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +00:00
HV: specify dispatch hypercall for sos or trusty
Changes: - In current design, the hypercall is only allowed calling from SOS or trusty VM, so separate the trusty hypercalls from dispatch_hypercall(). The vm parameter which referenced by hcall_xxx() should be SOS VM; - do not inject #UD for hypercalls from non-SOS, just return -ENODEV; Tracked-On: #3214 Signed-off-by: Victor Sun <victor.sun@intel.com> Acked-by: Eddie Dong <eddie.dong@Intel.com>
This commit is contained in:
committed by
ACRN System Integration
parent
8c70871ff1
commit
3d3de6bd38
@@ -337,6 +337,7 @@ int32_t hcall_reset_vm(uint16_t vmid)
|
||||
* @param param guest physical address. This gpa points to
|
||||
* struct acrn_vcpu_regs
|
||||
*
|
||||
* @pre Pointer vm shall point to SOS_VM
|
||||
* @return 0 on success, non-zero on error.
|
||||
*/
|
||||
int32_t hcall_set_vcpu_regs(struct acrn_vm *vm, uint16_t vmid, uint64_t param)
|
||||
@@ -407,6 +408,9 @@ int32_t hcall_set_irqline(const struct acrn_vm *vm, uint16_t vmid,
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
*@pre Pointer vm shall point to SOS_VM
|
||||
*/
|
||||
static void inject_msi_lapic_pt(struct acrn_vm *vm, const struct acrn_msi_entry *vmsi)
|
||||
{
|
||||
union apic_icr icr;
|
||||
@@ -578,7 +582,9 @@ int32_t hcall_notify_ioreq_finish(uint16_t vmid, uint16_t vcpu_id)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*@pre Pointer vm shall point to SOS_VM
|
||||
*/
|
||||
static int32_t add_vm_memory_region(struct acrn_vm *vm, struct acrn_vm *target_vm,
|
||||
const struct vm_memory_region *region,uint64_t *pml4_page)
|
||||
{
|
||||
|
Reference in New Issue
Block a user