From nobody Sat May 30 19:21:50 2026 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=1776963805; cv=none; d=zohomail.com; s=zohoarc; b=XuSz9KtJoeV/ErzjaGLZM3dTJd7R74sE4PXvr+6irYbPg4EmOO52pwgrnw1FEtOzBHe1i3Or1Ef+AZmBlIUP1e/v2UzWK3CYTcMGSKDOnsORcPdCK+m2xCN8eP3WQlI+yHU6RZIt9UfvW9KwGiow5TGFf7dqym6pKzjH7w9m7Hc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776963805; 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=YGkoFuEm7+jO9F5J4WaA/pQTANhW5MV3tHvArzYt2ao=; b=D7RG5k/Kepsr/gplY6ZGuUMHA3Ui1oOFpR7FDkiOZ8Xa7J2xifEb5qQxgai9n79AsKN8o48q3/NxvbmW2xW3rnKtoiIU9zXwERMwVPqUOWF7ZjoRJeomp/C5/xlT8VoeERmh65vVyU5qPT/0ddThS1e9iFngPctooQu3LApCW7g= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1776963805891860.4288632020537; Thu, 23 Apr 2026 10:03:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wFxSB-0000Uh-7L; Thu, 23 Apr 2026 13:03:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wFxRu-0000Mg-UO for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:02:56 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wFxRr-0004cr-2t for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:02:46 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-48896199cbaso68058535e9.1 for ; Thu, 23 Apr 2026 10:02:42 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488fc0f82bbsm912678555e9.3.2026.04.23.10.02.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 23 Apr 2026 10:02:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1776963761; x=1777568561; 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=YGkoFuEm7+jO9F5J4WaA/pQTANhW5MV3tHvArzYt2ao=; b=JzWNyKd5jLVT91ecLdhSEPDPHXBHbFPjLvcqTW2hWoLSUqeXxsqjmagpH21VgAfrCS wM5Axl+mmX+o1dI/MRKu2a/LFemGSWPZ/ieVcZZgrsBrg5wa9NsZwxRmuSHDUz364Qrr 7pfNH6k650XNlOOIOE1tBd4Brfkn69GcVq0uBJlJDjirrDi2lJ98EHSSnsPExM05L2l0 JW92woBBHmb5MI6nFexVPEWHKUrsLle399jBAY+6FaTlUyHuIKPedQgQbwby7Va3qun+ d9M99Zn4/PxHmwnU8eHlZlpXS4XJnUVUgMdOkRM6A39rZhei3kx/ELlzBcsSaTNkKEwS mHog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776963761; x=1777568561; 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=YGkoFuEm7+jO9F5J4WaA/pQTANhW5MV3tHvArzYt2ao=; b=iISjDdfJMQrarL9ks+YmJiDfZd06PFE9FYK5w3v4uFCGm61XQWIInJmxK3DdsleqrK kPViJa1FNa/HumpGVsLJyp67BXfZxnhJO4ie+CTqaZr2rRwySfgvHCrxX7xD/LyFEHea DP64DbQz6a5X0aQlRGy3VY9bd0UPWUKb1cXZ5B2eRS0RKiFo6sBlZFpk+KDS2N9j5WGV eClqAVEzHvGv87LnfT3nn+79iOv8SWkKtYH0J8tPpmS4NRFOwV/dXJRmBlgbqQ1dsWgE u4S/JlXuDv5nVrfydlzSr+NcGL6WTSsZkrzX4JbjAWLqqw5+IMXKy3B4YXSTsPbSLpvH m5tw== X-Gm-Message-State: AOJu0YzGR7EksXTQh2a07/ZE7IlTo5O8RyZTKHYAtNwRkNy1SzzyJk7j eY1PX9Ltqm4fFLnI4raKFZ1FNmsCLnNd3u7eiPQsO6lpmYnSvjAD3VfImNlKQsgKUu7nZPhi31X KeqYrSTI= X-Gm-Gg: AeBDieus9vSwQhaNziLkVbehCZAi6XkTwx0t3AIu8xhrH0nHxUi1Fy+n/uj31PccTcx XmfevMRb/lGiN8+NgkDc6mQzcODfY6a9oW8ACMP+iok4IsiHVX01UdrCYMFynSefcI4FY5UtrIk cZ1mJCh0l7H0BjiXXiEmf8ihbBM9W2ea/QoS/92oxx5rfTJdUyq1fD6Xh3u+bwhDVt9ldcQ8peY ornprRfxWj5Qu0c9WoLfxj35A3odfXf9dVgkHBBMim1WVOAEpRhncPsVKUy0rdGceVYHO4pmATU aLM8zM5qRZ6N8tCp3cm3WYqPuKjhJMoDuUme35AtbvOFXAEzeyGYccDsHVCakbz+DJjj72O2Hxs NpIBozmqvsxoDZc0SL8AaHSURr1KQVydgelFx0f+d8lxjgAKLwsfCv7Lz5LS+/rxiJ5Xnx0jTO4 Lbjz+ixNy09AjK8sikZAHNX6LbU49rHiEQrn2pv5xG0RiqKxTBTeCCf2AbyWUYFtVouuv9sQbKV 1yayjkeC09X520MrjPXIQ== X-Received: by 2002:a05:600c:3553:b0:48a:52f2:a0f1 with SMTP id 5b1f17b1804b1-48a52f2a5f0mr207640535e9.18.1776963760832; Thu, 23 Apr 2026 10:02:40 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Roman Bolshakov , Jonathan Cameron , Mads Ynddal , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Richard Henderson , Paolo Bonzini , Alexander Graf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Brian Cain Subject: [PATCH 01/16] target: Simplify env_archcpu(cpu_env(cpu)) expression Date: Thu, 23 Apr 2026 19:02:13 +0200 Message-ID: <20260423170229.64655-2-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260423170229.64655-1-philmd@linaro.org> References: <20260423170229.64655-1-philmd@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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1776963807427158500 env_archcpu(cpu_env(CPUState)) expands to ArchCPU, available via the ARCH_CPU() macro. Use the latter to avoid using &env. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/hvf/hvf.c | 2 +- target/hexagon/translate.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 5fc8f6bbbd9..2fb768048b8 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -2303,7 +2303,7 @@ static int hvf_handle_exception(CPUState *cpu, hv_vcp= u_exit_exception_t *excp) =20 static int hvf_handle_vmexit(CPUState *cpu, hv_vcpu_exit_t *exit) { - ARMCPU *arm_cpu =3D env_archcpu(cpu_env(cpu)); + ARMCPU *arm_cpu =3D ARM_CPU(cpu); int ret =3D 0; =20 switch (exit->reason) { diff --git a/target/hexagon/translate.c b/target/hexagon/translate.c index 633401451d8..825b236dd24 100644 --- a/target/hexagon/translate.c +++ b/target/hexagon/translate.c @@ -978,7 +978,7 @@ static void hexagon_tr_init_disas_context(DisasContextB= ase *dcbase, CPUState *cs) { DisasContext *ctx =3D container_of(dcbase, DisasContext, base); - HexagonCPU *hex_cpu =3D env_archcpu(cpu_env(cs)); + HexagonCPU *hex_cpu =3D HEXAGON_CPU(cs); uint32_t hex_flags =3D dcbase->tb->flags; =20 ctx->mem_idx =3D MMU_USER_IDX; --=20 2.53.0 From nobody Sat May 30 19:21:50 2026 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=1776963823; cv=none; d=zohomail.com; s=zohoarc; b=NxJmX92Xur2vTjiIZ5/pOPjD1Y2eVMgtW2wiU4QXfgG7o9k57JAU04h+a2Ya1JfCuFrT56mL2+Jv35evk68e2m1K5BPtrmYFyeMCF/HTQDzE0L19av0TKLnHvclnAVGD+BmeDSNqo+jUH4eH9zFX4WhLfmoLgSKv+riY3EbZOF4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776963823; 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=4Ah6Ua2r56zNx19wd7NL4st28ziivhlE6PqFpaPuGyE=; b=XZhZYvk22iYcJQD2v5L6oXBzZleBRV8taN0vmYfFCZN3Jxg9PowP8gR89m6gya17LjLkhsblKgWUN45T1qz9mwMpd9edLHDTy7OGgiCbJDezO7mo+QOd832NyRjcL8ydI5XmfzlfuUjBaQkqrf0nJRwN6BsVSP9xABQnZQ4KpIo= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1776963822901779.1667376617013; Thu, 23 Apr 2026 10:03:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wFxSD-0000Wa-AD; Thu, 23 Apr 2026 13:03:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wFxS4-0000Ns-I5 for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:03:00 -0400 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 1wFxRy-0004ia-DU for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:02:55 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-4896c22fcbaso41675465e9.0 for ; Thu, 23 Apr 2026 10:02:50 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48a5a579bd3sm161809585e9.6.2026.04.23.10.02.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 23 Apr 2026 10:02:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1776963768; x=1777568568; 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=4Ah6Ua2r56zNx19wd7NL4st28ziivhlE6PqFpaPuGyE=; b=PmMdJqafWYYqrBTauMwJXaO3PQl0pk+8R2RQeGFzrCOX+dkq7wbazok2ZLukWGyumc +3gYKsxj+Yfffyw9Idz1idPUsq3C9pUT4t58Sb8OCQu5oQQEbuQTtGro5idlk+h3DuOD 38+NpTk/FhZ48mh3mJ5QMliB+0GmMNSVOX24BDyhhLwwUsfUdw+pMQJBaop2SaL5UsTf qtgtHvBIhjx+8ENS4jzERtrt/Eor9imgN/Kb5BWMXIOX7Kb4uKgEdJdio8nMLSU4oi/p ek4WS1qdtad8H1ttOhdjsCegwUR5VHafqKS0+YP7vPD3W2NpbTERskej5PBK7jNDhpYF PU+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776963768; x=1777568568; 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=4Ah6Ua2r56zNx19wd7NL4st28ziivhlE6PqFpaPuGyE=; b=N7QF5NObsSeEPqTt+2LbCdsNlBdr9NbN5P5SRhCHPbkwf90cdnu+uPA4EZKCYSQHkI IlowcNG16OTVGw8S8zLjXdkqJsErasSPe/Ql9lRmzkc1oyrzKzbipu3iBftS2X7f8e8p IMKA9K6dm6uPH52WEvzt1uF1zZ4i6FqP6Dai+u/C+wJ8aVOeVW5QvHMLS9iLE2jMKmGg 8H9PjQjQ8t+Hn9bbLuO6iKCdawzaYN6wgkbFFDqisuIRxWVkPQ7aHpB02Xz3yGfdFRuA f54KuGjChfr0pL81DRC+xaPusHv6NcJcQn0/3ZAiBHT4VyUceEzTu9pZmnspxwaW4aBP 4K8A== X-Gm-Message-State: AOJu0Yw+Qq3wccU6G/6qKYdPmqC69z738qmPk9Z/lkiHG1m8qOQ1gZiA XEhic1PpiETXYyXeFbbLUXS5waRFHRt824OKMHleiWaiC4hdq4y0Pxi2DMz1C3+KLncXA67S0U0 nvQYzhCU= X-Gm-Gg: AeBDietqfFGscefnjNYSZ6yh9AE6rLikLLUkMd0V0bQB37kFysjTL4nvqOVmpz1Okci MpnyJ2sq9aWZVbGbi9EdJh+42T0mCM7YMTWg9YFgZu9jMv//Ilo+2VnxfQL2KmW6cuM73xBZU/g +IVN1GtIFwnfYVAdQVVLPSqlcNryFypn5xdrq8mloHu/4+dTnehyi1w+/ABWhTmxTbFl1hBo0dz MTX04KO6ASVF9n2pHlnX8ADyVPHMCi3cZrpILCS6pa+qefj4Yg1GI/HYjMTymfJ76R03cgmgP+c hRpn3s+fKVTacrc8SAyqYdP7iZjYZr8nn+SqanYYvAlKh/OE9FM4IVnRDy2VgFlrtOpELnz9Uhx O7uv++o8cHv+GC1IjzUisNlLoJLN/E2+Hc5BYone44NXhegIEOlg+jiM9vrUuDD0A6UNLljyFSq 6rGN1Emx5DCMbtPUiV60HgLdQrvYFKml4EvpEE4e0FK1PSLWYsqf4eFYxPeiX2fGA5xjlvoN6y2 VbM49XVBXSYU2NRMBXY7w== X-Received: by 2002:a05:600c:c106:b0:489:1ba8:5be9 with SMTP id 5b1f17b1804b1-4891ba85d07mr187900845e9.29.1776963768440; Thu, 23 Apr 2026 10:02:48 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Roman Bolshakov , Jonathan Cameron , Mads Ynddal , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Richard Henderson , Paolo Bonzini , Alexander Graf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Fan Ni Subject: [PATCH 02/16] hw/cxl: Define cxl_fmws_get_all_sorted() stub Date: Thu, 23 Apr 2026 19:02:14 +0200 Message-ID: <20260423170229.64655-3-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260423170229.64655-1-philmd@linaro.org> References: <20260423170229.64655-1-philmd@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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1776963825674158500 Add a stub for cxl_fmws_get_all_sorted() to fix building a QEMU configured with the '--without-default-devices' option: Undefined symbols for architecture arm64: "_cxl_fmws_get_all_sorted", referenced from: _cxl_build_cedt in hw_acpi_cxl.c.o Note, the CXL <-> ACPI Kconfig relationship is a bit convoluted. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Jonathan Cameron Reviewed-by: Richard Henderson --- hw/cxl/cxl-host-stubs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/cxl/cxl-host-stubs.c b/hw/cxl/cxl-host-stubs.c index c015baac813..9b515913ea4 100644 --- a/hw/cxl/cxl-host-stubs.c +++ b/hw/cxl/cxl-host-stubs.c @@ -18,3 +18,8 @@ hwaddr cxl_fmws_set_memmap(hwaddr base, hwaddr max_addr) void cxl_fmws_update_mmio(void) {}; =20 const MemoryRegionOps cfmws_ops; + +GSList *cxl_fmws_get_all_sorted(void) +{ + g_assert_not_reached(); +} --=20 2.53.0 From nobody Sat May 30 19:21:50 2026 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=1776963809; cv=none; d=zohomail.com; s=zohoarc; b=LB00zMioZGEcM+wGmr3SUJ0sMeTh3gseP9WSMNKfFSEr9JQ8Kg5HCgA26060fH0y5FQkIB+z+Xy17xiZ+B+PKCNaifEVO+XfMVgdcJ3+8xN+RKWgMKUOyvqHgtQEQedJXl0CjYLZv8g7a7H6GjBfHamUES/Gl88+OTxRESdrnuw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776963809; 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=USo4XixZxh0ONX4Sus0DTLLTZbV9KZKneQvSNxBeWnY=; b=UWI60HSA29pn+CPIwKSbu+guZoi1IiYVqWfTnGiJ0+Y5zMxM1RjjBmG8wFogBF9E/UJIlojcCQGbMwHiY8z+1UBkKattXqSFLNWCk4BlLer0M5Npy4IhXleR87aSiOoJ88pAB68/NmmiqwD3dyzXTOLmFhAAr05xPhj/9whpTls= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1776963809534990.7916179609912; Thu, 23 Apr 2026 10:03:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wFxSF-0000bU-N1; Thu, 23 Apr 2026 13:03:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wFxSD-0000XM-D2 for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:03:05 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wFxS8-00050W-7Y for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:03:05 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4891c00e7aeso45120315e9.2 for ; Thu, 23 Apr 2026 10:02:57 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4891c08faffsm580562955e9.1.2026.04.23.10.02.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 23 Apr 2026 10:02:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1776963776; x=1777568576; 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=USo4XixZxh0ONX4Sus0DTLLTZbV9KZKneQvSNxBeWnY=; b=Ou7s5s8yBXWd1vrhgtL9pM37yH05xXni+KZnLWVdyJgtLwlihtGGWEBUsuZZBtZQVa v2I0BLocrGIeRGM9PzA0ok1+mjaYpaFv2JqOZiHFLfHQf71tMylYAIUgg2CRlJZCyCuK aJuesUBLRVqK7tDdvF98ogh+n/tR+ZakpSQrqvsdgIjH5Yg5CrHWA6aILuW4HF44gSgy jLMz3jA25Okoa9YOq74TJf7pOKscJgwfjNR9NnDf7FTUBcPqxhOVJg7lYMpJqApGtAOa 0iJtLRvnuIwE4+GK4+FaOnp69iKpom4sbxsFvNGJYU+7XotohFPw/Np5+mMKM7foocEO wGpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776963776; x=1777568576; 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=USo4XixZxh0ONX4Sus0DTLLTZbV9KZKneQvSNxBeWnY=; b=GabBaO0hRPCJKN5tXa/hrLNs/C6QnXyIarTNZKq9E9whh0hLCsuOhn0Lj3oOdzzbav 2KHAaO59DNwos3eBNIXOTv74UhJEfTPyWt1o09o1f1hYgCtnvvF7L6pCtYx5YAXdNcwd AmnKvLIB4w22Xonr0/wfrX90yAzYE/MLHxsoFCfAOzxQ5uaYD+7WERJAaKhsWT13HJiY TCYOYlIRUO0UqzRXYZGDkp8UBmLr98VrzjlKfI6mDHMM4d2uNHpP/IwL5OP5casBV0bN 0Nzks2ABXZQNnuGGbVPZwCmEnJJw5bNWCKHTooh10SKeQcO4lNVkdapSi7PeKNBxL66i Pu1g== X-Gm-Message-State: AOJu0YxEdncm8d7Zg3xLyiBiUjdRsIwQKbSR/lHN21QVVUCTaCRyVZbo 18Wl+HrCzzki4RRl0mQVOQn8LoqaWruPHKzedeDXLwYjD2tDpjCaSNwvpF0mlmfjckCnxUsCeBH oUJRoFZw= X-Gm-Gg: AeBDieuUEB/pNV7fhQxs/eHB36j5tVCYuVSuNmIGvn0+GDViVmcHNc4XSM0y8NUwV6H OY0XVlO/TYTQuWJ4XIhQqrDYi/QUFyJGsrM06y3j6x4cmxr1NlwZBfJodtMT6KUieUZjMp8YJz+ erSqaxGH2M4Wf8ahvZoCMLd0ncOaStBvBzAQax87RJCm/gKfpOm9MS5c0lLcvrMoD/MsUZycmtd ydq63SoN+D7HFBisx/+gmEuGtRymwZZn2QV4T6qwK9cJkLkNM/PwgBh2FBncV1WT4Q/G1FUKOmv PXW16lXnNX4xwlABpU+zp+KBHjNbIKqF7hG62kYQyYLC9Uuws7HSqTTbGuw9DI9i4p7k2veTX+8 BB5Sq5BlCoApXrqmyfO7MpDbWx3uq69PxdTfFQEgp9KnOSunsNDuXZByf128Di1v9AkEiGmbJSi VmqSrYCK4QdHU1aEpzjdlggChpzeHYVmkpEe6nvf7bP/8LmcT6wMWQ7S0+m1MFWUNo3d2ZW8UBQ FOycDy1PDg= X-Received: by 2002:a05:600c:890b:b0:488:a977:8d6 with SMTP id 5b1f17b1804b1-488fb775a35mr296097165e9.19.1776963775607; Thu, 23 Apr 2026 10:02:55 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Roman Bolshakov , Jonathan Cameron , Mads Ynddal , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Richard Henderson , Paolo Bonzini , Alexander Graf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 03/16] hw/arm/virt: Do not select Kconfig symbol PCI_EXPRESS Date: Thu, 23 Apr 2026 19:02:15 +0200 Message-ID: <20260423170229.64655-4-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260423170229.64655-1-philmd@linaro.org> References: <20260423170229.64655-1-philmd@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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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: qemu development 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: 1776963811178158500 The PCIe bus is not provided by the Virt machine but by its GPEX host bridge (selected via PCI_EXPRESS_GENERIC_BRIDGE). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- hw/arm/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index 4e50fb1111f..41d5e968c86 100644 --- a/hw/arm/Kconfig +++ b/hw/arm/Kconfig @@ -15,7 +15,6 @@ config ARM_VIRT select GPIO_KEY select DEVICE_TREE select FW_CFG_DMA - select PCI_EXPRESS select PCI_EXPRESS_GENERIC_BRIDGE select PFLASH_CFI01 select PL011 # UART --=20 2.53.0 From nobody Sat May 30 19:21:50 2026 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=1776963893; cv=none; d=zohomail.com; s=zohoarc; b=MR6Pe22smNuqVsHDhSFCH5ksrrN0ANZWtRFO8aatzd8qoJbIYOaP6SNrC18LV/CilFnnWJZtH0EDGGBee6IPa9tD1YrcZ2OGPwaJWrwK/1F3Bidt1Ikn7pXbhzJC+PhjGULMyCdoBiIfZtRVBNsjUlxZO3+u6rq1brPD+w9VPAo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776963893; 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=q5QlbpkhLSFbpydkuquJtvxsAHOyc0Gt7hSL58Wv5bM=; b=VMDJMeuS2hxjZGnpKge/uyxnw9Cqi8ZwZbG7oMVITNB3MHaXypRrB9ZccS3cZIq/ZlS6INBt9uwVnhS8/5GJbb4+nIQM0MQuCI1OCUpHvHAy3yHnD5JrHAgzM2Xlw5gZ2HYCWr4IMehjHe/4nrDMfkL+RbVjlzsHA0V+a4d2dRs= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177696389359780.99334001465138; Thu, 23 Apr 2026 10:04:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wFxSK-0000dv-JO; Thu, 23 Apr 2026 13:03:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wFxSJ-0000dT-Gf for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:03:11 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wFxSD-0005BX-2z for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:03:11 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-488af96f6b2so88530865e9.0 for ; Thu, 23 Apr 2026 10:03:04 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488fb7a0b60sm156040625e9.17.2026.04.23.10.03.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 23 Apr 2026 10:03:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1776963783; x=1777568583; 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=q5QlbpkhLSFbpydkuquJtvxsAHOyc0Gt7hSL58Wv5bM=; b=x6DkY8h2cbp+2SIg3lJkDW5cmx39oYnLc1jU1YC3Me0FgNDkCQZOcZZfAaCJbBZSL6 SNXX4/9F2l/zOr7HLpE3VZpfdGPpeuQn6C9mJN+NFRqr5i63W6sVxm3HnXCPGfb505P1 4shihyK9asLwX39gJ0t1Kvj9rKrCjNyPUFJ+iTAvPfEmhpsEWI008h69JVLwP+tIqAAu OqQndSlZtgzw3JsGg+XEc+qzwfGOzqCibwfoCVgX/Cwv+BBrvxxc6SndnwTTMBSp662n 9pbJTDa5/h77y33ntWEo4LqCZoxSBIxxSKI/EwyP4H+4Se72KkLX2ad7D+fGxC137Y3T 1izw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776963783; x=1777568583; 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=q5QlbpkhLSFbpydkuquJtvxsAHOyc0Gt7hSL58Wv5bM=; b=KabJKzhgiLSYbny5aJVjcxTs6PqrVV/hFjPYgRp5R5jYh+xrc8hjZpqaaMMt+LESCy JyabVtZExkMtFYe2UayUN1HwWTVvXel7SbzW2wjYVoB//e7/ECITElkel7E5/gMSWT8E aoFvSLgZi+kydDKnSUa0SvudKW0BBDYxTzFFp7YT8eWuPLE4mJWj/WnmXzuTR7S2QgIb P1bOopWEgNYZ2rPBElAnkAIsLCth9mwdNwS2ldBGHZmnDwwlS/NqRMxumm0CufBFhimB 4NB2c1o0vfewSkhcy9Pt2hMwfd2HqDS0tloac3bbbxsSKIZwIEIR4Hnrb06bbctOH11J rmrA== X-Gm-Message-State: AOJu0YyhxYRAkd5H488ARuWLJEflV6gm2Ld4MsXOCb4E7LXcMWyyvpCp 4fKe9o9hH/sz9lsextdUaZduAsTyETsEvzVPWBgrUWW/VlHLCkhMXHzYHLScVoIPLkaMasD1JfT D5CJJe+k= X-Gm-Gg: AeBDievWv8z2sxt7nC1Y69AqbR26R1xYEVeG3Qetmoe7xvRo4e5iHOi7P4hT0bql+wS cyi3rFLuYJ21ocnUfBuMY3lNw5UV+Ex5BEyEKlgyrg0YmWwN3gOEt8SkYh4QSNRjgRWH3m+PiXw z9ZLFIuou9KXLex7v8DiImURAbBqfcDjlPw45cOWSPoX2qv8Qlew/gZ7t+3d1XCvm8CnDrM38Fe oLptVK4vWWWzRXH7evYNomGv3804jkTt9IkZinULTVb/4ZqRHPvuu3aK08iVvV+ueNT1WL7MhVL V8nvKJAjsxJXNdvBPuLi78iQhLlKGDZeB5HixroePYX6iHgO+CbZC3WDkNsy5CPRN1cI740E9uv QbuDoUQy83nmjfAbh7hq0B1rzp7/gi82mOId8iB/87PDE3+344AHUMfr318x86IIFCS8qoX0/ca oW0qgoxYaK4erI8Y6Hf19P4JaLudKet3bzlS2qh71I1/ptPdMfw3pnXFxXwqmoZoVXRRkh8k4P0 1LnGtgfZWA= X-Received: by 2002:a05:600c:8183:b0:488:b187:d898 with SMTP id 5b1f17b1804b1-488fb771445mr339012825e9.14.1776963782997; Thu, 23 Apr 2026 10:03:02 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Roman Bolshakov , Jonathan Cameron , Mads Ynddal , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Richard Henderson , Paolo Bonzini , Alexander Graf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 04/16] tests/functional/test_aarch64_kvm: Stop dumping kernel ringbuf Date: Thu, 23 Apr 2026 19:02:16 +0200 Message-ID: <20260423170229.64655-5-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260423170229.64655-1-philmd@linaro.org> References: <20260423170229.64655-1-philmd@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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1776963895189154100 Avoid the following kernel message to interfere our stdout parsing: platform gpio-keys: deferred probe pending: gpio-keys: failed to get gpio Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/functional/aarch64/test_kvm.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/functional/aarch64/test_kvm.py b/tests/functional/aarch6= 4/test_kvm.py index 7545f5ed554..a03a6134626 100755 --- a/tests/functional/aarch64/test_kvm.py +++ b/tests/functional/aarch64/test_kvm.py @@ -48,6 +48,7 @@ def _launch_guest(self, kvm_mode=3D"nvhe"): =20 self.wait_for_console_pattern('buildroot login:') ec_and_wait(self, 'root', '#') + ec_and_wait(self, 'dmesg -n 1', '#') ec_and_wait(self, f"export PS1=3D'{self.PS1}'", self.OK_CMD) =20 # this is just a smoketest, we don't run all the tests in the image --=20 2.53.0 From nobody Sat May 30 19:21:50 2026 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=1776963865; cv=none; d=zohomail.com; s=zohoarc; b=DYJyXDJk3SabcwgTHXVsinoXQM522bTg5kBd8fzFlWtSncC35kPC2/UsE1AhSfg23KhmNotZ8u3Y4ZDs5OEFQr17O30YIEQeSq96jK3hty2kKEgb7g7sVyqTTbsdbakmXENWE2Sa1QR5ZNhE8Pw9Tp7r203POEnj7vE+itwcKps= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776963865; 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=1JYwWzQqSdbiTUNYH+gDTHqMgMIp3AmEiP06Alx9Rgc=; b=jHIlho0RGspH+vqsS0V18Pw3D9jjDlq92FrMdnC/2LZhRWf8wbOYI269bZ0Py1W6HXCFZNj8jzlA3VgFnJBfH3U1BSllb7AYDBoHdYH+iCK9AIvxUmg4MHEeybCS/urwyn60598ljV5YRXaNHDLp/XFMjN5HJroFT0WuA7+vv4M= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1776963865709911.1198183748745; Thu, 23 Apr 2026 10:04:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wFxSR-0000i6-Ow; Thu, 23 Apr 2026 13:03:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wFxSP-0000fR-FX for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:03:17 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wFxSK-0005JC-Dt for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:03:17 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-43d0deb7ad5so5702784f8f.2 for ; Thu, 23 Apr 2026 10:03:11 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43fe4e4eec9sm51475613f8f.34.2026.04.23.10.03.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 23 Apr 2026 10:03:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1776963791; x=1777568591; 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=1JYwWzQqSdbiTUNYH+gDTHqMgMIp3AmEiP06Alx9Rgc=; b=oewDSZeTM6cVSXORuG8mbK0k8KFlwFPxOR2peVgx7NQGt0xBhIUDyzwlatEBUkr+IE VvkfL/rs0FS910c66bRluFYmGVr9EBrHAd3IUMJjaY01C0XQlIAj5SPYueEvUazSR0cH QHK3S9W9alqWSa/qgcPbVVzkVM+hR7NIEpM/ajZj+H2J9m9ZTSrFulNpIVYeL1DFQL2Y HIfj1Bz2ilNKnfCEr7xv7sOi62++Xu6JrskWeaTO5Q8KRde7xxYSfCAiGY4YGnSc2S97 essx+YOKR3ROpDcjN+rJuOV/9jQEC6PCM7NLyragh4SYaypmriC9t2Bz9opU9Cp2Yw2x a+pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776963791; x=1777568591; 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=1JYwWzQqSdbiTUNYH+gDTHqMgMIp3AmEiP06Alx9Rgc=; b=bRU8O4DlFrPYm+M2N6RYT/23T8vVfKZ+Q/BO3DDY143yu5uTVJsoCv52CEoSn+ecUg hhAylvDPNrjp5BaVAVs5sEXxvZPzYctMVTTaofYS1FguZeIloW+H8Yc5RoIgJAFRRQ6s xSVePlsxOXkSZWbZUpWbCkiEYI9ykGeds9+fc6zBQov9tDxu7H+2C6mLstCCWHqf2Oqj z064SVW1R6Fw6yvE8Jo0mwuYiSSo/K9xPVrwwb5vCoZGZsVg2zLX54ojfWiVe8QnGzts 4XuZUxpv6vbGN/5ZdhM19BbvXPdRIbE7bVz5aJY779bo/bKQ1Faw+YIcGkhnXsc4Eeto ehQA== X-Gm-Message-State: AOJu0Yx7mmmlslIJ1tnfz0dKOu+Mi5xjhx/PxwFG4MVKiiTr9mVzuYSy sVbWVYcNqkQm3lYfi8ljrdMhhw+o8rf/dH0+GOk1ngOtSQMq3rWr8MddxUE3rDfocym1bREJYUj H1qfAn34= X-Gm-Gg: AeBDieuk+1mOmWSUfIDVjUb7Owa69R5L9lYQcImE9CJqPbX/oVALK9mxrZe8OvpKtjz duN5cVwneUPvUWQvRl3gForxH6whTVNoDI7y7txwSfzN81h639Ie6fS2BLsVS6Keugh3jOC9na0 Uqqz5AV83JXmV7uJslxVhTgm9UE2FPzc87M6ZDHXaHBKjsWqmnhiD6Ql5Zs2OMlsiisllQ3usuZ 5mkhD+AloCGNFP9nAr0XQCNMSdtSjyJlqAt6H7CmExTw3L6qb1KM+zLB9wA5hKQwpAUisYY4JO7 f0Tr3QLNHeqeSHAHSbEdHJaeCsbsDrTAuE1xhXKOKTwTIHSwA7ilcxFgOhPn/DuEuDjvgDiPPW9 sehjt89isHWEMnvfym2jX97dEfN+9lFHuKuffz7yrGQtungxSCPycJxxzB1CNOtQ3LvrU9hp9C3 10O4E2sWaE4oyyvH5nXb1+1s+vFzCRo3PTOLpCyl8Cvm3pynDBJ2P/1z8sLHPNQTnLOS3rJ+X7c 3ZBklq2hwc= X-Received: by 2002:a05:6000:25c4:b0:43b:8f56:1e1d with SMTP id ffacd0b85a97d-43fe3dc10demr43844816f8f.13.1776963790189; Thu, 23 Apr 2026 10:03:10 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Roman Bolshakov , Jonathan Cameron , Mads Ynddal , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Richard Henderson , Paolo Bonzini , Alexander Graf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , Yanan Wang , Zhao Liu Subject: [PATCH 05/16] hw/core/cpu: Expose CPUState::start_powered_off docstring Date: Thu, 23 Apr 2026 19:02:17 +0200 Message-ID: <20260423170229.64655-6-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260423170229.64655-1-philmd@linaro.org> References: <20260423170229.64655-1-philmd@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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.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: qemu development 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: 1776963868955154100 The comment about @start_powered_off is buried within the CPUState structure. Hoist it to the structure docstring comment. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- include/hw/core/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 04e1f970caf..bc719d51b3a 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -419,6 +419,7 @@ struct qemu_work_item; * QOM parent. * Under TCG this value is propagated to @tcg_cflags. * See TranslationBlock::TCG CF_CLUSTER_MASK. + * @start_powered_off: Indicates whether the CPU starts in powered-off sta= te. * @tcg_cflags: Pre-computed cflags for this cpu. * @nr_threads: Number of threads within this CPU core. * @thread: Host thread details, only live once @created is #true @@ -502,7 +503,6 @@ struct CPUState { bool stop; bool stopped; =20 - /* Should CPU start in powered-off state? */ bool start_powered_off; =20 bool unplug; --=20 2.53.0 From nobody Sat May 30 19:21:50 2026 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=1776963841; cv=none; d=zohomail.com; s=zohoarc; b=adKFDoXxKXPSEprnOkp+i0SPnzgU1sCynPbtrDx43CX9SnXBBHrQfVyVxapqbFWp+VTdLB1Lld6yTLJIddP9xRxDYf45p/XwTv/mED82o/pP59y4i/fbBZ2z+tRgsXQq1WOU1SuFiVvRKaiFEZPtBYg4u0k7diML7sv+EQDcxy0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776963841; 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=TO1pyTnO3mNIJGKSVSSCAJig7b0z6dQMkq6ZqngmlbM=; b=gp+4pqzQctHjiKJbPMXbCk78U5trlrEMuLcWycdlbAONfIHshVeUW2SwVq9JOT4rdlzNB62P0S+7I7IA7DWm8hN0QcEoTHBi6jmIIoOtLxTRjy0tJYc7AEZp6pWHcLFgQ1DDapAAbp/jYg3VUNlmOhrj3cBV0kG1N4GrBq3OAnk= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1776963841921594.7686264210155; Thu, 23 Apr 2026 10:04:01 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wFxSn-00013T-C6; Thu, 23 Apr 2026 13:03:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wFxSV-0000pU-4o for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:03:24 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wFxSR-0005OO-VW for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:03:22 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-43cff5dafc3so5585309f8f.1 for ; Thu, 23 Apr 2026 10:03:19 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43fe4dc24cfsm53790415f8f.16.2026.04.23.10.03.16 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 23 Apr 2026 10:03:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1776963798; x=1777568598; 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=TO1pyTnO3mNIJGKSVSSCAJig7b0z6dQMkq6ZqngmlbM=; b=KTbvI8z2INyBy56nkEKkhQt8hCJrJYsdcsQCz0BwT0C7NHt6z60FLw5LiJbzuPGE0Y ChJbkSWGg1K5YTSshpC9akpMjjZqHAsrqyphDGIEopN+mxHN/CBfh3qLCTBmzefx0KTi nixIkULlii1BC3rT/rkND6nxw7tTB8dhn+Jln+i9fV9HPxY+7X7gQIrEq41d7hwwvI3M K/hyRirYXnl0vfgS/CqTjdfYa/Mtgny0gV6nUaV/ZbW/aqWYswkpda9gDZProL7gIRjW stwuA881d+K0wQOiOO3JAjhZ+6GX5m7P32WjS97tqTOXCwd+X0hIxFndeduse8tkVGwY apww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776963798; x=1777568598; 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=TO1pyTnO3mNIJGKSVSSCAJig7b0z6dQMkq6ZqngmlbM=; b=SAaXUK/t3BH3bZRo/owWiLoS04P/NAubWF76rBtl2bQ6uaCt2iWt1gMj8SgpU7QGQE SDsKIeU6epbwYWmUlwtQV1cgnQ6BNLOABDYbzGH7OWSPx/QueNIsnIB6lK1bClTKbr22 dO4bMwBrbaij3r6mjyQA4fHz+S8wDOu/IzUCTQV4QK/WAbo/QQJAe2JU3ZoZrSkqXiOd 7h/VYaW/GIl0BpQGkvqQBd6HlZajgWiEGeMTq7jgq5x3DcYxDna5ZOxgaPrRtdsWPAdb WSH3chfLVAKMbfJwd7HyIR2vR4dX+EzP0sihEKYI9ORr1hVfcq0tFoq6oJMCSMKj1Pe6 gBGQ== X-Gm-Message-State: AOJu0YyHOEX4k0Pug5jnwO7v8RxDJJNhvaTatOiIn94As2XFYuB72uY0 1yM+4/u8xmBRVDQtrCk2YTIqjhXyowpKshs+TI2mFZ+PR3P1EV0qXkgg1/ewihPEccqfXJt6fPI coNzneiI= X-Gm-Gg: AeBDiesCpUB2WF8Oe29acHvJY3uVRbdoWcmo4hcGS/Rpl/kh+nlO4XUL74bLJDqdMIA TCTA89NL3fvc8NWW8r5FknoDp5TNg1RsFGAcU1gdUk5Y0ZShX5RKNdWH5e+KllgT/YLYbv1LGf4 T6d95OWF85MmQ+ODs6Pvb32/BOYWpzyKqJk7B6WPiP+cQqPmsYq6BRyZtD68SsQMOq/MC0QbPBq TZrJ5DHQxqoD01SSKE8UIchNqSMBaBqv/zCpdHbRFxGodP2vQD8b4pV5gpGIDVo4ZupV96oBx5X sZ1JlaMyC2dk135rzLUOEtiKg4tAlHTYj7iI3RbKr7vTq411OBiVOuiSG9KyKvL7hur399c82SN mS3YVxXIDPeFpkgq7BGmced+oBySTRidiUjTi2hNNJgqbE0mzzxX4nRDc8JAHCCa8Twf1VXtgv9 jW8ZUD13yYe2Bpo6kQnOqFMm0h/aF+taNYuK/WR0DByb/2NuqgM5knc4JwNNIro/r2GO6/N9jpR KZcpXJEjs2j7q9Yan7vvA== X-Received: by 2002:a5d:5f89:0:b0:441:1c95:17e7 with SMTP id ffacd0b85a97d-4411c951810mr24411525f8f.15.1776963797790; Thu, 23 Apr 2026 10:03:17 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Roman Bolshakov , Jonathan Cameron , Mads Ynddal , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Richard Henderson , Paolo Bonzini , Alexander Graf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Xu Subject: [PATCH 06/16] system/cpu: Defer memory layout changes until vCPUs are realized Date: Thu, 23 Apr 2026 19:02:18 +0200 Message-ID: <20260423170229.64655-7-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260423170229.64655-1-philmd@linaro.org> References: <20260423170229.64655-1-philmd@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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.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: qemu development 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: 1776963843594158500 vCPUs are not really usable until fully realized. Do not attempt to commit memory changes in the middle of vCPU realization. Defer until realization is completed and vCPU fully operational. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- system/physmem.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/system/physmem.c b/system/physmem.c index 4e26f1a1d42..091a1da3458 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -3089,6 +3089,14 @@ static void tcg_commit(MemoryListener *listener) cpuas =3D container_of(listener, CPUAddressSpace, tcg_as_listener); cpu =3D cpuas->cpu; =20 + if (!qdev_is_realized(DEVICE(cpu))) { + /* + * The listener is also called during realize, before + * all of the tcg machinery for run-on is initialized. + */ + return; + } + /* * Queueing the work function will kick the cpu back to * the main loop, which will end the RCU critical section and reclaim --=20 2.53.0 From nobody Sat May 30 19:21:50 2026 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=1776963968; cv=none; d=zohomail.com; s=zohoarc; b=DCgTV0onARKOU5pDyv4Sds5sJG6fBOHPqrWwHIe8h3F2x2dSGNhoxEWcMHXj4CIrcexT4r6/q2sgRmkit1N1mv1ZI8t3075JIbCOqGse/ZWMJU3MpwCENS/9k2AQaGmJU8ecqxYEjP2mWJI2pLQ7czSe9v3qSb5shdpXDOjdscs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776963968; 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=U1NXswT2g4EmWOQS8rfES2kgf/hXgcwodQ+5qwGBtok=; b=hlZBmqeHyjw4nzpTWySgT3Hz380TQqTtchuonJagvVZSH63k3Po7w6ZFKGOrJTRJxRcVfB4x3jPbykB0x3BzbnTKsV85SUNJsnQs7B5njYbqNQTavFNpy9r+85fOjEq8ZiIfbOKImDOOBzW+KRrlyJMcRqeUmTKDUMNy4HkH/XE= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1776963968313555.9677431247366; Thu, 23 Apr 2026 10:06:08 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wFxT7-0001LQ-6x; Thu, 23 Apr 2026 13:04:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wFxSd-00010n-SA for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:03:40 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wFxSY-0005RQ-TH for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:03:31 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-488a88aeec9so88621845e9.2 for ; Thu, 23 Apr 2026 10:03:26 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488fc1c01cfsm556148625e9.10.2026.04.23.10.03.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 23 Apr 2026 10:03:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1776963805; x=1777568605; 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=U1NXswT2g4EmWOQS8rfES2kgf/hXgcwodQ+5qwGBtok=; b=F8Xkbu1U4nNVUGh1aKDlKOn2Qqz5jOtlaLXk+JVIhL2fRLa5y2Mr4+Ft4Scm0pgkht 62skfHF6D/mg6YDSFfgNgVJAqMyfx8dly9D6gB23md20t+95ezfWT0tgsdXvaF/Nj575 ttROP3TzAsWEArFw7UOvfHrCB4RTrQZ8KdV3SSZYT9xF3ui5O0dXRfYH1q9OGv6q3Gfd N5XYRJC72LzyJwPoCp0ao+c3aQYJzZE8W+j3II1eAh/Q6gyUzfH5yVAQF5GVjQXOKuvW gH2b1OOCVfecd5U4zmGufowjGx1qA4cBcKQBDQ20+Wiok7zf/Y08r/26F1vfFXqYrr5e M4ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776963805; x=1777568605; 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=U1NXswT2g4EmWOQS8rfES2kgf/hXgcwodQ+5qwGBtok=; b=Z6lYqyoR2DuiCfwgK8y+lxQ1txndddzjpzkO7KC6yPen5V6Hsie6Gy8PJ/MtCwUKuu /lCM2xsxNj+56qN2ruFoLGReXmx5tYfix1lEf62hyg/I3QiLqbRy7/4uw8DagrmXElga BeHYl93jideRN5aIm9joFlm0UX/S4ljUyINKccNM1UPm1UsRZAyYO13W9SRmTFLDxHjq rJnmeK94LJEpeLdO9uptCIC6WuXmmVQX2mPumsRW15DzHfwdCDWnD/UYcmNo0F0mmGVV 3qu7fTQVaVXkf07/Pi0d97NbL+3Ijs1a7d/aCQbKp21aPUBGZEZsjb8Ktq3r+bVDNvRn JDYQ== X-Gm-Message-State: AOJu0YzBG75KHMH2BNZZvpz51iFUqbf68k1XPz2VZS0jaPBhflfvVrsT G+3Vnx4D1ztp5w/aksek7Pn8WrGUEEjmytx4HqyukmHbqhd4+kVmnZj05nYhKHDb7/LnOb1W5cw 6+oaR/24= X-Gm-Gg: AeBDieuuvxIMkrt25II7qDq9b0fehwtxDQlwQO7eJREHNBasy3U4e3977HvBrdVfW9L +c4+RBCh9Jey8qJXczZWBWmrt0LtA8DpD31HEkqOlUFdRAelv2yqY6hsb2/bKTv+M9GfQPtaafs cJ75zvH26fNCtsMpIf1tV+AupY0KHiufcN2XhLmpTEg0O6P54aBqgRa0fINsL4aTtRcJYDjV67Y 4JNn+N4VsBYhidzmIT2DNbDNQde4r8dl4WhFyuuHHME8EdwLbk3QyUDFz/T8DVa2gTUFPbi48qE xS0qnt7QcHVcFlG1Dc0CnVONVDSQhUTdC63lsvzZjEBfvaiR6poqMklwxXJc2CYo3pjMPWFZFkr /Y8walShIoKD9mLayHpLxly7IJ1hwb862Z5uzJkmkHuBP2FebrDmj67KPLR9aQ+lIvOOC347cP4 WyG64wk+RLhWq37VMBdjSUMMpqDJpx80x68Piru2KSS/ZecraiabzjaP0VMau2Ck0Xcvef2SBBf 0cRQnfdB0A= X-Received: by 2002:a05:600c:6297:b0:486:d76c:fa57 with SMTP id 5b1f17b1804b1-488fb77155dmr372134825e9.17.1776963805093; Thu, 23 Apr 2026 10:03:25 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Roman Bolshakov , Jonathan Cameron , Mads Ynddal , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Richard Henderson , Paolo Bonzini , Alexander Graf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 07/16] system/cpu: Reset vCPU %exception_index before resuming it Date: Thu, 23 Apr 2026 19:02:19 +0200 Message-ID: <20260423170229.64655-8-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260423170229.64655-1-philmd@linaro.org> References: <20260423170229.64655-1-philmd@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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1776963970439158500 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- system/cpus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/system/cpus.c b/system/cpus.c index bded87feb1c..b4c7f94332d 100644 --- a/system/cpus.c +++ b/system/cpus.c @@ -621,6 +621,7 @@ void cpu_pause(CPUState *cpu) =20 void cpu_resume(CPUState *cpu) { + cpu->exception_index =3D -1; cpu->stop =3D false; cpu->stopped =3D false; qemu_cpu_kick(cpu); --=20 2.53.0 From nobody Sat May 30 19:21:50 2026 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=1776963882; cv=none; d=zohomail.com; s=zohoarc; b=ITliCZdkiJe4VMDl5F6bVhZaE7QJSpVSCE+KviIpwrcGabb8q3g3SL/3iVQAtno0bZLuJnJkCoZJT0XR+J8XMVhtQHL/FIZCefqxjZutHgOg89v8kmX1tlKRwMMEkVbrpakdhFUKjdshfuBi3EuoF+DVq1Jv3DeYBLPPcnd8usE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776963882; 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=Hd00qZcL8QVm2gA5t6jS3nvHyVAnt2EjJSsPobGZzWM=; b=mndoEW+Qfth3hUzvCJvOATeq1VyUta4ixCvKswDJh+aUlOiq8vJaDm+fnSzoylwEFPZZiRwCEaX/AoWNFaAk4LjSbpfoP5YlnORiWwtjX+KJaAM1hbepkth8Xd7+ZP3xc3KUQub0hZ3ZvCWgmc1ZKfg2x3ApAGZqKZWOLraWFgU= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1776963882774193.30516079067866; Thu, 23 Apr 2026 10:04:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wFxTN-0001fR-Vj; Thu, 23 Apr 2026 13:04:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wFxSm-00013d-5y for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:03:41 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wFxSg-0005W5-8b for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:03:39 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4890d945eb4so32292605e9.0 for ; Thu, 23 Apr 2026 10:03:33 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43fe4e4d525sm51858649f8f.31.2026.04.23.10.03.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 23 Apr 2026 10:03:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1776963812; x=1777568612; 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=Hd00qZcL8QVm2gA5t6jS3nvHyVAnt2EjJSsPobGZzWM=; b=ws26ag0U9xuE4Qh+ouOUQiLgaTM0WT44guZ+IUvbWUbmM0dMPu1P6hXNw7SzZmoSgo bkw8fFnC39V4QpUhYBax+FeD2zpfL1+x1uVvZnSFVwDwpPO42sjR07s4yVAykkEKCVQJ yXJvfxxWz1o1lKeMz5CK0JfwAbwMJLTWWq3+SXW/Pznvf4xgUhog+0ZHx6xltoGW3Bi5 vKqNgXa1zFzuItY9pq7fwx1nIzRIWeikwOaZAfOrOuLshqdL3DTat6VbCCD4fXDVKjQn duCT050Ujg00fyRphoW5gyDxOSLc0I0GBjkQiPZNsPJyEJfzv25Shq3AzuSQK8mfUxKY /6YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776963812; x=1777568612; 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=Hd00qZcL8QVm2gA5t6jS3nvHyVAnt2EjJSsPobGZzWM=; b=f8Vi0HDCkOcC1KGDvuVbyqTYG3vXx0cL5U/C7huzSts7vE9KxX5xEyyRCgf+navAD+ 8Xx49O7/GELWxeCZ6dLoUqRsgcOyKaUZgiV9FHsCrTFuBtF5IZLsEpU72pW5gsIKyQjl AlGf2KxmozRiTy2Ztghs7gCAyPud0tx0vMft8kLf3W36ZcUXEMLLphLzEHghL6pO1SXe 3DRB0Vfoqy9hhQKnRabcuca9khrwIedhWFoIxegsq5WqtdygJBcibwY2YUnYk+5a834b DxIwZf1XB5MQnrO+Sr0+oka9NFhaDHBshBRT175Q8ej+oBz1J21LfTWiUIoylgVLU46+ fFmQ== X-Gm-Message-State: AOJu0Yyy3qqcs1dQe7iUN6aiTNdnCZL6j1CIGew/e6ayae57039/Xaar aox4CBLokopoq6ecirVFoZERf3MWfTNb1gUn/1Mr+E/DsyFR2LQzwin8iCihadMBNo52NO9W2xC JfRgrT70= X-Gm-Gg: AeBDieuZCW5kx6WpbMHp06quDHQsZPeRTJIi5zr7ggsqcr2q+SLxwjbUnpjdwYUjDA/ nODCeD6vvaitruyCJj0DEGI0c/R6xvjSrAGeqlXSEKqjdmRMEkjgD7OVUK1szsHe4AbL+1IWBgb TPxAmtdUB0i55/NU+Q6XlVmED8BNOd2y+z1xD/RntKUzw0E5gkg610sOBgf+MNdXFdZUaykgMVF GpUHD3ce5rZ+IV1d7ydSdFwtPqR+xQHPNmNjanS+jYG2zqEX/61xg20y71E9swwCvBpfrWCeREt hW6o/inKZPS/UJPKXl4EdqOI4m+3boRW95v5hBnbGTz7V7vYAjQpZcWCJbkKLZHqSp9k9WZDukd YbwKv5WnKJrRWbTVfonyZD00kLKx1hCp6JIHUot5YhXS7Oavx3cVMnF2o9yjvkVeI6GMayb7uz0 JWzwz0THHabh1t8nqEDPBROL6x42KY7BWzXUEKsFGABUaRakJ1nfoySIuBzrxb9mn2KjQxigXFb GROklSFPpw= X-Received: by 2002:a05:600c:8b6b:b0:485:3c2e:60d5 with SMTP id 5b1f17b1804b1-488fb8859ddmr367972995e9.2.1776963812496; Thu, 23 Apr 2026 10:03:32 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Roman Bolshakov , Jonathan Cameron , Mads Ynddal , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Richard Henderson , Paolo Bonzini , Alexander Graf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Phil Dennis-Jordan Subject: [PATCH 08/16] accel/hvf: Enforce host alignment when calling hv_vm_protect() Date: Thu, 23 Apr 2026 19:02:20 +0200 Message-ID: <20260423170229.64655-9-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260423170229.64655-1-philmd@linaro.org> References: <20260423170229.64655-1-philmd@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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1776963885148154100 Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- accel/hvf/hvf-all.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c index 5f357c6d198..82cb3717750 100644 --- a/accel/hvf/hvf-all.c +++ b/accel/hvf/hvf-all.c @@ -56,6 +56,8 @@ static void do_hv_vm_protect(hwaddr start, size_t size, intptr_t page_mask =3D qemu_real_host_page_mask(); hv_return_t ret; =20 + start &=3D qemu_real_host_page_mask(); + size =3D REAL_HOST_PAGE_ALIGN(size); trace_hvf_vm_protect(start, size, flags, flags & HV_MEMORY_READ ? 'R' : '-', flags & HV_MEMORY_WRITE ? 'W' : '-', --=20 2.53.0 From nobody Sat May 30 19:21:50 2026 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=1776963970; cv=none; d=zohomail.com; s=zohoarc; b=Lj7LamphD3xj6y9ztjg3rBcLfiaD4eX4S9z4uA4Mz9bqohDkS/wmF1fNNBxsGPKPZBhFMxTgLuFqHDJEkaSL6+aTyP0jS4OK1QwkNBZmpZaX6/GN+i32i8o8EAZTYwUk3XLwLkSmLsE7nciw2B2oN922aIHChgzcfbpGhrlAVCc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776963970; 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=PLkHfU6gnGPNuMZLmMU3QVfExHc0Hln8v5Rj1pdI6b4=; b=c/jyGQEHD6JOvKbtdzkzAbu8yQRoghe2QaBMfuy/FrUBa14GjPe76NJ3Rb3NAftZyv34qyWgp+JvW9wTfvjx+eeDkqsKtcBQ247ivbgwwpnopthoZ+8gfS8D3L+dVFzraH2LS1TRdYTTmjaPqqFvRP/NwS42/Rnjcrv6dWROmdk= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1776963970305239.83016978970454; Thu, 23 Apr 2026 10:06:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wFxTi-00028A-Uv; Thu, 23 Apr 2026 13:04:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wFxSt-0001Dx-6p for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:03:48 -0400 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 1wFxSo-0005fk-To for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:03:45 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-4891c0620bcso42239765e9.1 for ; Thu, 23 Apr 2026 10:03:42 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4412150a071sm19367663f8f.21.2026.04.23.10.03.38 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 23 Apr 2026 10:03:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1776963821; x=1777568621; 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=PLkHfU6gnGPNuMZLmMU3QVfExHc0Hln8v5Rj1pdI6b4=; b=YADR1bWN1GJeDhY8UzbsTdhSEo3TXY2YQCRYgWe+mS9TXKsz7hIKbiG5/XSSBShJ7U Xhhl9eX3cy3L0ey0/0VrSPFfHFRY/CJ3xxOWGfLIc4MXRNDS3ZC4i/ZUzsdGgveuYwmD 9Z3Zop/H4ZtPRRZ3eGrdsLsnHFWKHmO5Nwhf3Nv6nuCrctCkB+FgRhOQdXNnJ1RtJhue WLlHFQ7QYlRTwcBonlZ5g9XP2sxVV2WiLPug5hoaRxtCoods/mHWMYSgvy2w6gnPsxbP kU6nY8ayD7+vcM63ArsB32j7nuQgNOLnMOZQlWWaoBTSIr9Yc3o1WPv3cp42pgH75zq7 g6XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776963821; x=1777568621; 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=PLkHfU6gnGPNuMZLmMU3QVfExHc0Hln8v5Rj1pdI6b4=; b=AchJo6BB2EeN+Rer+2pCzggNXXw2rg5UaY0KHRQUgVAOZhMTGCyWlPmcKhVUGTqlXt umL8SoPpSfPHxE0oTgQGuultxiouUD/V4i4kntq2VyyG0cnMsGQkPw+wFZEuWA3Lt2Tw jtylQNqu7RaRDHVruxtkJcbQzOY3t5B+IM0nlsC9tTCv1Tbte2JkJv16M2nDCaEUcBXf rtAeC9/t4x4m01iELo+/RuEfXshk+tbh1YLXkmYku2C5SY8ylFpN6QNVWdqTX9BQIGmU HWd2VjxbNmCZzulZozmguGcZeNTUfpsjbz6OssCa7R/iK6RJwHABPgZOSlurcJur6TA+ wGBA== X-Gm-Message-State: AOJu0YwHcS2m6ykG6D6MFirGUW7lM7z/Jrk6nvyqI+ZaQb3TjRwJMrgo 1gEwQNZP6E8Inm2xqDbKFZRS9kCSSFtvuHE+fK7LgT3Pg1RbZs1hsZPNXKRng0YGIRlEzJ/0BhH EkZjB/NU= X-Gm-Gg: AeBDiesjetGFA4GTe/YaYZ8lZ8JRRFMZgWDsFDO5h5mN92Pi2wi59RyaG0YyNaRW98P rGb5gMeJ1O5DnbiLaUYtBYSVgpBk4dmbI3AFk68BViTvjSI4zbltr0D294os4qxsUVacdinFk+4 wHONaI/vnD8gntgxgd7j7Rcy3F0pw/Ihz/j5X8+50dwYk2ypJBwKHGK7R07mjIJDSf3RVGUArb+ JJb48eP3qNfoowF7iRXSLAB+jrE66AuxO1MEUEQChTyn4pp2FCil4U38wAa9IeE2HAjSYnPeJzR uyXB1vPlJ70DvdpJDSHbH4ieDFOx5Xy9qJ2825JbjFs+6nIoM/ruLtFPSu+o6rgHjqC6EDyJAM3 9JU3e74EwT+CZgxX0doDdOZsfBujo4CB3g41da0tKc016js3kmM16QB/hq7bn22hDpFhgrP1zqL JS0dkAB+6LmWfgYJhK0uq7lLpwDyrmalO4WeN8fCf+Gpap8xYhp1/Zl5ri/2bEk0jmsI13zzaDk rBAdvtF7fI= X-Received: by 2002:a05:600c:a404:b0:47e:e2eb:bc22 with SMTP id 5b1f17b1804b1-488fb73b2a3mr333100145e9.5.1776963820706; Thu, 23 Apr 2026 10:03:40 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Roman Bolshakov , Jonathan Cameron , Mads Ynddal , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Richard Henderson , Paolo Bonzini , Alexander Graf , "Scott J. Goldman" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Phil Dennis-Jordan Subject: [PATCH 09/16] accel/hvf: avoid executable mappings for RAM-device memory Date: Thu, 23 Apr 2026 19:02:21 +0200 Message-ID: <20260423170229.64655-10-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260423170229.64655-1-philmd@linaro.org> References: <20260423170229.64655-1-philmd@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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1776963972367154100 From: "Scott J. Goldman" On macOS, HVF can panic the host kernel if a guest accesses device-backed memory through an executable mapping. Leave RAM-device/MMIO regions mapped read/write only and keep EXEC for ordinary guest RAM. This works around the immediate crash seen with passthrough BAR mappings. There are still platform-specific performance issues with guest write-combining mappings, but uncached mappings behave much more like the host-side mapping and this at least avoids the panic. Signed-off-by: Scott J. Goldman Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260405072857.66484-3-scottjgo@gmail.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- accel/hvf/hvf-all.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c index 82cb3717750..0b431fab72a 100644 --- a/accel/hvf/hvf-all.c +++ b/accel/hvf/hvf-all.c @@ -116,7 +116,15 @@ static void hvf_set_phys_mem(MemoryRegionSection *sect= ion, bool add) return; } =20 - flags =3D HV_MEMORY_READ | HV_MEMORY_EXEC | (writable ? HV_MEMORY_WRIT= E : 0); + flags =3D HV_MEMORY_READ | (writable ? HV_MEMORY_WRITE : 0); + /* + * Leave RAM-device/MMIO mappings RW-only: on macOS, accessing them th= rough + * executable HVF mappings can panic the host kernel. Ordinary guest R= AM + * still needs EXEC. + */ + if (!memory_region_is_ram_device(area)) { + flags |=3D HV_MEMORY_EXEC; + } mem =3D memory_region_get_ram_ptr(area) + section->offset_within_regio= n; =20 trace_hvf_vm_map(gpa, size, mem, flags, --=20 2.53.0 From nobody Sat May 30 19:21:50 2026 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=1776963895; cv=none; d=zohomail.com; s=zohoarc; b=dRPNOhWSTNx/fTRtBvh3Xy4m0eqp3z6lkdueC2fwASyexkIDSR+YgaZpn6RkAg++Q6OoKP8/GSvlYk97/WS9UN5liBj3yxfSY9DcwkbWSg3RyMFusxRQSyDTZApYz170aK9p3b4WyvFCwHkrfD+DHhcxX3ioXx7wrOqyYZNARpA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776963895; 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=zd/YFz6QaH8XwfH3yB/TOjWNiK07VelK7idPnaaUGxk=; b=gnJgEv4/qL99eyBBZwqOQIo4/LdCDI6PfxZtPsGLseFShqImsSjuS6zyIYWkNktfOipPuCeV5CmNrZ8stLNrbzgM24f1xR0GQh3JaSxggKW7Dn1TiLg2kxhJyLHgRbPFQpqbjB982Z1mRfx38c2dW661SQHVBy3oBJ92khqzeSM= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1776963894882590.8977560126983; Thu, 23 Apr 2026 10:04:54 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wFxTX-0001jX-Fm; Thu, 23 Apr 2026 13:04:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wFxT1-0001IU-2T for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:03:57 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wFxSw-0005iU-0O for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:03:54 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-483487335c2so68061555e9.2 for ; Thu, 23 Apr 2026 10:03:49 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488fc0f8193sm485631935e9.1.2026.04.23.10.03.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 23 Apr 2026 10:03:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1776963828; x=1777568628; 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=zd/YFz6QaH8XwfH3yB/TOjWNiK07VelK7idPnaaUGxk=; b=AKPUZKx6dwoeDfixfaux0xF0b0qLAnEXxaSw6RALUHeyx0oY7ZGwBZIVdMZzT1FPSW TjlPE+PTjt1zYuVEsTJii4WROdxJH0JhEQ9sf+M+9bmS4MkUuzTn+7uZASwK8nLA/3YA hqRIUxk53rV4dNTjgmaiV9fjfYJRpQrsjj+W1AKGtjFp8neJ5RzsUPyAhRwNOilMvKs0 2cXKM9wRKRmCKAwX58SS/qUrGhJfKXkUnQjT7/l/KT4Y+r5N6RzqfDv53jesuAXptFfM uIdS7GAOhWLEFHc6gr9/29U8K2gKnGHGucTEILvU5NH/tw341EePlCp71WRKLAZxOKcU GVkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776963828; x=1777568628; 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=zd/YFz6QaH8XwfH3yB/TOjWNiK07VelK7idPnaaUGxk=; b=EsjmxmcfUyYWpW8DUEcS0hZIXTbLLJEv+YR1ZTDblZWGFIHTSHsDhzFoMOV9m39cmi g3fXuItk6Qy0Njg5oTNNiVl1/htzfYqqr6geFfLXkSZwlDdIQdNJrQdXHFqujekNx9br lrrN9hzBmneWE9cc8xHdeaiE/ufqMsVMsxdGNN4PZb81Ebcu9DnvcFNJmynQYQysCOdn 8wMi12D6uFF9cqYOjQIXTpg/C6j9cZj0F9PqP6X1rd8TBSu/yuGGE55PQlWNUvsRwT3u 3i2dBpTQNSHnwZDCo1klwalh2ysIHxnxUF5C3K+nP/uR95BENhlpCHeregu+8uLOZgBv G38A== X-Gm-Message-State: AOJu0YzRLg6OgwI42T056Wf1WSaL9cwwiHQKDzNIgFpipvfleFkya3X9 4KPumIn8LQ8WOlqrFgbJf13KAyHi2UmFQv2+hwWaxSYULiqEfCTzbFfXZmMEVhhIcgSoRAT83NU 1luBm84o= X-Gm-Gg: AeBDiesplx5Gjd+NHTRn7DG9WDELYJZlRX5VIb/NbPUvQIQ0QcNByYFvmPtLEcY4U/E /xNAb/v1X2MLUC2WK8TGJwpTiK5S6kCX4tsGLFr1mXOyNB4Wo6ZN9BFXvq+jMvTGXf+nRoN+jsk M+C2ZjqMMGleWpn0EHIJTqmyxbBgYLNfLtjARfrHIraNwNJPhZWFMUT9dtEiI0D1rHp1c93LGdE 01UQL1AHf5+FmZ+xIy273liT6eL+Sg2Ui85AwTXOAOE8z5/ExcL9DDgdZq4CqFVyGMOg5IsMZh9 roQ2n30XlEvCUjv4v47c5uVebte8CzAHLsScQXSqHrXswO4id8IBsq7NK+lhBhZsNj0/ZeKu6Gz Mz7ji+faaGalJpEfrBjVZshpNek2USQdvWgxTXm3YnwYDV70sbs5HhI5A7wb8rdMIeuXNQY7nOn QeJT+6DQfWNL6lNUBydPmI/00/UlZSH4IUgx+ok7LStFVkxx+9gL8i1CpOHpjfxI51TSk78HA8g t2N/w9zbKhGUQirXVMoFw== X-Received: by 2002:a05:600c:8b38:b0:485:39b2:a47c with SMTP id 5b1f17b1804b1-488fb796fa0mr383690255e9.25.1776963827997; Thu, 23 Apr 2026 10:03:47 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Roman Bolshakov , Jonathan Cameron , Mads Ynddal , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Richard Henderson , Paolo Bonzini , Alexander Graf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 10/16] target/arm: Use generic hwaccel_enabled() to check 'host' cpu type Date: Thu, 23 Apr 2026 19:02:22 +0200 Message-ID: <20260423170229.64655-11-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260423170229.64655-1-philmd@linaro.org> References: <20260423170229.64655-1-philmd@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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1776963895906158500 We should be able to use the 'host' CPU with any hardware accelerator. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/arm/arm-qmp-cmds.c | 5 +++-- target/arm/cpu.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/target/arm/arm-qmp-cmds.c b/target/arm/arm-qmp-cmds.c index 83ec95c290f..ee17261c9fe 100644 --- a/target/arm/arm-qmp-cmds.c +++ b/target/arm/arm-qmp-cmds.c @@ -31,6 +31,7 @@ #include "qapi/qapi-commands-misc-arm.h" #include "qobject/qdict.h" #include "qom/qom-qobject.h" +#include "system/hw_accel.h" #include "cpu.h" =20 static GICCapability *gic_cap_new(int version) @@ -96,8 +97,8 @@ CpuModelExpansionInfo *qmp_query_cpu_model_expansion(CpuM= odelExpansionType type, return NULL; } =20 - if (!kvm_enabled() && !strcmp(model->name, "host")) { - error_setg(errp, "The CPU type '%s' requires KVM", model->name); + if (!hwaccel_enabled() && !strcmp(model->name, "host")) { + error_setg(errp, "The CPU type 'host' requires hardware accelerato= r"); return NULL; } =20 diff --git a/target/arm/cpu.c b/target/arm/cpu.c index ccc47c8a9ad..4f98121be0b 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1629,8 +1629,9 @@ static void arm_cpu_realizefn(DeviceState *dev, Error= **errp) * this is the first point where we can report it. */ if (cpu->host_cpu_probe_failed) { - if (!kvm_enabled() && !hvf_enabled() && !whpx_enabled()) { - error_setg(errp, "The 'host' CPU type can only be used with KV= M, HVF or WHPX"); + if (!hwaccel_enabled()) { + error_setg(errp, "The 'host' CPU type can only be used with " + "hardware accelator such KVM/HVF/WHPX"); } else { error_setg(errp, "Failed to retrieve host CPU features"); } --=20 2.53.0 From nobody Sat May 30 19:21:50 2026 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=1776963900; cv=none; d=zohomail.com; s=zohoarc; b=n8rFToNvtZEPYoeEgcv9H8qIoGaeeaRmO9/m739mOJTintejBtA61Eypl0/m0ZCHbakwnUomkwsH4ny/rl222w0Jze1KhO7fh8MgsANvaCcG3rsqU4M8Avhrn72h3BJiirg+W4zI8ntUriWzxbrwuhyqtUv2yZLbTqEuqKXNFus= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776963900; 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=ZCFQzooRNCLAU0lxbQyFXKr+3+SaXX5+jlkuAyFk6Qg=; b=f2ENcOIiBCSDg7gQaaRS/hGQ4JL9wKWNFj18ljIaLbdjTWArMwh+I7fJojn9eVyBbbGkzTAtWHm8qeV219erulBrRkPNN+otf9fscJOpeOtNKr33kilg1o9o/6Cm2ht/JT22VJHatYkRUeVKS4qgDwxDS2rAgpgDKRV8aiIG7kU= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1776963900747307.3513206937945; Thu, 23 Apr 2026 10:05:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wFxTs-0002Wm-C2; Thu, 23 Apr 2026 13:04:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wFxTD-0001YU-QP for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:04:09 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wFxT3-0005jf-5M for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:04:05 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-43fe3e22e33so4556542f8f.0 for ; Thu, 23 Apr 2026 10:03:56 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43fe4e3a174sm59920785f8f.18.2026.04.23.10.03.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 23 Apr 2026 10:03:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1776963835; x=1777568635; 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=ZCFQzooRNCLAU0lxbQyFXKr+3+SaXX5+jlkuAyFk6Qg=; b=io4xn7R/SmxpXazT0G6JihMVClWhfblgSELzjJ2T9I6R8z72Ll3TtzUhGBHwjkhSTO DpPcNEKiuC0a4WwpyNut/F94QufjFmK4D/Bs4WiLWQx2nQyF6s4fZNECGHxi3FjmCTXW MConiZCjTz0YU8u5En+pK3NLsuwJ+CK4ccgm8nPGboaQkt3paLiYTk9Y+P7NdLR+/gI6 HMfddqwqQWiCuZiQhhEelInVV1spQZ/PGJSu3a11+gUhAH5jIzkbKrvkBWpH+X3mYrjK KEKCll51CHy3EB2ziSK1lccxa1JmFUKcnyCLXtMJC2WFeTlhpb0nOmX/fCXYXhAuS0lp SPbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776963835; x=1777568635; 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=ZCFQzooRNCLAU0lxbQyFXKr+3+SaXX5+jlkuAyFk6Qg=; b=D0//xyRfe6zi9MwsJdG5lJzyzN7oe55juUss1h0DmYon/qouwOH+/CjaRJUnr67xlb SfnjJtO4I6aBC6pocsJNR0knuk+IIutaHxhrAtPyb+fUN/D5xb8hYgfDRkt8lHUbxuOQ jMH7VHJKag+de1PtYMYIdoqu2IT4Lqph3I8Cwfl1uRwVt+KV/tVcr0NpIqihOL7KiEZf hq03wCZfWB2dOZXhE9nh3xI+dHiy2olkNIHhTkTmXKu55e2WMbnH81k0O/c0tyCHZF5g T033tfGFBMjUYtwa2z1q3Ds7wAKZrqmnz850Zh5XscpnV9ZK+pqUAE8ALu7gcYFs31ER UMjA== X-Gm-Message-State: AOJu0YwwTuD8ghQGk1pc6fBnFm4ZVZ3qJWksud8ZPef3BA57WAy2Z2Yb db7uYH87OR8EG1G6/++qFcIMIDL8S+dK92Oehms27FdO3pZmWrLzeOS/+PV/W1L7QNZ21U9VLmy HEIKcftw= X-Gm-Gg: AeBDieu1iiOdnPDeVoVsJHCX2eez/HpEh41SOodxslBfDigm8eiGw36Vr2cECtV1yGw qUmrZKH1Uf4GLlHHiIhFxqKXobsUciYY4OrNI+nb4wuzxy+hSEdFrG3LbrSZy6OUntCMYCq0mpa 4BVkIgkndtTcpj0u7ss/o6lIHY1TRxOf4H+iYQIVVcGgWiBdKr3xrCsDUMiqPXWvX0rUxqCy0dy QT04WSSQ0L0toVukCT9RYc4ERZuTUeNwbzQkGSPEnJHB6vUFnzDnj4X3odymAqr9D0o+1elME1s QRXM/fvSJoFQqUB92vRcGh6P9qggbHY/len1t85cZ3HO9qyl+dMqhQ+BdfIZjcf6KlgoOl2Q7gX y2L/kv3A6+7/GNCjYn+YR65g2RKe/Ll3rc/rFuvy32VMYKbrdxqBy9XiMwPPhwBqu8nKko1pw+Z pQ/lj8BWwqeqKzpPLeXUJZSksOJFVCPOAZjX32r+SF/yQ6mimOBw1pGK2HVCTqIb9U5wjdtmQnY UdYwSEuOuZwvgCEXOyxrQ== X-Received: by 2002:a05:6000:2909:b0:43d:733f:aee6 with SMTP id ffacd0b85a97d-43fe3dbecebmr42817355f8f.10.1776963835241; Thu, 23 Apr 2026 10:03:55 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Roman Bolshakov , Jonathan Cameron , Mads Ynddal , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Richard Henderson , Paolo Bonzini , Alexander Graf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PATCH 11/16] target/arm: Only set CPU_INTERRUPT_EXITTB for TCG Date: Thu, 23 Apr 2026 19:02:23 +0200 Message-ID: <20260423170229.64655-12-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260423170229.64655-1-philmd@linaro.org> References: <20260423170229.64655-1-philmd@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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1776963901895158500 Commit 34c45d53026 ("target-arm: kvm - re-inject guest debug exceptions") removed CPU_INTERRUPT_EXITTB from KVM, but it also appears on HVF. Better to restrict it to TCG. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Pierrick Bouvier Message-Id: <20250630130937.3487-2-philmd@linaro.org> Reviewed-by: Pierrick Bouvier --- target/arm/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 7389f2988c4..45183df4449 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -9577,7 +9577,7 @@ void arm_cpu_do_interrupt(CPUState *cs) =20 arm_call_el_change_hook(cpu); =20 - if (!kvm_enabled()) { + if (tcg_enabled()) { cpu_set_interrupt(cs, CPU_INTERRUPT_EXITTB); } =20 --=20 2.53.0 From nobody Sat May 30 19:21:50 2026 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=1776963926; cv=none; d=zohomail.com; s=zohoarc; b=MjSzKR/PhiDMwkzFNnxkdJDYgmbugSDiCjP9LizODFHCP6ITzIuMhMaP+gKsXaHyWBRMrZlODGPbNRG+E8ZGR3Pp66bB4Itlfg+RDOUujhcEFRRuiMoPfTWf3bX/kvxtRuCk+mQ+Qw6pJRUnTA+Y/N1DcslIY9ZD+wVlxw4gIes= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776963926; 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=+igmwACxKAAriU8rkOxPQALcbbgJ0c+NUQHQmbA0Oqs=; b=LqtE23mnu0ckqqDe+7eu/nwcJFrIbJwImW5hIXAivYwY/tYm3EmQe0iy0tbE9kkpsFUgh1Xt5zMFJWo14vD1P9mOdvjlHvZd/qwpsJSWYZ6a1DH1ZiQNgi/f//XBL4EElTUVRVZiDwI82Q1i3SVAlE47ro8O+uv/NhEUu92a9kk= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1776963926229388.2243112227766; Thu, 23 Apr 2026 10:05:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wFxTt-0002h0-Rh; Thu, 23 Apr 2026 13:04:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wFxTG-0001dF-7V for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:04:15 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wFxTA-0005kM-LQ for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:04:09 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-43d75312379so5076075f8f.1 for ; Thu, 23 Apr 2026 10:04:04 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4412150a092sm19901683f8f.23.2026.04.23.10.04.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 23 Apr 2026 10:04:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1776963843; x=1777568643; 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=+igmwACxKAAriU8rkOxPQALcbbgJ0c+NUQHQmbA0Oqs=; b=ZZ1vcM/DKMfjIYSbz6C3eQXOE8LBX/M9ZKEqsHfphitZgcPIf+YBKQyIAgkvycPL+B Uj411BXVUL/Elfh1EBoUwGsgYZ7+HmNo35hRkC1cqL/dcuqD0oU28FxXZAQBf1RvfrT0 4sbRYJJCJQKBb9sUPSpkdoamo1+Q+DHYZzx+QgffIV3ZeP0fKo+xNedD12z1qvaakelq YCFCXp44Wu1KkfjicB6Z6Ag7sPumz/BlAv5bqF8TSSzV91YaCVmMV5aBVaRnjzMIgNr9 r79mztr0X9HSZg9GrnGLS5eziFhJF/VulCImlHuzHrm7UegCpUiGIh8PAjHLO8SnrpA5 KC/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776963843; x=1777568643; 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=+igmwACxKAAriU8rkOxPQALcbbgJ0c+NUQHQmbA0Oqs=; b=enR8W0W7JM4kYhSGauFyU9kN8yHTFyP7RcOc1B6SGAazur539tJIBMdbU6RtUw8p0V ZCYhqntJa9Cmy4FEoeJ6bAzfrgit3s0fl+109cntU59U0uCI58hLv6aq/3DGj45j9URs ZM/etl+o79zgwDSLTjsIkiMCLV5gaU9/7AsnN3LRVHLsvz7Bawi2pCvVncjEPXspH9mO sDYUTd6vXnm4o8KgM7Ihl8dKGk3ElCuF1ucDGMLHVfW0Cz//UaDP0uYtUvhTZtvmSkU+ hkSFrkZAiva/pEjKPk6AqIohhx2F2TO7UxJd9xtiOJXh1F7JwzgxNRwg4NIQYKUNba8l yPtw== X-Gm-Message-State: AOJu0YwJ2UrNgjdK+Ht+SLoT54qdAXhQl7NtozhDH8W+jf27G3O85bEZ Mr129ejDpaiLSKaiQF10c2Fo5vOAu0Oc1W7fPCcZDl9z89zoLoJuAVp8KsLf8edAgNv56od/ByH SjB9kM0g= X-Gm-Gg: AeBDievdoy+QRrdWbY82QoTD0X35FTBQGA1fKryevqJ/+inJ9jP+aIKFq54tRXV+xtg v2g/R13iqDaK8kuBibYzGmh4Y0jJY4r5+0CoY6ypw4atd7ZjutMYskpsoVzBC//0CYa88s8AVWi 1IJWROGV1BSCFW6Q0THcWKF/Gc5D2D9VCNQjEHX+kDgDJIFWu3XiSmfrMAmadgPndsqgs+YX+Cd YhQQxJbrcvebGemc/5W9yAoRYiSVCOK8wvgpcSjyxYILLOP0kkxSBA2a1a7AliKMAUZ4u9W/gxd uCMSppjivHiyupv1yU7Nj4yEfTo8Nht7OXj5HQG/AE8ZoDQQab/KWfGiJ/xKuNKMI7tDtS0m9v6 xrwB2yFfm4ES2jPBP5Vjq12ErrGgSkLom4/VhH+J+0iJWV0gJxzrS44rp/W9ixP2Om9PRnsj7CA gz2bq0E2Ddic2BH0iF1VjyrjyTE87mW8+v8Z6WyNnP80b7yMKnFkQ+cf+MZKiiZkdpUCeLd7xpo wZAEAoWWXI= X-Received: by 2002:a5d:64e5:0:b0:43d:7606:5a47 with SMTP id ffacd0b85a97d-43fe3f358a5mr43126165f8f.2.1776963842597; Thu, 23 Apr 2026 10:04:02 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Roman Bolshakov , Jonathan Cameron , Mads Ynddal , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Richard Henderson , Paolo Bonzini , Alexander Graf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH 12/16] target/arm: Remove vcpu_dirty=true assigments in hvf_handle_exception() Date: Thu, 23 Apr 2026 19:02:24 +0200 Message-ID: <20260423170229.64655-13-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260423170229.64655-1-philmd@linaro.org> References: <20260423170229.64655-1-philmd@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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1776963928355158500 Commit 2a425aae0b5 ("target/arm: ensure PSCI register updates are flushed") manually sets %vcpu_dirty in hvf_handle_exception(), but these calls follow calls to cpu_synchronize_state() which itself sets %vcpu_dirty. Better have the generic CPU API handle this, but add a pair of assertions when serializing the accelerator state to be safe. Suggested-by: Alex Benn=C3=A9e Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/arm/hvf/hvf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 2fb768048b8..f2c5bde5983 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -737,6 +737,8 @@ int hvf_arch_get_registers(CPUState *cpu) hv_simd_fp_uchar16_t fpval; int i, n; =20 + assert(!cpu->vcpu_dirty); + for (i =3D 0; i < ARRAY_SIZE(hvf_reg_match); i++) { ret =3D hv_vcpu_get_reg(cpu->accel->fd, hvf_reg_match[i].reg, &val= ); *(uint64_t *)((void *)env + hvf_reg_match[i].offset) =3D val; @@ -888,6 +890,8 @@ int hvf_arch_put_registers(CPUState *cpu) hv_simd_fp_uchar16_t fpval; int i, n; =20 + assert(cpu->vcpu_dirty); + /* * Set SVCR first because changing it will zero out Z/P (including NEO= N) * regs @@ -2239,7 +2243,6 @@ 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); @@ -2256,7 +2259,6 @@ 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); --=20 2.53.0 From nobody Sat May 30 19:21:50 2026 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=1776964016; cv=none; d=zohomail.com; s=zohoarc; b=A02L/lQUM8MqR21bRSrOB6pX6IbE6C0SAh/XReCUPiGw8Rf9P85C8AlMXljwFjeBihbnfPqGUZmOpamJN2A1WyHaE6MqmuDylims6Gq06nTPYWtovBkNEAQfPtNyHu7MK9wUoltKSAL/7GLnjjEXlbLsVgc+iHmjLHdE5X331P8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776964016; 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=RrWv8gw/u68HSJbd/POGgEkEDudbWbGUOlVbg7Qyl6w=; b=OFRilYWMGLSEg9JJVgMokyihpUSDMeTDPvoJAmZ/t5Zi80zVBU/v4j9blBenolCACjwkXxHvqUlzgcoWKPGy7TmhWOHvQXRzrpd7iwI5y4BVRhQKTpUeicaGsYNR0vJJttpX7iHQCePuk0Wc4qX1UTqxYRHdFN8OxbufmIU8xeI= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1776964016926828.208685889664; Thu, 23 Apr 2026 10:06:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wFxTv-0002op-5M; Thu, 23 Apr 2026 13:04:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wFxTL-0001hn-T7 for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:04:17 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wFxTH-0005lc-VR for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:04:15 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4891f625344so54416995e9.0 for ; Thu, 23 Apr 2026 10:04:11 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4891b46cffasm353820325e9.13.2026.04.23.10.04.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 23 Apr 2026 10:04:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1776963850; x=1777568650; 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=RrWv8gw/u68HSJbd/POGgEkEDudbWbGUOlVbg7Qyl6w=; b=nGn0SSrqsxYb4gNkZgaYMe8+7TeYcPVj3TR2+XSGmx7IqWNwkvXjKTgo0oJtgIAXxi jG5KigKuBhE+vj1+Is/2oWCISvfER6yzrsSFO+Y1d2bAPaV6Kh/wrgude5Vlehi2OSX8 p2E/PR5WjOPb+jC87we0K0EOD4xyOqWLn5SmJ0cGpjEn82DYzDMFHcOLkLH8mve14tHN tCyieQJMkSa79t2u6Prj1lf8+QIGGev7UWmSCGVJkcGIGZ65zGcIQPyO2PcjHwnZBcRa qYA0zfWnXWz356rI1j1p9dztt2DVdrKXBr12wwSry5lY5fhJ2p/4PdN2/d7aw35dVKJD QqVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776963850; x=1777568650; 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=RrWv8gw/u68HSJbd/POGgEkEDudbWbGUOlVbg7Qyl6w=; b=GmPleOsxfjlyTbj8lr1X/msdQW6LaJnzYCwUdJk1dlBFDzqXG/cmA+uLe53kjNGcAF G0TBE3ph5TCFCAuafeokTZt+PCqX9wa4VfF7U9LmKnmGi1+rd+vsh/4cike5274hYgaA GDvmmTu61NVhjMTawS84174y6hK98gsBn9ReoNzXRVkNUrt4g9nCSOmYyUQ1moRZcY9v MGoFNhHz0PQKLwJJKYKCwCO3pKZjUj4r5ddGW5yxAmyVq7t9/n26B0B72MSD/1BjOfa+ 1EbGxyTPldI7tKhh5SJMU/SKYNC+eXJRtzu+RRMZBSeLFthOxl7lf0g9g2rlGaplGCcC 7VkA== X-Gm-Message-State: AOJu0YyvAkBtZ69EIOOu+m3Lbrh7Oym9ItyE6xuJPREHVG76jFHIJh3O vRbcOFnUbctiL3UGsBxuGm9uYcQnyDgpdGtbr9LzCN/sNT6aBTjOguxvsdism8tWYEKSe8+yKYT RXUgehYM= X-Gm-Gg: AeBDievQcAUDRss01LzXrUgJ2tFols1FAbRBUbYPopyr2f3TKgLrEaQljNzHuxpzT+o gqZDanNIUPEVND3g88gAaMwyxIth0pwGBhydCzFbbTPbEVycrk2uSfSnQEs5vkxrpNCW5iKkGt9 WiwgArwjl3vsTAx3cgxCPKw5uPjiJfOfiNFPsDfx5XQ2XHV4DeTbc/sbKYN2fD2Ad43oPL8ZfU0 SKyd4UZkjPaGHkrj/nz4P58EekcvU/LuCndGyVoKd2mzxUE2+kXR+yK5iAy/ectQRuIGPrYY9Ho ZKwyN+bIwb5i7WaRnRxeh1QEmxzMuymAa/L2asu+R3hDHyntva94pyS0KTlOI3RS9ubX316KgLd rpMa5Qs0PeBC5Z+ZHeuWoO1IJMlN1I15kVPA8w+GCNR7G/ZNSVsYaMd5w8vMtG+7xALNRGvXFMu b42UZOLcD/VdoxejKjxUaUYLEhs4ri9hEIeu7kXiXwq5ReSaRBGrLWE900RViZ5B707KH/0FLmK vn5Mf9427E= X-Received: by 2002:a05:600c:3150:b0:485:3cef:d6ea with SMTP id 5b1f17b1804b1-488fb8b9deamr320043925e9.13.1776963849896; Thu, 23 Apr 2026 10:04:09 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Roman Bolshakov , Jonathan Cameron , Mads Ynddal , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Richard Henderson , Paolo Bonzini , Alexander Graf , "Scott J. Goldman" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Phil Dennis-Jordan Subject: [PATCH 13/16] target/arm/hvf: Fix WFI halting to stop idle vCPU spinning Date: Thu, 23 Apr 2026 19:02:25 +0200 Message-ID: <20260423170229.64655-14-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260423170229.64655-1-philmd@linaro.org> References: <20260423170229.64655-1-philmd@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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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: qemu development 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: 1776964018853158500 From: "Scott J. Goldman" Commit b5f8f77271 ("accel/hvf: Implement WFI without using pselect()") changed hvf_wfi() from blocking the vCPU thread with pselect() to returning EXCP_HLT, intending QEMU's main event loop to handle the idle wait. However, cpu->halted was never set, so cpu_thread_is_idle() always returns false and the vCPU thread spins at 100% CPU per core while the guest is idle. Fix this by: 1. Setting cpu->halted =3D 1 in hvf_wfi() so the vCPU thread sleeps on halt_cond in qemu_process_cpu_events(). 2. Arming a host-side QEMU_CLOCK_HOST timer to fire when the guest's virtual timer (CNTV_CVAL_EL0) would expire. This is necessary because HVF only delivers HV_EXIT_REASON_VTIMER_ACTIVATED during hv_vcpu_run(), which is not called while the CPU is halted. The timer callback mirrors the VTIMER_ACTIVATED handler: it raises the vtimer IRQ through the GIC and marks vtimer_masked, causing the interrupt delivery chain to wake the vCPU via qemu_cpu_kick(). 3. Clearing cpu->halted in hvf_arch_vcpu_exec() when cpu_has_work() indicates a pending interrupt, and cancelling the WFI timer. Fixes: b5f8f77271 ("accel/hvf: Implement WFI without using pselect()") Signed-off-by: Scott J. Goldman Reviewed-by: Mohamed Mediouni Message-ID: <20260410055045.63001-1-scottjgo@gmail.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/system/hvf_int.h | 1 + target/arm/hvf/hvf.c | 65 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 65 insertions(+), 1 deletion(-) diff --git a/include/system/hvf_int.h b/include/system/hvf_int.h index 2621164cb22..df13cc650fd 100644 --- a/include/system/hvf_int.h +++ b/include/system/hvf_int.h @@ -48,6 +48,7 @@ struct AccelCPUState { hv_vcpu_exit_t *exit; bool vtimer_masked; bool guest_debug_enabled; + QEMUTimer *wfi_timer; #endif }; =20 diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index f2c5bde5983..33595bac72c 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -28,6 +28,7 @@ #include "hw/core/boards.h" #include "hw/core/irq.h" #include "qemu/main-loop.h" +#include "qemu/timer.h" #include "system/cpus.h" #include "arm-powerctl.h" #include "target/arm/cpu.h" @@ -301,6 +302,8 @@ void hvf_arm_init_debug(void) #define TMR_CTL_IMASK (1 << 1) #define TMR_CTL_ISTATUS (1 << 2) =20 +static void hvf_wfi_timer_cb(void *opaque); + static uint32_t chosen_ipa_bit_size; =20 typedef struct HVFVTimer { @@ -1218,6 +1221,9 @@ void hvf_arch_vcpu_destroy(CPUState *cpu) { hv_return_t ret; =20 + timer_free(cpu->accel->wfi_timer); + cpu->accel->wfi_timer =3D NULL; + ret =3D hv_vcpu_destroy(cpu->accel->fd); assert_hvf_ok(ret); } @@ -1356,6 +1362,9 @@ int hvf_arch_init_vcpu(CPUState *cpu) arm_cpu->isar.idregs[ID_AA64MMFR0_EL1_IDX]); assert_hvf_ok(ret); =20 + cpu->accel->wfi_timer =3D timer_new_ns(QEMU_CLOCK_HOST, + hvf_wfi_timer_cb, cpu); + aarch64_add_sme_properties(OBJECT(cpu)); return 0; } @@ -2031,8 +2040,30 @@ static uint64_t hvf_vtimer_val_raw(void) return mach_absolute_time() - hvf_state->vtimer_offset; } =20 +static void hvf_wfi_timer_cb(void *opaque) +{ + CPUState *cpu =3D opaque; + ARMCPU *arm_cpu =3D ARM_CPU(cpu); + + /* + * vtimer expired while the CPU was halted for WFI. + * Mirror HV_EXIT_REASON_VTIMER_ACTIVATED: raise the vtimer + * interrupt and mark as masked so hvf_sync_vtimer() will + * check and unmask when the guest handles it. + * + * The interrupt delivery chain (GIC -> cpu_interrupt -> + * qemu_cpu_kick) wakes the vCPU thread from halt_cond. + */ + qemu_set_irq(arm_cpu->gt_timer_outputs[GTIMER_VIRT], 1); + cpu->accel->vtimer_masked =3D true; +} + static int hvf_wfi(CPUState *cpu) { + ARMCPU *arm_cpu =3D ARM_CPU(cpu); + uint64_t ctl, cval; + hv_return_t r; + if (cpu_has_work(cpu)) { /* * Don't bother to go into our "low power state" if @@ -2041,6 +2072,34 @@ static int hvf_wfi(CPUState *cpu) return 0; } =20 + /* + * Set up a host-side timer to wake us when the vtimer expires. + * HVF only delivers HV_EXIT_REASON_VTIMER_ACTIVATED during + * hv_vcpu_run(), which we won't call while halted. + */ + r =3D hv_vcpu_get_sys_reg(cpu->accel->fd, HV_SYS_REG_CNTV_CTL_EL0, &ct= l); + assert_hvf_ok(r); + + if ((ctl & TMR_CTL_ENABLE) && !(ctl & TMR_CTL_IMASK)) { + r =3D hv_vcpu_get_sys_reg(cpu->accel->fd, + HV_SYS_REG_CNTV_CVAL_EL0, &cval); + assert_hvf_ok(r); + + uint64_t now =3D hvf_vtimer_val_raw(); + if (cval <=3D now) { + /* Timer already expired, don't halt */ + return 0; + } + + uint64_t delta_ticks =3D cval - now; + int64_t delta_ns =3D delta_ticks * NANOSECONDS_PER_SECOND + / arm_cpu->gt_cntfrq_hz; + int64_t deadline =3D qemu_clock_get_ns(QEMU_CLOCK_HOST) + delta_ns; + + timer_mod(cpu->accel->wfi_timer, deadline); + } + + cpu->halted =3D 1; return EXCP_HLT; } =20 @@ -2334,7 +2393,11 @@ int hvf_arch_vcpu_exec(CPUState *cpu) hv_return_t r; =20 if (cpu->halted) { - return EXCP_HLT; + if (!cpu_has_work(cpu)) { + return EXCP_HLT; + } + cpu->halted =3D 0; + timer_del(cpu->accel->wfi_timer); } =20 flush_cpu_state(cpu); --=20 2.53.0 From nobody Sat May 30 19:21:50 2026 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=1776963898; cv=none; d=zohomail.com; s=zohoarc; b=EseESWh2Y/hFSJvRnQimeSu5Eyw4t26HYEzENwSaSjvtQzWnHQ8Mw2f7CQk0d2Wu4WzysvqH9PJi3YlvzuWk42VZorkWTeuthp/6wA6fq/3P00dWoqMrE6Uduyn/MULF+Fj5Rp/xj6TtIkEOQ7Y11w089LSiDWkoQzdAejKyHC8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776963898; 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=F5k9kqQDv8QT0/Fw3i6//tVhmROXr99HTWpXkB4Vr04=; b=lFl9rrxMHbCzYnS4qmCfz7pSn4okSqCUo6g6PNFJCmW/3E+NNXgquxjfOaeSNHo0hGbDq+PcvszsviTUROzwC8grwKaN88eamud3JdejGfNCUzOL372z6xlrsYvkj8X4GNuCDI7HwhuVlo67PzESrFcT9qW9dPu31y8i9+PgDVQ= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1776963898257611.5346499987772; Thu, 23 Apr 2026 10:04:58 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wFxTs-0002Wn-CD; Thu, 23 Apr 2026 13:04:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wFxTR-0001l2-Bq for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:04:25 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wFxTP-0005mf-4b for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:04:20 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-488b0e1b870so112937535e9.2 for ; Thu, 23 Apr 2026 10:04:18 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43fe4e591cesm73428037f8f.36.2026.04.23.10.04.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 23 Apr 2026 10:04:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1776963857; x=1777568657; 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=F5k9kqQDv8QT0/Fw3i6//tVhmROXr99HTWpXkB4Vr04=; b=liM5ld9iYFH2G+4y57OysFIEgpmQdzwFXndKUqrCy46GR4VerbuKwNNHeH8b5yVSnI JbO+qkX2BQHP7vqVQesqsajXX/Xv2Eh+yoHep7eB+pfe32Hj+azZweLCzYD+CgJS1HHR qBHPkgWns65zv2wr9Lb8ILwo7WTLGTI3PhEUWcv0O/h4I1l/VSMqo1waXm8w9M2r+7kL We2GyVGuRfjIkkm54snz4WIxAsRharLL2BEco34vrsVrjnomTgQW0tzk0CvcRmQ/LGQU 73gmSsKtiugoPYRHAsGMkx27lyGIMS0yUQz9LY9UqMqYr4+1k//xDwUjzxWPAGecANjh xcWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776963857; x=1777568657; 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=F5k9kqQDv8QT0/Fw3i6//tVhmROXr99HTWpXkB4Vr04=; b=XMWjuC9cXh5N3kPq8U0qVjIG/oa0tcpVJUTSaOTzNCtUKOgcOljGJSh1cj9GA4HHS+ rzDvjeqI7gYHtQKbPhIsHkIpQesGLaLGLQYaMpEl727Prqe6XMNq+jxsrXgIfz517fEU F40yenbeD0GoZ1SyVG57lpK6gyEvxR5DySiP6p3AjVIlsQGnCFhXc+I2M0offinGykha SNeQBGCsSB5U1hKgj5Uxwy4hMHURv5iPFm/aCyicE2kKneWj1PwYPXb2/1W+RXrpmRb6 fRvhCp64Gyp5u2U9XugpdJ1WaNw1SV+JU8eoEXPWaCRDOP9DgbbVUo8CKOqGNgaew0cc PXgQ== X-Gm-Message-State: AOJu0YwCPQauTxyor5I3+4zBi5AoNkMbO4BaLv/IkWIwHNSW3KlwSnPJ rpR6evCJK21zUeS1/rHVwikJLT93nnvdMBFTrmIGPHOYlydPKqBMsaskFxEj1v8BsFTzg3dNInN Xz31Cyr0= X-Gm-Gg: AeBDieuLq88CtyT3iRN3zCsfO/ckcCc2jKl3DYqxegvg0bOcNGzdkPoZhfWsJBtXqI3 taVJF1ZZAVqDCydJQxaj4ZmTh4UmVqL1o98+znb16LBgq3HutQjzoWiVO+bx8QLhEqOxKqMNmED i1MEVCf3E3XOUHlg7c0aQh9/PYTDJBk4ogvDFFMniouStA45ZkriDwRD8TNdqEdyDJR4GAdcdR9 EGt65mYvvQf6DNaKv8ZkIAfrOZBSpxTDYdbOY4pXWkG2DeOANqD1Hzv+8fmFAihUVi+W/LqbLce JGg5ZWj/TPRIoDF0rrPqbA46sDoNJAeCyk2MmChtyVGHwe7iC7/P2sSX395FhHtiVDjYDVqg4TF x+8dVH+MjmgQpgli9EIeOnC5GDm9Rtek2169ccI/A5CpYrS4wHAoEdzwGRy38gEhSG11Z/JfTdP YpVdSeqgONxRmmkuwEcEjfa0mNkdz+7KXmLT/DFXyCpNUYpA6napsm3lzbT78nfucnNcgq7AM93 zl9qnGuicvlMwXbwaVB7w== X-Received: by 2002:a05:600c:c09c:b0:48a:5363:8cac with SMTP id 5b1f17b1804b1-48a53638e07mr154852825e9.22.1776963857307; Thu, 23 Apr 2026 10:04:17 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Roman Bolshakov , Jonathan Cameron , Mads Ynddal , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Richard Henderson , Paolo Bonzini , Alexander Graf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Zhao Liu Subject: [PATCH 14/16] target/i386: Report TPR accesses to HVF Date: Thu, 23 Apr 2026 19:02:26 +0200 Message-ID: <20260423170229.64655-15-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260423170229.64655-1-philmd@linaro.org> References: <20260423170229.64655-1-philmd@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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1776963899966158500 HVF should be able to handle task priority register accesses. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Zhao Liu Message-Id: <20250616090632.55214-1-philmd@linaro.org> --- target/i386/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/helper.c b/target/i386/helper.c index c397a6fde5a..28bc37966c0 100644 --- a/target/i386/helper.c +++ b/target/i386/helper.c @@ -563,7 +563,7 @@ void cpu_report_tpr_access(CPUX86State *env, TPRAccess = access) X86CPU *cpu =3D env_archcpu(env); CPUState *cs =3D env_cpu(env); =20 - if (kvm_enabled() || whpx_enabled() || nvmm_enabled()) { + if (kvm_enabled() || whpx_enabled() || nvmm_enabled() || hvf_enabled()= ) { env->tpr_access_type =3D access; =20 cpu_interrupt(cs, CPU_INTERRUPT_TPR); --=20 2.53.0 From nobody Sat May 30 19:21:50 2026 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=1776963919; cv=none; d=zohomail.com; s=zohoarc; b=Xcqixs1k5KzWdZKl+MFE6mI3e/hLd+4pfrL1YIokpmGTkadnK1xb/P8F3dm65f0PuXmxri7NwfCFy2+0EOD6GIwKGM5DJWdgnrhFYq7YDEIR+2g2bQU6Vczyj8fwwWwyMV5FTlntnbEFVjXcnwBMHYxoM4+xg4DInY/bAlPJat4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776963919; 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=2+dlrVOsNPHtgWGTf3x2VGDZydKVga1ZwBAM/XkoOYY=; b=bF5weu53qC9E+nrtwnawhuAC+U06QKDdX7uLNgZUT9e/BPGGbzfd6y3vVqdGqmoOrtr7rbmCb0mvqKgW0J64HZN9HWU/T8UYIVY2FFuUosGWGWH7JQcQmSCx/JwGRYze7+/OcjqNOynH18hEpgg6HEG3bzERQqk+Oc1XPA2VWys= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177696391903134.040227845868685; Thu, 23 Apr 2026 10:05:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wFxTy-0003Ff-6m; Thu, 23 Apr 2026 13:04:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wFxTY-0001qR-Cv for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:04:32 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wFxTW-0005op-J0 for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:04:27 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4891c00e7aeso45133025e9.2 for ; Thu, 23 Apr 2026 10:04:26 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488fc1c0354sm497194745e9.11.2026.04.23.10.04.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 23 Apr 2026 10:04:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1776963865; x=1777568665; 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=2+dlrVOsNPHtgWGTf3x2VGDZydKVga1ZwBAM/XkoOYY=; b=sCnDhuB3ZAyT2wrOAo5H16zUQIj3rgvLp8qunMc6UatUz98hHGMzb4/JsRFIyn51Jr p1674Ud4gVZtGgOAlcpmeeXxRvCN5M9vZ83TFRBvjQ5kqFr9RYiF0oYSeKvsQ0oTE5Bf CRPVIF6rifzq7nSuZb/TxL23OBWQVqhmgpXn1+e4tpEM5VZw5LS/yF1dL1aWvIgxjtrj mtEBTQexiyDyWBHY7oytUzlSjLQv7K/nkEFvlxGZYjmG00qFcMfEfQlojfRNGjrzdehv fZzeK2RmbSW/cn4G6FHC70Kgr4ug68q+CaATPi5tFVOKI0okDyJKuNwRVi6+m/4GESNu 7FDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776963865; x=1777568665; 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=2+dlrVOsNPHtgWGTf3x2VGDZydKVga1ZwBAM/XkoOYY=; b=epMWcFVggMae+gWd+L7+Sxh5TJcz/FBUffMTfPALSuTwzi/lN7/UT6WBBZy92CaHPr 6/6oqF7JjwVpXDGnTay6UjgbFPcyw76kAErZmYJ5fYBSsrZ0Cf2x08XTRENy66VRo/PE OgySpigG8U6LEhZOmuZns47MBGXcjVAD7ASjKd1vuDLcAmdp3SobN2pMj9FzVb8dmKIx 9mCjc0JGL/K7v/3rB+4MCEboGWdtjP5aBwCP2vZBFkkKwPaYL9rOcNKylRkpc+pvlbxc tmt8I8KwM4pfOwyiqbq4kUYj/WjBHj7Kjg4lnB8iJrV+Jiwj4z1nwPu2BH4ODjrHKemL WO3Q== X-Gm-Message-State: AOJu0Yx0YMfba3qMr9UgnmaJnQYXtayQpT8j1j9X10RpRthgRQLKNuX8 ycAwYltSO/nRB+Mwn9EAI1skR30sBPr02qlTgIzjYFMeLbP/0/3nCaFQKi5CwZvGX31S/EpbIig F8I9zeZY= X-Gm-Gg: AeBDiesSROZ6kIr+osY8y+6Gj0m+Sg8PoIq1evy9shIsXm6o9RAyueDphFfXDEib690 r4ZQag1P32IeXQgXu6EZAdypsao837IW3LmK1qFVU0NBtOHhhPo0zLG0MUtL3aEjavUSRak09ye 9Ol1hm3sJMhN9j4+zevgpkwcEngl5gx5wAo7MFH0cM5XApgWW1bBe6Pb7aPiXTsDAipRT2MSiZk VkqwZrx7WxJAh0FCAZYnf/QhCa9/mDg0xDSkmnhq3cKzm3/ts5H6gyAnsqyu0tqsqVVEFGDwA/2 4Jk+D7a+OtzYCjaoXLVjZooE1vFwPiu/0Ac44dCZRminOEitHIuYA9KyvhubLjrtxiyOVj64Mi1 GBsFQeKo5JAXXlcaAJmzlkBCA6tiUVMsFuFDcIACPmSZJdgPH3jlMW/XJqqtCs485U9wS1HuKE5 nNtjrIi3HxVUHXoEpFR7i8Qn4LJwCDA24UnLIOwAMcn3NZ5fN9gooBWqJUITfagCGmcMRB9koAS atCUocZuYs= X-Received: by 2002:a05:600c:46cb:b0:488:a723:ea53 with SMTP id 5b1f17b1804b1-488fb744fbemr398891365e9.7.1776963864601; Thu, 23 Apr 2026 10:04:24 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Roman Bolshakov , Jonathan Cameron , Mads Ynddal , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Richard Henderson , Paolo Bonzini , Alexander Graf , Matheus Tavares Bernardino , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 15/16] accel/hvf: fix double hv_vcpu_destroy() causing teardown error on ARM Date: Thu, 23 Apr 2026 19:02:27 +0200 Message-ID: <20260423170229.64655-16-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260423170229.64655-1-philmd@linaro.org> References: <20260423170229.64655-1-philmd@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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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: qemu development 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: 1776963920040158500 From: Matheus Tavares Bernardino The following callstack causes hv_vcpu_destroy() to be called twice, producing HV_BAD_ARGUMENT on the already-destroyed handler: hvf_vcpu_destroy | |_ hv_vcpu_destroy | |_ hvf_arch_vcpu_destroy | |_ hv_vcpu_destroy The first hv_vcpu_destroy call covers both x86 and arm. Let's remove the second one, as it is redundant. This reverts commit feee55d36a1c5d494ee73812d279b439bb05137c. Signed-off-by: Matheus Tavares Bernardino Reviewed-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/hvf/hvf.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 33595bac72c..a905d9bc370 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1219,13 +1219,8 @@ void hvf_arm_set_cpu_features_from_host(ARMCPU *cpu) =20 void hvf_arch_vcpu_destroy(CPUState *cpu) { - hv_return_t ret; - timer_free(cpu->accel->wfi_timer); cpu->accel->wfi_timer =3D NULL; - - ret =3D hv_vcpu_destroy(cpu->accel->fd); - assert_hvf_ok(ret); } =20 hv_return_t hvf_arch_vm_create(MachineState *ms, uint32_t pa_range) --=20 2.53.0 From nobody Sat May 30 19:21:51 2026 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=1776963967; cv=none; d=zohomail.com; s=zohoarc; b=JlXe5GW2akWnT6wtRuWXO/TJ32NANgoE9ASwuVvsBGImh2Vr5142KEkv2DenAJymES9pBRfjEizCTq3YmL6BgSzhfYtyQ4a27ZWSasaNpRjqA3/codnjrNHnhHCcYlnymsfrSUvpEu4JWTJSn3pku3HqcWeFuXjzn7ji7UpniCo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776963967; 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=MqoR8+5+ajlcuLd5JxwnxOpo8CeItjayYOK0zAMELiY=; b=EChg79De2MIe3oYqhtlqInINgD2/4gD1EStYEmDMCCb+RAvbn1O05TvArIywbyWrDgNaW4tLHq+rEarQXmblKasK7xNeH/jUmJgwq4PqQIEjzGgi6if3OVuGvXZd8RAc+qg8w6opyOy2VqiTGTEzQElmHgt2Nu8tajGLxTucIq0= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1776963967555518.3632855850071; Thu, 23 Apr 2026 10:06:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wFxTv-0002vD-JO; Thu, 23 Apr 2026 13:04:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wFxTi-0002Bj-NK for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:04:39 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wFxTd-0005yd-Rk for qemu-devel@nongnu.org; Thu, 23 Apr 2026 13:04:38 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-488b0e1b870so112941725e9.2 for ; Thu, 23 Apr 2026 10:04:33 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43fe4e44f69sm56847463f8f.25.2026.04.23.10.04.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 23 Apr 2026 10:04:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1776963872; x=1777568672; 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=MqoR8+5+ajlcuLd5JxwnxOpo8CeItjayYOK0zAMELiY=; b=PfafYJePD/a7VyyNmEGRgNb50P1rq7nFm5dt2k5vOXQh1U4j9Lizvz8DDRGEAvYwGP 81V1PDiUrxsnnU1wjLzV1o7FmZAmfmrhyqulefN60ldFnih9IpKq5XVWXLvy0F1r7CPR 9lM2XdU+OWZ3lYndqa9yyrsSuHJdv4HoY9EGBWB7Us9u9HPS3vCV9NZYjLj+oMnuoLSa BLsbLwnTzxSYXkVpnhLjxvc90D+zn0nhPTcuKaLiIIP2BLfCcrItZ7EY2J3VsL8yrwXq MXS4YI8JWy8Y7S0vneNaEdzJIEMwS8L21e6G6y6e8beSuixwywu6snVSCkJVNKMDNr5s nTMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776963872; x=1777568672; 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=MqoR8+5+ajlcuLd5JxwnxOpo8CeItjayYOK0zAMELiY=; b=lG7e+RaCXJpDbUggjXjzx61i47xKqnUo/L/hiSejRHJWqbSDlaYFSdeXQtyBHHp0mh oEDhnHPKBCS0ZvzzFIvU9N4LFiJPAk8HZ7fESKFB2MIEa/PWjrvYVj7/hgNpBybz9n0U 3AfLPH+47GUCA3MrqhK27eLov+I68GZ10N2f4pMjb1IXIDVHhzWSf/RmQXDtykaYsOX3 36r1Y7v0LmMB+qF48dLIubArNIu6SrqBgmHOcwd/0zyPy6nhc9X9h3ebWSAYHO7PNXYr 1pz2kek2S+wSZvnrVUiSNP4zA3dodQ1SCNThM/FG7tOBb+sBT7qkWKuNvKLZH7t97PIo zljA== X-Gm-Message-State: AOJu0YwGc8rgOQC11dINxOxYcza+Ey7NISWTZWGqE4bMb1pnydlpLPvu wvMDBrSxNNJ3XLeXbxoCxetXqUS9pI5GbuRP9GRpxDS2epOTO8ns3mtlT90xZEOymMhwflWQgur QWMy2Agc= X-Gm-Gg: AeBDiev1OpjAcmHOsvyQb2joSjyJSMIyzklZOWIv9OWDz0UaIEW3mN7rtrJbV/MSoec wfxcGlGgM97omyN3v3X6YXE0K4I+JnmzACpHnGOvinSOptvm+h2uyAfv2g9ZDvKSVXla3kc/hUq v7Bk1ef+9xUkyU2mHOuA3Aj5+BgzKoanGk+dwr7+kl/86d/LRt0Akilft9stEhPBFefgUxyZPog TIwPcJYTvCW7cMi8x+lGw7F6xn72ZAS72bQYF7pWJHdz9bZGT3oKVbpWOENjksdQLOdTeDdcVqQ OPdAFS5/kHDbDN4+5yJV7awGeesYOMi6SKPhXS9dUxDi1vLILdoZzILrsrSDQkFQMK+4iT0ffXE Y8zGi9g5BQGWXa2LY4qxyfNgEoP+TBkft75uqiOWxPl6rkMZBtdVZPDtz8g7hlnZWsHusvfYAIC /6jUQaNdljoUC0eoKyn7lOQe4GZmKm4iyfwGLVENUc6b5MDC7x627FCy9i5sP78fqRv+xiE63l9 1jv6EgticQ= X-Received: by 2002:a05:600c:3110:b0:487:2439:b7be with SMTP id 5b1f17b1804b1-488fb7389dfmr418371755e9.6.1776963871992; Thu, 23 Apr 2026 10:04:31 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Roman Bolshakov , Jonathan Cameron , Mads Ynddal , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Richard Henderson , Paolo Bonzini , Alexander Graf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [RFC PATCH 16/16] Reapply "target/arm/hvf: Sync CNTV_CTL_EL0 & CNTV_CVAL_EL0" Date: Thu, 23 Apr 2026 19:02:28 +0200 Message-ID: <20260423170229.64655-17-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260423170229.64655-1-philmd@linaro.org> References: <20260423170229.64655-1-philmd@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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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: qemu development 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: 1776963968374154100 This reverts commit 28b0ed32b32c7e5094cf2f1ec9c0645c65fad2aa. Still not working... ** ERROR:../../target/arm/machine.c:1045:cpu_pre_load: assertion failed: (!c= pu->cpreg_vmstate_indexes) Bail out! ERROR:../../target/arm/machine.c:1045:cpu_pre_load: assertion f= ailed: (!cpu->cpreg_vmstate_indexes) Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/hvf/hvf.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index a905d9bc370..01b2a904c3c 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -201,6 +201,9 @@ void hvf_arm_init_debug(void) #define SYSREG_PMCEID0_EL0 SYSREG(3, 3, 9, 12, 6) #define SYSREG_PMCEID1_EL0 SYSREG(3, 3, 9, 12, 7) #define SYSREG_PMCCNTR_EL0 SYSREG(3, 3, 9, 13, 0) + +#define SYSREG_CNTV_CTL_EL0 SYSREG(3, 3, 14, 3, 1) +#define SYSREG_CNTV_CVAL_EL0 SYSREG(3, 3, 14, 3, 2) #define SYSREG_PMCCFILTR_EL0 SYSREG(3, 3, 14, 15, 7) =20 #define SYSREG_ICC_AP0R0_EL1 SYSREG(3, 0, 12, 8, 4) @@ -731,6 +734,40 @@ static bool hvf_sysreg_write_cp(CPUState *cpu, const c= har *cpname, return false; } =20 +static void hvf_arch_get_vtimer(CPUState *cpu) +{ + hv_return_t r; + uint64_t val; + bool b; + + r =3D hv_vcpu_get_sys_reg(cpu->accel->fd, HV_SYS_REG_CNTV_CVAL_EL0, &v= al); + assert_hvf_ok(r); + b =3D hvf_sysreg_write_cp(cpu, "VTimer", SYSREG_CNTV_CVAL_EL0, val); + assert(b); + + r =3D hv_vcpu_get_sys_reg(cpu->accel->fd, HV_SYS_REG_CNTV_CTL_EL0, &va= l); + assert_hvf_ok(r); + b =3D hvf_sysreg_write_cp(cpu, "VTimer", SYSREG_CNTV_CTL_EL0, val); + assert(b); +} + +static void hvf_arch_put_vtimer(CPUState *cpu) +{ + hv_return_t r; + uint64_t val; + bool b; + + b =3D hvf_sysreg_read_cp(cpu, "VTimer", SYSREG_CNTV_CVAL_EL0, &val); + assert(b); + r =3D hv_vcpu_set_sys_reg(cpu->accel->fd, HV_SYS_REG_CNTV_CVAL_EL0, va= l); + assert_hvf_ok(r); + + b =3D hvf_sysreg_read_cp(cpu, "VTimer", SYSREG_CNTV_CTL_EL0, &val); + assert(b); + r =3D hv_vcpu_set_sys_reg(cpu->accel->fd, HV_SYS_REG_CNTV_CTL_EL0, val= ); + assert_hvf_ok(r); +} + int hvf_arch_get_registers(CPUState *cpu) { ARMCPU *arm_cpu =3D ARM_CPU(cpu); @@ -767,6 +804,9 @@ int hvf_arch_get_registers(CPUState *cpu) =20 ret =3D hv_vcpu_get_reg(cpu->accel->fd, HV_REG_CPSR, &val); assert_hvf_ok(ret); + + hvf_arch_get_vtimer(cpu); + pstate_write(env, val); =20 for (i =3D 0, n =3D arm_cpu->cpreg_array_len; i < n; i++) { @@ -929,6 +969,8 @@ int hvf_arch_put_registers(CPUState *cpu) ret =3D hv_vcpu_set_reg(cpu->accel->fd, HV_REG_CPSR, pstate_read(env)); assert_hvf_ok(ret); =20 + hvf_arch_put_vtimer(cpu); + aarch64_save_sp(env, arm_current_el(env)); =20 assert(write_cpustate_to_list(arm_cpu, false)); --=20 2.53.0