[PATCH v2 0/1] x86/split_lock: check split lock support on initialization
From: Benjamin Lamowski
Date: Mon Apr 06 2020 - 11:58:09 EST
> It's for the case that SLD is explicitly disabled by kernel params
> "split_lock_detect=off". You know, BIOS may turn SLD on for itself. So
> if user uses "split_lock_detect=off", we have to clear the SLD bit in
> case BIOS forgets to clear it.
Ah, I forgot that split_lock_setup() returns early if sld is disabled.
Thanks for explaining!
[...]
> If you really want to avoid the MSR access on the platform without SLD.
> You could make the default sld_state as sld_unsupported. It can only be
> changed to other value in split_lock_setup() when SLD is enumerated. So
> in split_lock_init(), we can use if (sld_state == sld_unsupported) to
> skip the MSR_TEST_CTRL access.
Attached is a new version of my patch that implements your suggestion.
Thanks,
Ben
--
Benjamin Lamowski - +49.351.41883235
Operating Systems Engineer - https://www.kernkonzept.com
Kernkonzept GmbH. Sitz: Dresden. Amtsgericht Dresden, HRB 31129.
GeschÃftsfÃhrer: Dr.-Ing. Michael Hohmuth