Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1988309ybh; Tue, 14 Jul 2020 12:24:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0C8Fox6HEMNWfrT/D2d6dOW1RydtmmgIW36QIfeiAV4FTx08gFtr4OlVl5oY8zVza7m+F X-Received: by 2002:a17:906:dbe9:: with SMTP id yd9mr6089462ejb.75.1594754684965; Tue, 14 Jul 2020 12:24:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594754684; cv=none; d=google.com; s=arc-20160816; b=V84GFCAeKv+flXTDLGBNCKJJoKDzwZLiaQtMzogR949BYP3rhf3vcj67yWvzV6jVVm SICJy87rShkqrnk5kTCHSKEgoNwrSa3d49/zTb7+slRDNzSwFg5IxM5muyKejjiHFMAw +Uyg2rfWlko4qBFTeoKUmUgIzdR6HXBH8VWUJkpFd4BgrxwhPSe91B6SBT14S8cayTZx uLkwR8XaRzbY9pkxsIeFdok3qaOP0rajypjXdo0YincXlJcaYDwZ/YdQGigRzDPW0JGs OOYelBd/S6nkQkhayiw4bcncMr3bJc5F1P8dSsPkYLJ/WNqaDdFie84EH8iZuJh8cngF eJcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=MRou1Qdq4l9JekmH02JZIVeKrdbO9tm/+cq0GXGbg4M=; b=I34jqunke4fBV5FvZ0/fg4lA5SP6XsZSbuMoY+g/08pqnIbN2EjNYXyNSGgbGRtnzW AOkyFU6+c2hqacYfTrEgeCNuKIUH1K1SCcmmOXifUmfpDR+3Z35MCbc+WD1VBVv5sNcg VD58arbOTpTUhyj4b6q9GylQp0ipdL3y7jUO4OTAv/ynKpgoECj1Y7AWaVbVjyyE3ya7 K0deXTWKFvvoZKpEnx1CpL3ZmAu+LkaLXN3msXgEFrfYzZELodKQOS0dpWzaZJYANJ0O /5/VDPaB+aaHjYZTbIK+OslcOEsc4r4zc4eB9aEvH29o1XFMllUxOoVzhxaVkBOk53vw tkGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k6si12011319edn.299.2020.07.14.12.24.22; Tue, 14 Jul 2020 12:24:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729430AbgGNTXw (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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