Skip to main content

alloc_msr_bitmap

Function alloc_msr_bitmap 

Source
fn alloc_msr_bitmap() -> Option<PhysFrame>
Expand description

Allocates the MSR bitmap of a vCPU.

The modelled MSRs and the x2APIC window are intercepted on reads and writes. Every other MSR in both bitmap windows is intercepted on writes as well: an unmodelled WRMSR then exits to the kernel and is reported to policy, instead of modifying the host MSR file. Reads of unmodelled MSRs are left native (no host state corruption, only read-only information).

The frame is deliberately leaked with the other vCPU resources (control block, host stack): a vCPU currently lives as long as its world.