Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp900857pxb; Fri, 3 Sep 2021 16:45:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwagbH8U4p4SW+fx8buJTOImqi6x/oTa9W789ibQHpfNeZ8YPdYOHOETVBztLMyK0VMH69p X-Received: by 2002:a92:8707:: with SMTP id m7mr946732ild.177.1630712731838; Fri, 03 Sep 2021 16:45:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630712731; cv=none; d=google.com; s=arc-20160816; b=Cr7w6zluhrX3pU1jFUfzDk6Yy6Vdat9TS+oBO95Kx7o7EKdSaTEzXB/VDNRaEvt1SR d6he+fBixj2pGsxE0iWUCTjUxBKjQMb2mYHRapddBFlR/Q0QNWq9MjPCVsyvQUMZhfcf /rRBjcL0us7fRZ9bW43rTbYIA11CwSNkjVWNtcBBOkxPBYhkHM8swCg02q8p5mWPug4n fM9wdtPtXTfl0XcwRioBmAeXz70/4RspcAK1kOmIlDSvY7MR7uFk8KOCu1mNtWUyXYzO 4VVIOA0SQ+o3T7ptyhyQJJGzHR+LYaGU8OvB2sD8WNyAUw4iKloG7SQ05Zb7qOxQZoQp OXpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xRkv29REOmSpayMHsTkGf88hkJrd3OSMBUh/MVM03EU=; b=rgE62DxGHGjM8TKRxIpfL4/CdufcMlU8xJ92mkrCLzYPoFIYHnzVw2WJzGrvlfUMG5 6EdBBmGEe5yfJU/s1FyePwowq0TJxDu/3RazkNwjcddTyy5gRd8E991c7y91WQtlaYbN hUUj5TITCsyf6BB4azZ3/AUgrVP+mkrh1QYTYD9dMIs5WytoOkSbXqL3qXtpvd0M6rRt 9RKGWFvB9YszWwBAjpRzXaDLKH9bpdogAE55IydzD5rhLOnALCkAfvR2qc6ezNZ8yEu2 qgG2Ls/q0n0paw5+oypAzZLq/P5xhFLqPDr855DZGYTExqGjpS3Rl8pw5maSR63lTlXx NgeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=hRlgRtj7; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f46si742620jaa.87.2021.09.03.16.45.19; Fri, 03 Sep 2021 16:45:31 -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; dkim=pass header.i=@google.com header.s=20210112 header.b=hRlgRtj7; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350788AbhICXoW (ORCPT + 99 others); Fri, 3 Sep 2021 19:44:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350681AbhICXoV (ORCPT ); Fri, 3 Sep 2021 19:44:21 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EA4CC061575 for ; Fri, 3 Sep 2021 16:43:21 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id w19-20020a17090aaf9300b00191e6d10a19so613238pjq.1 for ; Fri, 03 Sep 2021 16:43:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=xRkv29REOmSpayMHsTkGf88hkJrd3OSMBUh/MVM03EU=; b=hRlgRtj75/kwKOrlL2OIJhrxM7LbBozXmixbMseIrNTO2s5AoYiarFZwNZR/UDEtgX IYUEwCmnIy4ZrdoGE9/WbV/BHZ1BinSUkdNowoQ8iC0PhNIsWdbDRQXNtnWBiUaOXU4z 3yI7suOOaLaTRmptZ/v/yo4Ge1iMNORjFcV2E+sHf93QM2OFDRtQ9mgM0Ihq4ighCiss r8yhPJfKCTIJouvKw4Nl2zRO9O6u45egqkjakhwQ/TOIPCfEYWpYUXRV5xHS8+kT09ZW 0Nth0XJdNUaAnbVufh6MUewuKOWzUBLD52QhDrTSDfO6LY7emZ3/WRPdD1i0hJZZbd/i XpOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=xRkv29REOmSpayMHsTkGf88hkJrd3OSMBUh/MVM03EU=; b=I4oJQIH6cFcz3j70n1WlAFtcTu5l6eDo7xbUjGV0awA8vDrPMeTcWfKePf9S13NbZB dnvwn6jP9Ikd5a54/5svNGSVDiB0y4KXnOdlHR7KQAhlBqn0vDAgkjU5AN+MhbZ9Lp2t znDbS9/DcJJNYAmGJhJ9xzPu8j/dc5S20FxxFYx3TZ7YIND/gKAipTs1LFBtEMVzTlcO akpQ5+j8YoDl88nSyZkDngEuZOsG6om/j101RJeB9JQ9xKk70lQ/qYqWDsF2/K62pFS1 shK1iDTncxS9V7ps0xyWD7eDYhOWPvgt2CYsu1RMDrBBf1tY+jcKyyLVVpZd3DNDULFf Y5ZA== X-Gm-Message-State: AOAM530zt8gv4UsjXDMUe67Ab8sQ4KMLBXb7zj+BEzMOzJWoDSr46NuZ npw+ucFswMKMtuRBJPQjqxuq7g== X-Received: by 2002:a17:90a:1c8:: with SMTP id 8mr1384851pjd.81.1630712600442; Fri, 03 Sep 2021 16:43:20 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id z8sm403765pfa.113.2021.09.03.16.43.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 16:43:19 -0700 (PDT) Date: Fri, 3 Sep 2021 23:43:16 +0000 From: Sean Christopherson To: "Kuppuswamy, Sathyanarayanan" Cc: Dave Hansen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, Paolo Bonzini , Juergen Gross , Deep Shah , VMware Inc , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Peter H Anvin , Tony Luck , Dan Williams , Andi Kleen , Kirill Shutemov , Kuppuswamy Sathyanarayanan , linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 11/11] x86/tdx: Handle CPUID via #VE Message-ID: References: <20210903172812.1097643-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20210903172812.1097643-12-sathyanarayanan.kuppuswamy@linux.intel.com> <24d0fe72-78b4-6550-e5d8-dd511dcbfef3@intel.com> <26e79e8f-ba96-9087-04dd-283eadd8c693@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <26e79e8f-ba96-9087-04dd-283eadd8c693@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 03, 2021, Kuppuswamy, Sathyanarayanan wrote: > > > On 9/3/21 11:35 AM, Dave Hansen wrote: > > On 9/3/21 10:28 AM, Kuppuswamy Sathyanarayanan wrote: > > > From: "Kirill A. Shutemov" > > > > > > TDX has three classes of CPUID leaves: some CPUID leaves are always > > > handled by the CPU, others are handled by the TDX module, and some > > > others are handled by the VMM. Since the VMM cannot directly intercept > > > the instruction these are reflected with a #VE exception to the guest, > > > which then converts it into a hypercall to the VMM, or handled > > > directly. > > > > Does this patch do any of the "handled directly" leaves? If not, why > > mention it? > > It was added to give more information about CPUID leaves handling. Since > it has nothing to do with this patch, I can remove it. What leaves are "always handled by the CPU"? VTx doesn't allow disabling CPUID exiting, let alone conditionally exiting on a specific CPUID leaf. I don't see anything in the TDX specs that suggests that's any different in SEAM non-root mode.