Skip to content

Commit 9fa6eff

Browse files
lifeixwenlingz
authored andcommitted
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>
1 parent dafa3da commit 9fa6eff

File tree

5 files changed

+13
-535
lines changed

5 files changed

+13
-535
lines changed

devicemodel/core/vmmapi.c

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -457,28 +457,6 @@ vm_set_gsi_irq(struct vmctx *ctx, int gsi, uint32_t operation)
457457
return ioctl(ctx->fd, IC_SET_IRQLINE, *req);
458458
}
459459

460-
int
461-
vm_assign_ptdev(struct vmctx *ctx, int bus, int slot, int func)
462-
{
463-
uint16_t bdf;
464-
465-
bdf = ((bus & 0xff) << 8) | ((slot & 0x1f) << 3) |
466-
(func & 0x7);
467-
468-
return ioctl(ctx->fd, IC_ASSIGN_PTDEV, &bdf);
469-
}
470-
471-
int
472-
vm_unassign_ptdev(struct vmctx *ctx, int bus, int slot, int func)
473-
{
474-
uint16_t bdf;
475-
476-
bdf = ((bus & 0xff) << 8) | ((slot & 0x1f) << 3) |
477-
(func & 0x7);
478-
479-
return ioctl(ctx->fd, IC_DEASSIGN_PTDEV, &bdf);
480-
}
481-
482460
int
483461
vm_assign_pcidev(struct vmctx *ctx, struct acrn_assign_pcidev *pcidev)
484462
{
@@ -523,30 +501,6 @@ vm_unmap_ptdev_mmio(struct vmctx *ctx, int bus, int slot, int func,
523501
return ioctl(ctx->fd, IC_UNSET_MEMSEG, &memmap);
524502
}
525503

526-
int
527-
vm_set_ptdev_msix_info(struct vmctx *ctx, struct ic_ptdev_irq *ptirq)
528-
{
529-
if (!ptirq)
530-
return -1;
531-
532-
return ioctl(ctx->fd, IC_SET_PTDEV_INTR_INFO, ptirq);
533-
}
534-
535-
int
536-
vm_reset_ptdev_msix_info(struct vmctx *ctx, uint16_t virt_bdf, uint16_t phys_bdf,
537-
int vector_count)
538-
{
539-
struct ic_ptdev_irq ptirq;
540-
541-
bzero(&ptirq, sizeof(ptirq));
542-
ptirq.type = IRQ_MSIX;
543-
ptirq.virt_bdf = virt_bdf;
544-
ptirq.phys_bdf = phys_bdf;
545-
ptirq.msix.vector_cnt = vector_count;
546-
547-
return ioctl(ctx->fd, IC_RESET_PTDEV_INTR_INFO, &ptirq);
548-
}
549-
550504
int
551505
vm_set_ptdev_intx_info(struct vmctx *ctx, uint16_t virt_bdf, uint16_t phys_bdf,
552506
int virt_pin, int phys_pin, bool pic_pin)

devicemodel/hw/pci/core.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -218,15 +218,6 @@ CFGREAD(struct pci_vdev *dev, int coff, int bytes)
218218
return pci_get_cfgdata32(dev, coff);
219219
}
220220

221-
static inline int
222-
is_pci_gvt(struct pci_vdev *dev)
223-
{
224-
if (dev == NULL || strncmp(dev->dev_ops->class_name, "pci-gvt",7))
225-
return 0;
226-
else
227-
return 1;
228-
}
229-
230221
static inline int
231222
is_pt_pci(struct pci_vdev *dev)
232223
{

0 commit comments

Comments
 (0)