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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7287EC636D6 for ; Wed, 22 Feb 2023 22:14:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232573AbjBVWOa (ORCPT ); Wed, 22 Feb 2023 17:14:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232696AbjBVWOR (ORCPT ); Wed, 22 Feb 2023 17:14:17 -0500 Received: from mail-pg1-x549.google.com (mail-pg1-x549.google.com [IPv6:2607:f8b0:4864:20::549]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2CC346141 for ; Wed, 22 Feb 2023 14:13:47 -0800 (PST) Received: by mail-pg1-x549.google.com with SMTP id 62-20020a630241000000b004fb3343142dso3623474pgc.5 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=O+UpZYwGjxfZ/FkoiH7qiQ8EFQ6X8Zb0+0J6HpQoVI5ldOQyjsKo7tUa6KKpBAuJe7 dKXedmxsw8KFUpK1c0ubjVSbyKtiyaUuk7Wejh9+/n3n9uj4L0P0kNmVOVyvVj14Mkv8 U40gxSAC4uW42ECLa3jO7qY2iDHpQXxz+YWAgw2x1VrmK6cvoviU6QHD5gfo3t4xzx0g TsysqKBmlnHK5w08HS7OTXcqyZACIETN/1ORNiQu5JUmzuk6x+XO8igTOTPUkj8iY1Od 72seEu/9pU1RnTWEFQCmT2z199XsSrdzzxm58HPqCtzzebVncDN4Lns4T/jPFmIE2Y2+ hzTw== X-Gm-Message-State: AO0yUKVvRKN0hsNkC14foMSq8JYFqLIs4tmkooi3E3JyAh3dOjq6Zjnx UGoirLmC/xxZV1PO5EtuuJ5eXG5yE+E= 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-hyperv@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.