Thread (42 messages) 42 messages, 7 authors, 2025-07-24

Re: [PATCH v7 02/10] x86/fred: Pass event data to the NMI entry point from KVM

From: Sohil Mehta <hidden>
Date: 2025-06-13 15:21:57
Also in: kvm, linux-edac, linux-perf-users, linux-pm, lkml

On 6/12/2025 5:18 PM, Sean Christopherson wrote:
quoted
Read the VMCS exit qualification unconditionally since almost all
upcoming CPUs are expected to enable FRED and NMI-source together. In
the rare case that NMI-source isn't enabled, the extra VMREAD would be
harmless since the exit qualification is expected to be zero.
Nit, instead of "is expected to be zero", something like this 

  harmless since the exit qualification is architecturally guaranteed to be
  zero on CPUs that don't support NMI-source reporting.  Per the SDM's
  "Exit qualification" subsection of "Basic VM-Exit Information":

      For all other VM exits, this field is cleared.
--
Looks good. Clarifying it explicitly reduces ambiguity.

If this patchset gets applied directly, I am hoping the clarification
can be included while applying. If we end up doing another version, I'll
add it to the log.
to make it very explicit that reading the exit qualification on older CPUs is 100%
safe, e.g. even on non-FRED CPUs (see https://lore.kernel.org/all/aBUiwLV4ZY2HdRbz@google.com (local)).
That's interesting. Thanks for the link.
quoted
Suggested-by: Sean Christopherson <seanjc@google.com>
Originally-by: Zeng Guang [off-list ref]
Signed-off-by: Sohil Mehta <redacted>
---
Acked-by: Sean Christopherson <seanjc@google.com>
Thank you!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help