Skip to content

Commit 906c79e

Browse files
binbinwu1wenlingz
authored andcommitted
hv: vpci: restore vbdf when pci dev un-assigned from uos
When a pci device assined to UOS, the virtual bdf is allocated by device model. After the pci device un-assigned from UOS, it is back to SOS. The virtual bdf should be restored. The virtual bdf equals physical bdf for a pci device in SOS. Tracked-On: #2788 Signed-off-by: Binbin Wu <binbin.wu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
1 parent 7669a76 commit 906c79e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

hypervisor/dm/vpci/sharing_mode.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@ void vpci_reset_ptdev_intr_info(const struct acrn_vm *target_vm, uint16_t vbdf,
251251

252252
if (vm != NULL) {
253253
vdev->vpci = &vm->vpci;
254+
/* vbdf equals to pbdf in sos */
255+
vdev->vbdf.value = vdev->pdev->bdf.value;
254256
}
255257
}
256258
}

0 commit comments

Comments
 (0)