Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp39957pxj; Thu, 10 Jun 2021 14:10:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/oHbtMmW/jQXaA+P83EuWl84RK9xjrVN9X60FePSr6+bcLJRvTrzG6/tPjmG5bzgajX3B X-Received: by 2002:a17:906:a245:: with SMTP id bi5mr478913ejb.316.1623359404971; Thu, 10 Jun 2021 14:10:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623359404; cv=none; d=google.com; s=arc-20160816; b=MRLMoe3Lx77vKx10wPGOPUxO5vTH8CeBn1GWrF2+3miAqDFBtN4ib+J3OO7s6KAP6d xGxzbx0P6ZHtY4ylNIXJIvR26Mmwc52BQ58ags0oO2t8ZlVM7eFYeZrCREDFHPg/fsG1 kr1jnKan66esFMHZ7guMEpADM7auyKMicQTTmSdSnA0pJptGqPe9beu1Lca8eUn+9GAR Ftb3fLnYj6nikz9vmcfbKhsllKwOASoqVj5XvMse8QV56ICBxga5Nb64bpLNx5yGMCmH 3VVhNQSDiXTPz26u+CU2mlERlReoOpyOrvbjv+oFRukOszwtVmD6Rj5C2PsdkLoy/WeD 9JXw== 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=U66o5NPctiBjexTUVOAi9pIBymcgh42hxbtqNj2WUcE=; b=wr0CzbRJ11c7bAKaMGRbnfiqY7EtthFjTbo0S7qmOJDDsSZuMhVjSZU7OVU2QWEmvx TVNaRQjjECzDmcH3G8SUJegKnJSWcivaoqrzqcoFH1EYrzEya6aITupW3dxURFxvyOCn HCTjBAGhfBWeCPrTNdIa4j8ldzysHI66NMEtkCAJFheJcExxlQ9AhAFXiMV+6Y71CZSA jIxlYNUSCcj6iolGmtFFZ32CrbfIcvTF6VAP1P8EnaaS7lyy3JyEud+S5MKtMK0nEBXc 8IznxSSeDnpiWkNew33THIf62ordCqEwvBvhQiv99pokbk6WxPkCtpfHeOkgU9TL3gJ2 o/UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="kYC8/2Qv"; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m12si3167922ejq.256.2021.06.10.14.09.40; Thu, 10 Jun 2021 14:10:04 -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=@alien8.de header.s=dkim header.b="kYC8/2Qv"; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230181AbhFJVJv (ORCPT + 99 others); Thu, 10 Jun 2021 17:09:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229941AbhFJVJv (ORCPT ); Thu, 10 Jun 2021 17:09:51 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3526C061574 for ; Thu, 10 Jun 2021 14:07:54 -0700 (PDT) Received: from zn.tnic (p200300ec2f0cf600c1d899d9d1fa7d9d.dip0.t-ipconnect.de [IPv6:2003:ec:2f0c:f600:c1d8:99d9:d1fa:7d9d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 46D6A1EC047E; Thu, 10 Jun 2021 23:07:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1623359272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=U66o5NPctiBjexTUVOAi9pIBymcgh42hxbtqNj2WUcE=; b=kYC8/2QvAyJKwVIqZ6vMf0j6Ulu2E/oBdLTbE/JKpDebUpfLqsZQH50IIvYdg180Q0JVSG ulCxVB6GOD0A2d7rLha1++7HHT+xSkgMxIe6QGr2Ol4eG+NDg52H2jtb7ey7Z/tItvzvhd zcth3Z2f3s1JEnZTzg2tTmTMIEl/jp4= Date: Thu, 10 Jun 2021 23:07:46 +0200 From: Borislav Petkov To: "Kuppuswamy, Sathyanarayanan" Cc: Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Andy Lutomirski , Peter H Anvin , Dave Hansen , Tony Luck , Dan Williams , Andi Kleen , Kirill Shutemov , Kuppuswamy Sathyanarayanan , Sean Christopherson , linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH v1 04/11] x86/x86: Add is_tdx_guest() interface Message-ID: References: <20210602022136.2186759-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20210602022136.2186759-5-sathyanarayanan.kuppuswamy@linux.intel.com> <3437ff11-4656-2c2a-ae58-04b77b6ff663@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <3437ff11-4656-2c2a-ae58-04b77b6ff663@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 10, 2021 at 02:01:41PM -0700, Kuppuswamy, Sathyanarayanan wrote: > Is it alright to use vendor name in prot_guest_has() flag? I thought > we want to keep them generic. Sure but keeping them only generic doesn't work in cases like this. And just like you have: +/* Protected Guest Feature Flags (leave 0-0xff for arch specific flags) */ there could be ranges for vendor-specific flags. Intel at 200-2ff AMD at 300-3ff which is 256 per vendor, so should be enough. :) -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette