Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp2000304lqa; Tue, 30 Apr 2024 05:58:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVK/BpegxckWKl0NI/4N+K3+DYUncrVxOntXo/gJ5jO+qjh4DfeK+OtnRWO+8SbEviEA4eVGKjIFY/j+vVcDowTRXI6czgBqippdFcB6Q== X-Google-Smtp-Source: AGHT+IFHGn20OGaGAiL9NqNuoAq8im0tPjbuROC7v3s1533B3cFkHmj17rFSA4I+8K0qpWfK+fYo X-Received: by 2002:a50:bb4a:0:b0:56c:d47:e403 with SMTP id y68-20020a50bb4a000000b0056c0d47e403mr6735241ede.28.1714481929773; Tue, 30 Apr 2024 05:58:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714481929; cv=pass; d=google.com; s=arc-20160816; b=RaOrRSjkDpIL08jWg6mMJTAe1xw6O6iKiYKhdK+5v+g4vdTXLrkBwg4TKr3HmA6x/H njqxhm3xAk1uzsdHStY8IyvYkks6LR2lsNYvVGgToAelyN88zAdJJmVR7PvlD9lqXQEj d0Vef6BtVLXt8yymwtP0yko+5y72fhavmROcFGM7zk6nKcLc+iBDdCtQkFAWscwiSBmB vyZb5ToH3s7ftQWTMguoD5O38OYYV2qVmeTD+dtG0aRNhFJYAUeBh9r6kpDHQEp/fNp3 k+M9YKlsczLW1UO7lvfxIqeOlw9fZyRmelSYXgmI0DDSQB7Qa04+maGbMDGfUfI15hk0 Ojow== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=JIpGJ222f6DlJRq4eDp7EoEORpRjHOTnZ9jXZzNPKUg=; fh=GANuBoRmw59Xp4BYEw61YuLLj+kyLJv1HKjTwOI0RwE=; b=srgpiuo5wxPRtqiaVDYNYXfTwMeTt7IGPNxyVeGBmhCGs1xPhyIg26UShjmhQgXAY1 avW/qcB3EXAJ79QBypXrNF1uLtT8UKk6oODZZqSf7sQ5p9ZRvIotIxyXkUBEVIl9646q sICqJRMFlxPMWRpiJ7akdqsMt89b7jihS46B92lqWmiAFqxs17T3wnYM016J5Y5Qf3Ut kJJ2sPVsGKS4U30tOB2y0/CLA14toJqwLK2Zih+i0ttDJcWqoLt0qgFmkuqIo7m9VStl MajWEjt8R3DrYUfYhOf+eu61AOrE/RrMZ2OsGC056ri23AItBH5DcpjgNx8izwogPwV8 9vXQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=k0hz+6Yi; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-163952-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163952-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id y25-20020aa7d519000000b00571be379431si14634385edq.572.2024.04.30.05.58.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 05:58:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163952-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=k0hz+6Yi; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-163952-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163952-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 81E451F2182D for ; Tue, 30 Apr 2024 12:58:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BF071171E74; Tue, 30 Apr 2024 12:58:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b="k0hz+6Yi" Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6397D171669 for ; Tue, 30 Apr 2024 12:58:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=65.109.113.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714481898; cv=none; b=NlZsJZZMAsJ+uQ6968uRAiL+Hzg+A7TPWn5CjQ1Mzt2sE6kIVRRp6VpL1FH+9mTRiEBzFR6pIEm9bJdK8BREGBHGEb4OIpLkbug7mLcGiv/mdWgFNKvW0B4UzHbxNXEp8x94apyTQT3d6I2mjOeja8TXS28W+3gVVhAMcz/driM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714481898; c=relaxed/simple; bh=6u+FWsINnrfSGtCwyNnQlvbx5yJBBCmbil7RE1EkMdo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=R6jTyxc06e6AMDdc3yAbpebAU1+FRFmcs+VCbnbmR6ItZ5aSdxVLJizE0oebqpjL+KEB7lUOjWJnZ3dZK1wqBHR42sErHme0wgjItGsBmcCqo9d6gNMhfUzjBejsHFIcpGZkhnhIIxIco/biIX7IJcFW16vCwcLNuhbfcTO9ym8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de; spf=pass smtp.mailfrom=alien8.de; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b=k0hz+6Yi; arc=none smtp.client-ip=65.109.113.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alien8.de Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id BD00D40E00B2; Tue, 30 Apr 2024 12:58:13 +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 ZV3pt-UnzM2i; Tue, 30 Apr 2024 12:58:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1714481890; bh=JIpGJ222f6DlJRq4eDp7EoEORpRjHOTnZ9jXZzNPKUg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=k0hz+6YiJrTAJEVtCM44lX+k6fS0nhtBTM7sNoVHfqYqDltk9uRgnk05/peANK4Xw DY34QJaWudiQm121U/c2t8W9sEFjrtGuAllZvb9yd6NnZOvydLsGezVRgEZ8WKtd0J AlUwp1g0Vpq9x5deLTXx8qHmrAyEMVQQki1fARM4o3YIuhF4f5RTgZBmkk/h7utIgs ERZvpCAJpzbElAae/y10YkkGASFA94BjvJO2TbYLWwKOtCtsWy3CnZe/uian3x3y63 /rLaLb4RnEs0KNL9O/1vJWSbEETl3egE9GeE6s1cncuMM8FAk+Q/8S1b+9fKt8gabi iPQoSYgmOWupQU8E2vUFZTj6ztwyzt6qcC58Gp6nkowShdJRbvLwEGNt+qgufoxC2V BSJ34iFpEpqUkQ5PJf/nCNAVbzs++JNLutcdMVAiA7Mw5wg9P9T4e62l/5sr/nQ7rJ ucRyNe40IPf7uvX55ZYNdyn8DAYJeau5s/qCxKUsc+f0N25+8lPKxZ/vnRWTbd22yQ VdzC5qJ2io5JiDh8EQUR2OORscxfnjDuiQzyRdm4abg8tl/ULDMf5o13YZnYRwBifr 22oeZvMnpDmhujKIXyfkN+AXuWCT77avEaGABW3EQqG1WbUIKnCZjlU+nAdu+UqTML sFmaxBKupr32m8kBpVxTKI88= Received: from zn.tnic (pd953020b.dip0.t-ipconnect.de [217.83.2.11]) (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 5CE0740E016B; Tue, 30 Apr 2024 12:57:50 +0000 (UTC) Date: Tue, 30 Apr 2024 14:57:44 +0200 From: Borislav Petkov To: "Kirill A. Shutemov" Cc: Sean Christopherson , Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org, "Rafael J. Wysocki" , Peter Zijlstra , Adrian Hunter , Kuppuswamy Sathyanarayanan , Elena Reshetova , Jun Nakajima , Rick Edgecombe , Tom Lendacky , Ashish Kalra , Kai Huang , Baoquan He , kexec@lists.infradead.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCHv10 05/18] x86/kexec: Keep CR4.MCE set during kexec for TDX guest Message-ID: <20240430125744.GQZjDqyM3k_peEw-bc@fat_crate.local> References: <20240409113010.465412-1-kirill.shutemov@linux.intel.com> <20240409113010.465412-6-kirill.shutemov@linux.intel.com> <3q6jv3g4tezybmd667mqxio7ty22akxv7okrznmzx3tju2u4qo@2alzjkbgm2lh> <20240428171111.GKZi6DLy_ZwuZsZdFq@fat_crate.local> <20240429144454.GHZi-yZkD0boKk5N17@fat_crate.local> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On Mon, Apr 29, 2024 at 06:16:54PM +0300, Kirill A. Shutemov wrote: > Yes, that's what happens in current upstream. Let's rewrite that commit message then: "TDX guests run with MCA enabled (CR4.MCE=1b) from the very start. If that bit is cleared during CR4 register reprogramming during boot or kexec flows, a #VE exception will be raised which the guest kernel cannot handle that early. Therefore, make sure the CR4.MCE setting is preserved over kexec too and avoid raising any #VEs." without that bit about TDX guests might be allowed to clear CR4.MCE which is only confusing and unnecessary. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette