Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp5857108rwl; Thu, 29 Dec 2022 04:10:12 -0800 (PST) X-Google-Smtp-Source: AMrXdXt/8+l178AcVpZxL11H66itj2kPVqicXuKTT/LA+eBvpbqjasYn+hggQkBr0ZvXipe/Xl2p X-Received: by 2002:a17:906:6b8c:b0:841:df6e:a32e with SMTP id l12-20020a1709066b8c00b00841df6ea32emr32037272ejr.25.1672315811993; Thu, 29 Dec 2022 04:10:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672315811; cv=none; d=google.com; s=arc-20160816; b=uxI7B9+9GG7+74Dpkzr/q/S0cZ4RK2WnfXVgwV4ojRrThda4vWhvYoSjKXRh/Imj8I AmszcD6nslmN7Q03lwu0Wy6/9JrrnvOqo4jl/gJIBnhQArNl+9k5Bpk6ao5LmTs8Yw3u rHMm4LJyUphtwsiyLV1YoT6bH8FgapJDaiODafDkmShT1E7eY+WQ7h2qt0n+/Ynovnk2 hbXN99cDxWHpOjQTI915Fh55L4GBerl9ZNKcze557+Js0oQSd9rhKJ0cTk7/ZrxK3cox ky63YEb8o2t8cVrq9QMNc7Ac76LVpvRrXlc3Nt+8SbuOPaomb1Hd2u1FzLeNOtCAy/Oi Qbcg== 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=ul44K3f4ZupNPx/eCMwjHBaV6XqkOzJhw1crDNySdnk=; b=C+ID/j/Q5UmRgjcIhnjRX2FoD3Ujh8RRcQJy/tCCiVqspQ/KqqpVn9HVeillJdcG0E ZPs9TLqwpE3HigkeBl5/W2fftfbqnPrVfhqNML6j9xWoTDEsnfe7i7tNHkdmtUCfrPeS 0A+5ftW7qtXmcRjK8/FrsMy2gMRd+oSgRbkh0DLOS1kdmX0VmenUfvhQUs9UmASq3lSD bMMrX22DeXCdVQSoNJ+k7C3QZnZ15DtVN6jngVbV/bVjuO1BJbXbZTuvfldHu8wPW0hd 0+rSco2fLhc1td/HLzxJLojgC1fkdJ/Z47olEURY3L3trxDcou07SJf93+uywectPW24 Ec9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=bxNiEBBL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sh37-20020a1709076ea500b007d97d797c8dsi17766603ejc.215.2022.12.29.04.09.56; Thu, 29 Dec 2022 04:10:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=bxNiEBBL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S233130AbiL2LjS (ORCPT + 63 others); Thu, 29 Dec 2022 06:39:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230173AbiL2LjP (ORCPT ); Thu, 29 Dec 2022 06:39:15 -0500 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 873A013E24; Thu, 29 Dec 2022 03:39:11 -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 D43761EC064D; Thu, 29 Dec 2022 12:39:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1672313949; 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=ul44K3f4ZupNPx/eCMwjHBaV6XqkOzJhw1crDNySdnk=; b=bxNiEBBLAaBnIPVoCbb+hCeekBNbVKTQcB3i2k6jDvY//NgNcPOphifK0E8Zy75BUtZmBE dt186MvMyBnoFlR8z5b6TFHAhdWikrfAqAunyUzuWfmpmJ7xW0AXAHtjeEfb7rl/9lsD3Z FWBWKkS8+hFeKC0KzPo1PEwvMPoQ5e0= Date: Thu, 29 Dec 2022 12:39:05 +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@infradead.org" , "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" , "Williams, Dan J" , "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 v4 01/13] x86/ioapic: Gate decrypted mapping on cc_platform_has() attribute Message-ID: References: <1669951831-4180-1-git-send-email-mikelley@microsoft.com> <1669951831-4180-2-git-send-email-mikelley@microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 06, 2022 at 07:54:02PM +0000, Michael Kelley (LINUX) wrote: > Exactly correct. Ok, thanks. Let's put that in the commit message and get rid of the "subsequent patch" wording as patch order in git is ambiguous. IOW, something like this: Current code always maps the IO-APIC as shared (decrypted) in a confidential VM. But Hyper-V guest VMs on AMD SEV-SNP with vTOM enabled use a paravisor running in VMPL0 to emulate the IO-APIC. In such a case, the IO-APIC must be accessed as private (encrypted) because the paravisor emulates the IO-APIC in the lower half of the vTOM where all accesses must be encrypted. Add a new CC attribute which determines how the IO-APIC MMIO mapping should be established depending on the platform the kernel is running on as a guest. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette