Hyper-V does not expose a virtual AHCI controller to guest VMs. The synthetic storage controller that Hyper-V presents is not AHCI-based and cannot be switched into AHCI mode through configuration. For kernel driver development that specifically targets AHCI, testing must be done either on:
- Physical hardware with AHCI enabled in firmware, or
- A virtualization platform that emulates an AHCI controller and allows attaching a disk to that emulated controller.
Hyper-V configuration changes (generation 1 vs. generation 2 VM, different virtual disk types, etc.) do not provide an AHCI mode, so no additional Hyper-V steps can enable AHCI inside the VM.
For the second scenario (Hyper-V VM, Secure Boot disabled, test-signing enabled, BSOD with WDF
type violation and only inbox drivers present), the context provided is focused on memory integrity / VBS and driver compatibility, which are the main kernel-mode hardening features that can interact with WDF drivers.
Key points from the context that are relevant to troubleshooting:
- Memory integrity (HVCI) is a virtualization-based security (VBS) feature that changes how kernel memory is allocated and protected. It enforces that executable kernel pages are never writable and that allocations that request executable memory must comply with strict rules.
- Drivers that allocate executable memory incorrectly, or that rely on writable+executable mappings, can become incompatible when memory integrity is enabled, leading to crashes.
- The documentation describes how to detect and fix such incompatibilities using Code Analysis warnings (C30029–C30035) and by ensuring that drivers do not request executable pool types or executable MDL mappings.
Given that only inbox drivers are present, a WDF violation after changing boot configuration (disabling Secure Boot and enabling test-signing) strongly suggests an interaction with VBS / memory integrity rather than with unsigned third-party drivers. The following checks and mitigations are supported by the context:
- Verify whether memory integrity (HVCI) is enabled in the VM
- Use System Information (msinfo32) and check the line “Virtualization-based security Services Running”. For memory integrity, it should show “Hypervisor enforced Code Integrity”.
- Alternatively, use the Windows Security app: Settings → Update & Security → Windows Security → Device security → Core isolation details → Memory integrity.
- If the BSOD correlates with memory integrity being enabled, then the crash is likely due to a driver (even an inbox one) hitting one of the forbidden patterns described in the HVCI compatibility guidance:
- Requesting executable pool types.
- Using executable page protections for allocations.
- Using executable MDL mappings instead of MdlMappingNoExecute.
- Having an image section that is both executable and writable.
- For custom drivers under development (even if not yet installed in the failing VM), the same rules apply when they are eventually introduced. The context recommends:
- Running Code Analysis for Drivers and addressing warnings C30029–C30035, which specifically flag executable memory allocation issues.
- Ensuring all pool types used include the NX (no-execute) flag.
- Ensuring MDL mappings use MdlMappingNoExecute where appropriate.
- Programmatic detection of memory integrity
- From kernel mode, NtQuerySystemInformation with SYSTEM_CODEINTEGRITY_INFORMATION can be used to detect whether memory integrity is active (0x400 flag). This allows drivers to adjust behavior when running under HVCI.
Workaround direction based on the above:
- If the BSOD only occurs when memory integrity is active, and the environment is strictly for development/testing, temporarily disabling memory integrity (while keeping other security features as needed) can avoid the crash while investigating the offending driver behavior.
- For any in-house driver code, use the Code Analysis rules and the HVCI compatibility table to remove executable allocations and W+X sections so that the driver is compatible when memory integrity is re-enabled.
The context does not provide a specific known issue or hotfix for inbox drivers causing WDF violations in the exact configuration described, so the supported guidance is to:
- Confirm whether memory integrity is enabled and whether disabling it changes the behavior.
- Ensure any custom drivers follow the HVCI compatibility rules so they do not trigger WDF or kernel violations when VBS/memory integrity is active.
References: