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 CC669C636CC for ; Tue, 7 Feb 2023 12:41:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231157AbjBGMlf (ORCPT ); Tue, 7 Feb 2023 07:41:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjBGMle (ORCPT ); Tue, 7 Feb 2023 07:41:34 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82C85EFB2; Tue, 7 Feb 2023 04:41:33 -0800 (PST) Received: from zn.tnic (p5de8e9fe.dip0.t-ipconnect.de [93.232.233.254]) (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 014511EC0589; Tue, 7 Feb 2023 13:41:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1675773692; 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=+krXHkOwaQ2CA6MBr//FoiRxxZ4nkc4bLu0Pn6fd5JQ=; b=VzbT+beWx6gdcXo8RwgQy7OJCkExOCPf3pCJZ44jIA0nMadh93X6k2+oKL32X6ZrtoBNsJ QwT3xSdG6H4wfEqL4g6Ft6qDG5GfZst4KuuFau2C8/I5O4xGjnpj5xFGzGevrr0Rt8PlPH wRbcGTMmXZuj/u24y0qZCB/3MkezfZk= Date: Tue, 7 Feb 2023 13:41:27 +0100 From: Borislav Petkov To: "Michael Kelley (LINUX)" Cc: "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" , "seanjc@google.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" Subject: Re: [PATCH v5 06/14] x86/ioremap: Support hypervisor specified range to map as encrypted Message-ID: References: <1673559753-94403-1-git-send-email-mikelley@microsoft.com> <1673559753-94403-7-git-send-email-mikelley@microsoft.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-hyperv@vger.kernel.org On Thu, Feb 02, 2023 at 05:49:44AM +0000, Michael Kelley (LINUX) wrote: > I could do: > 1. CC_ATTR_PARAVISOR_SPLIT_ADDRESS_SPACE, which is similar to > what I had for v1 & v2. At the time, somebody commented that > this might be a bit too general. > 2. Keep CC_ATTR_ACCESS_IOAPIC_ENCRYPTED and add > CC_ATTR_ACCESS_TPM_ENCRYPTED, which would decouple them > 3. CC_ATTR_ACCESS_IOAPIC_AND_TPM_ENCRYPTED, which is very > narrow and specific. > > I have weak preference for #1 above, but I could go with any of them. > What's your preference? Either 1. but a shorter name or something which works with the TDX side too. Or are there no similar TDX solutions planned where the guest runs unmodified and under a paravisor? > For v6 of the patch series, I've coded devm_ioremap_resource_enc() to call > __devm_ioremap(), which then calls ioremap_encrypted(). I've updated the > TPM driver to use cc_platform_has() with whatever attribute name we agree > on to decide between devm_ioremap_resource_enc() and > devm_ioremap_resource(). > > If this approach is OK with the TPM driver maintainers, I'm good with it. > More robust handling of a mix of encrypted and decrypted devices can get > sorted out later. Makes sense to me... Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette