x86/bugs/multihit: Fix mitigation reporting when VMX is not in use
authorPawan Gupta <pawan.kumar.gupta@linux.intel.com>
Thu, 16 Jul 2020 19:23:59 +0000 (12:23 -0700)
committerIngo Molnar <mingo@kernel.org>
Thu, 6 Aug 2020 23:32:00 +0000 (01:32 +0200)
commitf29dfa53cc8ae6ad93bae619bcc0bf45cab344f7
tree75773c72df86d8df4a61c1f6b987b01dbfa2861b
parent76d10256a97a7cab72b123d54b766a3c17da658c
x86/bugs/multihit: Fix mitigation reporting when VMX is not in use

On systems that have virtualization disabled or unsupported, sysfs
mitigation for X86_BUG_ITLB_MULTIHIT is reported incorrectly as:

  $ cat /sys/devices/system/cpu/vulnerabilities/itlb_multihit
  KVM: Vulnerable

System is not vulnerable to DoS attack from a rogue guest when
virtualization is disabled or unsupported in the hardware. Change the
mitigation reporting for these cases.

Fixes: b8e8c8303ff2 ("kvm: mmu: ITLB_MULTIHIT mitigation")
Reported-by: Nelson Dsouza <nelson.dsouza@linux.intel.com>
Co-developed-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/0ba029932a816179b9d14a30db38f0f11ef1f166.1594925782.git.pawan.kumar.gupta@linux.intel.com
Documentation/admin-guide/hw-vuln/multihit.rst
arch/x86/kernel/cpu/bugs.c