Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp569308lqb; Wed, 29 May 2024 04:39:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUC2fx5OOLfZFFrqebV/aHx2iqXSMOj0uK54aZbEGsvkScH84T17ThmqqyS7SbCXlVWBBrBtU03+ilqyCz5nKvzqQRMajQZtNybZfvN3Q== X-Google-Smtp-Source: AGHT+IH64y0dO6slGR7RjwFuCOw4ESh3R6Eb2Bved/aL0FNbRD+k4Yo92ULrS4PGpXWDfAKLzUc+ X-Received: by 2002:a05:6e02:1c8c:b0:36d:c18e:a0f6 with SMTP id e9e14a558f8ab-3737b33b4ecmr151314735ab.21.1716982790771; Wed, 29 May 2024 04:39:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716982790; cv=pass; d=google.com; s=arc-20160816; b=F8MDICuY5r2Cc74s8hcPWA0E+YQ9Tbut8hvFlf0FzU2PFY4yxmDcpmagdv2PfrujHM X6gZGux/Ld+ovCCkQq06AJnnaA6xI47OzS+4e+wPkskPh2p/L3BmyJeg7aAvjknWT1Gg r21SuriQlOtoorD/Y8saUn+ToMCjo5iUI3+KUAWCN4nww5D5ycWLgun8USPy5pHhqnoa mX9MDJtM+gVI1DE+bgPqgexzeQ5lQPHMe2BIKAjUDZxR57kFfCe0IwvVbx1un5tkhsa9 oANRRT7Z1J1AdMyZGpbMM6F52K9aG6rpeF4SUxnGM6aklj7uwEzCJfeHZp/j2kr8C+a1 88cQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=EdFeXZ0iZQwHyJpJ9sEUFEvxz5pnqM5Lhk7k33g54Ts=; fh=F0B4ciRNsdEnI+1GVpwo5euct/MMJfko0aN9N7nwIps=; b=v9VfLZ0N928mftjxVLa87mSsZYjUahX8AqKTCmxNkbMiLSSttnYngnaKerd10ZTGTV D2P9d1Zihz3u/Z7TEbUxHbSdXeM39CbHqm0c6R5nI84rM8iZD/gw+0xb9aM0w7Sp6CYJ fnEEKmJi9yj2p5q/A6SUp35BYs+Dn9kI5G3h6a5RtHMzFSHOpbk0PC2x3jdKNiSFr2tO 0zxDl0piKgijVm0wMzP2Q3Qv0ZH2o72hjkOIIH9C7b4nvDkl/JQ+0qCt3LuOMKR6PcU0 T17utn2YzA9d0HLzZ/iJydOxOPpabDUwHcIFxzmGUpnvFMecw/T+vI8+5i6wiKJdrMWS /JlQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b=gucEyGED; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-194034-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194034-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-68c73a135f5si8563883a12.503.2024.05.29.04.39.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 04:39:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194034-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=@suse.com header.s=google header.b=gucEyGED; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-194034-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194034-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com 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 047A9B227A7 for ; Wed, 29 May 2024 11:39:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E72851802DE; Wed, 29 May 2024 11:39:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="gucEyGED" Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 178A61802A8 for ; Wed, 29 May 2024 11:39:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716982780; cv=none; b=kcjDtRr2ZQ9x1leF+VSWIkaXbDprRVXL7Ujv04xG4n+ZU8OiKtsw3ES9QIH0cmxfTxVurIL7+MmXqTxcxRmIcMZmBsc30oTlLLW8xP7t4iAznsIqZaTafTAhowHim+4RC7oP9RiSRvH+HKYGumr04vH3/5Pw4R5dibdVTpnBpzI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716982780; c=relaxed/simple; bh=ydja5ABopWv3H3E435qacVly16lftEf0fcwfsjpRf8Y=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=AqyuR2zdSgp+bMAQOAUagBZWZRRv9X3hYJqPCnwo0eraL2X2vFUSClw7TaDHaOUrI0fmYrzQqt8QlygFyaZs9byYMx9Gda1/OZFqtpMwSlCAvzME8gI1vwPJY4iSaFcIW7/loGTswFnBuyPVXdDgkVCtTjTQiIMmPkQMtQHYfBs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=gucEyGED; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-42125bfa28fso1190425e9.1 for ; Wed, 29 May 2024 04:39:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1716982776; x=1717587576; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=EdFeXZ0iZQwHyJpJ9sEUFEvxz5pnqM5Lhk7k33g54Ts=; b=gucEyGEDBr4+17MeUfIyWpapTdoZUGFkq7sJUPEX5qLfvB37BuOdznOrkykyQxEDiQ qjZJ0A5kFHAVor7oU6aaUk6oYMnv2x6/sP+8qeexusOT7wNUqvVTEc783c1KdjL96Jr/ 8iSTSzvNejMqGduLqo5SM3Y0F5Dcltm1fPbOY9t6Ucu/pPi927nqyTIuC2CWdCd3gYEA /Bpoy2xknX8tFadJCHlAXMoc1YwJv5EBOl6gfA/Cb0agkS8VNz2ZsCrplSj+8PR4O41O 4RDsIn2mW6LuDnMPFU5PifDxYIFEmIbNOF/aGfKea8+Y1B4AnNe3MovqQzWW14JYnPkk t0mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716982776; x=1717587576; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EdFeXZ0iZQwHyJpJ9sEUFEvxz5pnqM5Lhk7k33g54Ts=; b=QOac8i2ZGe6/26Kcf9Xnv7r2X3X2EeUwVQmtaQU85IiAZsR/3B0nj0c++2HprvTqo3 wKl2gf0QEIIveflE6bopbyuD+dmTzz0bd3mXJSwUB1gcHRfIsvh7lD7b3mhgpFgZJ8Pc 9Z1ZJ1r3NNUFJ+Vvjey83+doRt4eZQ2AYAQv7YGw0/bmE3SWQzEEUDHBnL7iqpv30HwA fich7BEydxxMUtGhROsm/xJV0FASVOdSDlrJzGRFsh2hzYsskw7w93VmqNWt99cTDQmE RFg6cbKI40j3RAlm03p87JrBurABK1hbKeh3q6XNV1KOjJ333itOGl4u7yM5+G3cnvk6 wCDQ== X-Forwarded-Encrypted: i=1; AJvYcCWZLMQXbYYHNXghfknPQtxkgZtd6TytdGZeJYOF2t7itJXI7rFsm8xGWbJiZi20QBOIY/E1TnrSg2wT2vA7PZK5KVFuxlDYDKvAmlhD X-Gm-Message-State: AOJu0YyRUrbGh7wUMITq9Bh9LzZJX6jdPxP3RdAjNPMk/dpHWI/oF8hI bp3pZ0HVRNQW/39xQh5rhx0C1xX348erIqlLFLPT0t655ZHreAg1Gi/lVH28BWk= X-Received: by 2002:a5d:62cc:0:b0:354:d098:8d67 with SMTP id ffacd0b85a97d-3552fe179a1mr12680946f8f.57.1716982776439; Wed, 29 May 2024 04:39:36 -0700 (PDT) Received: from ?IPV6:2a10:bac0:b000:5de0:ca17:8dd8:7313:d6fd? ([2a10:bac0:b000:5de0:ca17:8dd8:7313:d6fd]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3557a1c93a5sm14633282f8f.70.2024.05.29.04.39.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 May 2024 04:39:36 -0700 (PDT) Message-ID: <46ddc54e-f7bb-4de3-b311-faee12e5a6b9@suse.com> Date: Wed, 29 May 2024 14:39:33 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCHv11 06/19] x86/kexec: Keep CR4.MCE set during kexec for TDX guest To: "Kirill A. Shutemov" , Thomas Gleixner , 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" , Ard Biesheuvel , Baoquan He , "H. Peter Anvin" , "K. Y. Srinivasan" , Haiyang Zhang , kexec@lists.infradead.org, linux-hyperv@vger.kernel.org, linux-acpi@vger.kernel.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org References: <20240528095522.509667-1-kirill.shutemov@linux.intel.com> <20240528095522.509667-7-kirill.shutemov@linux.intel.com> From: Nikolay Borisov Content-Language: en-US In-Reply-To: <20240528095522.509667-7-kirill.shutemov@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 28.05.24 г. 12:55 ч., Kirill A. Shutemov wrote: > 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 it. > > Therefore, make sure the CR4.MCE setting is preserved over kexec too and > avoid raising any #VEs. > > The change doesn't affect non-TDX-guest environments. > > Signed-off-by: Kirill A. Shutemov Reviewed-by: Nikolay Borisov