Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp504135pxj; Thu, 3 Jun 2021 11:58:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4CfEA8eHpDpSdXxNuCqSdlG+NwoJD8lwDdCGY2rUOT2WyVirPFJgfOOcB63N6iKqq5Bu0 X-Received: by 2002:a05:6402:848:: with SMTP id b8mr877569edz.159.1622746715900; Thu, 03 Jun 2021 11:58:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622746715; cv=none; d=google.com; s=arc-20160816; b=LsmdyxpHzZHo32SlzPATjnMULj7uj8W0KEJDiPCC36UyzTRAiWusVdS+CMdswSUpiR bAYkQCGyycUaS9T/ppKlBWyy3ZKPxe/qJ95EnrNECKLelt1GzucM6kGfnOb96kNbVpWM T8Wct8BXCZ/qd39XyEmnhE6wEZVW+nPIU543WzwxMdSWdjknXTvM6tdQ3a+5aHWe6sTX OAmETEdzKgKdKLpURZgg6hKAtMscy/v765sW6S7h3b+95Gkb5jIiK+VH30Pj+VV2AGwt 1ZqARMmfuv4g0BMeC8sLFG9vqu0zdeq0EeMAM7K1qvfQgukwQ1W0NJYX+4N1LIRLaDP2 l4ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=muzg4+cO8kcs9+lLSj6LXbhCgERvn9xRdOoX6n/k1ro=; b=PzL9pO179m9zGkQNsmHPhyUENAhZ04I1ao6pCxIbZ5AMIjL4SqNkVWjBTDJWFqSM9q I0HLq5K2IHTWJSbjMPrIIZ3DwbemzDdOQ0968D2j4Xi/rQfdPgNKK+pVSueRS+0tpCO1 CQ9fftabjCG4qcGKjRsG1dng/X9g1eFE3xQ3XXqrkLT9E1ah0Rib2a4+5v2cgIRTsC6C qXAJtyeAPSvsIOMdD/C0w0ehSryP5j+66Jxa5OY/O/ef24STLJszeKRH+uYYpYY13kJk G46peptAV86F5XergGhZVObezNtFyQOmj4Lbd+84igqB8bexaHPxI8AasRypxRILFT3I 9P5A== 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 a26si2724587edt.163.2021.06.03.11.58.12; Thu, 03 Jun 2021 11:58:35 -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 S229976AbhFCS4m (ORCPT + 99 others); Thu, 3 Jun 2021 14:56:42 -0400 Received: from mga04.intel.com ([192.55.52.120]:14410 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229957AbhFCS4m (ORCPT ); Thu, 3 Jun 2021 14:56:42 -0400 IronPort-SDR: 4cxVX1emJECtk7WQibT1LhHTD6MTD7DbTPFxTHs6DgG3B+Z6ew81RVrtjiMPsxcqzn8K0K4zdh ZNVvr3un5PDQ== X-IronPort-AV: E=McAfee;i="6200,9189,10004"; a="202264746" X-IronPort-AV: E=Sophos;i="5.83,246,1616482800"; d="scan'208";a="202264746" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2021 11:54:54 -0700 IronPort-SDR: cX8H+mQzf8xMh4D17tdHxI5UHTCEw0j6FlJsDp0Bgs6WiplOwV1JNv58xNph/YRAXL3Ex1F2w3 XfpvsM9YdyZg== X-IronPort-AV: E=Sophos;i="5.83,246,1616482800"; d="scan'208";a="480338329" Received: from jacobmon-mobl.amr.corp.intel.com (HELO skuppusw-mobl5.amr.corp.intel.com) ([10.212.36.217]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2021 11:54:53 -0700 Subject: Re: [RFC v2-fix-v2 1/1] x86: Introduce generic protected guest abstraction To: Borislav Petkov Cc: Peter Zijlstra , Andy Lutomirski , Dave Hansen , Tony Luck , Andi Kleen , Kirill Shutemov , Kuppuswamy Sathyanarayanan , Dan Williams , Raj Ashok , Sean Christopherson , linux-kernel@vger.kernel.org, Tom Lendacky References: <20210527042356.3983284-2-sathyanarayanan.kuppuswamy@linux.intel.com> <20210601211417.2177598-1-sathyanarayanan.kuppuswamy@linux.intel.com> From: "Kuppuswamy, Sathyanarayanan" Message-ID: <0db0402c-390f-2c5b-8fdc-36462b49e029@linux.intel.com> Date: Thu, 3 Jun 2021 11:54:50 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/3/21 11:41 AM, Borislav Petkov wrote: >> Since you are checking for AMD vendor ID, why not use amd_protected_guest_has()? > Because, as Sean already told you, we should either stick to the > technologies: TDX or SEV or to the vendors: Intel or AMD - but not > either or. Ok. We can go with technologies for now. In future, if protected_guest_has() is extended for other technologies like MKTME, then we can generalize it base on vendor. -- Sathyanarayanan Kuppuswamy Linux Kernel Developer