From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 896EB606A320 for ; Mon, 30 Nov 2026 14:27:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=X/fzRBLc; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=mHhpfk7z DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=H7AYQE8QciYkagPn4//SUt6RKW5FRiv6iYOpu0DOgpY=; b=X/fzRBLc9Ji/GS/Xm2eF6nqO7C 8SgqInR+su21SOmqJsi2byxOZLYfT7U6cH4mn6YkHniiHgnLAhZshg9PUE3sdG8+GI+kt4ibqhT3o jIqyDis2Xg4CnEKH7dGP31/zF4ctWygmrkLHhfISlmoMdiBntsP9/PU/grpbHq8s0B83nrSQCGo4T FXveFv5IL3/JkaM0Kl0Dr0I59PHofeGOIQIEzLYp6RssJ2ji6XIFkny3AktFPWCnTqDjsAT0i8K1a hMcWhETVpbMefhWn/pmLGnrPj7mmZJ5TzrVJ62TfTtD6+xXvP1uQu9MSMatubL+QKRwWZrEKMFes0 wFq3FHUg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xY1aZ-00000004juw-3s6H; Mon, 30 Nov 2026 13:38:39 +0000 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xY1aW-00000004juB-1rzY for linux-arm-kernel@lists.infradead.org; Mon, 30 Nov 2026 13:38:38 +0000 Received: from pps.filterd (m0353729.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6AUDYeqK1645232; Mon, 30 Nov 2026 13:38:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=pp1; bh=H7AYQE8QciYkagPn4//SUt6RKW5FRi v6iYOpu0DOgpY=; b=mHhpfk7zESF8attnpDSUnXG7NCQ0Mkm3uLJPv5DB1f6PBu jO/+SVwaQibYAwyoLsxMqtfK26xW5E4QGAg5GVMNiEdXsuALz5+Axt2t2eyLKrUG f6fh8TbMAs15LgfyuieKU8QtAdzvv8i7RJyDI5ZFVBCNCpCS4quOhONKfCfPTasx lhmJgYXS1k/rRiH1QqX7855Bm/i/YaMSWV1kXfP/YJwZzPQ4m4o/lL7I4Ai0nMyZ J22GeUjMH+IvzaCFisaQCNc+hN7liIWip7ORRmC61Liba+97vyCWa0tcwFwffQUr qRo66KseFonXyyNEQD+t17ndki+B4s8L5i8f+KFg== Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4j7pmsyyts-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 30 Nov 2026 13:38:06 +0000 (GMT) Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.18.1.11/8.18.1.11) with ESMTP id 6AUDJmZ03100440; Mon, 30 Nov 2026 13:38:05 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 4j8bggcvgq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 Nov 2026 13:38:05 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (smtpav04.fra02v.mail.ibm.com [10.20.54.103]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 6AUDc3oj17891676 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Nov 2026 13:38:03 GMT Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 79E3420043; Mon, 30 Nov 2026 13:38:03 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4D73320040; Mon, 30 Nov 2026 13:38:02 +0000 (GMT) Received: from osiris (unknown [9.111.45.38]) by smtpav04.fra02v.mail.ibm.com (Postfix) with ESMTPS; Mon, 30 Nov 2026 13:38:02 +0000 (GMT) Date: Mon, 30 Nov 2026 14:38:00 +0100 From: Steffen Eiden To: Dan Carpenter Cc: Marc Zyngier , Oliver Upton , Fuad Tabba , Joey Gouly , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , Mark Rutland , Rusty Russell , Marcelo Tosatti , James Morse , Sebastian Ott , Eric Auger , Paolo Bonzini , Sean Christopherson , Shuah Khan , Karthik Bhargavan , =?iso-8859-1?Q?Cl=E9ment?= Blaudeau , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v3 4/9] KVM: arm64: Discard a pending SError when resetting a vcpu Message-ID: <20261130133800.20600-B-seiden@linux.ibm.com> References: <20261130-double_exception_v3-v3-0-864856664b26@pereq.eu> <20261130-double_exception_v3-v3-4-864856664b26@pereq.eu> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261130-double_exception_v3-v3-4-864856664b26@pereq.eu> X-TM-AS-GCONF: 00 X-Proofpoint-Reinject: loops=2 maxloops=12 X-Proofpoint-ORIG-GUID: EElTCCyarod0jqwS7HP0dMxnbO-k2GY- X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTMwMDA1NCBTYWx0ZWRfX9sifdvL9z/g9 dB4gNFeswu0+8NtvJVFzb8uNpk+3pQuZZRjmPtc5P2Fgt69lodIqya8rWk2LdpiqmBNUvZgPXW2 RW0MSOOvSmMWcBOlVvuVw2caUWjzmpTe3YisfQdJuP8Mvsm9FwUGjt5GvD7GWwKQ4xjajInnqb0 fI3Rl0gyzoR5Qc5gbVliGjZNzpWVNfB4z3G3CgahNiLeYX7l1jpkzLMrLIXSVn/rUQO+hytrkQS cERvScbbj/OU+1cW0RhquzooxJUUlZPNnkRPnEH6uk4IaVt/0dd5jaQBa6WPrTC0oZOr25aefJj kT+LUhI4ZCOY4bmEFL+ybVWcScnPTdBKRf2XCK3/vFNGW4aAmjIQIzeEILaY+Zy1rZh1lraH47Z ijjs0xijf8PssxoZsnLFdl/cNTU56/to+JqnFSRnoDiXjDeIn92yN8jKW0LjPuCEw8FajSNkThq DUDErDx92OCj6I78htg== X-Proofpoint-GUID: n76H7qdvNI8Mx_NocGEtupi_PpwPS2DF X-Proofpoint-Spam-Info: AW1haW4tMjYxMTMwMDA1NCBTYWx0ZWRfX94JDhdGlaoGC whccSErb7xJZyg2qC2Find8/0Q7IFLen87bKYTJFD57Btq8HIF4BDekGmp0eQ2AVxfIyBRDxj0C JHNjIVCknP8rRTHIv/sIMoHawCAkDg0= X-Authority-Analysis: v=2.4 cv=U9cHnuru c=1 sm=1 tr=0 ts=6b0d7c3e cx=c_pps a=AfN7/Ok6k8XGzOShvHwTGQ==:117 a=AfN7/Ok6k8XGzOShvHwTGQ==:17 a=kj9zAlcOel0A:10 a=zJRp6_cAMcgA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=uAbxVGIbfxUO_5tXvNgY:22 a=VwQbUJbxAAAA:8 a=9T-HPDOZAAAA:8 a=VnNF1IyMAAAA:8 a=QSgesBBaQ_ST1TijxPMA:9 a=CjuIK1q_8ugA:10 a=PONNgiUjRR_v8ZwuZ4b9:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-11-30_04,2026-11-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 phishscore=0 malwarescore=0 impostorscore=0 lowpriorityscore=0 clxscore=1011 spamscore=0 priorityscore=1501 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2611300054 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261130_053836_909006_28A087F2 X-CRM114-Status: GOOD ( 15.50 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-8.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Mon, Nov 30, 2026 at 11:48:16AM +0300, Dan Carpenter wrote: > Resetting a vcpu with the KVM_ARM_VCPU_INIT ioctl keeps a pending > SError. We used to rely on vcpu_reset_hcr() to clear the SError but > commit f1ff3fc5209a ("KVM: arm64: unify code to prepare traps") changed > it to only reset HCR_EL2 before the vcpu's very first KVM_RUN. > > If we reboot a guest while there is a pending SError then KVM delivers > it to the freshly booted guest. > > Clear HCR_EL2.VSE in kvm_reset_vcpu(). > > Fixes: f1ff3fc5209a ("KVM: arm64: unify code to prepare traps") > Cc: stable@vger.kernel.org > Signed-off-by: Dan Carpenter Reviewed-by: Steffen Eiden