mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-25 06:51:49 +00:00
hv: remove corner case in ptirq_prepare_msix_remap
ptirq_prepare_msix_remap was called no matter whether MSI/MSI-X was enabled or not and it passed zero to input parameter virtual MSI/MSI-X data field to indicate MSI/MSI-X was disabled. However, it barely did nothing on this case. Now ptirq_prepare_msix_remap is called only when MSI/MSI-X is enabled. It doesn't need to check whether MSI/MSI-X is enabled or not by checking virtual MSI/MSI-X data field. Tracked-On: #3475 Signed-off-by: Li Fei1 <fei1.li@intel.com>
This commit is contained in:
parent
c05d9f8086
commit
da3ba68cb6
@ -637,10 +637,6 @@ int32_t ptirq_prepare_msix_remap(struct acrn_vm *vm, uint16_t virt_bdf, uint16_t
|
||||
|
||||
if (entry != NULL) {
|
||||
ret = 0;
|
||||
if (is_entry_active(entry) && (info->vmsi_data.full == 0U)) {
|
||||
/* handle destroy case */
|
||||
info->pmsi_data.full = 0U;
|
||||
} else {
|
||||
/* build physical config MSI, update to info->pmsi_xxx */
|
||||
if (is_lapic_pt_configured(vm)) {
|
||||
enum vm_vlapic_state vlapic_state = check_vm_vlapic_state(vm);
|
||||
@ -680,7 +676,6 @@ int32_t ptirq_prepare_msix_remap(struct acrn_vm *vm, uint16_t virt_bdf, uint16_t
|
||||
irq_to_vector(entry->allocated_pirq), entry->vm->vm_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user