Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp619914rdb; Thu, 22 Feb 2024 14:07:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWgrsgSlkd5sfjEkXFHW4kCTg3ouSBgqos3uVXRl06go+DK+EkocbI42ZhO5RNe+oUPCMMyxCUnXeyTA0xtrz2cIdXAn36yKoJYgTLX6A== X-Google-Smtp-Source: AGHT+IEBjn+7H4IKloh+5aWuFEUjJxcdzWQ1tsSyomLYAgP5HVGP9pWIU7SFpNohtmFXNmpYj/wE X-Received: by 2002:a17:902:d385:b0:1db:fd89:791d with SMTP id e5-20020a170902d38500b001dbfd89791dmr147795pld.39.1708639623789; Thu, 22 Feb 2024 14:07:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708639623; cv=pass; d=google.com; s=arc-20160816; b=jX6jEO4R15U8VN/kY0r3ZRwv0bFUP7PwAJL+KIfMzkRU3an16npcEQug0XoQsOtXPZ KiTG3bp7uTM2Q/QxFdQZrsoAQEqhx4CHRRlpIjiSf7ALqrIUpRXKUsKWCwWvp1qGw8ef CIdB2uY9k0f3jM/TtqP3Vd7gcJACXE2az1pOJc1L6cGomiqvYo8OL7fS5rmvMEYrvLB5 4HvfTDK2rJVYh+dlsnkdXZA9Iezn2JyXmRqYD0BsV5iEpp+j9tPPYhe/keWpyANFOIaB 1R2F8+brOWtvqMb6bqFs0+vXmUjg0jqtDNVtbchX7yd9htnBMF/nQklhx1kBJq6e6T4g 86XQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=xXS+uiHmPKxW40P0P65T09ha/nNwEp1FEeNKV9lC8Jg=; fh=8QDqhbUYqUmo6njZfsgNvzC+8/sB9djjWa/jdu7CcQ8=; b=mq0NEJN7M1rTlmSGIqSk0FZ7uUALbDuvZlbKS+ZtprnX7SC0mYf6c8ciaYUAztymIn J40Wp69a0Emhwe8RDCwHc0YAIgNm/Ethqb6Nfrrm2GHoszHu7ZbLl9BCu33ZTvyxNer+ ZfJ2O9xOpwi9+GZ1HYGMZEY0bzFpootrWMN0ecaKTyRPlC5wHKhRKHdmmitvYT00yu0E RgK7k7ETDODph6OwxuOJrr3urm7dTa2r3NiO1unT3vwU56ipApSipiCgQQB1SL5obkVr M6L2wmOCHkIeWJMPv/ER0A2TSvZDiFIjtq/poDJPmquxzAJvNSE/zz3DmBDKD38kUIIO 4XfQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="m/2dyR85"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-77439-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77439-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id w15-20020a1709026f0f00b001d9ece29addsi10857908plk.178.2024.02.22.14.07.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 14:07:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77439-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="m/2dyR85"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-77439-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77439-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 6E3A2B22C83 for ; Thu, 22 Feb 2024 22:05:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A42BC13790A; Thu, 22 Feb 2024 22:05:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="m/2dyR85"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="3P0A8iIY" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 62BC012D1EC for ; Thu, 22 Feb 2024 22:04:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708639499; cv=none; b=qBXx+d9geXLlJcrYYU+Ml+21Erm/zE2HLshjTuB1Zi2Hjwv8nyr/iBz/GNFhkGQJyt/MRQjsj4XwLKt8IV2PM0QCD6u/DXDocgOXewvXKTSm0CqU1LqEnwfq+7BE7nws3JgyXaRncD6pLwd55pqtz8iqAJ0IqQkP67OEOdwxmUc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708639499; c=relaxed/simple; bh=xXS+uiHmPKxW40P0P65T09ha/nNwEp1FEeNKV9lC8Jg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=R8ysItm/v1m2Lj8AUtnMzJC8ZpczTIGHj/4tu140g6ETJMBDH5zblEeUZB1q6ozdaiRgKwz8TjqBB/8Uxq3tfxfYtl0995kLkxS4QHxC8P/j4Ug3AUUrCua7+DxdLiD2hKVMtHrPi2VpCVnhrtLDF/cgHdrwNAslL2UONFNqm4M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=m/2dyR85; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=3P0A8iIY; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708639496; 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: in-reply-to:in-reply-to:references:references; bh=xXS+uiHmPKxW40P0P65T09ha/nNwEp1FEeNKV9lC8Jg=; b=m/2dyR85JIcCZGGQAeMJdxKDF024ImfMz99e5pyEMaUY+Fdv9HkWyfwbGViJcw/1GsTU9C 8DlytIkC6CfziPrs7KYoFvgFP3/Sx/czcK21SfpTS2DjTbyfhPk8O1OszRPXJQflOgeomK UiqPbaS4/7VjEl7989ZoaPpKS4NAJJQRqCRnvMCPRgLc04BR1OZrWH+dCx99XRPneivpeY Ki6y92Dd/pC+o+66J2I6p5mayn0z/fVgF6ejdRp2EOqY8uL7ewCuvnNmknT4Y4Y3t6rzM3 TZ3yF+FHuyOyV6NXNQVcgplxcJ0ZhSMrJv4VXiuFn9SD1CyP0kf0SKih2T7T6w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708639496; 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: in-reply-to:in-reply-to:references:references; bh=xXS+uiHmPKxW40P0P65T09ha/nNwEp1FEeNKV9lC8Jg=; b=3P0A8iIYNJKmKCEkHPb/QvfbAasAull6AWDpa1ZTYuv6xCjlo8gStKpcoFEdANi6im3piH WcGG495WSr94wCAw== To: "Kirill A. Shutemov" , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org Cc: "Rafael J. Wysocki" , Peter Zijlstra , Adrian Hunter , Kuppuswamy Sathyanarayanan , Elena Reshetova , Jun Nakajima , Rick Edgecombe , Tom Lendacky , "Kalra, Ashish" , Sean Christopherson , "Huang, Kai" , Baoquan He , kexec@lists.infradead.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" Subject: Re: [PATCHv7 05/16] x86/kexec: Keep CR4.MCE set during kexec for TDX guest In-Reply-To: <20240212104448.2589568-6-kirill.shutemov@linux.intel.com> References: <20240212104448.2589568-1-kirill.shutemov@linux.intel.com> <20240212104448.2589568-6-kirill.shutemov@linux.intel.com> Date: Thu, 22 Feb 2024 23:04:56 +0100 Message-ID: <87le7cduk7.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Mon, Feb 12 2024 at 12:44, Kirill A. Shutemov wrote: > TDX guests are not allowed to clear CR4.MCE. Attempt to clear it leads > to #VE. > > Use alternatives to keep the flag during kexec for TDX guests. > > The change doesn't affect non-TDX-guest environments. > > Signed-off-by: Kirill A. Shutemov > Reviewed-by: Kai Huang Reviewed-by: Thomas Gleixner