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 17981C76195 for ; Mon, 20 Mar 2023 18:24:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231211AbjCTSYf (ORCPT ); Mon, 20 Mar 2023 14:24:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231138AbjCTSYB (ORCPT ); Mon, 20 Mar 2023 14:24:01 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12CF03028B; Mon, 20 Mar 2023 11:17:09 -0700 (PDT) Received: from zn.tnic (p5de8e687.dip0.t-ipconnect.de [93.232.230.135]) (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 955551EC0531; Mon, 20 Mar 2023 19:16:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1679336212; 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=Su0jVvMlcA8VS9cp0F1QAxEGU0NJDxsY7JHrrw9jo40=; b=joiMDXgbeJuLDkYQrkuw2mdaf4RdNU+LXTis9e0EN2JNuc0tQpyM6dOFBRL655TYKP8Bpx TEf2daSlXJw9ifgiWxfuuSVJhbgOP9mVkwD/7SNsdyMev9W4YowMghg37YdPCzG1Bik5VS zBYfAqODJeMNHIuharTIGHYKQZONm74= Date: Mon, 20 Mar 2023 19:16:46 +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 v6 06/13] x86/hyperv: Change vTOM handling to use standard coco mechanisms Message-ID: <20230320181646.GAZBijDiAckZ9WOmhU@fat_crate.local> References: <1678329614-3482-1-git-send-email-mikelley@microsoft.com> <1678329614-3482-7-git-send-email-mikelley@microsoft.com> <20230320112258.GCZBhCEpNAIk0rUDnx@fat_crate.local> 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-kernel@vger.kernel.org On Mon, Mar 20, 2023 at 01:30:54PM +0000, Michael Kelley (LINUX) wrote: > In a vTOM VM, CPUID leaf 0x8000001f is filtered so it does *not* return > Bit 1 (SEV) as set. Consequently, sme_enable() does not read MSR_AMD64_SEV > and does not populate sev_status. So how much of the hardware side of vTOM are you actually using besides the actual encryption? Virtual TOM MSR (C001_0135)? Anything else? AFAICT, you're passing the vTOM value from CPUID from the hypervisor so I'm guessing that happens underneath in the hypervisor? I'd like to make sure there are no more "surprises" down the road... Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette