Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7948394rwb; Tue, 6 Dec 2022 11:56:42 -0800 (PST) X-Google-Smtp-Source: AA0mqf4f6HtzLXzj1n0n+ohBtHdS2Oo6e3nImI0DAMR5H7GPrL5py0i41Bj3lXbXDdyKACTVwxLr X-Received: by 2002:a05:6402:10c3:b0:468:4c9a:7c6c with SMTP id p3-20020a05640210c300b004684c9a7c6cmr11343994edu.397.1670356602713; Tue, 06 Dec 2022 11:56:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670356602; cv=none; d=google.com; s=arc-20160816; b=QZKj81/j8xaiPFowT0rVygTRMg3XrSpOIkSe+PvO/ssJNqapd6wG576PVyVc66A2g0 Ee3yNLzsXb+riwjix+34U/sOTmHBEDTJWxVIT1wti4nZ3TWF3FKiNnH9TFz6+2xuwSex FpegeeHuiuA2omlXZiyNWrlxqiZWyNzOoBeMwsyZcgOijX8fO0FjDwYXFvWnx3bvAdsQ klfnWy4GaRgnOxm9f7NtvI7eFryT4rXfD9hEG1wPyAWlk7JieWJombPX9zOBWkLzKQrR 88Hc2PDibD0I83mdlX4UgxQ+H4qQER8+WpgzeXs6xLYdVXyAZaRs6jcNMe2Hi8CbmIwf G/hw== 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=PpHLRqc8XLUfoQnYBqYUJLgGKbD1hU1U01mFEABewLc=; b=U+NIMz+KCdpKabx7z9Ol5CyZ0BpHF8sAy5RZjz1rrtW7M6DvSQi3HW7Ug5KtYApAlB I6BQ3a3Yilejy3jJxltrzrvC4w9PSR6MhsIdA8SDMO6b0nIhQuwsyOJ1D9xY0sPS4QFy bw9HgYbEDnyTSicRQpQtIrHxoBMUlaCcBLZAmNg4Q8DGa3hQTETDP6Zfizk8s7dRzWXy h8qvYt5KpRnfrFJocq014GntrPejo+vctQ+hka3Wfbc853dvTgWo9MV3WZP/pFCzavwl bUfEbe+9S8CcMAoF9wXfPloOY+8tNDHa4PchxJ8HAf4puwONKZ6o8PDglo1mX3aNM0Ey yeNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=ip6kQ8Ww; 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 ho38-20020a1709070ea600b007bf9de4fe91si17405148ejc.53.2022.12.06.11.56.24; Tue, 06 Dec 2022 11:56:42 -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=ip6kQ8Ww; 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 S229763AbiLFTXB (ORCPT + 78 others); Tue, 6 Dec 2022 14:23:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229753AbiLFTXA (ORCPT ); Tue, 6 Dec 2022 14:23:00 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C864B65C1; Tue, 6 Dec 2022 11:22:59 -0800 (PST) Received: from zn.tnic (p200300ea9733e7ff329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e7ff:329c:23ff:fea6:a903]) (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 381411EC0523; Tue, 6 Dec 2022 20:22:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1670354577; 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=PpHLRqc8XLUfoQnYBqYUJLgGKbD1hU1U01mFEABewLc=; b=ip6kQ8WwF0mpXQ0La9KuqUE3MOTKrEo5TeF5wuPansskXmkFbbjaXWaMlnJnwVEvbeAdQj mtzRq21pzGgnhBSdO5H2XDf2BDv2JuktLnh6D2JSp5w/oc9CSKKcJ6iGHj2dVQ8e+2FNp1 Q/0Lr3NS4jicx7cJTpdg+i54pwa1LqQ= Date: Tue, 6 Dec 2022 20:22:52 +0100 From: Borislav Petkov To: Michael Kelley Cc: hpa@zytor.com, kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, 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@microsoft.com, 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 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: <1669951831-4180-2-git-send-email-mikelley@microsoft.com> 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 Thu, Dec 01, 2022 at 07:30:19PM -0800, Michael Kelley wrote: > 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). Lemme see I understand this correctly: the paravisor is emulating the IO-APIC in the lower range of the address space, under the vTOM which is accessed encrypted. That's why you need to access it encrypted in the guest. Close? Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette