mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-21 16:57:20 +00:00
hv:Rename ptdev to ptirq for some APIs
-- Rename the fowllowing APIs: ptdev_intx_pin_remap --> ptirq_intx_pin_remap ptdev_msix_remap --> ptirq_msix_remap ptdev_add_intx_remapping --> ptirq_add_intx_remapping ptdev_remove_intx_remapping --> ptirq_remove_intx_remapping ptdev_add_msix_remapping --> ptirq_add_msix_remapping ptdev_remove_msix_remapping --> ptirq_remove_msix_remapping ptdev_intx_ack --> ptirq_intx_ack ptdev_lookup_entry_by_sid --> ptirq_lookup_entry_by_sid ptdev_lookup_entry_by_vpin --> ptirq_lookup_entry_by_vpin ptdev_build_physical_msi --> ptirq_build_physical_msi ptdev_build_physical_rte --> ptirq_build_physical_rte alloc_entry --> ptirq_alloc_entry release_entry --> ptirq_release_one_entry ptdev_activate_entry --> ptirq_activate_entry ptdev_deactivate_entry --> ptirq_deactivate_entry ptdev_intr_handle_irq --> ptirq_handle_intx ptdev_softirq --> ptirq_softirq ptdev_enqueue_softirq --> ptirq_enqueue_softirq ptdev_dequeue_softirq --> ptirq_dequeue_softirq get_vm_ptdev_intr_data --> ptirq_get_intr_data alloc_ptdev_entry_id --> ptirq_alloc_entry_id ptdev_intr_delay_callback --> ptirq_intr_delay_callback ptdev_dequeue_softirq --> ptirq_dequeue_softirq ptdev_interrupt_handler --> ptirq_interrupt_handler -- Merge 'ptdev_release_all_entries' and 'release_all_entries' to 'ptirq_release_all_entries' v2-->v3: Rename ptirq_release_one_entry to ptirq_release_entry v1-->v2: still use ptdev_init instead of ptirq_init Tracked-On: #861 Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
committed by
Xie, Nanlin
parent
5b43aa8a65
commit
5dcfc1336b
@@ -400,7 +400,7 @@ vioapic_indirect_write(struct acrn_vioapic *vioapic, uint32_t addr,
|
||||
((last.full & IOAPIC_RTE_INTMASK) == 0UL)) {
|
||||
/* VM enable intr */
|
||||
/* NOTE: only support max 256 pin */
|
||||
(void)ptdev_intx_pin_remap(vioapic->vm,
|
||||
(void)ptirq_intx_pin_remap(vioapic->vm,
|
||||
(uint8_t)pin, PTDEV_VPIN_IOAPIC);
|
||||
}
|
||||
}
|
||||
@@ -468,7 +468,7 @@ vioapic_process_eoi(struct acrn_vm *vm, uint32_t vector)
|
||||
continue;
|
||||
}
|
||||
|
||||
ptdev_intx_ack(vm, (uint8_t)pin, PTDEV_VPIN_IOAPIC);
|
||||
ptirq_intx_ack(vm, (uint8_t)pin, PTDEV_VPIN_IOAPIC);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -78,7 +78,7 @@ static int32_t vmsi_remap(struct pci_vdev *vdev, bool enable)
|
||||
info.vmsi_data = 0U;
|
||||
}
|
||||
|
||||
ret = ptdev_msix_remap(vm, vdev->vbdf.value, 0U, &info);
|
||||
ret = ptirq_msix_remap(vm, vdev->vbdf.value, 0U, &info);
|
||||
if (ret == 0) {
|
||||
/* Update MSI Capability structure to physical device */
|
||||
pci_pdev_write_cfg(pbdf, capoff + PCIR_MSI_ADDR, 0x4U, (uint32_t)info.pmsi_addr);
|
||||
@@ -220,7 +220,7 @@ void populate_msi_struct(struct pci_vdev *vdev)
|
||||
static int32_t vmsi_deinit(struct pci_vdev *vdev)
|
||||
{
|
||||
if (vdev->msi.capoff != 0U) {
|
||||
ptdev_remove_msix_remapping(vdev->vpci->vm, vdev->vbdf.value, 1U);
|
||||
ptirq_remove_msix_remapping(vdev->vpci->vm, vdev->vbdf.value, 1U);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@@ -59,7 +59,7 @@ static int vmsix_remap_entry(struct pci_vdev *vdev, uint32_t index, bool enable)
|
||||
info.vmsi_addr = vdev->msix.tables[index].addr;
|
||||
info.vmsi_data = (enable) ? vdev->msix.tables[index].data : 0U;
|
||||
|
||||
ret = ptdev_msix_remap(vdev->vpci->vm, vdev->vbdf.value, (uint16_t)index, &info);
|
||||
ret = ptirq_msix_remap(vdev->vpci->vm, vdev->vbdf.value, (uint16_t)index, &info);
|
||||
if (ret == 0) {
|
||||
/* Write the table entry to the physical structure */
|
||||
hva = vdev->msix.mmio_hva + vdev->msix.table_offset;
|
||||
@@ -412,7 +412,7 @@ static int vmsix_deinit(struct pci_vdev *vdev)
|
||||
vdev->msix.intercepted_size = 0U;
|
||||
|
||||
if (vdev->msix.table_count != 0U) {
|
||||
ptdev_remove_msix_remapping(vdev->vpci->vm, vdev->vbdf.value, vdev->msix.table_count);
|
||||
ptirq_remove_msix_remapping(vdev->vpci->vm, vdev->vbdf.value, vdev->msix.table_count);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@@ -328,7 +328,7 @@ static int vpic_ocw1(const struct acrn_vpic *vpic, struct i8259_reg_state *i8259
|
||||
|
||||
virt_pin = (master_pic(vpic, i8259)) ?
|
||||
pin : (pin + 8U);
|
||||
(void)ptdev_intx_pin_remap(vpic->vm,
|
||||
(void)ptirq_intx_pin_remap(vpic->vm,
|
||||
virt_pin, PTDEV_VPIN_PIC);
|
||||
}
|
||||
pin = (pin + 1U) & 0x7U;
|
||||
@@ -365,7 +365,7 @@ static int vpic_ocw2(struct acrn_vpic *vpic, struct i8259_reg_state *i8259, uint
|
||||
|
||||
/* if level ack PTDEV */
|
||||
if ((i8259->elc & (1U << (isr_bit & 0x7U))) != 0U) {
|
||||
ptdev_intx_ack(vpic->vm,
|
||||
ptirq_intx_ack(vpic->vm,
|
||||
(master_pic(vpic, i8259) ? isr_bit : isr_bit + 8U),
|
||||
PTDEV_VPIN_PIC);
|
||||
}
|
||||
|
Reference in New Issue
Block a user