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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 B7F40C48BDF for ; Thu, 10 Jun 2021 21:07:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9FBFE613DD for ; Thu, 10 Jun 2021 21:07:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230269AbhFJVJw (ORCPT ); Thu, 10 Jun 2021 17:09:52 -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