Re: [PATCH v6 4/8] kvm: x86: Emulate split-lock access as a write in emulator

From: Xiaoyao Li
Date: Tue Mar 24 2020 - 20:31:31 EST


On 3/25/2020 8:00 AM, Thomas Gleixner wrote:
Xiaoyao Li <xiaoyao.li@xxxxxxxxx> writes:
+bool split_lock_detect_on(void)
+{
+ return sld_state != sld_off;
+}
+EXPORT_SYMBOL_GPL(split_lock_detect_on);

1) You export this function here

2) You change that in one of the next patches to something else

3) According to patch 1/8 X86_FEATURE_SPLIT_LOCK_DETECT is not set when
sld_state == sld_off. FYI, I did that on purpose.

AFAICT #1 and #2 are just historical leftovers of your previous patch
series and the extra step was just adding more changed lines per patch
for no value.

#3 changed the detection mechanism and at the same time the semantics of
the feature flag.

So what's the point of this exercise?

Right. In this series, setting X86_FEATURE_SPLIT_LOCK_DETECT flag means SLD is turned on. Need to remove split_lock_detect_on(). Thanks for pointing out this.

Thanks,

tglx