Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3357084pxj; Tue, 11 May 2021 02:37:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXsYXEMRBqOXkkwCDYNupwiqZwVDu+SYLNZEP6b+AOP+Vl5qIAVZqJC4C2iW1NNU3mcliq X-Received: by 2002:aa7:d543:: with SMTP id u3mr35463670edr.26.1620725866529; Tue, 11 May 2021 02:37:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620725866; cv=none; d=google.com; s=arc-20160816; b=mTB3cVCjkrC3/jOuXTxc+H9J3h3R66XSZ8aUDe0t43nh2RBRSx0XHaxH/Kx4tZ5ebC kEDx2w7n5YqeF6QoQLza8jYBtvr/4b9zsAJmT2/zd4Vu26wYJR0Ef6enQQmZinFm8s9m AOaZelvEJVDfisGu/L9efYd4RbEJsnakr/ntKUCzA7v1LrtlJAYBRv2zNyGJiaIYdM2l SYiOACBvEPLFA0zf0QAs0051txqRDKMiokFqU6H1kZ50Rzulxif+AsSERv5EXXDlcM7k BZVdm19ylaAdp5GqgQStdLVfj2on28UL/vCk9h6IKS92M3W4Uf2nZDFqgXRDYuzeZVh5 3/lQ== 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=F7VxGCtxqOa5Uaq8/CVpfggBErw2DOeXqO+Qk8G4uYU=; b=Q4zQbMRV+sIV/cC+bb01VVmPoo3Wcz0Yp5tU8iqW0ZTSxsFCDmCCxSlfkkoKEcWUHW JBjTM0lPtQs9Rk0qYQJQFG1NY8oXn8fqlT73uWSoyKsqw+eeZjTN5sKbRzClPgejlNfB iPz3ghxrNVw9tVYcZyNscqce1b44eWK5b3h7Kv0+8B3JDLDK4Lu8LMR8X25xfaVdsCf2 B0D4pcZsQ1n32HiX8YkxETm+OTA9HVcF9mDyZ8v+qaaVyGMal1TaKx+hZIi+F4Hv8jyl /nVbgg4aZ8/rTVgUl7A2Xg6SWf0B/Aj38dW8zESGxEJLKRB357IUYjQYC0B59ZkVwfD1 dIPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=kCiLX+qW; 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 r1si15160467edp.303.2021.05.11.02.37.22; Tue, 11 May 2021 02:37:46 -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=kCiLX+qW; 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 S231217AbhEKJhM (ORCPT + 99 others); Tue, 11 May 2021 05:37:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230427AbhEKJhK (ORCPT ); Tue, 11 May 2021 05:37:10 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BEF7C061574 for ; Tue, 11 May 2021 02:36:04 -0700 (PDT) Received: from zn.tnic (p200300ec2f0ec70079cd82bef3234244.dip0.t-ipconnect.de [IPv6:2003:ec:2f0e:c700:79cd:82be:f323:4244]) (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 740DE1EC0523; Tue, 11 May 2021 11:36:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1620725761; 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=F7VxGCtxqOa5Uaq8/CVpfggBErw2DOeXqO+Qk8G4uYU=; b=kCiLX+qWCIE9DmOWmD2vOMkS8u1N1iOnViJVyAqlmlv12k52rSr9m3JcN39XVGWUjpKID0 2tXfFE2NCcTiyfL2UFdEwyEpMt9/GaZ1ayxGK7E4IXPJF8CMaTurNEKkGOvbin4Ltur95d jWhLxSRGD+V5VtGSsz8O4h9x6t+T2R8= Date: Tue, 11 May 2021 11:35:57 +0200 From: Borislav Petkov To: Sean Christopherson Cc: Dave Hansen , "Kuppuswamy, Sathyanarayanan" , Andi Kleen , Peter Zijlstra , Andy Lutomirski , Dan Williams , Tony Luck , Kirill Shutemov , Kuppuswamy Sathyanarayanan , Raj Ashok , linux-kernel@vger.kernel.org Subject: Re: [RFC v2 28/32] x86/tdx: Make pages shared in ioremap() Message-ID: References: <312879fb-d201-a16d-2568-150152044c54@linux.intel.com> <797c95bf-9516-8aee-59d0-f5259d77bb75@linux.intel.com> <5b4b4fc0-aaa8-3407-6602-537d59572bc1@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 10, 2021 at 10:52:49PM +0000, Sean Christopherson wrote: > I can't find the thread offhand, but Boris proposed something along the lines of > cpu_has(), but specific to a given flavor of protected guest. IIRC, it was > sev_guest_has(SEV_ES) or something like that. > > I 100% agree that we should have actual feature bits somewhere for the various > protected guest flavors. Preach brother! :) /me goes and greps mailboxes... ah, do you mean this, per chance: https://lore.kernel.org/kvm/20210421144402.GB5004@zn.tnic/ ? And yes, this has "sev" in the name and dhansen makes sense to me in wishing to unify all the protected guest feature queries under a common name. And then depending on the vendor, that common name will call the respective vendor's helper to answer the protected guest aspect asked about. This way, generic code will call protected_guest_has() or so and be nicely abstracted away from the underlying implementation. Hohumm, yap, sounds nice to me. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette