AMD Zen 4 CPUs will support VNMI for their new CPUs to allow for virtualization which rival Intel has offered support for over the last ten years

VNMI support allows for the CPU ID to detect the feature, but due to the severely late release from AMD, it is possible that the company has chosen to not initiate it fully until the new Zen 4 architecture later this year. Santosh Shukla of AMD summarizes the company’s Virtual NMI implementation below: Michael Larabel of Phoronix states that the VNMI is only useful in optimizing efficiency in AMD’s own virtualized guests that will not require themselves to follow the NMI state with any concerns about intercepting the interrupt return or IRET when the NMI handling is complete. Intel has had this utilization for virtualization as far back as 2008 in Linux platforms. Virtual NMI (VNMI) allows the hypervisor to inject the NMI into the guest w/o using Event Injection mechanism meaning not required to track the guest NMI and intercepting the IRET. To achieve that, VNMI feature provides virtualized NMI and NMI_MASK capability bits inVMCB intr_control -V_NMI(11) - Indicates whether a virtual NMI is pending in the guest.V_NMI_MASK(12) - Indicates whether virtual NMI is masked in the guest.V_NMI_ENABLE(26) - Enables the NMI virtualization feature for the guest. When Hypervisor wants to inject NMI, it will set V_NMI bit, Processor will clear the V_NMI bit and Set the V_NMI_MASK which means the Guest is handling NMI, After the guest handled the NMI, The processor will clear the V_NMI_MASK on the successful completion of IRET instruction Or if VMEXIT occurs while delivering the virtual NMI. The inclusion from AMD now hints that the new series of patches will see use in the next Zen 4-powered Ryzen 7000 series, along with the company’s EPYC 7004 series. News Sources: Phoronix, Linux Kernel info page

AMD Zen 4 CPUs To Support Virtual NMI  VNMI  For Efficiency Optimization - 80AMD Zen 4 CPUs To Support Virtual NMI  VNMI  For Efficiency Optimization - 62AMD Zen 4 CPUs To Support Virtual NMI  VNMI  For Efficiency Optimization - 31