Memory integrity is a Windows security feature that uses hardware virtualization to ensure that only verified, properly signed code can run in the Windows kernel. Known in technical documentation as hypervisor-protected code integrity (HVCI), it moves the decision about which kernel-mode code may execute out of the normal kernel and into an isolated, hypervisor-protected environment that malware running in the kernel cannot easily tamper with.
In Windows security, memory integrity is one of the core components of virtualization-based security (VBS). It is exposed to users in the Windows Security app under Device security and Core isolation, and it is enabled by default on many new Windows 11 devices with compatible hardware and drivers.
How memory integrity protects the kernel
Memory integrity works by splitting trust between two virtual trust levels. The ordinary Windows kernel runs in VTL0, while code integrity checks run in VTL1, a secure kernel that the Hyper-V hypervisor isolates from the rest of the system.
When a driver or other kernel-mode module loads, the secure kernel validates its signature before the hypervisor marks its memory pages as executable. The hypervisor enforces this through second-level address translation, the hardware feature that controls how guest memory maps to physical memory. As a result, kernel memory follows a strict rule: a page can be writable or executable, never both.
This rule defeats a classic attack pattern in which an exploit writes shellcode into kernel memory and then jumps to it. Even an attacker with kernel-level write access cannot make new code executable, because the permission change must pass through the hypervisor.
The table below summarizes the main components involved and the role each one plays.
| Component | Where it runs | Role |
|---|---|---|
| Hyper-V hypervisor | Below the operating system | Enforces memory permissions for both trust levels |
| Secure kernel (VTL1) | Isolated virtual trust level | Performs code integrity validation |
| Normal kernel (VTL0) | Standard Windows kernel | Requests driver loads, cannot override decisions |
| Second-level address translation | CPU hardware | Applies write and execute restrictions per page |
| Driver signature policy | Code integrity policy files | Defines which signers and drivers are trusted |
Hardware and software requirements
Memory integrity depends on CPU virtualization extensions and firmware support, and its performance cost varies strongly with processor generation. Modern processors include features that make the protection nearly free, while older chips must emulate the checks in software.
| Requirement | Typical examples | Effect if missing |
|---|---|---|
| Virtualization extensions | Intel VT-x, AMD-V | Feature cannot be enabled |
| Second-level address translation | Intel EPT, AMD RVI | Feature cannot be enabled |
| Mode-based execution control | Intel MBEC, AMD GMET | Higher CPU overhead through emulation |
| UEFI with Secure Boot | Modern firmware settings | Weaker protection against boot tampering |
| Compatible drivers | Drivers built for HVCI | Feature blocked until drivers are fixed |
Mode-based execution control is the decisive performance factor. On processors from roughly Intel 7th generation and AMD Zen 2 onward, the overhead is usually a few percent or less in typical workloads; on older processors it can be noticeably higher, which is why Microsoft does not enable memory integrity by default on such hardware.
Driver compatibility and blocked drivers
Driver compatibility is the most common reason memory integrity is turned off. A driver that allocates memory that is both writable and executable, or that modifies its own code at runtime, violates HVCI rules and will either fail to load or prevent the feature from being enabled.
When enabling fails, the Windows Security app lists incompatible drivers by file name. Typical culprits include old anti-cheat components, legacy hardware utilities, overclocking tools and outdated virtual drive software. The correct fix is to update or remove the driver, not to leave the protection disabled permanently.
Windows also maintains the Microsoft vulnerable driver blocklist, which prevents known vulnerable but validly signed drivers from loading. This blocklist targets bring your own vulnerable driver attacks, in which an attacker installs a legitimate driver with a known flaw to gain kernel access. The blocklist is enabled by default when memory integrity is on.
Memory integrity compared with related Windows protections
Memory integrity is often confused with other features in the same Topic because several of them share the virtualization-based security foundation. Each protects a different asset, and they complement rather than replace one another.
| Feature | What it protects | Relationship to memory integrity |
|---|---|---|
| Virtualization-based security | Platform for isolated secure environments | The foundation memory integrity runs on |
| Credential Guard | Domain credentials and secrets in LSA | Separate VBS feature with a different goal |
| Smart App Control | User-mode applications at launch | Covers applications, not kernel drivers |
| Exploit protection | Processes against memory exploitation | Process-level mitigations, no hypervisor |
| Microsoft Defender | Files and behavior on the system | Detects threats; HVCI prevents kernel code tampering |
A useful mental model is that memory integrity guards the door to the kernel, while antivirus inspects what is already inside the house. Both are needed, because detection alone cannot stop an attacker who already controls the kernel.
Enabling and managing memory integrity
On individual devices, memory integrity is switched on in Windows Security under Device security, Core isolation details, followed by a restart. In managed environments, administrators configure it centrally so that enforcement is consistent across the fleet.
- Group Policy: Turn On Virtualization Based Security, with virtualization-based protection of code integrity set to enabled with or without UEFI lock.
- Microsoft Intune: device configuration or endpoint security profiles that enable HVCI.
- Registry: the HypervisorEnforcedCodeIntegrity scenario key under the DeviceGuard path, mainly for scripted deployment.
- Verification:
msinfo32lists running virtualization-based security services, including hypervisor-enforced code integrity.
The UEFI lock option stores the setting in firmware so that malware cannot simply disable it in the registry. It also makes legitimate rollback harder, so administrators should test driver compatibility on pilot devices before applying a locked configuration.
Limitations and common misconceptions
Memory integrity is a strong control, but it does not make a system immune to compromise. The table lists frequent misunderstandings and the accurate position.
| Misconception | Reality | Practical consequence |
|---|---|---|
| It blocks all malware | It protects kernel code, not user-mode programs | Keep antivirus and application control |
| It always slows gaming | Overhead is small on modern CPUs | Benchmark before disabling |
| Signed drivers are safe | Signed drivers can still be vulnerable | Keep the vulnerable driver blocklist on |
| It works inside any virtual machine | Requires nested virtualization support | Check hypervisor settings for VMs |
Attackers also adapt by abusing data-only attacks, which modify kernel data structures without injecting new code. Memory integrity raises the bar significantly but should be part of a layered defense with Secure Boot, timely patching and least privilege.
Understanding it simply
The kernel is the most powerful part of Windows: whatever runs there can control the entire computer. Memory integrity places a strict security guard in a separate, locked room that the rest of the system cannot enter. Every time a piece of low-level software asks to run, the guard checks its credentials first.
Even if a criminal sneaks into the building, the criminal cannot bribe or replace that guard. The main cost is that some old drivers fail the check and must be updated. For most people, the right choice is simple: keep memory integrity turned on.
Applied in practice
An IT team at a regional accounting firm manages 180 Windows 11 laptops through Intune. A security review finds that memory integrity is off on 37 devices. The Windows Security app on those devices reports one incompatible driver: an outdated utility for a discontinued USB docking station.
The team removes the utility, installs the docking station’s generic driver and deploys an Intune policy that enables memory integrity with UEFI lock after a two-week pilot on ten laptops. Benchmarks of the firm’s accounting software show no measurable slowdown on the 11th-generation processors. Months later, a phishing campaign tries to install a known vulnerable driver to disable endpoint protection, and the driver is blocked at load time, stopping the attack before it reaches the kernel.