Skip to content

Commit bbdf019

Browse files
lifeixwenlingz
authored andcommitted
hv: vpci: refine comment for pci_vdev_update_vbar_base
Refine why we set the base_gpa to zero for a vBAR. Tracked-On: #3475 Signed-off-by: Li Fei1 <fei1.li@intel.com>
1 parent dad7fd8 commit bbdf019

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

hypervisor/dm/vpci/vdev.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,9 @@ static void pci_vdev_update_vbar_base(struct pci_vdev *vdev, uint32_t idx)
138138
}
139139

140140
if ((base != 0UL) && !ept_is_mr_valid(vm, base, vdev->vbars[idx].size)) {
141-
pr_fatal("%s, %x:%x.%x set invalid bar[%d] base: 0x%lx, size: 0x%lx\n", __func__,
141+
pr_warn("%s, %x:%x.%x set invalid bar[%d] base: 0x%lx, size: 0x%lx\n", __func__,
142142
vdev->bdf.bits.b, vdev->bdf.bits.d, vdev->bdf.bits.f, idx, base, vdev->vbars[idx].size);
143-
/* If guest set a invalid GPA, ignore it temporarily */
144-
base = 0UL;
143+
base = 0UL; /* 0UL means invalid GPA, so that EPT won't map */
145144
}
146145

147146
vdev->vbars[idx].base_gpa = base;

0 commit comments

Comments
 (0)