mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-02 09:25:17 +00:00
dm: vPCI: add assign/deassign PCI device IC APIs
Add assign/deassign PCI device ioctl APIs assign a PCI device from SOS to post-launched VM or deassign a PCI device from post-launched VM to SOS. This patch is prepared for spliting passthrough PCI device from DM to HV. The old assign/deassign ptdev APIs will be discarded. 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:
@@ -479,6 +479,18 @@ vm_unassign_ptdev(struct vmctx *ctx, int bus, int slot, int func)
|
||||
return ioctl(ctx->fd, IC_DEASSIGN_PTDEV, &bdf);
|
||||
}
|
||||
|
||||
int
|
||||
vm_assign_pcidev(struct vmctx *ctx, struct acrn_assign_pcidev *pcidev)
|
||||
{
|
||||
return ioctl(ctx->fd, IC_ASSIGN_PCIDEV, pcidev);
|
||||
}
|
||||
|
||||
int
|
||||
vm_deassign_pcidev(struct vmctx *ctx, struct acrn_assign_pcidev *pcidev)
|
||||
{
|
||||
return ioctl(ctx->fd, IC_DEASSIGN_PCIDEV, pcidev);
|
||||
}
|
||||
|
||||
int
|
||||
vm_map_ptdev_mmio(struct vmctx *ctx, int bus, int slot, int func,
|
||||
vm_paddr_t gpa, size_t len, vm_paddr_t hpa)
|
||||
|
Reference in New Issue
Block a user