This is not a driver development question, but looking for some insight in this forum on how winload.efi and driver installation work.
We have Windows 2012 R2 installed on a server with an Intel NIC with SR-IOV enabled and appropriate Intel driver (ixn64x64.sys) downloaded and installed. After doing a sysprep generalize on the installation and capturing an image, it is used in a VM (hypervisor is kvm) on a different physical host, but with the same hardware. The VM has a VF assigned to it.
Windows fails to start with the bugcheck 0x7b - INACCESSIBLE_BOOT_DEVICE; parameter 1 indicates it failed to access partition 4 on the disk.
Attaching a debugger to the VM during startup, I see that ntoskrnl gets loaded; winload.efi has loaded a bunch of drivers for booting including the physical NIC driver; the Ethernet device is detected, but is not started - the PCI device id indicates it is the virtual NIC.
Questions:
-
How does winload.efi determine what set of drivers to load before loading ntoskrnl? How does it know that some drivers are required for NT to boot? From looking at the ixn driver inf file, it is not marked as “boot-start”.
-
How is a driver configured to always load during boot? How can we force installation of the VF driver on the physical machine and configure it to be loaded during boot, so that when the VF shows up in the VM, the driver is available during boot?
Output from debugging the VM during boot is below:
0: kd> kcn
Call Site
00 nt!DbgBreakPointWithStatus
01 nt!KiBugCheckDebugBreak
02 nt!KeBugCheck2
03 nt!KeBugCheckEx
04 nt! ?? ::FNODOBFM::`string’ . <------- This is likely nt!PnpBootDeviceWait
05 nt!IopInitializeBootDrivers
06 nt!IoInitSystemPreDrivers
07 nt!IoInitSystem
08 nt!Phase1Initialization
09 nt!PspSystemThreadStartup
0a nt!KiStartSystemThread
1: kd> !pcitree
Bus 0x0 (FDO Ext ffffe001ebb13320)
(d=0, f=0) 80861237 devext 0xffffe001ebb091b0 devstack 0xffffe001ebb09060 0600 Bridge/HOST to PCI
(d=1, f=0) 80867000 devext 0xffffe001ebb099d0 devstack 0xffffe001ebb09880 0601 Bridge/PCI to ISA
(d=1, f=1) 80867010 devext 0xffffe001ebb081b0 devstack 0xffffe001ebb08060 0101 Mass Storage Controller/IDE
(d=2, f=0) 12341111 devext 0xffffe001ebb071b0 devstack 0xffffe001ebb07060 0300 Display Controller/VGA
(d=3, f=0) 808610ed devext 0xffffe001ebb079d0 devstack 0xffffe001ebb07880 0200 Network Controller/Ethernet <----- device id 10ed indicates Intel NIC VF
1: kd> !devext 0xffffe001ebb079d0
PDO Extension, Bus 0x0, Device 3, Function 0.
DevObj 0xffffe001ebb07880 Parent FDO DevExt 0xffffe001ebb13320
Device State = PciNotStarted
Vendor ID 8086 (INTEL) Device ID 10ED
…
1: kd> !DevNode ffffe001ebabf010
DevNode 0xffffe001ebabf010 for PDO 0xffffe001ebb07880
Parent 0xffffe001ebaeed30 Sibling 0xffffe001ebabf940 Child 0000000000
InstancePath is “PCI\VEN_8086&DEV_10ED&SUBSYS_7B11108E&REV_01\3&13c0b0c5&0&18”
State = DeviceNodeInitialized (0x302)
Previous State = DeviceNodeUninitialized (0x301)
StateHistory[00] = DeviceNodeUninitialized (0x301)
…
…
Flags (0x000022f0) DNF_ENUMERATED, DNF_IDS_QUERIED,
DNF_HAS_BOOT_CONFIG, DNF_BOOT_CONFIG_RESERVED,
DNF_RESOURCE_REQUIREMENTS_NEED_FILTERED, DNF_HAS_PROBLEM
CapabilityFlags (0x00040018) EjectSupported, Removable
Unknown flags 0x00040000
Problem = CM_PROB_NOT_CONFIGURED