lkml.org 
[lkml]   [2020]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH 0/1] x86/split_lock: check split lock feature on initialization
    Date
    Benjamin Lamowski <benjamin.lamowski@kernkonzept.com> writes:
    > During regression testing of our hypervisor[1] with the current git tip,
    > we got writes to the TEST_CTRL MSR on hardware that does not support
    > split lock detection. While the original split_lock implementation does
    > not exhibit this behavior, the reworked initialization from
    > dbaba47085b0c unconditionally calls split_lock_verify_msr() from
    > split_lock_init().
    >
    > After the elaborate checks in cpu_set_core_cap_bits() this seems like an
    > oversight. The following simple patch fixes our regression by checking
    > for X86_FEATURE_SPLIT_LOCK_DETECT before accessing the TEST_CTRL MSR.

    No. It's not an oversight, it's a simplification and it's perfectly
    legit. rdsmrl_safe() on a unimplemented MSR results in a #GP which is
    caught and fixed up. Nothing to see here.

    Thanks,

    tglx

    \
     
     \ /
      Last update: 2020-04-06 23:22    [W:4.075 / U:0.180 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site