Skip to content

Commit 44b0ec0

Browse files
Shuo Liujren1
authored andcommitted
Ignore length of resource for PCI ROM request
Writing PCIR_BIOS is to get PCI ROM resource length. Ingore the request as it's not support currently. Else, guest might get wrong information about the PCI ROM resource. Signed-off-by: Shuo Liu <shuo.a.liu@intel.com>
1 parent b84aa9f commit 44b0ec0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

devicemodel/hw/pci/core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1905,6 +1905,8 @@ pci_cfgrw(struct vmctx *ctx, int vcpu, int in, int bus, int slot, int func,
19051905
}
19061906
pci_set_cfgdata32(dev, coff, bar);
19071907

1908+
} else if (coff == PCIR_BIOS) {
1909+
/* ignore ROM BAR length request */
19081910
} else if (pci_emul_iscap(dev, coff)) {
19091911
pci_emul_capwrite(dev, coff, bytes, *eax);
19101912
} else if (coff >= PCIR_COMMAND && coff < PCIR_REVID) {

0 commit comments

Comments
 (0)