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=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 6BFDFC4360C for ; Fri, 4 Oct 2019 21:02:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3D2492133F for ; Fri, 4 Oct 2019 21:02:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730618AbfJDVCX (ORCPT ); Fri, 4 Oct 2019 17:02:23 -0400 Received: from mga07.intel.com ([134.134.136.100]:29034 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726811AbfJDVCX (ORCPT ); Fri, 4 Oct 2019 17:02:23 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Oct 2019 14:02:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,257,1566889200"; d="scan'208";a="186373614" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.41]) by orsmga008.jf.intel.com with ESMTP; 04 Oct 2019 14:02:22 -0700 Date: Fri, 4 Oct 2019 14:02:22 -0700 From: Sean Christopherson To: Jim Mattson Cc: Yang Weijiang , kvm list , LKML , Paolo Bonzini , "Michael S. Tsirkin" , Radim =?utf-8?B?S3LEjW3DocWZ?= , yu.c.zhang@intel.com, alazar@bitdefender.com Subject: Re: [PATCH v5 2/9] vmx: spp: Add control flags for Sub-Page Protection(SPP) Message-ID: <20191004210221.GB19503@linux.intel.com> References: <20190917085304.16987-1-weijiang.yang@intel.com> <20190917085304.16987-3-weijiang.yang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 04, 2019 at 01:48:34PM -0700, Jim Mattson wrote: > On Tue, Sep 17, 2019 at 1:52 AM Yang Weijiang wrote: > > @@ -7521,6 +7527,10 @@ static __init int hardware_setup(void) > > if (!cpu_has_vmx_flexpriority()) > > flexpriority_enabled = 0; > > > > + if (cpu_has_vmx_ept_spp() && enable_ept && > > + boot_cpu_has(X86_FEATURE_SPP)) > > + spp_supported = 1; > > Don't cpu_has_vmx_ept_spp() and boot_cpu_has(X86_FEATURE_SPP) test > exactly the same thing? More or less. I'm about to hit 'send' on a series to eliminate the synthetic VMX features flags. If that goes through, the X86_FEATURE_SPP flag can also go away.