From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5B07C433E0 for ; Tue, 14 Jul 2020 19:23:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 899C822282 for ; Tue, 14 Jul 2020 19:23:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728370AbgGNTXw (ORCPT ); Tue, 14 Jul 2020 15:23:52 -0400 Received: from mga11.intel.com ([192.55.52.93]:9953 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727930AbgGNTXv (ORCPT ); Tue, 14 Jul 2020 15:23:51 -0400 IronPort-SDR: kWL5vu8lEG7WbOubWKGL/AZAtgk69fWGkm5J/r8kIHlbETWF6vuzdAM2f9cugRn5M62Fv6l55R 7X235GhGpYAQ== X-IronPort-AV: E=McAfee;i="6000,8403,9682"; a="147022483" X-IronPort-AV: E=Sophos;i="5.75,352,1589266800"; d="scan'208";a="147022483" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2020 12:23:51 -0700 IronPort-SDR: PCMjJ49O7HM1ZDukmb0/xSV3g6OqD7Hs4Q4nkyKXVCpxH8AQYuOK6cDIyzUqcC1dWE+GGzGVQL DKKPOK90aDlg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,352,1589266800"; d="scan'208";a="285859255" Received: from guptapadev.jf.intel.com (HELO guptapadev.amr) ([10.54.74.188]) by orsmga006.jf.intel.com with ESMTP; 14 Jul 2020 12:23:51 -0700 Date: Tue, 14 Jul 2020 12:17:59 -0700 From: Pawan Gupta To: Dave Hansen Cc: Sean Christopherson , Borislav Petkov , Thomas Gleixner , Ingo Molnar , x86@kernel.org, "H. Peter Anvin" , Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Tony Luck , "Gomez Iglesias, Antonio" , Andy Lutomirski , Peter Zijlstra , Fenghua Yu , Dave Hansen , Vincenzo Frascino , Josh Poimboeuf , Anthony Steinhauser , Mike Rapoport , Mark Gross , Waiman Long , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Jonathan Corbet Subject: Re: [PATCH] x86/bugs/multihit: Fix mitigation reporting when KVM is not in use Message-ID: <20200714191759.GA7116@guptapadev.amr> References: <267631f4db4fd7e9f7ca789c2efaeab44103f68e.1594689154.git.pawan.kumar.gupta@linux.intel.com> <20200714014540.GH29725@linux.intel.com> <099d6985-9e9f-1d9f-7098-58a9e26e4450@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <099d6985-9e9f-1d9f-7098-58a9e26e4450@intel.com> Sender: linux-doc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Tue, Jul 14, 2020 at 07:57:53AM -0700, Dave Hansen wrote: > Let's stick to things which are at least static per reboot. Checking > for X86_FEATURE_VMX or even CONFIG_KVM_INTEL seems like a good stopping > point. "Could this kernel run a naughty guest?" If so, report > "Vulnerable". It's the same as Meltdown: "Could this kernel run > untrusted code?" If so, report "Vulnerable". Thanks, These are good inputs. So what I need to add is a boot time check for VMX feature and report "Vulnerable" or "Not affected(VMX disabled)". Are you suggesting to not change the reporting when KVM deploys the "Split huge pages" mitigation? Is this because VMX can still be used by other VMMs? The current mitigation reporting is very specific to KVM: - "KVM: Vulnerable" - "KVM: Mitigation: Split huge pages" As the kernel doesn't know about the mitigation state of out-of-tree VMMs can we add VMX reporting to always say vulnerable when VMX is enabled: - "VMX: Vulnerable, KVM: Vulnerable" - "VMX: Vulnerable, KVM: Mitigation: Split huge pages" And if VMX is disabled report: - "VMX: Not affected(VMX disabled)" or something like that. Thanks, Pawan