mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +00:00
hv: vpci_cleanup for VMs of type POST_LAUNCHED_VM
ACRN cleans up the IOMMU domain and other data structures that represents the state of device assigment to POST_LAUNCHED_VM. This is with the help of hypercalls from SOS DM. Under scenarios where DM execution can get terminated abruptly or due to bugs in DM, hypercalls responsible for cleaning up ACRN cannot happen. This leaves ACRN device representation/resource assignment in an incorrect state. This patch cleans up the IOMMU resource and other data structures upon shutdown of POST_LAUNCHED_VM. Tracked-On: #2700 Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com> Signed-off-by: Zide Chen <zide.chen@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
committed by
ACRN System Integration
parent
7a78e70eb3
commit
53b2bd5811
@@ -991,6 +991,7 @@ hcall_reset_ptdev_intr_info(struct acrn_vm *vm, uint16_t vmid, uint64_t param)
|
||||
if (copy_from_gpa(vm, &irq, param, sizeof(irq)) != 0) {
|
||||
pr_err("%s: Unable copy param to vm\n", __func__);
|
||||
} else if (irq.type == IRQ_INTX) {
|
||||
vpci_reset_ptdev_intr_info(target_vm, irq.virt_bdf, irq.phys_bdf);
|
||||
ptirq_remove_intx_remapping(target_vm,
|
||||
irq.is.intx.virt_pin,
|
||||
irq.is.intx.pic_pin);
|
||||
|
Reference in New Issue
Block a user