https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a4405f9610f7703a647f4…
commit a4405f9610f7703a647f43229a8e063fb85c98d7
Author: Stanislav Motylkov <x86corez(a)gmail.com>
AuthorDate: Thu Jun 17 17:04:09 2021 +0300
Commit: Stanislav Motylkov <x86corez(a)gmail.com>
CommitDate: Sat Jun 19 20:58:27 2021 +0300
[PCI] Filter out devices with null vendor and device ID
Some virtual machines errorneously expose null PCI device function
on PIIX4 chipset where an USB controller should normally reside.
Windows pci.sys driver does not enumerate these devices.
Affected virtual machines:
- Connectix Virtual PC 5.1.370
- Connectix Virtual PC 5.2.418
- Microsoft Virtual PC 2004 SP1 (5.3.582.27)
- Microsoft Virtual PC 2007 SP1 (6.0.156.0)
Non-affected virtual machines:
- Connectix Virtual PC 4.0
- Microsoft Hyper-V
Fixes CORE-17636.
---
drivers/bus/pci/fdo.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/bus/pci/fdo.c b/drivers/bus/pci/fdo.c
index 2cd73f650b2..17a4c07c622 100644
--- a/drivers/bus/pci/fdo.c
+++ b/drivers/bus/pci/fdo.c
@@ -151,6 +151,12 @@ FdoEnumerateDevices(
PciConfig.VendorID,
PciConfig.DeviceID);
+ if (PciConfig.VendorID == 0 && PciConfig.DeviceID == 0)
+ {
+ DPRINT("Filter out devices with null vendor and device ID\n");
+ continue;
+ }
+
Status = FdoLocateChildDevice(&Device, DeviceExtension, SlotNumber,
&PciConfig);
if (!NT_SUCCESS(Status))
{