hv: vPCI: remove passthrough PCI device unuse code

Now we split passthrough PCI device from DM to HV, we could remove all the passthrough
PCI device unused code.

Tracked-On: #4371
Signed-off-by: Li Fei1 <fei1.li@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Li Fei1
2020-01-17 18:31:18 +08:00
committed by wenlingz
parent 9fa6eff3c5
commit e8479f84cd
9 changed files with 39 additions and 280 deletions

View File

@@ -124,27 +124,6 @@ int32_t ptirq_add_intx_remapping(struct acrn_vm *vm, uint32_t virt_pin, uint32_t
*/
void ptirq_remove_intx_remapping(struct acrn_vm *vm, uint32_t virt_pin, bool pic_pin);
/**
* @brief Add interrupt remapping entry/entries for MSI/MSI-x as pre-hold mapping.
*
* Add pre-hold mapping of the given number of vectors between the given physical and virtual BDF for the given vm.
* Except sos_vm, Device Model should call this function to pre-hold ptdev MSI/MSI-x.
* The entry is identified by phys_bdf:msi_idx, one entry vs. one phys_bdf:msi_idx.
*
* @param[in] vm pointer to acrn_vm
* @param[in] virt_bdf virtual bdf associated with the passthrough device
* @param[in] phys_bdf physical bdf associated with the passthrough device
* @param[in] vector_count number of vectors
*
* @return
* - 0: on success
* - \p -ENODEV: failed to add the remapping entry
*
* @pre vm != NULL
*
*/
int32_t ptirq_add_msix_remapping(struct acrn_vm *vm, uint16_t virt_bdf, uint16_t phys_bdf, uint32_t vector_count);
/**
* @brief Remove interrupt remapping entry/entries for MSI/MSI-x.
*

View File

@@ -248,30 +248,6 @@ int32_t hcall_write_protect_page(struct acrn_vm *vm, uint16_t vmid, uint64_t wp_
*/
int32_t hcall_gpa_to_hpa(struct acrn_vm *vm, uint16_t vmid, uint64_t param);
/**
* @brief Assign one passthrough dev to VM.
*
* @param vm Pointer to VM data structure
* @param vmid ID of the VM
* @param param the physical BDF of the assigning ptdev
*
* @pre Pointer vm shall point to SOS_VM
* @return 0 on success, non-zero on error.
*/
int32_t hcall_assign_ptdev(struct acrn_vm *vm, uint16_t vmid, uint64_t param);
/**
* @brief Deassign one passthrough dev from VM.
*
* @param vm Pointer to VM data structure
* @param vmid ID of the VM
* @param param the physical BDF of the deassigning ptdev
*
* @pre Pointer vm shall point to SOS_VM
* @return 0 on success, non-zero on error.
*/
int32_t hcall_deassign_ptdev(struct acrn_vm *vm, uint16_t vmid, uint64_t param);
/**
* @brief Assign one PCI dev to VM.
*

View File

@@ -132,8 +132,6 @@ extern const struct pci_vdev_ops vhostbridge_ops;
void vpci_init(struct acrn_vm *vm);
void vpci_cleanup(struct acrn_vm *vm);
struct pci_vdev *pci_find_vdev(struct acrn_vpci *vpci, union pci_bdf vbdf);
void vpci_set_ptdev_intr_info(struct acrn_vm *target_vm, uint16_t vbdf, uint16_t pbdf);
void vpci_reset_ptdev_intr_info(struct acrn_vm *target_vm, uint16_t vbdf, uint16_t pbdf);
struct acrn_assign_pcidev;
int32_t vpci_assign_pcidev(struct acrn_vm *tgt_vm, struct acrn_assign_pcidev *pcidev);
int32_t vpci_deassign_pcidev(struct acrn_vm *tgt_vm, struct acrn_assign_pcidev *pcidev);

View File

@@ -249,28 +249,21 @@ struct hc_ptdev_irq {
/** physical BDF of the ptdev */
uint16_t phys_bdf;
union irq_source {
/** INTX remapping info */
struct intx_info {
/** virtual IOAPIC/PIC pin */
uint32_t virt_pin;
/** INTX remapping info */
struct intx_info {
/** virtual IOAPIC/PIC pin */
uint32_t virt_pin;
/** physical IOAPIC pin */
uint32_t phys_pin;
/** physical IOAPIC pin */
uint32_t phys_pin;
/** is virtual pin from PIC */
bool pic_pin;
/** is virtual pin from PIC */
bool pic_pin;
/** Reserved */
uint8_t reserved[3];
} intx;
/** Reserved */
uint8_t reserved[3];
} intx;
/** MSIx remapping info */
struct msix_info {
/** vector count of MSI/MSIX */
uint32_t vector_cnt;
} msix;
} is; /* irq source */
} __aligned(8);
/**