From nobody Sat Dec 13 23:04:11 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1764947503; cv=none; d=zohomail.com; s=zohoarc; b=Yto8mzeG7ZQu6nVpo/zAU4ZpMbAsasoTVDvyoz3Tnbrj89j4N35KmsQrEgqNdMKLeKg/qFzZbgNvm5Y9zyJ+fmJeBJb3YUGvsEGuukKor6UVq/a0jM95PKaznTxGZF+2mLxSMxLxs95e3PJ0dzhOOzymJJrb8VEBfwflYrUrmhk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1764947503; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=SNRoxsNNrYd1+8NJrEKrokd9NPN4VEeWaFFpiw4lBGU=; b=A5FEPcjz9ChL8ChE7t41h8wnvfOeof416y2L/B/HWXpGcGlFln7OcaEmvPoRBdQTSNsT+ST+CHPwOAzKwrKxOfWuiItRozSCslA9MY1GH66OPvhdmZUu5RMSHvxrt/z8R3Nv6bZLYbNtdQlBlCfMg9I4uHD6hS5Wuwq81k8w1LU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1764947503308378.81132822412826; Fri, 5 Dec 2025 07:11:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vRXSr-0003dP-D6; Fri, 05 Dec 2025 10:11:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vRXSp-0003bt-Nt for qemu-devel@nongnu.org; Fri, 05 Dec 2025 10:11:19 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vRXSo-0001Rg-8L for qemu-devel@nongnu.org; Fri, 05 Dec 2025 10:11:19 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-47778b23f64so14294655e9.0 for ; Fri, 05 Dec 2025 07:11:17 -0800 (PST) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47930ca15adsm93255835e9.13.2025.12.05.07.11.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Dec 2025 07:11:16 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 71E565F833; Fri, 05 Dec 2025 15:11:15 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1764947477; x=1765552277; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SNRoxsNNrYd1+8NJrEKrokd9NPN4VEeWaFFpiw4lBGU=; b=EV9kqBqhkbgPotbM8PWa8huUzaT/jVLZzbNtfxcgRAzCGRvHLTM6igwGGak2GHwqWY dxZBWSrigXRjhZ9q4vLR8k5o+3YmvVjf9vd5NYBWHN3Wu+XMDwlxPIUSimA4905VZnlp gZgJuWZfbtEwFu73Dqe8JJhe7d8kWTJOM35PvivrfPqlm51geNIVmpgUe4krIpBP63PI aFzumXAcNXzT4P0zCKV+hKAnu/yk9yg/Sp290y6w3pflKIyAas5/hPZu91YUIoha1myS pN7O0wZsXE6udtY+y95IksbNt02axlQ2JhV/nl3GDS/OPII8JdYh8elA99Cm+pvmkNNe MzNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764947477; x=1765552277; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=SNRoxsNNrYd1+8NJrEKrokd9NPN4VEeWaFFpiw4lBGU=; b=PBa6TY6mTzN8iARQWzxFzOYbUrBJi8xdAYZ5aiCT26XtCIr6T6sZZTWqBg9/jkf3Q8 ZTok2TyJGnaQq2JmWKbHAXDALwUP8VY1cCGc+QPfEmvgGK4lKVekkEjMtxfpJP3M36Y1 VmHXCdve4KbZwTw4xapzLSGHdOmik3eC1/mnamnhq4vSpiOZsC6RG/TaxfDNIlcjP7gw J+AacOOnmvV8PkeOObyiKuaarM/cXywWrwFVVQ6dvNioJqklMpeF0l3SP3bTYDV1Tbx4 44VMtbsVqlY9jlKE0hfsmQnmjj15Bbycf5PxBTJaUlsbKZPKLfK41CZGqHozuA0GA0nO kGcw== X-Gm-Message-State: AOJu0YwrtEpO5LE8K9yW7zjD7hL2++TProLh4cls13Qvc6Vd93ceoRyr 4+mwEiem47GpMA/btph10fRdf7FY0biuBnHoc7IAnmIg0U05HDsvHga37fRUD/Xxlp0= X-Gm-Gg: ASbGncsFY1PpT3GV9AkLOXiRxH4jqihM7TecVOZvh1ctl5x0d7UzRWACHfXdSduxhjA 2k2RbzZf0UNl6OZmSJgkMVwDRpIIwZ3NK+Uyq9SB0nzZpdLe2frMA9yn+wSVLqVqX2JhA1ITfd1 wy9Mrl+Y6KGh6eg0j2ZuZavXRcsPhtVM7NdmZPzQ5EVp1CxqOBcis+ue+aDHo+O7vxKHRgmlFxm J7KDRun7vTRUHmrUSHYJuUm4h99L8ofIfPSBdt4XFPE6AhKfyrylzIMRaMxOYKVpo0Gnr5kyYFG oYP6MW9s//jB5+BDOM7oHMZNqx0W4vyMG/OwmvwLRTRjpJ9Mgg/RX95nGeY2TXpKzQqdCMcj1HT NxtfIuT8TZSe+3mYDL1Z+uDkqGZDL1G1jCagKDZkzCSnJgwYi7dl6UxPw788V31IKBiXRxsWsVd sFY/W9sY661Dw= X-Google-Smtp-Source: AGHT+IGT9nMbbGKbe0jvIAstlq9HEshYBDi2cuW5ilozLcsEOgE8dadbKnKf/wfgUO2Hq3l1x1dkoQ== X-Received: by 2002:a05:600c:3106:b0:46e:1a5e:211 with SMTP id 5b1f17b1804b1-4792af1b207mr106135245e9.21.1764947476663; Fri, 05 Dec 2025 07:11:16 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Mads Ynddal , Peter Maydell , qemu-arm@nongnu.org, Alexander Graf , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH 1/2] Revert "target/arm: Re-use arm_is_psci_call() in HVF" Date: Fri, 5 Dec 2025 15:11:14 +0000 Message-ID: <20251205151115.2035930-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251205151115.2035930-1-alex.bennee@linaro.org> References: <20251205151115.2035930-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1764947506077019200 This breaks a pure HVF (--disable-tcg) build because the fallback stub will always report false. This reverts commit 4695daacc068cd0aa9a91c0063c4f2a9ec9b7ba1. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/hvf/hvf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index de1e8fb8a05..70d34063df8 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1935,7 +1935,7 @@ static int hvf_handle_exception(CPUState *cpu, hv_vcp= u_exit_exception_t *excp) break; case EC_AA64_HVC: cpu_synchronize_state(cpu); - if (arm_is_psci_call(arm_cpu, EXCP_HVC)) { + if (arm_cpu->psci_conduit =3D=3D QEMU_PSCI_CONDUIT_HVC) { /* Do NOT advance $pc for HVC */ if (!hvf_handle_psci_call(cpu)) { trace_hvf_unknown_hvc(env->pc, env->xregs[0]); @@ -1949,7 +1949,7 @@ static int hvf_handle_exception(CPUState *cpu, hv_vcp= u_exit_exception_t *excp) break; case EC_AA64_SMC: cpu_synchronize_state(cpu); - if (arm_is_psci_call(arm_cpu, EXCP_SMC)) { + if (arm_cpu->psci_conduit =3D=3D QEMU_PSCI_CONDUIT_SMC) { /* Secure Monitor Call exception, we need to advance $pc */ advance_pc =3D true; =20 --=20 2.47.3 From nobody Sat Dec 13 23:04:11 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1764947518; cv=none; d=zohomail.com; s=zohoarc; b=liQhQUBwcQM3bztQ8WKB6yoJ+LXF1zmBO5lRV3Q08f9dBk8zKh91jCOqrhnu01Xs5oeykylpaBcHbnMUWk7fd7VNvdD3LhcwKNl1canNd+rGjQKTSC6JtPmqRiZx9JPAtyRk7Lc88xa6Mr9IRF4RRvb/YOR+kLKiI50T5ADkM3U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1764947518; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=cfX9YOm1De6R6T1aFALHx1afL1WHdp07Fe4YIeRNplQ=; b=OAIVvAw9hOZqAAQAzLnG5XCaEXfutSAUnRbw3SiHFGpAn3iWQPLbUA3EJUYuhLz9zmwZAHeH7gVe6ffhu/W9FL/HMmImmUY6EbC+1m71eACmEzOjLQ8307sinLB0xmBKJinC0ONS23o5TuOG9QY5djwSSHpGiaIHq24E1FsIR84= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 176494751868193.70488324370683; Fri, 5 Dec 2025 07:11:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vRXSr-0003eN-TF; Fri, 05 Dec 2025 10:11:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vRXSr-0003dJ-8O for qemu-devel@nongnu.org; Fri, 05 Dec 2025 10:11:21 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vRXSo-0001Rp-UT for qemu-devel@nongnu.org; Fri, 05 Dec 2025 10:11:20 -0500 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-47796a837c7so18747885e9.0 for ; Fri, 05 Dec 2025 07:11:18 -0800 (PST) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-479311e712fsm91377305e9.9.2025.12.05.07.11.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Dec 2025 07:11:16 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 8A9D55F839; Fri, 05 Dec 2025 15:11:15 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1764947477; x=1765552277; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cfX9YOm1De6R6T1aFALHx1afL1WHdp07Fe4YIeRNplQ=; b=A4vutgGFNBoI4H1iPbsz5WO2tylDiEFGK2Wu/WHHxphfoH8PnTbHnS6NZcAB/n+2tJ fDcg7lzZguIDoPIHTSPu3+MuJXELz63RaakhEqeCEFTDRWwRThC/cjBu0aPmCLPqT4Ps yFanhFcMs8r0t8lK1cQeGbcVrNMwwFQ5//eQOhp/ak7mT0EaxMRAqeldPjfDfQWAhV8d s+s9U4CWqh312bvUHcpW8ugYP3+5SLLVGCpyU6X02PzFcvOPNc4OKIbqZE7DpXQ7aKmA Zb6hLEJUZ8SNQigviXaBn1CNFb73iberUfs48phAXmEyOqi5q+RVwSwXft2cZ2DKtvpL ychQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764947477; x=1765552277; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=cfX9YOm1De6R6T1aFALHx1afL1WHdp07Fe4YIeRNplQ=; b=dPOPYt8a8JDrVSu0gjLqdGBtumGpiabN7S0r8fuZHTS4cHZr9R/eoEtVwTeVjSbGmI dhdYzJ53m1yvVoAsXpG6ZQT0X4z9yrRYPHvbK8I3ofbFaMk8hj5EhOXnmTsk2QVomXbw La8MsOhk4QpkrOe2Ddaqg+WZESfPN4ryoz8M1U10XvNbdRiqrznTJtdivzLAeQbKSQHr qs4BxH4UOsnJqwSedoOlhf+i8alUKqotiddwZuKh2kE2hplxSdQqhAS2C0aG/f2UbqZK fTen5eWTs2IAG1NteX6XUXneubs8PzVVSPsEelYkU4WDqMAol51AqDtb7Nw7jgY1bfz+ Cn7g== X-Gm-Message-State: AOJu0YxtAeqd2JjvGHA5DVE1/lmnUyySNRIxGxnYifv83mcNPXHBNors GhqNCQr0y+L3v3kCSeSfVhOecRY9dJ5znAY8M3zEe3JU0tH97kOPUWlWnTBiSHpX8ek= X-Gm-Gg: ASbGncvmDKjCYdD9lC/vIrrgCYFbK+0vIeJ7ls+hzpJI0knGV/nh0SDM0WwCvknNHJ0 Oj1nTw5+r8Ys7n6G+jQ5BzC6cZo1ubsk99GPj5pCtwSaJqJBdz/pXXpYPutk0adRZSrcNUvNOjh Dkjk/0wxazyOuDQQDXlWoBlbecVxrMCMQ3wb7ZWbo5CDHlyMWbd3EypGKJzBT/vIH8ggIzPFNZr D7gE8PnWqay1wLogKHvXmQ8pVpl9tF59m9J6HRuEcZgQ9MtOiL/IP2oq4+LsQUoCaEnt3WpwJ5D J0kZeOAqGV1sIBRIIapKDN/uLtfwUzDWbX9WjpkwVZxJHvz0FAVOobiuc7W9+pRtwOqeaG1RJJX WC4cIOOx5OD1tNOxshjowO0VbDQKjc6/MPoHXJfX691vOoAXZbFyaswW8g52B9yAp0tb0rS9sK9 cnjzy55MKY0b8= X-Google-Smtp-Source: AGHT+IHfd1Higw70dl2d7141IVGsKJB45YCokbQ8pRdJgFqGLyT05yhnROoJMBoyrwV87/072IaQTw== X-Received: by 2002:a05:600c:1390:b0:477:a3f9:fda5 with SMTP id 5b1f17b1804b1-4792aef1a50mr92069565e9.9.1764947477413; Fri, 05 Dec 2025 07:11:17 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Mads Ynddal , Peter Maydell , qemu-arm@nongnu.org, Alexander Graf , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH 2/2] target/arm: ensure PSCI register updates are flushed Date: Fri, 5 Dec 2025 15:11:15 +0000 Message-ID: <20251205151115.2035930-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251205151115.2035930-1-alex.bennee@linaro.org> References: <20251205151115.2035930-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1764947520314019200 When we handle a host call we report state back to the caller via registers. Set vcpu_dirty to indicate QEMU is currently the reference and hoist the flush_cpu_state() and make the call unconditional. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/3228 Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Joelle van Dyne Tested-by: Zenghui Yu --- target/arm/hvf/hvf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 70d34063df8..8e2940217a6 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1942,6 +1942,7 @@ static int hvf_handle_exception(CPUState *cpu, hv_vcp= u_exit_exception_t *excp) /* SMCCC 1.3 section 5.2 says every unknown SMCCC call ret= urns -1 */ env->xregs[0] =3D -1; } + cpu->vcpu_dirty =3D true; } else { trace_hvf_unknown_hvc(env->pc, env->xregs[0]); hvf_raise_exception(cpu, EXCP_UDEF, syn_uncategorized(), 1); @@ -1958,6 +1959,7 @@ static int hvf_handle_exception(CPUState *cpu, hv_vcp= u_exit_exception_t *excp) /* SMCCC 1.3 section 5.2 says every unknown SMCCC call ret= urns -1 */ env->xregs[0] =3D -1; } + cpu->vcpu_dirty =3D true; } else { trace_hvf_unknown_smc(env->xregs[0]); hvf_raise_exception(cpu, EXCP_UDEF, syn_uncategorized(), 1); @@ -1980,10 +1982,12 @@ static int hvf_handle_exception(CPUState *cpu, hv_v= cpu_exit_exception_t *excp) error_report("0x%llx: unhandled exception ec=3D0x%x", env->pc, ec); } =20 + /* flush any changed cpu state back to HVF */ + flush_cpu_state(cpu); + if (advance_pc) { uint64_t pc; =20 - flush_cpu_state(cpu); =20 r =3D hv_vcpu_get_reg(cpu->accel->fd, HV_REG_PC, &pc); assert_hvf_ok(r); --=20 2.47.3