mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-02 01:16:50 +00:00
dm: vPCI: remove passthrough PCI device unused 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:
@@ -457,28 +457,6 @@ vm_set_gsi_irq(struct vmctx *ctx, int gsi, uint32_t operation)
|
||||
return ioctl(ctx->fd, IC_SET_IRQLINE, *req);
|
||||
}
|
||||
|
||||
int
|
||||
vm_assign_ptdev(struct vmctx *ctx, int bus, int slot, int func)
|
||||
{
|
||||
uint16_t bdf;
|
||||
|
||||
bdf = ((bus & 0xff) << 8) | ((slot & 0x1f) << 3) |
|
||||
(func & 0x7);
|
||||
|
||||
return ioctl(ctx->fd, IC_ASSIGN_PTDEV, &bdf);
|
||||
}
|
||||
|
||||
int
|
||||
vm_unassign_ptdev(struct vmctx *ctx, int bus, int slot, int func)
|
||||
{
|
||||
uint16_t bdf;
|
||||
|
||||
bdf = ((bus & 0xff) << 8) | ((slot & 0x1f) << 3) |
|
||||
(func & 0x7);
|
||||
|
||||
return ioctl(ctx->fd, IC_DEASSIGN_PTDEV, &bdf);
|
||||
}
|
||||
|
||||
int
|
||||
vm_assign_pcidev(struct vmctx *ctx, struct acrn_assign_pcidev *pcidev)
|
||||
{
|
||||
@@ -523,30 +501,6 @@ vm_unmap_ptdev_mmio(struct vmctx *ctx, int bus, int slot, int func,
|
||||
return ioctl(ctx->fd, IC_UNSET_MEMSEG, &memmap);
|
||||
}
|
||||
|
||||
int
|
||||
vm_set_ptdev_msix_info(struct vmctx *ctx, struct ic_ptdev_irq *ptirq)
|
||||
{
|
||||
if (!ptirq)
|
||||
return -1;
|
||||
|
||||
return ioctl(ctx->fd, IC_SET_PTDEV_INTR_INFO, ptirq);
|
||||
}
|
||||
|
||||
int
|
||||
vm_reset_ptdev_msix_info(struct vmctx *ctx, uint16_t virt_bdf, uint16_t phys_bdf,
|
||||
int vector_count)
|
||||
{
|
||||
struct ic_ptdev_irq ptirq;
|
||||
|
||||
bzero(&ptirq, sizeof(ptirq));
|
||||
ptirq.type = IRQ_MSIX;
|
||||
ptirq.virt_bdf = virt_bdf;
|
||||
ptirq.phys_bdf = phys_bdf;
|
||||
ptirq.msix.vector_cnt = vector_count;
|
||||
|
||||
return ioctl(ctx->fd, IC_RESET_PTDEV_INTR_INFO, &ptirq);
|
||||
}
|
||||
|
||||
int
|
||||
vm_set_ptdev_intx_info(struct vmctx *ctx, uint16_t virt_bdf, uint16_t phys_bdf,
|
||||
int virt_pin, int phys_pin, bool pic_pin)
|
||||
|
Reference in New Issue
Block a user