Re: [PATCH v9 8/8] x86/split_lock: Enable split lock detection initialization when running as an guest on KVM

From: Xiaoyao Li
Date: Sun May 10 2020 - 21:11:29 EST


On 5/10/2020 1:15 PM, Andy Lutomirski wrote:
On Fri, May 8, 2020 at 8:04 PM Xiaoyao Li <xiaoyao.li@xxxxxxxxx> wrote:

When running as guest, enumerating feature split lock detection through
CPU model is not easy since CPU model is configurable by host VMM.

If running upon KVM, it can be enumerated through
KVM_FEATURE_SPLIT_LOCK_DETECT,

This needs crystal clear documentation. What, exactly, is the host
telling the guest if it sets this flag?

and if KVM_HINTS_SLD_FATAL is set, it
needs to be set to sld_fatal mode.


This needs much better docs. Do you mean:

"If KVM_HINTS_SLD_FATAL is set, then the guest will get #AC if it does
a split-lock regardless of what is written to MSR_TEST_CTRL?"


Hi Andy,

KVM_FEATURE_SPLIT_LOCK_DETECT, KVM_HINTS_SLD_FATAL and their docs are introduced in Patch 5. Do I still need to explain them in detail in this patch?