Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 98A8FA92D for ; Wed, 22 Feb 2023 22:13:46 +0000 (UTC) Received: by mail-pj1-f74.google.com with SMTP id mj19-20020a17090b369300b0023673fbc35aso3696757pjb.2 for ; Wed, 22 Feb 2023 14:13:46 -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=tjCR8V0z4m5cVBNifCMn2VSXDAfhP49zwpc/QXSffJerDAp1Ppm3DxAG/+cZJSeKsq 7hVlGq+7E/m1tNDuPWI6o2lFbJ1yZEeIgfpg0RyoiRCNUXMoeS/NkVhLFgfw3hONL4Vt N4hjFpOmOoc4g+s5NdwRnx4Ac1pY7+8OOMqoxI4wR206lvGs0kLjO9nFG7sakHCpQUW0 MePtTMNOw8k0DI+QVQ/jSxeIuplKyjTWTMlc1i3z7QzXLunHcsvBD5hJ157NxXdpAsfE Tx9xIcLTx44wnj0Ivp832bJ6cR70PMEOBimdx6LGlaYJlC8aUg+uLrd0xCpe8avFmgER dssg== X-Gm-Message-State: AO0yUKWw5GHK/hT8WKUKf1cU+3Shl0cSZTsT8Te1siJrkL53Gjhs5rJb BvkBunEeO/UsdJCNuI0lhBFIRvVODV0= 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: Precedence: bulk X-Mailing-List: iommu@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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" 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.