Re: [PATCH v4 06/11] KVM: VMX: Expand FRED kvm entry with event data
From: Sean Christopherson
Date: Fri Aug 16 2024 - 10:14:30 EST
On Tue, Jul 09, 2024, Jacob Pan wrote:
> From: Zeng Guang <guang.zeng@xxxxxxxxx>
>
> According to FRED specification 10.6.2, VM exits triggered by events such as
> NMI, #DB, and #PF will have their event data stored in the exit-qualification
> field.
>
> However, #DB and #PF are owned by the running guest, which is managed by KVM.
This is wrong. #DB and #PF _may_ be guest #DBs/#PFs. When host userspace is
debugging, #DBs may be the host's. And when KVM is using shadow paging, or the
VM is running with a MAXPHYADDR smaller than the host's, #PF may be the host's
responsiblity.
> NMIs belong to the host, and the host NMI handler requires the event data
> stored in the VMCS for NMI-induced VM exits.
>
> This patch enhances the FRED KVM entry interface to include the event data
^^^^^^^^^^
Documentation/process/maintainer-tip.rst
> derived from the exit qualification.
It's not "derived" from the exit qualification, it's stored there in the exact
format that's used by FRED.