]> git.baikalelectronics.ru Git - kernel.git/commit
x86/speculation/mds: Apply more accurate check on hypervisor platform
authorZhenzhong Duan <zhenzhong.duan@oracle.com>
Thu, 25 Jul 2019 02:39:09 +0000 (10:39 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 25 Jul 2019 10:51:55 +0000 (12:51 +0200)
commit64c5bd9812db1e1f66a86798340d598941f31471
treed6c9e59e8c566298d7d8c747cccbca18b5a7767c
parente3605d0259f165a7df2354ff343f1c84f830170c
x86/speculation/mds: Apply more accurate check on hypervisor platform

X86_HYPER_NATIVE isn't accurate for checking if running on native platform,
e.g. CONFIG_HYPERVISOR_GUEST isn't set or "nopv" is enabled.

Checking the CPU feature bit X86_FEATURE_HYPERVISOR to determine if it's
running on native platform is more accurate.

This still doesn't cover the platforms on which X86_FEATURE_HYPERVISOR is
unsupported, e.g. VMware, but there is nothing which can be done about this
scenario.

Fixes: 66517677b7e1 ("x86/speculation/mds: Add sysfs reporting for MDS")
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/1564022349-17338-1-git-send-email-zhenzhong.duan@oracle.com
arch/x86/kernel/cpu/bugs.c