Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 770AFC61DA4 for ; Wed, 22 Feb 2023 22:14:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232902AbjBVWOf (ORCPT ); Wed, 22 Feb 2023 17:14:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232727AbjBVWOR (ORCPT ); Wed, 22 Feb 2023 17:14:17 -0500 Received: from mail-pg1-x54a.google.com (mail-pg1-x54a.google.com [IPv6:2607:f8b0:4864:20::54a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06DA9474CF for ; Wed, 22 Feb 2023 14:13:47 -0800 (PST) Received: by mail-pg1-x54a.google.com with SMTP id h19-20020a63f913000000b00502f20ab936so389566pgi.20 for ; Wed, 22 Feb 2023 14:13:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=v371wfsV4J0hP2YWPldN/jyK7SvY4U1Nw/7wNzhqMJ0=; b=SDx040f4cRwUIq1/Pn9rbyUg0nODn7NLzfPtTsxeLPrGL2xKNJKKpZMMN83uN7u2Wl B6St8Ul6KmHV9YkKNP0QNKLSJhgww930gocbdTCTZz31aQ+6H2IX036kJTxBmGsaDZuM pLwxQa5BKAWyjM4aTyFHZFsc1ggRCEsp717a+hUJiyhhx04l5kL+tUuk/kAJZOTrjGTZ 29ABu9JHgYtZ53tH+cm0XR1UR9WYYbYTvZHxC9DaiYE0ivRTQb0Q9C7XK4d1z33omvkV 2/J+qNvJJL1wWZ9XsxPfsY1hiJ8ljtFxZcTnopaPx2qxyvdb6x59W4AfE7hPt/tB78BC sbHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=v371wfsV4J0hP2YWPldN/jyK7SvY4U1Nw/7wNzhqMJ0=; b=xFHxN1/qAg1ZOHG8EA8cacZvIHfNX+j4KqG14WdXZi6HaLk/Um52QCogD7Q/Zon8rp EeGinBMxofm4Bf9hlyzWjJ/ZMNHwqcvF5FsjbacFJI5WDqnrH/05Z58f2EOVZslFJChx hYQXsWyf9Z6LzAv9stZK3zFEVtSg9lOLA3NWvDLdId6JzGEt7VUesmV1ENlpet3Jwdaf zN94LWr2hJF9bsIEqffyZUGPEo3Vaja1sKFqyZIvdu3BQdAVBoo37eo8IPo0B2HLqD7K G5cXYCBKXIJBbd/1K6w6IDpV0z/9XfPP/wIIzjOr4wfWVEx1MAFcuti1AKjxgIO91vX0 b22A== X-Gm-Message-State: AO0yUKVHdD3ENnBXumuenopmPNSnJZQNe448BTNiuMpwSexUjSvuVlWk Kf22sJ2s0agHNV5DPiyXwHNKXbjxjPk= X-Google-Smtp-Source: AK7set9Z1FLoPTpNq0n7vXYMl00aKb3WH8eouCDkP/taHVgLQB9g+fM0rK3HFBezOkWsQvlPcHR7H0gXMhg= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:90b:ec6:b0:234:6a5:5e3e with SMTP id gz6-20020a17090b0ec600b0023406a55e3emr12361pjb.7.1677104025901; Wed, 22 Feb 2023 14:13:45 -0800 (PST) Date: Wed, 22 Feb 2023 14:13:44 -0800 In-Reply-To: Mime-Version: 1.0 References: Message-ID: Subject: Re: [PATCH v5 06/14] x86/ioremap: Support hypervisor specified range to map as encrypted From: Sean Christopherson To: Borislav Petkov Cc: "Michael Kelley (LINUX)" , Dave Hansen , "hpa@zytor.com" , KY Srinivasan , Haiyang Zhang , "wei.liu@kernel.org" , Dexuan Cui , "luto@kernel.org" , "peterz@infradead.org" , "davem@davemloft.net" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , "lpieralisi@kernel.org" , "robh@kernel.org" , "kw@linux.com" , "bhelgaas@google.com" , "arnd@arndb.de" , "hch@lst.de" , "m.szyprowski@samsung.com" , "robin.murphy@arm.com" , "thomas.lendacky@amd.com" , "brijesh.singh@amd.com" , "tglx@linutronix.de" , "mingo@redhat.com" , "dave.hansen@linux.intel.com" , Tianyu Lan , "kirill.shutemov@linux.intel.com" , "sathyanarayanan.kuppuswamy@linux.intel.com" , "ak@linux.intel.com" , "isaku.yamahata@intel.com" , "dan.j.williams@intel.com" , "jane.chu@oracle.com" , "tony.luck@intel.com" , "x86@kernel.org" , "linux-kernel@vger.kernel.org" , "linux-hyperv@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-pci@vger.kernel.org" , "linux-arch@vger.kernel.org" , "iommu@lists.linux.dev" Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 17, 2023, Borislav Petkov wrote: > On Fri, Feb 17, 2023 at 06:16:56AM +0000, Michael Kelley (LINUX) wrote: > > Is that consistent with your thinking, or is the whole > > cc_platform_has() approach problematic, including for the existing SEV > > flavors and for TDX? > > The confidential computing attributes are, yes, features. I've been > preaching since the very beginning that vTOM *is* *also* one such > feature. It is a feature bit in sev_features, for chrissakes. So by that > logic, those SEV-SNP HyperV guests should return true when > > cc_platform_has(CC_ATTR_GUEST_SEV_SNP_VTOM); > > is tested. > > But Sean doesn't like that. Because vTOM is a hardware feature, whereas the IO-APIC and vTPM being accessible via private memory are software features. It's very possible to emulate the IO-APIC in trusted code without vTOM. > If the access method to the IO-APIC and vTPM are specific to the > HyperV's vTOM implementation, then I don't mind if this were called > > cc_platform_has(CC_ATTR_GUEST_HYPERV_VTOM); I still think that's likely to caused problems in the future, e.g. if Hyper-V moves more stuff into the paravisor or if Hyper-V ends up with similar functionality for TDX. But it's not a sticking point, the only thing I'm fiercely resistant to is conflating hardware features with software features.