Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp550459rdb; Tue, 5 Dec 2023 12:34:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IHh6S35IQ4VudepY8ixmMS6bIYlBKY5r0uD11ekgyAe/vq9In20RaClJ3A4yQ9kOCybOsyn X-Received: by 2002:a17:902:7c05:b0:1d0:a9fa:5939 with SMTP id x5-20020a1709027c0500b001d0a9fa5939mr2893393pll.111.1701808442139; Tue, 05 Dec 2023 12:34:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701808442; cv=none; d=google.com; s=arc-20160816; b=ZuALQJE1sLTn3YgGbpxwtpU/tFqWu0rh3k2uDfcldl6gTVwc4A+Jzd74wXngvxPMVS WeBE/1LAwgjsXg82k1/zYUUF5XCmxYoQ5hYHhPpqfact89cgSQdi2hLUaYZblMh80q9g xtlN90Z9E2abip0pzCsMQf0xec+wKY4BOko1LdBL0NvYRwSkOP6OerZcZCvYMgCrNcKH xcKrzOyLSl2plK5cbqSGCT+h7JH73pZCa1UsVkj/2Va55t38F5zsEOAPSj6HsPiyX4gG 60UFkx2T/uzvAE2vNr4n6THynFe2FcubjMMlJX2PBdkVk1imooWYwAG9sVA0aTeDpk/s 6mcA== 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=SQIjUtKUjx1k/ihWQekdjEpX0BxntYQsedoVYhd9nZQ=; fh=j/FlFT3AFBrfyd4b6/GF0zOfkjD/Y07yr8XvngdfZeM=; b=bCaevWHCdudE67B3/OlfehWA/16BagPMj3xMWhGXBDzpfJqSWCalq9pLlBqDODwAej zB4Dnn+3VRg7r8BtygyhTSd5Ma9mdq/k1j66dZlYIIhzUjSmB5FVf78RxX2MEnSELINY Eer4adsTtIBuJJm/ZoPqzfLboeuf95lfZHL4a2HKnsqXe3IzA5jnXxnFoG42aQsIynW7 mplQMl0L6Wh5ZifJcEQuSeQeXDEYjOVeozUlO1/fUDf3QWdVOMHhBswxGttlFuvCzx5R HNw/sstM+9JJEp8lCboGNlDJXe1QeqY5S1I/jWcnD5ebjZfKUGgFaVs7Pj/7N8sjKB68 ttRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=ZlCPdpsu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id v24-20020a170902e8d800b001d0b3be7e4asi3101185plg.161.2023.12.05.12.34.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 12:34:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=ZlCPdpsu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 9F598809AFC4; Tue, 5 Dec 2023 12:33:59 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231680AbjLEUdp (ORCPT + 99 others); Tue, 5 Dec 2023 15:33:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230162AbjLEUdo (ORCPT ); Tue, 5 Dec 2023 15:33:44 -0500 Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA8EF181 for ; Tue, 5 Dec 2023 12:33:50 -0800 (PST) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id BCC7C40E0173; Tue, 5 Dec 2023 20:33:48 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id fIA2bYMxYBIT; Tue, 5 Dec 2023 20:33:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1701808427; bh=SQIjUtKUjx1k/ihWQekdjEpX0BxntYQsedoVYhd9nZQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZlCPdpsuLl9kG7HvXjCt5VaKGA7jC+zQ00BRct+Hp1iZuM77uc0nOjeAE82ioUs8U XdRSgtBOwsUzp1YEoIMAwxJhGJi/RHMONfJm1UJuI99sZorl0dsePFalqJYMv1af9l YzMJzGU2f92zWlhIwpUXNZl6Myex5k/nXA7ZutC7SGE3dbH94O26cZahpoJqyeGGb7 6b+XoHA2qrnt1kwSfJphlqBQodquS81mZwsMSoDWiPM3GfYcR7e2dZM4WBQoQR7pR2 Lzeu7CW9fTAGitX9xHMGIF4Z7bbBvXLbrNNrVkhpZ8H1JBK5/4pVLcOJLJJ0RgBxtn uzPoSFfCW2DwmO4OgSuavsN2aKO0GD6718k6tcNTnop4u9YxBQA1STzVaBzVwFP9tC d060DM8d39onwdmiV9BV738ADpJ3T21M5qa97CKyi5YPqM9zphZaM+1xzEahLc1aeQ ncCPDnU1j1KI8QyvzA/Jt0TTBu3brNuZuxW48nNW6NjYgNDdmSlHavm4eRCEs5LmGT Efm8pvxcbgmkQs18VLb0nbAKiKUii/cH1UAFqWwHUhHFogH5pmcFmW+8mXjG9qLmQJ dXaQ1gDqaF6bxDoYLQptVyHik9HyJQODBtoZRY5xm2NAr7CPPzfO2dub+H60c/lkXN zoweAcG3NVcrT9YmieELLMFQ= Received: from zn.tnic (pd95304da.dip0.t-ipconnect.de [217.83.4.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id F1D5640E01AD; Tue, 5 Dec 2023 20:33:37 +0000 (UTC) Date: Tue, 5 Dec 2023 21:33:37 +0100 From: Borislav Petkov To: "Kirill A. Shutemov" Cc: Tom Lendacky , Thomas Gleixner , Ingo Molnar , Dave Hansen , "H. Peter Anvin" , x86@kernel.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/coco, x86/sev: Use cpu_feature_enabled() to detect SEV guest flavor Message-ID: <20231205203337.GKZW+JIe9m2/QVi7Xl@fat_crate.local> References: <20231205143738.2875-1-kirill.shutemov@linux.intel.com> <20231205144619.GCZW83uzAomKmupn7j@fat_crate.local> <20231205150012.6lma2wzcellr7pz7@box.shutemov.name> <20231205150648.GDZW88iAjBzYoIJ0+o@fat_crate.local> <20231205151437.aqmuydosfmnq3zr4@box.shutemov.name> <20231205160035.GEZW9JI8eKENXBo6EO@fat_crate.local> <20231205171643.zg7fwxjyccab53kf@box.shutemov.name> <20231205172436.GFZW9c1EaCaguGhglb@fat_crate.local> <20231205180813.phbxg5jdumfovshz@box.shutemov.name> <20231205185241.GGZW9xeTtiG6sORMTr@fat_crate.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231205185241.GGZW9xeTtiG6sORMTr@fat_crate.local> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 05 Dec 2023 12:33:59 -0800 (PST) On Tue, Dec 05, 2023 at 07:52:41PM +0100, Borislav Petkov wrote: > So yes, we will fix your issue, no worries. I'm figuring out the > details as we speak. So you can do for the short term: --- diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index c461c1a4b6af..f8999f6d1b00 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c @@ -434,7 +434,7 @@ static void __init sev_map_percpu_data(void) { int cpu; - if (!cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT)) + if (cc_vendor != CC_VENDOR_AMD || !cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT)) return; for_each_possible_cpu(cpu) { --- until we've sorted out the bigger picture. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette