From nobody Mon Feb 9 03:17:04 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=1768562377; cv=none; d=zohomail.com; s=zohoarc; b=GcyhxURZoYVuMAeXcoNyaVGcw2SMtNmQ7+aSYQZaxWIKEODg6tuesnsHEgum2OzrFt1H9AVxCf73gCDtEQvdy5vlY+Ee/vcXwR6Dlx117RWrt0TgOZcJ0nYOdf8fO2l2U3qnPcm8wVsKgreT19I4xTmD+0LE7WBuEXwkjdYE+pM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562377; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=Py+D4Z2jLFhk0Imy0zLvCVBhfBDbviITMroIchXNosY=; b=B7GNTF0ClwLffbNgKaddqfOgYtAkur5APNEiZJJPXyTXj8JQIb/qRL5bKGCvB4t8PkHQacIsvdk2PiztNtETS5ZacpAl9ZjppqCWo2cO0sfCI8h2QUWtTAYesUByRhB0FAfBQ9G7KbPY7/D14Zo7bqyaYjOROAl9k6MnCtPUBuY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768562377644636.6991207717766; Fri, 16 Jan 2026 03:19:37 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghql-0007Jk-Vp; Fri, 16 Jan 2026 06:18:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghqN-00076v-Sk for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:18:21 -0500 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 1vghqM-0005eh-BV for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:18:19 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-47f3b7ef761so10376185e9.0 for ; Fri, 16 Jan 2026 03:18:17 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47f42907141sm93855695e9.9.2026.01.16.03.18.14 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:18:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562296; x=1769167096; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Py+D4Z2jLFhk0Imy0zLvCVBhfBDbviITMroIchXNosY=; b=IiSirVriiZajLw8Tall+4smF+IwWHEKxWGfNNXPYMt1ZKCvBnZQySDPEO73zY9W88O b44VTIWxrGeSgFxN4TKeE1T/izMBos5wO28Oy0Xm05RqaL3UaPGG2c1C98ynt6Jtp9U4 SxyhVcHBIuMm6jHHRsSQSrMvWGDjjTMWdIeUWz+BxfABAJDcbtrCg0elnlCaESbSYYty BJ0BT5HFj65RaShrUXeXuurjOUpR0+PGwHnDdQ1nYJX3tZ5D2l2MLrctvir7o6ODd4uW 1ORWju7MT03a8IjBwZqhYS3vlJOdll+yKYMyBTTiMl1LGnKLbkaRNr2bIRk8vXNnVMZ3 AroQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562296; x=1769167096; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Py+D4Z2jLFhk0Imy0zLvCVBhfBDbviITMroIchXNosY=; b=oSLvp48n1127vgJVt1uJ2ZK/5jm4WK8VcCoRCxWlWeIaQ6AZtogMgmhgyLxKb7P95q Mz1UmV3vstC12KKluECPLuNXI2Zf+5b9xtkEp1/s9xbUvPdtPTNu/GfnfPPLCpUEXxs+ JTbex228Tv2n60gMXt351hGUHbpZhJ0GVLVC76k8QSqE2i+W0UxQFlnTM2Kzq1R7Mc49 gkcuPINbX2LlblAL8+M88+wjstySmWY7T0HxSGT9BIfCUU1MF4N0CywJEYHXuTYhLxfr yqEKqpa0CoDUn2x1G//dgP+4qjjX/Rkw8G2ijbRk2WRU2QppzuS/+a8S2H3o3Bu8NkFe TUpQ== X-Gm-Message-State: AOJu0YzRiMJ0+EBPuQNFFK3sy6idXLJ3KTpfKNKYoPommU1xRCYXh7hO pVSSnUk1errWbktS+05tn3xYesqpVUdONdSe9/EcCFMsck4XL9YhaNWT4kgVpbNzXjC4uaNJKBz Z0MBOeQc= X-Gm-Gg: AY/fxX7dJv7XPr17gstRPZ1a/fesBRhQwKM1byl1qbHIkWa1UF/6eB7KJiAYlWwUe0I X7z4fT8xWjBHESgUlmSRLyJoQTqVSx+zaXOgET2aAlCI2ey8+FeG1+tUTMtogKdrjRivLAOSwZ1 m6Le2mRq4d1H7i5AhmLlBRJogUzQe241SaNJbYEvJHqJLE87mtDk5EWZcPID6AlXNUxzLeGh9Ie xzHZZ/kmXUk3FzC2FjimavO8XEv55CqC+4EVeMO0YC9lWMMnMneuK+QQOHiFlCh/wJXvhp/nRQu qQCaRX1MkwVOnuNmaWmtuMbDsWVvDWL1Z6Rphzxj1Ha2n1BcnVxmCW7sFGSUNcTu7IPoitZ3JaP 10YwpIhccOGqPC44nXqblTnQ0MYraSP8kt2EkM8sluOzGAawJgOT91INaQIdXQvdkjff7ykvFBz XTUZKH3T6s5LOrcXr4EH5XW6aoghB+0Zb+Be0A231XrdtYjc/SIY3xrtCY2Iyd X-Received: by 2002:a05:600c:6209:b0:477:641a:1402 with SMTP id 5b1f17b1804b1-48023ea2fc7mr11261285e9.4.1768562295829; Fri, 16 Jan 2026 03:18:15 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 01/30] migration/dirtyrate: Do not unlock cpu_list lock twice Date: Fri, 16 Jan 2026 12:17:38 +0100 Message-ID: <20260116111807.36053-2-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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=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: 1768562379851158500 &qemu_cpu_list_lock is locked within the WITH_QEMU_LOCK_GUARD() context, then unlocked. No need to manually unlock it. Fixes: 370ed600296 ("cpu: expose qemu_cpu_list_lock for lock-guard use") Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Fabiano Rosas Reviewed-by: Richard Henderson Message-ID: <20250128135429.8500-2-philmd@linaro.org> --- migration/dirtyrate.c | 1 - 1 file changed, 1 deletion(-) diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c index 986624c79a1..58f04670629 100644 --- a/migration/dirtyrate.c +++ b/migration/dirtyrate.c @@ -174,7 +174,6 @@ retry: if (gen_id !=3D cpu_list_generation_id_get()) { g_free(records); g_free(stat->rates); - cpu_list_unlock(); goto retry; } vcpu_dirty_stat_collect(records, false); --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562377; cv=none; d=zohomail.com; s=zohoarc; b=Op5W8ukHKvlT/lZby+vrWaeWTCm8OAqM/d+GH4SmnSGZ1vaz7MN10tNWt4Yz+mTZi5OJEvgvP1eeZGPxTBZwD2rX+vUmD8dDE7M5HY7hPYqITL3nzGjQICJ3/2g1dCzoMyzrfwnJrgIF79pxx+G9GYSfFYIJg/HPiECc0/i/Vik= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562377; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=7OByW09TC4u5sBcurJXqiba1uVzO9wql2OaJBS6hrUk=; b=D16FmqR2+1YiJEUEACJho8YWFwfK18Y6N7PHF/f7UFO6wvFp/oxgvUVyK+cQKob56uO4B7+GTAWXKqFwbLVMjkCO3utR9AIZcQpWjKkcIla3qqgemfXimqTKDrlWM721hcZ36qoBQZGwWrGz9Tfno/u2WJeOOE9Q5NKDumOWCNY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 176856237741245.63540064099368; Fri, 16 Jan 2026 03:19:37 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghqk-0007J6-66; Fri, 16 Jan 2026 06:18:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghqV-0007C5-Fw for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:18:27 -0500 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 1vghqT-0005fO-UM for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:18:27 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4801d1daf53so10076405e9.2 for ; Fri, 16 Jan 2026 03:18:24 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4801fe7bc14sm13749335e9.20.2026.01.16.03.18.21 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:18:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562303; x=1769167103; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=7OByW09TC4u5sBcurJXqiba1uVzO9wql2OaJBS6hrUk=; b=RRObEnQTSOa1ynFrb2jvq08BoC4rvu6BECgm/Q+Hvq/zhAAZejs3X/Y4pZjNKBKS/N 2znyI7vZbvjiIdjs+bTtyj1znXkl1lW9VKRtmF8I8YvSEqAfp4YWZWjPMalUGvcK9584 /rlPHMOHB11EzMJuqqjoZ4W5TB/m+FA4k4lGNL8v6tlYYqnGW3/LQglrpBx9414kOwcP hZTl0yvYwluUEAznzkKs1SMg+IKht00dufVHxzxKw/3HDuUZjPtM8YQgjyEDVb+JGoP3 E6wYolRxfkMl21OFBIrkpQtE2XRSZWMuSmXwU2ETHMMCD5BWGaPgXhrTffIdk7DhFDaf TlUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562303; x=1769167103; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=7OByW09TC4u5sBcurJXqiba1uVzO9wql2OaJBS6hrUk=; b=pilDsB8PRXWHougF9en705qKK337Q4o5DJgGLM+YGmuWIKaIymJ9z0ZWrxEyH8pjUF UaCQRg/9NT3v3Rs+qkVOFlJ8OWz0E03zZz+umiz+Z/ghUEmQsiJxwCxq5f0ObP1+L3K6 fQFt0HoftbY8qIXTcc5ohuofnl6TdKRisuExLi/hDiyvZTBhEZ57Zbm8yzg0F4VIPSHD p7IJonUxnYJr18aDhJUMnmxdm4eXCYOZJL48vdRttHXzR6Lrcg7Exn8gtHKg9FDY8tLf CszCMBzfbdOSwo5Hh/bLKR656beyFX2nzA2Q2NuQaMjl8LQrLoZJ3wRF1ly7DYnU7ohP cDGg== X-Gm-Message-State: AOJu0Ywue3Ko5Kspwyr9v6ooUE0XMVzHH4NWLdHCEk0554TTzWkhQQeO wPVA7ebhgtTr0fmjKZdCk9aYGCRwRo2Lr8OcH4c4ekeOnxyN6Wr/3F1juliAJK3+a5DY9bUdkH/ cIUj7IB0= X-Gm-Gg: AY/fxX5f7OoXWklpa/vT9cmipUicz8y7/CsjWLgwu55amxgyYHqYNeAe6BFA4qVIO3b BVDFZNkAARyikxzwTPG1ux+XsOgcPirxbzdXde3LL0pXCSaHP0Al0I9JjgjWfpCpThM50Co7uAu GXQldq12FBFjWBb9DMNbH1rr/FeWuUUoeCNPN950oL7zwS+pwRwidDFhMrw3VP5sYu4xklQKcGm 85wPEWMM+IyuIbl9113POL3sfntrP6ijFpnoBKoYMziq28re/9pB1cmBcLW+G3PEdyc0IYZKBKP dY3FtMS7gz1Ml92LF2visMydkPGQOJpDi7n/op5QkPxCi8cpd1dQIiKbH6ZxN0y5nM085GTuS/+ qITbnNewzOW+BWztovIid0ihEAgpVudjL81Eq3osV3cfwnzvdCNvqg9eFj1SpZBPIhThU2vW2lA 2ckrFWFlSNuCFRStnN6Ch3WfAogYPSJXMcKTpTK+C+VPeGzt2JUSfdO2GwqBl4 X-Received: by 2002:a05:600c:1d19:b0:477:9caa:1a26 with SMTP id 5b1f17b1804b1-4801e33dbebmr30785385e9.29.1768562302677; Fri, 16 Jan 2026 03:18:22 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 02/30] tests/qtest/migration: Make 'has_dirty_ring' generic Date: Fri, 16 Jan 2026 12:17:39 +0100 Message-ID: <20260116111807.36053-3-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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: 1768562379801158500 Keep accelerator knowledge limited within MigrationTestEnv, expose a generic %has_dirty_ring value, only checking for KVM when initializing it in migration_get_env(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Fabiano Rosas Message-ID: <20250128135429.8500-3-philmd@linaro.org> --- tests/qtest/migration/framework.c | 2 +- tests/qtest/migration/precopy-tests.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/qtest/migration/framework.c b/tests/qtest/migration/fram= ework.c index e35839c95f5..6d830079ee4 100644 --- a/tests/qtest/migration/framework.c +++ b/tests/qtest/migration/framework.c @@ -1108,7 +1108,7 @@ MigrationTestEnv *migration_get_env(void) return env; } =20 - env->has_dirty_ring =3D kvm_dirty_ring_supported(); + env->has_dirty_ring =3D env->has_kvm && kvm_dirty_ring_supported(); env->has_uffd =3D ufd_version_check(&env->uffd_feature_thread_id); env->arch =3D qtest_get_arch(); env->is_x86 =3D !strcmp(env->arch, "i386") || !strcmp(env->arch, "x86_= 64"); diff --git a/tests/qtest/migration/precopy-tests.c b/tests/qtest/migration/= precopy-tests.c index aca7ed51efd..0283da43e3e 100644 --- a/tests/qtest/migration/precopy-tests.c +++ b/tests/qtest/migration/precopy-tests.c @@ -1265,8 +1265,7 @@ void migration_test_add_precopy(MigrationTestEnv *env) if (g_test_slow()) { migration_test_add("/migration/auto_converge", test_auto_converge); - if (g_str_equal(env->arch, "x86_64") && - env->has_kvm && env->has_dirty_ring) { + if (g_str_equal(env->arch, "x86_64") && env->has_dirty_ring) { migration_test_add("/dirty_limit", test_dirty_limit); } --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562377; cv=none; d=zohomail.com; s=zohoarc; b=Q9CBCLCvw9h5EKvJVuLKxt9Zt9v6UpSPCxN+HXtRuoKixGi32brLlAKSC+WDu6HbluFQpZBBnf9JueDvd9A+n0fCqrYJbCKtwZAFZPUvKU8+OzPwmAcaxpLa6ppVzsMQ2/w8GxO1feQZTaTjmBErxPWWYWnKI05VtSSewpKxAfA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562377; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=CcnzBZgEqrP8OEgT2AND3gS2a/N3KEvsYp7Fa2E/Yak=; b=T5rugeF2oYCvgR+P5GINLZfJ6XiqW52TnrHmHMsCgFtWCaLkG9VH4Tfpetnl/rf69DwVT/9W/9wfQA4pwtD38zuTQAkqqMmJGCq/UqhdxeiHnAruC8RCjzdcJpgVJScsEnG71AtztlkJa36uJ9nJYWWjkMs0AoQO11lsBSioSBE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768562377698518.1082320351614; Fri, 16 Jan 2026 03:19:37 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghqe-0007GS-31; Fri, 16 Jan 2026 06:18:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghqa-0007FF-QP for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:18:32 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vghqZ-0005fw-C2 for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:18:32 -0500 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-432d2670932so1575172f8f.2 for ; Fri, 16 Jan 2026 03:18:31 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43569926ff1sm4592945f8f.13.2026.01.16.03.18.28 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:18:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562309; x=1769167109; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=CcnzBZgEqrP8OEgT2AND3gS2a/N3KEvsYp7Fa2E/Yak=; b=O1EYwyYZdXRdBgnGIM5WBE4vsPgCfMopspyv4/GCjXldvepkJAZJmSZ98FiipUyuWI mFoHIjwbdjsflY9Fo8NU1ZUecUD++/Lbh894hrwr9EPl2thpZ66dSzzDqDAzW4iwBdLN TzLFBn7uGAUEeHKDXsTG4siOsIcwO61ucV3z0D9A1h/T0dSvuOWNUJt3yUoyjWh9SQCb vpEFsu8t1QUqFPWDCYfcJ20E1689/kE8qCxAxYtNV9BSTR6a81/BdYhnOeCtoxg3M5qQ mln6aDqHgtopGhPMDlA4f+qHHUmuG6NUYzqx3jzeWWi+cT5DT7eBgNlqMGrZX3xAH6aA bDXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562309; x=1769167109; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=CcnzBZgEqrP8OEgT2AND3gS2a/N3KEvsYp7Fa2E/Yak=; b=E9qMReKzswCVv3m1Mcvcu48bwEcHFsm5GkzZctIUsgy0HWEWhD8V7QoD8F8jpuSIqf uzjl3VxevBMHQu4m5U7wUjGXJEAhG6nOrSdAiO8+E6ftUppDOPE48+HI2nYbToWSfoia PlePqsRin1AT6+9c0S1Vr0nDAutPfC/wzGdNzaxu/GCrAL7AI9EG+JWit6XTEXTXnXBm g7NL7UOe1Ajjhtk1g4sm8gH8fMfiEMdS0eCArKFNukJNV0Rz4GMI+jwb1yqKw4wb4a1D UBk5zUUgsH8s9U1O7JhwYDte6e8uA5dbF71qBJeSNkog31SKGotKOQtXJMA18r0qZPVw 7WxQ== X-Gm-Message-State: AOJu0Yz+dLLDPkE1lfkhmUtk/fmhlg3yG0bNsieatEZyHBVwSD287DxM OnFORi9cVC+K9B1+GC1QIVXlPNixb7Mla8x8nFDW1ZGQGefZ6mntC/BnUdKUM57+QlJOv4PWwct eyivjfg0= X-Gm-Gg: AY/fxX4Di0V2JvuvXc3T2xVTGP41/FwJThwFlp224/7Zt968SUxd+32X4LU3A6MXYVp XoC8aV5RjtPzojNfa/wQ1omh6EZp+7M24ph6lbSiNbZU+VgRICMz6129cQuhQQ/sK94qxH11024 gdT4F1z5yBNelSHmcmMMjhR09s3f3jVgMe7jqV5j/HJKhabGBGjaWlJtzeCyP2x/QgMhfC47cs2 EHwyXbS8Ikk0GxtZw9a9U6mdVs7Azsb7SWkKLovfZu1Ns5dlgw2Slh4tb/+RqjjN80SSWiobapX RgDbUepaII5WigY4yUlRkZX6fRESc+QvVbdLCmrnHwT8KZk0cJaMW6fvjA6oPwllgL0p2YE1zVp msSX9VQPj9NvuUs7FiGdEoKJXxhI5Ph8k2Mmg55vp1sfwNoMt6az/ok3ekBfXW9qEI7+iO/AoaN 7d6MQWNyfV54Lwv7kavygkV8c3DWeJlnxAvQ1PSNXRAL1R04p7btbpxlvupUeEc7a5xazfA1U= X-Received: by 2002:a5d:5d10:0:b0:431:a33:d872 with SMTP id ffacd0b85a97d-4356997f5f0mr2788890f8f.8.1768562309240; Fri, 16 Jan 2026 03:18:29 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 03/30] tests/qtest/migration: Add MigrationTestEnv::has_hvf field Date: Fri, 16 Jan 2026 12:17:40 +0100 Message-ID: <20260116111807.36053-4-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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: 1768562379802158500 Allow tests to tune their parameters when running on HVF. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Fabiano Rosas Reviewed-by: Richard Henderson Message-ID: <20250128135429.8500-6-philmd@linaro.org> --- tests/qtest/migration/framework.h | 1 + tests/qtest/migration/framework.c | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/qtest/migration/framework.h b/tests/qtest/migration/fram= ework.h index ed85ed502dd..2ef0f579626 100644 --- a/tests/qtest/migration/framework.h +++ b/tests/qtest/migration/framework.h @@ -39,6 +39,7 @@ typedef enum { =20 typedef struct MigrationTestEnv { bool has_kvm; + bool has_hvf; bool has_tcg; bool has_uffd; bool uffd_feature_thread_id; diff --git a/tests/qtest/migration/framework.c b/tests/qtest/migration/fram= ework.c index 6d830079ee4..57d3b9b7c5a 100644 --- a/tests/qtest/migration/framework.c +++ b/tests/qtest/migration/framework.c @@ -1101,6 +1101,7 @@ MigrationTestEnv *migration_get_env(void) } =20 env->has_kvm =3D qtest_has_accel("kvm"); + env->has_hvf =3D qtest_has_accel("hvf"); env->has_tcg =3D qtest_has_accel("tcg"); =20 if (!env->has_tcg && !env->has_kvm) { --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562352; cv=none; d=zohomail.com; s=zohoarc; b=m+Dz/Tpy+6V7HO94LG1j2cBGCpGff8+6xqFkk+BAI0HumjSdkNTGRuvYOBBC9XYOZpPCq40Iwl48Mpkihmq0VsaDc3qfLO10S7nT2FxSYrlg7CfinPnH7T42vuv+9k2Ro+As9h+hBXUUbZNBsT9mZtWGgNTYphlVZbgrqYGqhes= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562352; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=+lSDqpgt49/OyQ2ExzKjU606U5rmO2/rMItUS6X3ncQ=; b=VT522iRPW3lMoTAnyQpmtBKKDqyeiM9JhH2HdUBzV5DQMpsw5dKpv7CWNP/nDmc8qa0m9RI0XjJoQN6pPKPiyDzzZWH3CuH+QKLDyZ7FkTEpakdaTVqb6sqRAWzCmqD3N91XOVwZn+z8z4AKVjAJuwvhmWxTvrkaQOLpYp8X2SA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768562352069677.5039331120536; Fri, 16 Jan 2026 03:19:12 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghql-0007JC-Ef; Fri, 16 Jan 2026 06:18:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghqh-0007I1-S6 for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:18:41 -0500 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vghqf-0005hX-TX for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:18:39 -0500 Received: by mail-wr1-x441.google.com with SMTP id ffacd0b85a97d-42fbc305882so999314f8f.0 for ; Fri, 16 Jan 2026 03:18:37 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4356997eb1fsm4746688f8f.35.2026.01.16.03.18.35 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:18:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562316; x=1769167116; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=+lSDqpgt49/OyQ2ExzKjU606U5rmO2/rMItUS6X3ncQ=; b=XWi3BOoju3xmOr9zUExzCOWDplb0NMhWJfhErBEGK+/s157RmUoNDQhiaKEn1N7iUG Mubblyheu57hYJmhehlJVvVBNuhKWKjw2nVT+yrWbF/K64B7zAq+jOl0mrzTUh8L58zp Fzc75fzACPkSRxKKWO83lap23trZvH7AagejfJBs+MJW2jdPK4idDEU/V9ZZXeAFLoxB tHH8Clcylifjnr18XAwaF2lpfqgHzc91mnhnEXvlO5u9dfleJ0l7UWczKoGAdHcEJaYe stH5w9YMZDvUGpLTXIxb0UWH5/TpYBtTQqPxkGH5lw/qPN3r4jTYXxQ15AwdV3Q29SL2 5Qjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562316; x=1769167116; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=+lSDqpgt49/OyQ2ExzKjU606U5rmO2/rMItUS6X3ncQ=; b=vZs19zlWz38P8wse+a47dBqc3AHKxL4DQpdDPKmIDdvFbC/YAz5K0fNCCBqb2WYV6g 6Pp4bhBsWcogigUOY0eJWfirzRzQp2I45fUBRJA3+k1iTgFy+DJE/qoJFxQkR1z91dn1 gpcqiZmE4oBbiezoJYYI77kzdIbheGKu1/tACcQ/1MefpIfJt6ddzvo2Wh8/L4fS+jnR VgBGjOI4dgfteJ1hhhWzM8jVh2PSFwVBfoOsDBtwSV/p2zlktJn5/VnetnY7CQZLfZ4S +UZakKS/CiVhEWEFi+Xc8f74jPFYs951prC7W0w90umfDWi7/3uBsb1eGZWQVfgxeAgD XShA== X-Gm-Message-State: AOJu0YzB31u8P2NiYyRA2q9hfrkSXCjSrX5WKut8mv0e0eWqA5gmE90h 8toUT95Dqv7uPupjRV9tiiZivkoP4QAvrJwHUFHJQMsFpowSDdiDLXPpnry+MKl0LK9gp1kLYss /sMZSAB0= X-Gm-Gg: AY/fxX7Q9zjz73OsBKotUTeU5yptz4tW10EL5OE/P16WSEIeBhzwEYFyfuUTDwnNXcW Ner2bAHEegIn8+YAxIeJzXmwOgrN2nPl3N/ghOPop+eVR9bNLhowJ4K/1LPnFSXc30U9ypWKgC7 GD6tzOnknk2fOxF6FMYCxyPQqpKvXAUoJ+I8PKBVRhgr456myzDvlaxsP4GwW0H+iLZsSi6vtEJ A8y4DWa2gKlN0A3hneDNfWOUlM4CH6k7dhZ8hF6b036C6ougWo0ZNGQP5IjBTo/Wacj6/9LwsnZ qnpUJD+OdBhjjMis+md3mlqTsz1Aeu4QWGOm8jNvN1J17RgVn3rAxeW4B3aqY4r/ZQMA/4GdFz5 FadUScuwCEA0Dc5FPoCGLinOk5nMjxzquuiNbR57uUTEVKD5JOg/DZ5rklt6PCD9YadmORDXv8m Ebg35Vw8M2k1QuJ6w5KhN1jZrM6DRjeyyz5UDVWs3IPtN0YNmb1BWCGqW7viT94p4GoAv2Hi8= X-Received: by 2002:a05:6000:2382:b0:432:86a3:ef2e with SMTP id ffacd0b85a97d-4356998ad0dmr2794824f8f.21.1768562316001; Fri, 16 Jan 2026 03:18:36 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 04/30] meson: Add wasm64 support to the --cpu flag Date: Fri, 16 Jan 2026 12:17:41 +0100 Message-ID: <20260116111807.36053-5-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::441; envelope-from=philmd@linaro.org; helo=mail-wr1-x441.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: 1768562353969158500 From: Kohei Tokunaga wasm64 target enables 64bit pointers using Emscripten's -sMEMORY64=3D1 flag[1]. This enables QEMU to run 64bit guests. Although the configure script uses "uname -m" as the fallback value when "cpu" is empty, this can't be used for Emscripten which targets to Wasm. So, in wasm build, this commit fixes configure to require --cpu flag to be explicitly specified by the user. [1] https://emscripten.org/docs/tools_reference/settings_reference.html#mem= ory64 Signed-off-by: Kohei Tokunaga Reviewed-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson Message-ID: <91f16f0e9ae6b36fbf0c2caac510dcf855120400.1768308374.git.ktokun= aga.mail@gmail.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- configure | 6 +++++- meson.build | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 55e0bd34256..92bfc5f9765 100755 --- a/configure +++ b/configure @@ -365,7 +365,6 @@ elif check_define __APPLE__; then host_os=3Ddarwin elif check_define EMSCRIPTEN ; then host_os=3Demscripten - cpu=3Dwasm32 cross_compile=3D"yes" else # This is a fatal error, but don't report it yet, because we @@ -419,6 +418,8 @@ elif check_define __aarch64__ ; then cpu=3D"aarch64" elif check_define __loongarch64 ; then cpu=3D"loongarch64" +elif check_define EMSCRIPTEN ; then + error_exit "wasm32 or wasm64 must be specified to the cpu flag" else # Using uname is really broken, but it is just a fallback for architectu= res # that are going to use TCI anyway @@ -519,6 +520,9 @@ case "$cpu" in wasm32) CPU_CFLAGS=3D"-m32" ;; + wasm64) + CPU_CFLAGS=3D"-m64 -sMEMORY64=3D1" + ;; esac =20 if test -n "$host_arch" && { diff --git a/meson.build b/meson.build index c58007291a8..600c50007da 100644 --- a/meson.build +++ b/meson.build @@ -51,7 +51,7 @@ qapi_trace_events =3D [] bsd_oses =3D ['gnu/kfreebsd', 'freebsd', 'netbsd', 'openbsd', 'dragonfly',= 'darwin'] supported_oses =3D ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin', '= sunos', 'linux', 'emscripten'] supported_cpus =3D ['ppc', 'ppc64', 's390x', 'riscv32', 'riscv64', 'x86', = 'x86_64', - 'arm', 'aarch64', 'loongarch64', 'mips64', 'sparc64', 'wasm32'] + 'arm', 'aarch64', 'loongarch64', 'mips64', 'sparc64', 'wasm32', 'wasm64'] =20 cpu =3D host_machine.cpu_family() =20 @@ -923,7 +923,7 @@ if have_tcg if not get_option('tcg_interpreter') error('Unsupported CPU @0@, try --enable-tcg-interpreter'.format(cpu= )) endif - elif host_arch =3D=3D 'wasm32' + elif host_arch =3D=3D 'wasm32' or host_arch =3D=3D 'wasm64' if not get_option('tcg_interpreter') error('WebAssembly host requires --enable-tcg-interpreter') endif --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562462; cv=none; d=zohomail.com; s=zohoarc; b=TBuJe9Zw5O5CKYc3lm7j7KhCAeYF2fbsSeDUnLR0rMxvWi84fVThp/3CtWxHnBAffdKcoxD/0QSe7BCDNHC5KbW4CYKjzcje9BrINvwiO0rb3cweh6GjCpr98g3uUXdMdiyKorVfbeU0xoNK4317j6jEJamGZ+oBAebMaOacoZ8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562462; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=0HpoXgcBtw/jlAhT3nBU0eOAguVGh9HBtx5DELtQlEQ=; b=Skyr6UEFdp9P/+xrdLVQvhu4iZZh40g2AxWtBW2Lb/wFtQNsNp6B46ku+kv/fyKVlzNZPkC9cIOuzJCwRA46fgtyA7hbRzP9FfOiqSqdWwyvtXyg6U299nSwwPelwZj5WUSlOKYS8bVqX9Rs84Kij1SmFQ+pCTDr3wuQWS1qUvk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 176856246269282.46849901416738; Fri, 16 Jan 2026 03:21:02 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghqq-0007M8-Gu; Fri, 16 Jan 2026 06:18:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghqo-0007Kc-OM for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:18:47 -0500 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vghqm-0005jU-SC for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:18:46 -0500 Received: by mail-wm1-x344.google.com with SMTP id 5b1f17b1804b1-47d63594f7eso12878225e9.0 for ; Fri, 16 Jan 2026 03:18:44 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4356997e79asm4682308f8f.33.2026.01.16.03.18.41 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:18:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562323; x=1769167123; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=0HpoXgcBtw/jlAhT3nBU0eOAguVGh9HBtx5DELtQlEQ=; b=hO2Yoh7hX/3IJ1RkGzUEksNSeATaO9oyjlvkbyuW7dTEgbU87o9QW9CfmenQdTJjXX Kfp0LGqA38d0hlU1wxb2Umip8VSG0haXawo6fjajm0+vU9mr/h1oSf31G528Lexw4Gpm WXj7kLbJoNHOlhv/dxfFWlioxnzzLLsrkNSkIcl1kb84h1r/V9oQFPQJspxpW5sIArkU Zjz3Bs+sx8IzizDp/KsADU/gvslKSl9FBuBsdpx7LfVhiK+LQ0r71eHKUic1HMJLFBkg XZULvS4+ShYzHMgAkATpndn/gKgWQwd6RNMRjn9i+NdGAXGCgIowowRjIC9k5+y0Yx/m zecg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562323; x=1769167123; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=0HpoXgcBtw/jlAhT3nBU0eOAguVGh9HBtx5DELtQlEQ=; b=IF10YPg/rQpZUZyTUb1FbtE9Zs8RhUxYGgHWGDH9Bl+Zt25Jiopn497uzMv9eAq5Xm yJRr+/zqv43ilue+kjeCwbOWFKG3heNWq+e2rvoDkv4K8XP2vCRozV7K8oGQMql5Fl8g Dx+cM0mZCm1u6+Cft+NgTandjSFycRIF0/uN2nzCp3fuMWq5BDszJS7do/5WFX3GNduW zn0UYDmlwS8WbfUKenC/Q9+TuiIBQLQPStuqmancqHzRDmT9c/M8W1cRThMw4gqT9tO3 UE9S2oPF5i8iNwTyv63g7Q25BpbdJoB17wkqk4i18mERD3KwVSpg8tsqY1XHvzKIiFH4 p02g== X-Gm-Message-State: AOJu0YyHoC+G975LJBDto7BqkgBA3udKGOIFg38TEfJH5/DKETctgIih LboDcIuohgmnVsafVaZ8eXflr8O5y5VXLhf9SXM/ET+Rp6ZdyBEmoPD2YzcQWbDrYdfNy0bAscH ukVYt5yc= X-Gm-Gg: AY/fxX6X7u87MwLuSIqNx1qNAREURYkMPDU1fwWx4OGmixueZm/H0oBcOnp+3AKQzEq I3GGC2DLeCYtrgHu0l8MHKPMEB+lt0Gwlg8HzlmDkeNWuUCIPYy1HuavBe7oi2Yhg95F6UA5vbD quiXCfu1QvCKdkmAKR+9mNasP/CSgQOcyQG+4l2A7vAH22eXPwoDWY6pHJZbljezo2KMA+zVa2l Dn1Yi7+NnPPgLQ0dEoYH1rQJ96Wi7YFpuQIWnsVjCNwvGmk+WNKk0WnaqzJ97Ecd0DnCTluWHkp pScrN6QRfAqasKANstRzc0zcDRUx7cnrms5A8kVan2CuSIZ6/G63Gzl3dU5iVIAxEI3tKSJ5SeV AUOqVmT+HxTTbbF2EkFCU4k9OUIGL4srPu+wwHEFmDtCpgk7hbktX+L7QkMQki+K6vzhsFVZHyi 44+T8JRJB6QNHTZVGH0QMm4LK1r3rIYJS3hP0ZMaeF28tPH2/KwwV4XgDJdPyk+WHNvWMJBYM= X-Received: by 2002:a05:600c:1986:b0:475:da1a:53f9 with SMTP id 5b1f17b1804b1-4801e30ba86mr32838625e9.14.1768562322648; Fri, 16 Jan 2026 03:18:42 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 05/30] configure: Enable to propagate -sMEMORY64 flag to Emscripten Date: Fri, 16 Jan 2026 12:17:42 +0100 Message-ID: <20260116111807.36053-6-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::344; envelope-from=philmd@linaro.org; helo=mail-wm1-x344.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: 1768562464859158500 From: Kohei Tokunaga Currently there are some engines that don't support wasm64 (e.g. unsupported on Safari[1]). To mitigate this issue, the configure script allows the user to use Emscripten's compatibility feature, "-sMEMORY64=3D2" flag[2]. Emscripten's "-sMEMORY64=3D2" flag still enables 64bit pointers in C code. = But this flag lowers the output binary into wasm32, with limiting the maximum memory size to 4GB. So QEMU can run on wasm32 engines. [1] https://webassembly.org/features/ [2] https://emscripten.org/docs/tools_reference/settings_reference.html#mem= ory64 Signed-off-by: Kohei Tokunaga Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- configure | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 92bfc5f9765..326d27dab1f 100755 --- a/configure +++ b/configure @@ -182,6 +182,10 @@ EXTRA_CXXFLAGS=3D"" EXTRA_OBJCFLAGS=3D"" EXTRA_LDFLAGS=3D"" =20 +# The value is propagated to Emscripten's "-sMEMORY64" flag. +# https://emscripten.org/docs/tools_reference/settings_reference.html#memo= ry64 +wasm64_memory64=3D1 + # Default value for a variable defining feature "foo". # * foo=3D"no" feature will only be used if --enable-foo arg is given # * foo=3D"" feature will be searched for, and if found, will be used @@ -239,6 +243,8 @@ for opt do ;; --without-default-features) default_feature=3D"no" ;; + --wasm64-32bit-address-limit) wasm64_memory64=3D"2" + ;; esac done =20 @@ -521,7 +527,7 @@ case "$cpu" in CPU_CFLAGS=3D"-m32" ;; wasm64) - CPU_CFLAGS=3D"-m64 -sMEMORY64=3D1" + CPU_CFLAGS=3D"-m64 -sMEMORY64=3D$wasm64_memory64" ;; esac =20 @@ -779,6 +785,8 @@ for opt do ;; --disable-rust) rust=3Ddisabled ;; + --wasm64-32bit-address-limit) + ;; # everything else has the same name in configure and meson --*) meson_option_parse "$opt" "$optarg" ;; @@ -904,6 +912,8 @@ Advanced options (experts only): --disable-containers don't use containers for cross-building --container-engine=3DTYPE which container engine to use [$container_eng= ine] --gdb=3DGDB-path gdb to use for gdbstub tests [$gdb_bin] + --wasm64-32bit-address-limit Restrict wasm64 address space to 32-bit (de= fault + is to use the whole 64-bit range). EOF meson_options_help cat << EOF --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562379; cv=none; d=zohomail.com; s=zohoarc; b=Vue1DPt8DX0Gul1peeQM2RbwyyG6dpC4W6iBLjD/Hte3+6OoEWgArBKgvAmOLTO6a5K5AfnwV92SGpKwmnBqOra85jf8pzprVWuY9coAI0mSw8zElCgQPTssODNhXg8nsHOzaP2cQkOcNlB+OCEQNrgYWsH4QhsYuR85pOjz6PY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562379; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=LWngYNpKVOutwMoJmRt3Ydc7XaZnIpLSQMBHhtCpGe8=; b=lNkPukch4Oo/9CwqL/Xauh0tHFS5zD9gh+N6PMIQBXM4umQjAHTMwhbr1HN5KqEk1BGcpGL8qn7UUGiekmsRwaNQI+JLV+Ijf0zinAHVqF2DaYeBY4anyJ3kxr/sgtqrYU6t4Bh05LdEdRvyJVDViGd1gxfV5Juwh/P3PfvUQyg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 176856237920380.72854564782745; Fri, 16 Jan 2026 03:19:39 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghqw-0007Oa-G0; Fri, 16 Jan 2026 06:18:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghqu-0007Ni-Sw for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:18:52 -0500 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vghqt-0005mh-7Z for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:18:52 -0500 Received: by mail-wm1-x341.google.com with SMTP id 5b1f17b1804b1-47ee76e8656so22837575e9.0 for ; Fri, 16 Jan 2026 03:18:50 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4356996cf58sm4614145f8f.22.2026.01.16.03.18.48 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:18:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562329; x=1769167129; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=LWngYNpKVOutwMoJmRt3Ydc7XaZnIpLSQMBHhtCpGe8=; b=mQu5F+DRpWbDcC1NNgfdjICjUyVW+QCfaeaRG20p7FJvXsohZbrZxt7hyrMlOpCAn0 co/UN3g8B9ICQG7Tn8KMIzaNCSUTEhsv/zag5E4YNy2UgqL9sj+y1kaR/qk5hKHdLO2O 2yK43pqNh0ZYFivN3wGESuCiSTpSqi4FbGE36kl7c7S1HlzLwh6ZU2pQKUBr1NWzVufy 8hXDOh70m4Mmlf9DxxAap+ZPyOinWq/Ej3eR7l7aUUna+L1IuaKmr3ZVVlgQ2ZkjhLDO LLRqBrPVA04Y/DT6u1pJoD39zceGCfqDb7/8GfTlX/aoSgpX2mYrGNNIIebqNbue0G0t Y8Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562329; x=1769167129; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=LWngYNpKVOutwMoJmRt3Ydc7XaZnIpLSQMBHhtCpGe8=; b=CUf7d3R0fvmUS2ApwcORYYenEix9751i6uqlhKMPsoNN2R4YsTglnwEDAll/pPVs1i A0+nX+2XBW/Jj1qnBQlOM9hKzxuaauYLkCfZD1bst5qaV3dy9MMdFvRKDFTgDLOR6dqn zKrmloKqHm0cS0L1fLUjJfaTlB1QifIX3pSo0Va2uxd7CX6SbKaFqDRSOSlY8kHRdcM/ Kq/OIOHg47VnCFjcDW5xYozpjS9yYQJSKVYhVDZ+dCHVAAhvymUdvtehf/HvPThnlwzK SIqspsEbJg7zaaEj2v21tP1fcb3vtKBCJ21e2AEG5v/Z2uMDaXXd5mA78GAPFppXZxFe M9kw== X-Gm-Message-State: AOJu0YyOEaL44uPd8OHjTYyXUUHukbmtJmb6eeKnWpASZTXVPh6eFQ6q HA6mJwXimF46gW8pOtt21TAthTOZ2cNWmZmksEPmCKoe3OdPancoYr1o5R6vRwedDHEuNQzwkKl +xykjFsA= X-Gm-Gg: AY/fxX5bFr0KuOBKxJob1CCO3esupvtNRx0x81DMLIDixSt28f6WEjEg8THqAF45iv/ EqoPo8KyBGBDPMDwLQUffL0koDIxHNutM6RGhk5GAwPZnJ2IcFPizYoIsE38EyxPZhoyd8y2Jbv Jicsj47geKQ5c0BJtzvS6zQUQ0oaHIIZUMG/9ucihcG47ph08Q8z+PBhNnMW+wcLbRjw3ag2v9Q ODA0OVOX2TDNjdgF2QwctM4Qp4PbAJ4gGATwfVA89v5fDNluaVsYIew19bRGZb+8mAo2VOa2cya DqHwKeI4OmuSCBQ/1toIqOFpG1mrfv7280veRf5hBZ+Jbn2LvQX5D7os8rVBO7/fxnawdpowymW jyhKTJP7qT0IsZ9jWQdpcjUpWHqTsNe+hkHL9GcN9ov1cTXagmp94PyWy0o9ChrjrqOntSxUOiK xgOaQIiM0J1DpG0vxJMR+3Ud9MceWJ4yluFr8DKwQhZTB080XITqy9RgxRUwNlFmaa0nZyKnU= X-Received: by 2002:a05:6000:2203:b0:431:92e:1d44 with SMTP id ffacd0b85a97d-43569980e80mr3082678f8f.20.1768562329377; Fri, 16 Jan 2026 03:18:49 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 06/30] dockerfiles: Add support for wasm64 to the wasm Dockerfile Date: Fri, 16 Jan 2026 12:17:43 +0100 Message-ID: <20260116111807.36053-7-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::341; envelope-from=philmd@linaro.org; helo=mail-wm1-x341.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: 1768562379934158500 From: Kohei Tokunaga This commit fixes Dockerfile of the wasm build to support both of wasm32 and wasm64 build. Dockerfile takes the following build argument and use it for building dependencies. - TARGET_CPU: target wasm arch (wasm32 or wasm64) Signed-off-by: Kohei Tokunaga Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <3f21342f50e0412a32143fe21ecc0d8db95b3f37.1768308374.git.ktokun= aga.mail@gmail.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- MAINTAINERS | 2 +- ...2-cross.docker =3D> emsdk-wasm-cross.docker} | 26 ++++++++++++++----- 2 files changed, 20 insertions(+), 8 deletions(-) rename tests/docker/dockerfiles/{emsdk-wasm32-cross.docker =3D> emsdk-wasm= -cross.docker} (89%) diff --git a/MAINTAINERS b/MAINTAINERS index 4ddbfba9f01..de8246c3ffd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -683,7 +683,7 @@ F: include/system/os-wasm.h F: os-wasm.c F: util/coroutine-wasm.c F: configs/meson/emscripten.txt -F: tests/docker/dockerfiles/emsdk-wasm32-cross.docker +F: tests/docker/dockerfiles/emsdk-wasm-cross.docker =20 Alpha Machines -------------- diff --git a/tests/docker/dockerfiles/emsdk-wasm32-cross.docker b/tests/doc= ker/dockerfiles/emsdk-wasm-cross.docker similarity index 89% rename from tests/docker/dockerfiles/emsdk-wasm32-cross.docker rename to tests/docker/dockerfiles/emsdk-wasm-cross.docker index 1f08eb0b855..ecd5a029037 100644 --- a/tests/docker/dockerfiles/emsdk-wasm32-cross.docker +++ b/tests/docker/dockerfiles/emsdk-wasm-cross.docker @@ -1,14 +1,15 @@ # syntax =3D docker/dockerfile:1.5 =20 -ARG EMSDK_VERSION_QEMU=3D3.1.50 +ARG EMSDK_VERSION_QEMU=3D4.0.10 ARG ZLIB_VERSION=3D1.3.1 ARG GLIB_MINOR_VERSION=3D2.84 ARG GLIB_VERSION=3D${GLIB_MINOR_VERSION}.0 ARG PIXMAN_VERSION=3D0.44.2 -ARG FFI_VERSION=3Dv3.4.7 +ARG FFI_VERSION=3Dv3.5.2 ARG MESON_VERSION=3D1.5.0 +ARG TARGET_CPU=3Dwasm32 =20 -FROM docker.io/emscripten/emsdk:$EMSDK_VERSION_QEMU AS build-base +FROM docker.io/emscripten/emsdk:$EMSDK_VERSION_QEMU AS build-base-common ARG MESON_VERSION ENV TARGET=3D/builddeps/target ENV CPATH=3D"$TARGET/include" @@ -29,12 +30,22 @@ RUN pip3 install meson=3D=3D${MESON_VERSION} tomli RUN mkdir /build WORKDIR /build RUN mkdir -p $TARGET + +FROM build-base-common AS build-base-wasm32 + +FROM build-base-common AS build-base-wasm64 +ENV CFLAGS=3D"$CFLAGS -sMEMORY64=3D1" +ENV CXXFLAGS=3D"$CXXFLAGS -sMEMORY64=3D1" +ENV LDFLAGS=3D"$LDFLAGS -sMEMORY64=3D1" + +FROM build-base-${TARGET_CPU} AS build-base +ARG TARGET_CPU RUN < /cross.meson [host_machine] system =3D 'emscripten' -cpu_family =3D 'wasm32' -cpu =3D 'wasm32' +cpu_family =3D '${TARGET_CPU}' +cpu =3D '${TARGET_CPU}' endian =3D 'little' =20 [binaries] @@ -56,13 +67,14 @@ RUN emconfigure ./configure --prefix=3D$TARGET --static RUN emmake make install -j$(nproc) =20 FROM build-base AS libffi-dev +ARG TARGET_CPU ARG FFI_VERSION RUN mkdir -p /libffi RUN git clone https://github.com/libffi/libffi /libffi WORKDIR /libffi RUN git checkout $FFI_VERSION RUN autoreconf -fiv -RUN emconfigure ./configure --host=3Dwasm32-unknown-linux \ +RUN emconfigure ./configure --host=3D${TARGET_CPU}-unknown-linux \ --prefix=3D$TARGET --enable-static \ --disable-shared --disable-dependency-tracking \ --disable-builddir --disable-multi-os-directory \ @@ -140,6 +152,6 @@ RUN sed -i -E "/#define HAVE_POSIX_SPAWN 1/d" ./_build/= config.h RUN sed -i -E "/#define HAVE_PTHREAD_GETNAME_NP 1/d" ./_build/config.h RUN meson install -C _build =20 -FROM build-base +FROM build-base-common COPY --from=3Dglib-dev /builddeps/ /builddeps/ COPY --from=3Dpixman-dev /builddeps/ /builddeps/ --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562378; cv=none; d=zohomail.com; s=zohoarc; b=eBCnrVwrxanjfgnymZpp3el8n+ifTsNzt7mTd5bLNXGatcezc7DWeli0gdDPtT8kQoGoPYH0eCx+RfkLHX7rDHK6kdpMeVcXx8A/kBNNuoxav+jdWaqYy2wxX2cwux+1yFEkezMV20qpgAzm+yjhQRVEy2T0D30F78NT9ZKxOvc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562378; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=0NDegptD8d1Zx0ptc1ByVU7iaPP5/DQ14N5L2MLvo1s=; b=KKLjPOn+RVeShTNLflDObFKZ3y7YtO47aPgPTmFY/v8zuv+HKXZyrhiLp4ey4BcnWL7YrBjGKG4OqjT+NY3dx2TXTFhAnLNr91IE9Z3g/vSODrzAPeE/oaUWYx9VbcTzSYbJEEGFpew1vSEUK9m+e+/fHQyNt14gKERY3xNBuvc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768562378949273.9905736609095; Fri, 16 Jan 2026 03:19:38 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghr3-0007eV-Ep; Fri, 16 Jan 2026 06:19:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghr1-0007Tw-Qq for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:18:59 -0500 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 1vghr0-0005nU-3e for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:18:59 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-47eddddcdcfso10168935e9.1 for ; Fri, 16 Jan 2026 03:18:57 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4801fe2c2a2sm13863985e9.10.2026.01.16.03.18.55 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:18:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562336; x=1769167136; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=0NDegptD8d1Zx0ptc1ByVU7iaPP5/DQ14N5L2MLvo1s=; b=K9E39UDS3oeGeGCy9/KzIN4wLB8E+TtaDA8XT1lflabOtPeQe6lIRSxvof8s6giNr0 XwtGkENqsBg96+yDaF1k4SYhU8LiJ6tZPcdz0xCqpJfFnqpysQNUksTPbfFMZvU9le09 jlIMs7P8w7rpj8FcYCkpSR3rpbvrOf6dTzLSCPcNB7d3Twyn0A3E7FrpZwti0M6raA9H WcDfD4FZ5qcd+/weaW/bq659/YRHbTI07ZdjB8jcEhwGC8UlI6xZI5Vdfz7qSSrV5PoY bagrM5fw5O7GrccVpvVOGYNW7M2sdOd5q/LFcU8ATBskaSPiKZvnOwvOuKgeX9qiJR/D EDug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562336; x=1769167136; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=0NDegptD8d1Zx0ptc1ByVU7iaPP5/DQ14N5L2MLvo1s=; b=L1ee+rBtbvds+Osez6vdxW3ZfgY6so+bgx5AogRITqznd8OGpOmtpNnzeTQ2W56SaO PseZamUPpVji1465JhAsjGPMq2/oj4obvXCKfpQXt3jwsUFMD+39OP29hAJHli8IO8Js t1jPbrnJ6crGw1ax/TlbTlB2f/f2CJySWiNVavXGvXymBdGf0XSv5GbuJY6SUR2SswSq sf/UEdf5pu7OFFc+VPx7uhJrCKev/40gzE3q++cGVzjfg25NSA/Ak7bRmH88AZ0MlfsB Pw1YTrgNQNB+rtBiMBGywwYRTzbDp2RGQTa/U6WzWI6LqYuRA/GlKcZx3A+VRx+TTA6F QUJw== X-Gm-Message-State: AOJu0YxjT0hhZyHDRCmXM5GcivY8UTA+5WEh/aXd5e1YTVY6Cf2UTixu DK1W7r4DZfaljH7n4dg8QjyMTYB+vLczZ2MPNMMk6i9IFoEq1ZDXZ2uukQKou9e3nntIIGUmab4 PYQjbtzA= X-Gm-Gg: AY/fxX7l5dAOpbBJpzBfKU8jWvoX4mvW7yNDSlUZWXlMO0vzVMOk2EnYxAHJpGHnvI2 FRQzVY8jQRpOnC26ozS0NCIgcHvTFGLzCGErrwAWLM+ZH0BqO4Cyf4s2qL0u6zE7VIwXKrOB05L ZfU6zJYEMs8q30S9ckNSJEnmoqNwHccHj5nl7BbSfaviIzFgcbU3YVaBnoNe87gUYkGq2avXPwz DJZgoCpN2hRyr0hUMtlA8TxYX4eOHHs4Sf7sc6FQHzRhLupZ0k9nC8XZhrQmG6y8mH84rf2mXsV P1VH741zsudiPzCxyBuvmQUPwRIOFU/VHhBR9KWoKvoq6SFeEZTW8HDVS7/2m011fvEOY8uckYP rdU+5IzxNEZhmHEchJBfvY5Kk2qNjflwnYG+AYjLNgN9tgZxdiSETth7b6VjugAuwJDi1+4uuNa wVMvpXgEu/b5AuWa2rKDGe1F9TgUhbKKaWunZexQLcYc6TMELnE64alq5eUU9z X-Received: by 2002:a05:600c:37c8:b0:477:af07:dd21 with SMTP id 5b1f17b1804b1-4801eb0d71cmr23604365e9.25.1768562336027; Fri, 16 Jan 2026 03:18:56 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 07/30] gitlab-ci: Add build tests for wasm64 Date: Fri, 16 Jan 2026 12:17:44 +0100 Message-ID: <20260116111807.36053-8-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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=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: 1768562379858158500 From: Kohei Tokunaga The wasm builds are tested for 3 targets: wasm32, wasm64(-sMEMORY64=3D1) and wasm64(-sMEMORY64=3D2). The CI builds the containers using the same Dockerf= ile (emsdk-wasm-cross.docker) with different build args. Signed-off-by: Kohei Tokunaga Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- .gitlab-ci.d/buildtest.yml | 24 +++++++++++++++++++++--- .gitlab-ci.d/container-cross.yml | 11 ++++++++++- .gitlab-ci.d/container-template.yml | 4 +++- .gitlab-ci.d/containers.yml | 3 ++- 4 files changed, 36 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index dfe954fe3ce..ea0f5bb0574 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -785,11 +785,29 @@ coverity: # Always manual on forks even if $QEMU_CI =3D=3D "2" - when: manual =20 -build-wasm: +build-wasm32-32bit: extends: .wasm_build_job_template timeout: 2h needs: - - job: wasm-emsdk-cross-container + - job: wasm32-emsdk-cross-container variables: IMAGE: emsdk-wasm32-cross - CONFIGURE_ARGS: --static --disable-tools --enable-debug --enable-tcg-i= nterpreter + CONFIGURE_ARGS: --static --cpu=3Dwasm32 --disable-tools --enable-debug= --enable-tcg-interpreter + +build-wasm64-64bit: + extends: .wasm_build_job_template + timeout: 2h + needs: + - job: wasm64-emsdk-cross-container + variables: + IMAGE: emsdk-wasm64-cross + CONFIGURE_ARGS: --static --cpu=3Dwasm64 --disable-tools --enable-debug= --enable-tcg-interpreter + +build-wasm64-32bit: + extends: .wasm_build_job_template + timeout: 2h + needs: + - job: wasm64-emsdk-cross-container + variables: + IMAGE: emsdk-wasm64-cross + CONFIGURE_ARGS: --static --cpu=3Dwasm64 --wasm64-32bit-address-limit -= -disable-tools --enable-debug --enable-tcg-interpreter diff --git a/.gitlab-ci.d/container-cross.yml b/.gitlab-ci.d/container-cros= s.yml index 0fd7341afac..7022015e956 100644 --- a/.gitlab-ci.d/container-cross.yml +++ b/.gitlab-ci.d/container-cross.yml @@ -86,7 +86,16 @@ win64-fedora-cross-container: variables: NAME: fedora-win64-cross =20 -wasm-emsdk-cross-container: +wasm32-emsdk-cross-container: extends: .container_job_template variables: NAME: emsdk-wasm32-cross + BUILD_ARGS: --build-arg TARGET_CPU=3Dwasm32 + DOCKERFILE: emsdk-wasm-cross + +wasm64-emsdk-cross-container: + extends: .container_job_template + variables: + NAME: emsdk-wasm64-cross + BUILD_ARGS: --build-arg TARGET_CPU=3Dwasm64 + DOCKERFILE: emsdk-wasm-cross diff --git a/.gitlab-ci.d/container-template.yml b/.gitlab-ci.d/container-t= emplate.yml index 82c1b69e8dd..b92e96b0fc5 100644 --- a/.gitlab-ci.d/container-template.yml +++ b/.gitlab-ci.d/container-template.yml @@ -10,12 +10,14 @@ - export COMMON_TAG=3D"$CI_REGISTRY/qemu-project/qemu/qemu/$NAME:lates= t" - docker login $CI_REGISTRY -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PA= SSWORD" - until docker info; do sleep 1; done + - export DOCKERFILE_NAME=3D${DOCKERFILE:-$NAME} script: - echo "TAG:$TAG" - echo "COMMON_TAG:$COMMON_TAG" - docker build --tag "$TAG" --cache-from "$TAG" --cache-from "$COMMON_= TAG" --build-arg BUILDKIT_INLINE_CACHE=3D1 - -f "tests/docker/dockerfiles/$NAME.docker" "." + $BUILD_ARGS + -f "tests/docker/dockerfiles/$DOCKERFILE_NAME.docker" "." - docker push "$TAG" after_script: - docker logout diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml index f7d3e7205dc..dde9a3f840f 100644 --- a/.gitlab-ci.d/containers.yml +++ b/.gitlab-ci.d/containers.yml @@ -58,7 +58,8 @@ weekly-container-builds: - tricore-debian-cross-container - xtensa-debian-cross-container - win64-fedora-cross-container - - wasm-emsdk-cross-container + - wasm32-emsdk-cross-container + - wasm64-emsdk-cross-container # containers - amd64-alpine-container - amd64-debian-container --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562495; cv=none; d=zohomail.com; s=zohoarc; b=e08SgaE1KPrzMNh5+67splF8E9bJ8bk4+7uXtvG8+AlhUW/igsiJNfYmcyRQGBdG5rqUziMH6LwlNYcfSze87FoUYmppOwXbOTOjMVmRWkVOoMlVDiZc2dC0OR32sO+sxkVmfZ7/QIx0pqXMS+1m2JamwTAGYKbIkU7+/MHpYvE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562495; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=aaDCuoO92f4Vf69cn2iypqC0aQgUpS+QpOm8Ne49+7s=; b=KemC0/e/KFJupGA5hTO+M/nZL2lJGqSMfm+AgbVF1PmSamBrRpE+Nk5ZhFamlmj85Mvjgfk6BYldO2nKEYxr5n2vhhzowp9aD4q3XT8pPG6qE4xr2cXR+RaDLXaOEOGxhRa4y8jD3h/YNQjl3zT/2VakFnIPWdwHj2tfxo99mRQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768562495578878.4654147734439; Fri, 16 Jan 2026 03:21:35 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghrQ-0008Cy-Ok; Fri, 16 Jan 2026 06:19:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghr8-00081S-0L for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:19:07 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vghr6-0005pc-Da for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:19:05 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-47fedb7c68dso12969075e9.2 for ; Fri, 16 Jan 2026 03:19:04 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4356997e6dasm4696524f8f.32.2026.01.16.03.19.01 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:19:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562343; x=1769167143; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=aaDCuoO92f4Vf69cn2iypqC0aQgUpS+QpOm8Ne49+7s=; b=ZOjrq8OB+PkYF6eWi0RpsIpflXFmSDvp67U7eYuCa2Ld5e3cWZ2Oca1GL3AKlDhGaH xjoTKZnBuUZfxnM6xcFxOs94To2LvN/xxYsnfkayo13KoszrPmonRpwP8Bc8bIBA9Unc svKFundAKi1TJrBrrmdRRFaFiRMK+31mF8dVtDKYxxOPuHEMKweF+y2GwOHQy8yyjtvn 9AYld2CDojvXDHCTBpoI6yGGgNKYlFOFhEeU9NoHfa2Tfi6ELwolMrJp/AIKu1W+smC/ CwCy9vN6BB7PXbgukyOSeL113R+7E3unYi1+G9UMPrpKeScuCLItmYyCUvFn/JQm0+zm uLTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562343; x=1769167143; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=aaDCuoO92f4Vf69cn2iypqC0aQgUpS+QpOm8Ne49+7s=; b=r1+4F6dAqQuFQEjabAga0S8EVwmoS5pbKT0v/t2D87/jvM8bS7foalq4F1E0A5JJku FbvGstllYVCbSzTeps86iSO9ZfbUJm0JTEJh1SGvjJ16pZgWMAihPWXtSbRHv45iNqMU xUW1dSv0svZgzjEk0fbwBcn7XEJJfLlfbZBH4ALK/vADIEhp3rcJ+8NuLEKmyPC/QODn PSXm8J1eb+3FK6X/oAWQzRug2RVFdn38QpTsHISmOGe3xlUB/VmpSlAVH8j5LdmoYMlw iyzReHn5TnZcWh0+tB7ST48DGnCasFI0ACuxBxMapC2TIucXSd4WBLdf7WjkUO6e3rKb 1eyw== X-Gm-Message-State: AOJu0YzW8X/BKf9sSMZ7kVz6wlVFdaE/nQBV4R1xorp/+nz9gA80i21/ VGXuMzVCSItoiZ59yMDEGplJZDYgZillpdVFPqtwu7W+q8Jtbbm2ynHb2QMy9wCcJ9325DX1UrB FA4Pt7ZI= X-Gm-Gg: AY/fxX484biZMuIN6kqGGJbos7oXLiyyp4jfuCTivIeDL2UcoiknKKcE1N2GgJOXDmZ LfdYRhQk7SWcHkgar6SLFsTA9esWxtN5nH4pDCRDoQcOoHrViZUTggMa0LkZyQ65qUiYfn3C8XX GSWvvh+qy1LkKICzrmlnCMq87nPx0r4QC0wAMmvr62y0hYyLDPaWgTAKcHD7K26tOQWI3pPJ4uH zaGO9TGzf3IfqcJkvbBwH1uhFNt+dVxa3rqMG0NL/CmtJVM5T1uCVjsxGGOyznQi7VO7cSxYP5k SQjlE25zM2Z/KVtrwpEaC/9zWxWZQ09JaAscOTRScEJAwI6tm6eFEvsxYb0jVDA7XVHnUDusU8b H8o1L1/TAPw77OAfbnwJykhLt29eeb/jWfnlZ1os18PCsVK2qUuajdyGn+KxGyRuZ7nQBl+7iBv dUyAt2im2KlCb+cjYZOdhb0pCqQRUi5dH4swnEOW5K8bsylJEnDp1ERGoP3eTx X-Received: by 2002:a05:600c:1d0a:b0:477:8ba7:fe0a with SMTP id 5b1f17b1804b1-4801e343051mr35811995e9.24.1768562342598; Fri, 16 Jan 2026 03:19:02 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 08/30] accel/hvf: Create hvf_protect_clean_range, hvf_unprotect_dirty_range Date: Fri, 16 Jan 2026 12:17:45 +0100 Message-ID: <20260116111807.36053-9-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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: 1768562496967158500 From: Richard Henderson Signed-off-by: Richard Henderson Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Akihiko Odaki Message-ID: <20251103101034.59039-2-philmd@linaro.org> --- include/system/hvf_int.h | 3 +++ accel/hvf/hvf-all.c | 25 +++++++++++++++++++++++++ accel/hvf/trace-events | 1 + 3 files changed, 29 insertions(+) diff --git a/include/system/hvf_int.h b/include/system/hvf_int.h index 3d2be4092ef..5a57691885f 100644 --- a/include/system/hvf_int.h +++ b/include/system/hvf_int.h @@ -89,6 +89,9 @@ int hvf_arch_get_registers(CPUState *); /* Must be called by the owning thread */ void hvf_arch_update_guest_debug(CPUState *cpu); =20 +void hvf_protect_clean_range(hwaddr addr, size_t size); +void hvf_unprotect_dirty_range(hwaddr addr, size_t size); + struct hvf_sw_breakpoint { vaddr pc; vaddr saved_insn; diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c index 77f4e4e4f30..741b4bdc4fb 100644 --- a/accel/hvf/hvf-all.c +++ b/accel/hvf/hvf-all.c @@ -58,6 +58,31 @@ void assert_hvf_ok_impl(hv_return_t ret, const char *fil= e, unsigned int line, abort(); } =20 +static void do_hv_vm_protect(hwaddr start, size_t size, + hv_memory_flags_t flags) +{ + hv_return_t ret; + + trace_hvf_vm_protect(start, size, flags, + flags & HV_MEMORY_READ ? 'R' : '-', + flags & HV_MEMORY_WRITE ? 'W' : '-', + flags & HV_MEMORY_EXEC ? 'X' : '-'); + + ret =3D hv_vm_protect(start, size, flags); + assert_hvf_ok(ret); +} + +void hvf_protect_clean_range(hwaddr addr, size_t size) +{ + do_hv_vm_protect(addr, size, HV_MEMORY_READ | HV_MEMORY_EXEC); +} + +void hvf_unprotect_dirty_range(hwaddr addr, size_t size) +{ + do_hv_vm_protect(addr, size, + HV_MEMORY_READ | HV_MEMORY_WRITE | HV_MEMORY_EXEC); +} + static int do_hvf_set_memory(hvf_slot *slot, hv_memory_flags_t flags) { struct mac_slot *macslot; diff --git a/accel/hvf/trace-events b/accel/hvf/trace-events index 2fd3e127c74..f989da59492 100644 --- a/accel/hvf/trace-events +++ b/accel/hvf/trace-events @@ -5,3 +5,4 @@ # hvf-accel-ops.c hvf_vm_map(uint64_t paddr, uint64_t size, void *vaddr, uint8_t flags, cons= t char r, const char w, const char e) "paddr:0x%016"PRIx64" size:0x%08"PRIx= 64" vaddr:%p flags:0x%02x/%c%c%c" hvf_vm_unmap(uint64_t paddr, uint64_t size) "paddr:0x%016"PRIx64" size:0x%= 08"PRIx64 +hvf_vm_protect(uint64_t paddr, size_t size, uint8_t flags, const char r, c= onst char w, const char e) "paddr:0x%016"PRIx64" size:0x%08zx flags:0x%02x/= %c%c%c" --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562478; cv=none; d=zohomail.com; s=zohoarc; b=LRf9EqA4ZLHfLiHC3b7C2VMC/xNESeYpobm75WMNfybvQctB578dPlN6icfqvgEVV7+jBgFlp23JEvwrZ2qogoR3c2UWfpHZKjjGCYIRiUacrPjZAeFeKZmjalBEN+Oi4ylqVgH6HwTYbyv/C2JPqJxbaQC6lV3p68kH76bCRqc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562478; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=FJKnxppWAC/n1eSB1d1Olh3eK3qa6g9cnmgeq7kmKnk=; b=ggNn4hALiaulOgaeFVp57hx1ll3hGvHyLvrAuA3X+rNS6CFPXccAde3MSA7iDDUXs87wRIHe3cXlvFnPDaPzS/Ufp6OxJOFG+TtVMqQP/CQVyJ07K+YVwoPOSfaVti+OBw3XcLTfr5PrrwX+Y7nYP5R5Ft6Rdt+bYlATdx57nxQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768562478665198.9494889354121; Fri, 16 Jan 2026 03:21:18 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghrT-0008NE-9U; Fri, 16 Jan 2026 06:19:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghrF-00087d-7Y for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:19:17 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vghrD-0005sE-Db for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:19:12 -0500 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-42fb0fc5aa9so983550f8f.1 for ; Fri, 16 Jan 2026 03:19:10 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4356999810bsm4690869f8f.40.2026.01.16.03.19.08 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:19:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562349; x=1769167149; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=FJKnxppWAC/n1eSB1d1Olh3eK3qa6g9cnmgeq7kmKnk=; b=QrA6FZ04erDB+CuzLIUdrUEMiTf1P3uXjEp35btjIcUG15WAW1p9hCtLYyLBbYfWjw DVRqmmfS/DWFeWsplvr5tEk6S/E4xRNGl/43MRNEVus+FIUXDKX+KS5u+ElhezBndnTD YFQn2yjMOMq7bPoUkvVB/qxVgv+j493GZupWmZ+BGsdUcGB/Zv6tWnYXew3cJ5B0AxPN 6C3UDtwNz9Fj+T7ZoLZhAWeDa6sh6jFkmwiVHBL8LAcIyKyVoIeDuTfSduBte72uYtBm FBKS0KuHfUyKKRSewZGOXv9PRMpalmRsxE+LJ+Wri2vgPbixTmn7GcwqNkennJ6NZZS5 OYug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562349; x=1769167149; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=FJKnxppWAC/n1eSB1d1Olh3eK3qa6g9cnmgeq7kmKnk=; b=gVr9cqqVbXo2XiOuy6GYgAbm7Uac6+4SEpViOjYr/uDg/wfFyR6pylZQowFfmXiJ06 fYXR6/qESDpk6bEzM89lvG1PzYs0Zc30G8l9ccrHheJ0BdvTD2sGHuvqkpPplV5i2S8r E7oQrCRobtegDyDARZut/a3mdn0FLsFrIwM0FqkeFeV4T/tyo3uB3Iv+yc7G9+YZbmS3 Tnp25D1nxns7mKLKAwTmsR9Z/cUIhvdGjty+gTF4lFwXZ8R0gvF/slT8Hg1XnsY6oT/g 13hRqDOWcrZc6N4qqrmtTKd7dZTRuZfakr0pFlFRJ59+yTkPyRoiDBiZGrPB7aivzjfj JZ5Q== X-Gm-Message-State: AOJu0Ywk/0xHvXWC6CWMUiOKP4RYO+rMWRo6I/dXTO9nur1EO0mxzTzT KfZq8pFsmm5V77juzD3LNgfqmuq7rI1nMcWvjJSGZ09d6DuoyxWsSjfM+N3O1kH7+u4k6knuwYy pLRdd71I= X-Gm-Gg: AY/fxX60c3RiDKZmCzg2xrBFbF5Bmsk/E+4Tx2Liob/bfHLziWr69G6Y8ka4mGSalBq CxpY2J5nFqf1hMQFYq7HYlOrj6DrTmJgJRCFGjgYVJawOdHJfZl7EQbfu9WAozBgI3OnGUl8fqq 4v7O2vrLl1iWxBurzLfHLzYbgHD/QJX1MvFCUU0LbG9Ntwp+ODUFMMil1SkUdQmRvKmpbvGAUOn aLI09QvwKUjZ1cPC73v75zOUpjzvkqqki6lOhdVL7HzDV1rYTaXQ2EkORRAaxuDhi/WgIjMFRu/ Ucowo2tB+U8AosLHCqg0s/9/i3iCU32rN2sUDYxz4Bg1WvUe1lwZ4N9q5uossWXmuKwqn4xHYYu igN7WNI67Hpzr3rAUyLA77KMpjF/b6RUGB+dRaKZ2bGB3GPQrqAnoRmqE6i6PD1MBN5xGf8shts eWxERApOvjOZTVf6PukzoCCeH4ydSamlKZO2uZip+8wFfTzJNbiEcYmf3WGck7ar5uCNxsQzM= X-Received: by 2002:a05:6000:2281:b0:430:f40f:61b9 with SMTP id ffacd0b85a97d-4356a024c7amr3136262f8f.4.1768562349435; Fri, 16 Jan 2026 03:19:09 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 09/30] target/i386/hvf: Use host page alignment in ept_emulation_fault() Date: Fri, 16 Jan 2026 12:17:46 +0100 Message-ID: <20260116111807.36053-10-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.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: 1768562480878158500 While on x86 the host page size is fixed to 4KB, it is better to call qemu_real_host_page_size() for consistency. Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Akihiko Odaki Message-ID: <20251103101034.59039-3-philmd@linaro.org> --- target/i386/hvf/hvf.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 2023a7bfbb0..731cd954630 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -76,7 +76,7 @@ #include "qemu/main-loop.h" #include "qemu/accel.h" #include "target/i386/cpu.h" -#include "exec/target_page.h" +#include "exec/cpu-common.h" =20 static Error *invtsc_mig_blocker; =20 @@ -137,9 +137,12 @@ static bool ept_emulation_fault(hvf_slot *slot, uint64= _t gpa, uint64_t ept_qual) =20 if (write && slot) { if (slot->flags & HVF_SLOT_LOG) { - uint64_t dirty_page_start =3D gpa & ~(TARGET_PAGE_SIZE - 1u); + uintptr_t page_size =3D qemu_real_host_page_size(); + intptr_t page_mask =3D -(intptr_t)page_size; + uint64_t dirty_page_start =3D gpa & page_mask; + memory_region_set_dirty(slot->region, gpa - slot->start, 1); - hv_vm_protect(dirty_page_start, TARGET_PAGE_SIZE, + hv_vm_protect(dirty_page_start, page_size, HV_MEMORY_READ | HV_MEMORY_WRITE | HV_MEMORY_EXE= C); } } --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562458; cv=none; d=zohomail.com; s=zohoarc; b=SlvMoCe75fvC8WEnkm561gMYd5un06c4/gw7KFTVBeJCVbG9fMm7YdN0jeeFUbeZotLj30xpHIOgjOdZHi5vDfTUxNjRQXo4fo/M8pIrHRSUBvA/mWGemWjzCriNwcYiccwHLtJFoo8E9ztKeKwipD/90ftZziQTJfoxA2wCxcw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562458; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=hEhb2xY72TYGDW2JqPRPheEDMAo9iQtg1TbE6R1DYGk=; b=ADGjL/kH20mM2e/y36x0sklY6VP2hA9LqIvFF/tegnbRCZhnJTqoi+4VeB5697P0YD6u2lKnPCP3KI5Gg4OcbTdFaQk/Jqj47qtDmXzIXUTzU2W0hteL6JHfPKFj1zlBLavti44CCIghe0nLwlDgjTP2AEwW91FDw9BHhejCePs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768562458437949.1137483161156; Fri, 16 Jan 2026 03:20:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghrU-0008SF-2e; Fri, 16 Jan 2026 06:19:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghrL-0008AV-B2 for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:19:24 -0500 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 1vghrJ-0005w2-Tn for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:19:19 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-47f3b7ef761so10381085e9.0 for ; Fri, 16 Jan 2026 03:19:17 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43569921da2sm4663646f8f.1.2026.01.16.03.19.15 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:19:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562356; x=1769167156; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=hEhb2xY72TYGDW2JqPRPheEDMAo9iQtg1TbE6R1DYGk=; b=JBvdmiMKLE6shxX3bwSzTLx3f92b6iCktbqfpytFDSqTJ8t7OT+FjdGIxpB6ldt8wD KoWWLhp6uFYhwTR+s52Fkmiuo9YAgPFrIkggNeuIAilzJlOHWb4JM6UkWadFYfEDUNtz Mzby/dKOEP6RtO3mOFKwVDngkXavBJsSDQzExN1IFEldCoNk5xX5m5TQHb4RK0fVdJVP /W3dCNH7qsYplfEY9cgBWYHNmYcj7WzPxDb2AEYKatxHrlgIOV1HtIv3BtSrfKHhRl4q 9yQvV/4eO5X9h3FDkGZNiSFzoC/J4ZhGUxUqXuLI8TLp7EJ3hfmtI8uHrFLQApS5QZA3 3mmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562356; x=1769167156; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=hEhb2xY72TYGDW2JqPRPheEDMAo9iQtg1TbE6R1DYGk=; b=ZOKVnEi+M6MUd/eCc1jFXZ6UsyiKTJP4EuhfdWSvfYItT9dHND/HiPwMtxesHcv8V4 mejiW+cGJcFA+L4mPYg27juJH103+OV6Ht7JYiz2TWaqO6FaZcW6d3yNFoT2/7Lf/2fo +jiwev5oTzlNRJ1b3mKqpZ6lHR6QU7ho4gVTFsw7TuQHf5rTJjwb448Emf2n0Zr5Lqdn aH/r4bCfI7EhVhBKYxorCkOnXo1L7kuZKZw9JFtQ5Ayf2Qgu8f6tkz/PgzsFRMcz5BMt vy6keJF2AX4C7Z2cpOObYRKEacMztt1Vmy4kiJE+Yg4OyVrPs1db35hZxQxsSaihVQxY beYw== X-Gm-Message-State: AOJu0Yzdc8wFjZ/CfwlDaZF/L5a6HYtXdvWambs0Jgxqvxs/IlO++4EI ssHok3bNNzlQmq5s/S4k3AJ3s2ZlT2NgW5uSeWXM276qHxVOP3Nz9n6rbuHAe8YOIxqW2YRhGSs bW1Kov0k= X-Gm-Gg: AY/fxX6E+PfI6b5+x+HChwGi2m05Kd+9Xadsh/6uULxMLYEQzgtcC33Dw6qyG5eUgBr DtVfZHhrb4vHpLgc/e8vNYoAOkgdIN5kZHygYbKCMmz9DtcD6XXYTVxIvNmq+EUo2ZTZk1ZVZpG 9Mz7WwVrFlkL74BiPcreQuZCTqFRlRqKp9jgw/Lq+rfqAEmYyXSnnvInvMSDiGtJwrGv0Mdg1lr eE0cFFM3VuxBG0ST2zRlrShbrM0EagV5IoinI6rDHzmBzKZMuoNEeAjpLjkx6p+xwzvqsJynBfH dS6DE+zgptuTE15Ps3FGfW1wmc08XrmwIhkNDfW1crIL/HhfrffZ/86QleOI7U1CInP3vQ9wLYc 4+kj6MV+KAjwCHStJ7fUL9P4Q/xIEDzHZRbEC0TxkMnRFiE/oOGNfay2tSMPWvqOVxSzBBWVqDH 0yD1xWcegGY1l3gPVfAbV/8N5HQOkT1dcQZgdl7gKyYizkn8usr76XIJiU9yav X-Received: by 2002:a05:600c:4584:b0:47b:deb9:15fb with SMTP id 5b1f17b1804b1-4801e350af0mr29014635e9.33.1768562355929; Fri, 16 Jan 2026 03:19:15 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 10/30] accel/hvf: Enforce host alignment in hv_vm_protect() Date: Fri, 16 Jan 2026 12:17:47 +0100 Message-ID: <20260116111807.36053-11-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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=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: 1768562458706158500 hv_vm_protect() arguments must be aligned to host page. Suggested-by: Richard Henderson Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Akihiko Odaki Message-ID: <20260112103034.65310-4-philmd@linaro.org> --- accel/hvf/hvf-all.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c index 741b4bdc4fb..96ed79108a6 100644 --- a/accel/hvf/hvf-all.c +++ b/accel/hvf/hvf-all.c @@ -11,6 +11,7 @@ #include "qemu/osdep.h" #include "qemu/error-report.h" #include "accel/accel-ops.h" +#include "exec/cpu-common.h" #include "system/address-spaces.h" #include "system/memory.h" #include "system/hvf.h" @@ -61,12 +62,15 @@ void assert_hvf_ok_impl(hv_return_t ret, const char *fi= le, unsigned int line, static void do_hv_vm_protect(hwaddr start, size_t size, hv_memory_flags_t flags) { + intptr_t page_mask =3D qemu_real_host_page_mask(); hv_return_t ret; =20 trace_hvf_vm_protect(start, size, flags, flags & HV_MEMORY_READ ? 'R' : '-', flags & HV_MEMORY_WRITE ? 'W' : '-', flags & HV_MEMORY_EXEC ? 'X' : '-'); + g_assert(!((uintptr_t)start & ~page_mask)); + g_assert(!(size & ~page_mask)); =20 ret =3D hv_vm_protect(start, size, flags); assert_hvf_ok(ret); --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562433; cv=none; d=zohomail.com; s=zohoarc; b=ms1usYWbQnYaHHhpVBglniCZYjJL2jR66EE0haLJuoEU4tOiQyTSRFmvYgQ++GzsAbsg+cW5ZYZWo8mhBJBaNlt8edmibWkGjbrBOCOMLgtcAhnPPKqmF6jIft/ORnyn7Qg/3w/ADEY2gggQTIPa809TzmCn7q28Ld+GowuEpNg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562433; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=FIl7RjFm+tucu6fJwNq1+KG0f2AMg64O+5Vnw5OpV/c=; b=fAo8b5ahXntSg9vJmh5CBGGD2nS/+KBumlgaL0OIApClHf8JfWvkcmYhLDvA7bLBv+8uF3FRknE1VX0e0C/ruQiVAd8BPGSxMzAQa5gFKYdFpb1KPCnmrEFuCHr7froSNWZfeU2uN5C42SyWs8uqDjfW/g4Bv+jTo8xqrxIzwlI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17685624339320.3504747670682491; Fri, 16 Jan 2026 03:20:33 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghrU-0008SM-2w; Fri, 16 Jan 2026 06:19:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghrS-0008FX-68 for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:19:26 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vghrQ-0005xy-Mk for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:19:25 -0500 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-4327778df7fso1130941f8f.3 for ; Fri, 16 Jan 2026 03:19:24 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4356996cf42sm4609491f8f.20.2026.01.16.03.19.21 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:19:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562363; x=1769167163; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=FIl7RjFm+tucu6fJwNq1+KG0f2AMg64O+5Vnw5OpV/c=; b=lecANSppcWqrmFx9Y7DnrTXRNTiO7pRR1VI+UW+z2pdU+vduunjL1bHhjkWTpIDvpd b1UU4RUQ3Ehm/1o7kkL6JbJPNngh3/Y0+lB2C6E9+6g2zhRiYDeeab+eddRevM24K6em CfrRq1gOlowXjWHRij50k0sSJYTdnve6Ea2OHWYZCeYN9X8E84SK/lfOso23pd+a4LhR nxlVf+vXMwv4CzC7Vx78SoU0Mzk6asJE2oRVa6u2R6U+vKXncsR+o+LtZsCbMjPuCMst InH6NIc3D3xiXI80k4P1FbfLXuqQm97MAAaQelJgtd5uInVLPHAYw2XdJqbmEOclRdyT 5Q3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562363; x=1769167163; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=FIl7RjFm+tucu6fJwNq1+KG0f2AMg64O+5Vnw5OpV/c=; b=oJ8bu1i2hSPYtt25qr38KicZU0t6DaZcHIzBGwLwSL74nnB6cbhDG4oSqVmg/YQpxV zmy/lBiwCgvio1Nxs1+uG0MLrpzZTxDYWSaFdiXKbHXs6N48Xk9UUwvaztJ+qQ2fGJaW gnsT79WdhDD080A+6uVIapEBU5O8buTD7Der/QbbNkgkNnNZ/p1r/4p/h6vHZF6izhfU AujdoQ2tPEXz2/KVhfnb74cP+s8YQ9J+KOGYAYzcGO19MZ8GSsv4kxMVe1YyXL/A/+qK cN0fiPIitNzhxXpIb+WAyok+tM05uPa1TT4GKU2DDBzdjCcOMcrLuqS/nCnYmDN3Ircx kOEA== X-Gm-Message-State: AOJu0Yx6OH2Pk4Lu0GwIh5NM3jlGNngI5O6U90dtcXO4HaQp9itta/yX XyahQvAJmkE8us9Bw4vmvoGYUM/jHIYVikzHnFdRBaBJcAxUfMH1/Rw+I0fBKBbKUik3ZrqW4AV B/0hPSgw= X-Gm-Gg: AY/fxX7pPbIbFanJ3u8EY7N+EP1kdl1SGzfTjrHoO+E9nwhC/ofyVEaP3+SehsH51Ul AUWgaQISVSttnOB2ehRXb98d/mOHndRRvoHFzEQr9aH0/zMoPDE6TMqd49eXFClWo5dh9Tmbi1z pVB94RUCYcqjP5/x4siQx0NcvbcoRwxmHmcTnPu9ugwObcqS6LI/V0yCC+q1duD9GqlytP/K7aC PwcNt5bjoyjRGZ68vqV2jS2ndVvgz3ZI9C20CfGZxL2L/H/4qsSdaCjhS6/RmvjJi9+j7MAtDXl v3O2BRHHoICOfmFIXpRbv6lElJa3m5zUvfjpMvPbRdUmoltk1fEuBuSp28gT+RDJsgYiUeKhAJc 9ri1ArfUq/+s0fRJ6a5jo5fbmJtGZh+ZKNejah2oGsTybN2exfYzXS/+j0Na2Uk8iN0A8I1tskY /Euj1qoIMwHbps99zyIlNX/PnndtdHM9UOvPhTVL/QO0qNDDoUaJp4ipMNQVEt X-Received: by 2002:a05:6000:1787:b0:431:104:6db7 with SMTP id ffacd0b85a97d-4356a02c9f0mr3308535f8f.26.1768562362583; Fri, 16 Jan 2026 03:19:22 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 11/30] target/i386/hvf: Use hvf_unprotect_dirty_range Date: Fri, 16 Jan 2026 12:17:48 +0100 Message-ID: <20260116111807.36053-12-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.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: 1768562434747158500 From: Richard Henderson Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Akihiko Odaki Message-ID: <20260112103034.65310-5-philmd@linaro.org> --- target/i386/hvf/hvf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 731cd954630..1610000d9ca 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -142,8 +142,7 @@ static bool ept_emulation_fault(hvf_slot *slot, uint64_= t gpa, uint64_t ept_qual) uint64_t dirty_page_start =3D gpa & page_mask; =20 memory_region_set_dirty(slot->region, gpa - slot->start, 1); - hv_vm_protect(dirty_page_start, page_size, - HV_MEMORY_READ | HV_MEMORY_WRITE | HV_MEMORY_EXE= C); + hvf_unprotect_dirty_range(dirty_page_start, page_size); } } =20 --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562439; cv=none; d=zohomail.com; s=zohoarc; b=A1onAtoFMLQmoV530cAz0gMX1DQD8X24tz1J5lhnkpaR1aPVNlGCScYHLBx4G1a0AXCQ+OkLOJWdnMv4hYcLwr3CRCNbC/R5TZK2o/XO+rBI6zAg1J6tbUv4C1R+A4Hj78OtT0Gegfupm1mq/3FwR2ooyFM2rbH8WwWfDIawFMc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562439; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=4VCJw2Mh019bUGRv0tYMpX5m9MPccao029SIxhwO1Ug=; b=Lnc+XrVWNxn+KKka/5g0rytH69BfVl1ca0BwDrBLht5glf+kxANIh06eK4rpbSY68nSEN8pCIOt75TCSK8HbZSufXnLCXzDfcp2vCjWoUF1PIP8eQy/j/zr3NGVzIZB7hzgDvi1aYGE2Zui+TznmxVmUOdsRHzP6MMMIdzqm7Ys= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768562439534798.7207403599537; Fri, 16 Jan 2026 03:20:39 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghra-0000ZW-NU; Fri, 16 Jan 2026 06:19:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghrZ-0000Qs-7H for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:19:33 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vghrX-00067b-DU for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:19:32 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-47ee301a06aso17296995e9.0 for ; Fri, 16 Jan 2026 03:19:31 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47f4b26764fsm93965075e9.12.2026.01.16.03.19.28 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:19:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562369; x=1769167169; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=4VCJw2Mh019bUGRv0tYMpX5m9MPccao029SIxhwO1Ug=; b=OJ6XVWMQHBgM+P/KtG6+MDlKWIiNmuv4G9VcjlbURpT/ukviR0aoo10oLLSN64K0L0 KHCaWs9WuQOv72Acs9kuOdvGzim9XRg4lx/++h7uKD0jCaOKxFFLRJnylpsehkIjxbie e9Dtmvv1dld9cnT1HVhDbpCNSHWy3TMyHbM+leBphP+C3H6q4o5hOLVcZxmyp7PlR2PQ 86t8tt6ZTLUY4ZcNw5pU/g/1B6llQEMQa8clLgN/Y8u7ZzMb27y2VB/oqQrwl6GQ1C5A O10hWPQlJIDFKNl4Em3ByUxugMbInV4wtjbIfJtz0fY0w0IX/JFTvRW48ha/MCOeNfJK g4+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562369; x=1769167169; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=4VCJw2Mh019bUGRv0tYMpX5m9MPccao029SIxhwO1Ug=; b=cbcb9x+P+m3BjN3brYR5GtDrFOwyQuEgwEZU8jeoWeLMh7wqzJ18zzN2/KngoCSDx/ wj1o8DuQRwYatsery66HvHwhFN7SqhOZNL1fFnxrNc0LwGPRH0fltJK0/zfIL5LD3A67 npBzcHnTvtvzpux2oEy2cxQzt0a79m48CyX0HM7C66uGKYGgKV08vX25vi0D/LSbKGQj hSiLgswyQdy8kkygi5veyTj0zmBB1ohbE1Z79Wb9ox+G8pexgEo9R/Yb7RNhpJmwm8Jq dSrg7N7/g/H8GVO7qCsdncqpXARZ131MsuHLNjtu1OibBmMjW/DAm6HBShfshHTPnDFx c75Q== X-Gm-Message-State: AOJu0YyfWmUYbT+0cpcxr9z5TkMN69+j+DuAumqPXAT9JlAmq7Vyz+gC YjrFxmbwDuZRpnDCApIYF0rOCVIiah+vBscZ2HQg4yw5fL0jXPXcmg1tmWsqeLLR8kPLyOcuo2m gTj0hA9I= X-Gm-Gg: AY/fxX6hx/VDlPdtu0TXcXZdYJWpnjI+zG59hXKwUX2IeDUV8tncdTQD/AKWPBwRZ74 td1xBqhqkgcDMIQQx7p97xHDjNzu/z+IuIYbV6pzL06L/3V1JAHtgDqVN+Fgr5jUSTIimpWdbAS GrsA4mhywjx/46Kjv0iIE8sDGOcELtDuqB+eBagtWcmoCaKKvRG2omd6Es6cs4q9kXrd9ctiDuZ t1l6vvoMAfj1QHhy5CzNp7W7vIu0lXml3ZgNWBVJaoO65rRqLefc/QVCiKq8PUPaUE5l2WmQYIo RkxoyYE7W9cUbzQF2FAx/1YwxgiHtzpgNICLqLkKeiN49FVMbqpXrBEtT5JVGoHOS/fnE14ELou ifQwMzMbsSGD2d8Oay+uDDCbGNpHVUuBfAb5U1ymxldVCcjk8RjH04GsZgBscvTZWO5Y0JZzOJD 6e4XEJduUFTGeEkSonhGpPqA6hPrgmirE02PFttqHEbPoDvX9wSg82ff2scF4E X-Received: by 2002:a05:600c:3107:b0:480:1a3a:5ce6 with SMTP id 5b1f17b1804b1-4801eabf6b4mr26056385e9.14.1768562369470; Fri, 16 Jan 2026 03:19:29 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 12/30] target/i386/hvf: Use address_space_translate in ept_emulation_fault Date: Fri, 16 Jan 2026 12:17:49 +0100 Message-ID: <20260116111807.36053-13-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=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=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: 1768562440701158500 From: Richard Henderson The hvf_slot structure is a poor replacement for properly looking up a memory region in the address space. Use memory_region_get_dirty_log_mask instead of HVF_SLOT_LOG. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Akihiko Odaki Message-ID: <20251103101034.59039-6-philmd@linaro.org> --- target/i386/hvf/hvf.c | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 1610000d9ca..8532e0fcffd 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -119,9 +119,12 @@ void hvf_handle_io(CPUState *env, uint16_t port, void = *buffer, } } =20 -static bool ept_emulation_fault(hvf_slot *slot, uint64_t gpa, uint64_t ept= _qual) +static bool ept_emulation_fault(CPUState *cs, uint64_t gpa, uint64_t ept_q= ual) { - int read, write; + bool read, write; + MemoryRegion *mr; + hwaddr gpa_page =3D gpa & qemu_real_host_page_mask(); + hwaddr xlat; =20 /* EPT fault on an instruction fetch doesn't make sense here */ if (ept_qual & EPT_VIOLATION_INST_FETCH) { @@ -129,21 +132,22 @@ static bool ept_emulation_fault(hvf_slot *slot, uint6= 4_t gpa, uint64_t ept_qual) } =20 /* EPT fault must be a read fault or a write fault */ - read =3D ept_qual & EPT_VIOLATION_DATA_READ ? 1 : 0; - write =3D ept_qual & EPT_VIOLATION_DATA_WRITE ? 1 : 0; - if ((read | write) =3D=3D 0) { + read =3D ept_qual & EPT_VIOLATION_DATA_READ; + write =3D ept_qual & EPT_VIOLATION_DATA_WRITE; + if (!read && !write) { return false; } =20 - if (write && slot) { - if (slot->flags & HVF_SLOT_LOG) { - uintptr_t page_size =3D qemu_real_host_page_size(); - intptr_t page_mask =3D -(intptr_t)page_size; - uint64_t dirty_page_start =3D gpa & page_mask; + mr =3D address_space_translate(cpu_get_address_space(cs, X86ASIdx_MEM), + gpa_page, &xlat, NULL, write, + MEMTXATTRS_UNSPECIFIED); =20 - memory_region_set_dirty(slot->region, gpa - slot->start, 1); - hvf_unprotect_dirty_range(dirty_page_start, page_size); - } + /* Handle dirty page logging for ram. */ + if (write && memory_region_get_dirty_log_mask(mr)) { + uintptr_t page_size =3D qemu_real_host_page_size(); + + memory_region_set_dirty(mr, gpa_page + xlat, page_size); + hvf_unprotect_dirty_range(gpa_page, page_size); } =20 /* @@ -156,11 +160,8 @@ static bool ept_emulation_fault(hvf_slot *slot, uint64= _t gpa, uint64_t ept_qual) return false; } =20 - if (!slot) { - return true; - } - if (!memory_region_is_ram(slot->region) && - !(read && memory_region_is_romd(slot->region))) { + if (!memory_region_is_ram(mr) && + !(read && memory_region_is_romd(mr))) { return true; } return false; @@ -765,7 +766,6 @@ static int hvf_handle_vmexit(CPUState *cpu) /* Need to check if MMIO or unmapped fault */ case EXIT_REASON_EPT_FAULT: { - hvf_slot *slot; uint64_t gpa =3D rvmcs(cpu->accel->fd, VMCS_GUEST_PHYSICAL_ADDRESS= ); =20 if (((idtvec_info & VMCS_IDT_VEC_VALID) =3D=3D 0) && @@ -773,9 +773,8 @@ static int hvf_handle_vmexit(CPUState *cpu) vmx_set_nmi_blocking(cpu); } =20 - slot =3D hvf_find_overlap_slot(gpa, 1); /* mmio */ - if (ept_emulation_fault(slot, gpa, exit_qual)) { + if (ept_emulation_fault(cpu, gpa, exit_qual)) { struct x86_decode decode; =20 hvf_load_regs(cpu); --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562403; cv=none; d=zohomail.com; s=zohoarc; b=dMnjqMVoxhOSD504GGq6sYUvT9Ja7oXNRI8AVtC/gH9hvnR4L2Uzp/6f6BbKcnoySO0oXaLCvMVRbeMeEMQ7ikU/pB5AeTMxp7Yl6Hdg3rYQx9FvtSn5b/pWgchx1EGvNDuVj8Zqz0u+HW5F/XPhxhnpAIUXbojXlsuJropG/6o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562403; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=OyfPLIv6CoMr8kyKBxR+dLvug2cD6tJc7HIr84MLnZ8=; b=lFNj0dIfJuc4X81nV953MTo05Weo2nyr0DNSXcHPee7ioci3bhAwbOCQGSdRnoyq0u01rusfFpMSP3DODpdMhorNk/oXlJEfC4rfI8W4y0Yg8xmSv13qGcmW4kmT5t0smE+meO7iOxyOa7zrOgvbuKR+xugcZHTJxHr0JfmBzMg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768562403246873.9623586411122; Fri, 16 Jan 2026 03:20:03 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghrg-0001JJ-Sn; Fri, 16 Jan 2026 06:19:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghrf-0001HY-Mj for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:19:39 -0500 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 1vghre-0006GH-2f for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:19:39 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-47ee76e8656so22846185e9.0 for ; Fri, 16 Jan 2026 03:19:37 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47f4289b83csm94187775e9.3.2026.01.16.03.19.35 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:19:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562376; x=1769167176; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=OyfPLIv6CoMr8kyKBxR+dLvug2cD6tJc7HIr84MLnZ8=; b=iWyK1zNSc+49yZ6k1gm2W/9Dfd+yyz//e34t6Pn0lmDRQIaE1GHjKL561FuMk+kebN 9lwUAkc6tY34GbKxphSiZLZS+jkzBYNXKhwoG+jnmw/Ef2sgRMGnOD6NQ2AN1dwbzpGu hxuMEw0FFruYSJ5mKbsn6FzhuwndfWblliGrQJpCl2gEOq92HqHqxxF0uE2Cl2H0bT9n iqpv0I+fA2RYVp1Dpf9NslTp/0skzaQ9sqPHXZauXOKaZYN4KRvh/qC4FjWu2NIscbxh T5Cdx6D//hRCccaJWMRmfAh39eWVdZiXNMKs5wW9ZyzEUMzMZu/aAMl4MiFy4T1FmeU4 2XlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562376; x=1769167176; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=OyfPLIv6CoMr8kyKBxR+dLvug2cD6tJc7HIr84MLnZ8=; b=R6khLVbBh24nYYB3sMeifX2P6RtchzEQh3OwK2+5gctScDeCghH39YebrvIF61Sjfc yI6r2jDBs5A5q9dKaZN+3vNUgj6DDcNjCh+xvORiNjTfAQ/ys2t7YviZAu3AEX9VNSqw 4EL0r2ocPZTjPgCljGegQR2DLu9rf/A1iOHzsnhf3kF4nYv/3zTN0nYqgB2O2rk70xdM oOUpYK+aUSuKY7qzEAmg4cgbdETThgrVKqCd8juhnOBeh2NeS0AVF8ueQRjeF1U7WeVm V4da3SHZyYSnBmUyYZRxpI7OWY2gm8nInHY5TGjWni8VRvU+Juxs/4AOmBYKQsIK46Wy dz0w== X-Gm-Message-State: AOJu0YzJ1VkAhqVUvqzvWhtxHrue6sjRK2xwEOVjztmx5rKDbDlfxDne tYCFDWveUVhF4HPZhirtv5OgKKpBeZQVz8tspDfe8kj0DjCoFaS0LK+kv8WLB5URYZkCNxP9c2w 3iJ+tncA= X-Gm-Gg: AY/fxX6uHDoJgClaKLD7iq+7NDQ5pqsdkKuaxQASMpXMHGIX+fmns3XxWxa881k08V5 2Bs3HEp4dObEv3S1cnBmY51aLf+jkCO+79eOKrJdZ3EN8ZYPi/Cba2WDgG7voOelSOAFaOEPtll NjHZIgKLvaVleCGGV0qPA/LEhPFuQ9eiwaBERTInfJVSKevPG+kxdmAxpimZkVC0pH8PVKQ+Xnm kmZxsjN/wnfqV70u4AKtJuHzPBIOyq9aL8VMAuk4+88IsOeo+gTE7c9ZBaynqVCNaOkFKJcTPCa m50SP4EBgIEk+HV004demuWHSZNOu/mIcdM4mJ0GmQNU7bSDo+9Lu99QfqKRJ476omzQz+hKgTn IQUU+flh+lTtJ7d2Q89R6ywyzLnQ3mlJ8dSG/7Tdvt8oGEXBW4hCM+SvQtwb5m0VUCViFQmH75b GU0X7amPCn8bOvqVAkHM/JbtUzaGAsjJp7YLZI0+Cxzt0RYkIck9VCZkniM3tjV47FAwoSN84= X-Received: by 2002:a05:600c:3495:b0:479:1348:c614 with SMTP id 5b1f17b1804b1-4801e34343cmr33901785e9.26.1768562376069; Fri, 16 Jan 2026 03:19:36 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 13/30] accel/hvf: Simplify hvf_log_* Date: Fri, 16 Jan 2026 12:17:50 +0100 Message-ID: <20260116111807.36053-14-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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=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: 1768562404033158500 From: Richard Henderson Rely on the AddressSpace and MemoryRegion structures rather than hvf_slot. Signed-off-by: Richard Henderson Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Akihiko Odaki Message-ID: <20260112103034.65310-7-philmd@linaro.org> --- include/system/hvf_int.h | 3 --- accel/hvf/hvf-all.c | 40 ++++++++++------------------------------ 2 files changed, 10 insertions(+), 33 deletions(-) diff --git a/include/system/hvf_int.h b/include/system/hvf_int.h index 5a57691885f..ee7ab689f45 100644 --- a/include/system/hvf_int.h +++ b/include/system/hvf_int.h @@ -24,9 +24,6 @@ typedef hv_vcpu_t hvf_vcpuid; typedef hv_vcpuid_t hvf_vcpuid; #endif =20 -/* hvf_slot flags */ -#define HVF_SLOT_LOG (1 << 0) - typedef struct hvf_slot { uint64_t start; uint64_t size; diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c index 96ed79108a6..bbb0403d246 100644 --- a/accel/hvf/hvf-all.c +++ b/accel/hvf/hvf-all.c @@ -204,45 +204,24 @@ static void hvf_set_phys_mem(MemoryRegionSection *sec= tion, bool add) } } =20 -static void hvf_set_dirty_tracking(MemoryRegionSection *section, bool on) -{ - hvf_slot *slot; - - slot =3D hvf_find_overlap_slot( - section->offset_within_address_space, - int128_get64(section->size)); - - /* protect region against writes; begin tracking it */ - if (on) { - slot->flags |=3D HVF_SLOT_LOG; - hv_vm_protect((uintptr_t)slot->start, (size_t)slot->size, - HV_MEMORY_READ | HV_MEMORY_EXEC); - /* stop tracking region*/ - } else { - slot->flags &=3D ~HVF_SLOT_LOG; - hv_vm_protect((uintptr_t)slot->start, (size_t)slot->size, - HV_MEMORY_READ | HV_MEMORY_WRITE | HV_MEMORY_EXEC); - } -} - static void hvf_log_start(MemoryListener *listener, MemoryRegionSection *section, int old, int new) { - if (old !=3D 0) { - return; + assert(new !=3D 0); + if (old =3D=3D 0) { + hvf_protect_clean_range(section->offset_within_address_space, + int128_get64(section->size)); } - - hvf_set_dirty_tracking(section, 1); } =20 static void hvf_log_stop(MemoryListener *listener, MemoryRegionSection *section, int old, int new) { - if (new !=3D 0) { - return; + assert(old !=3D 0); + if (new =3D=3D 0) { + hvf_unprotect_dirty_range(section->offset_within_address_space, + int128_get64(section->size)); } - - hvf_set_dirty_tracking(section, 0); } =20 static void hvf_log_sync(MemoryListener *listener, @@ -252,7 +231,8 @@ static void hvf_log_sync(MemoryListener *listener, * sync of dirty pages is handled elsewhere; just make sure we keep * tracking the region. */ - hvf_set_dirty_tracking(section, 1); + hvf_protect_clean_range(section->offset_within_address_space, + int128_get64(section->size)); } =20 static void hvf_region_add(MemoryListener *listener, --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562403; cv=none; d=zohomail.com; s=zohoarc; b=KhwgWEv3oH3idkAcZ8v5VVfcCCJslv3IKq3w+60dLCvWRXQ275CT26rLvC73ggAxd3fI8+roQxxxGRlA0NV5+vYwg6HQiTiUPiLT1muUf+5j/BZqHqzuWkheOg1O+BrIOkegxxtxRhmI6dRpbsV94qWw5eirK5Snhxw8v7J/GaY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562403; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=WfSQMk2tCldH+NAueyqDiyPdeTJe21wGRoHBYtyMmPw=; b=dRfgYPBYN/N7AOZxcsULyse9EMw5qgTjCyMYCnl0mEAMPksKXPD26qTCbtxlX3MC/Goe6Xi6iW6RTGRWbDCo7nONdaxGHPaBsSRN2ArgFD2JLF8CY0+k7Vy4v+Z6RuBiEUtX0kw/VHYYQJfa4U+VT+Hi2/I5b8vseS5Vv0uwxDA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 176856240314012.475405593107439; Fri, 16 Jan 2026 03:20:03 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghrq-0001Yk-2b; Fri, 16 Jan 2026 06:19:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghrl-0001S6-TW for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:19:45 -0500 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 1vghrk-0006Oh-BF for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:19:45 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4801c2fae63so9710585e9.2 for ; Fri, 16 Jan 2026 03:19:43 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4356997e79asm4687171f8f.33.2026.01.16.03.19.41 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:19:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562382; x=1769167182; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=WfSQMk2tCldH+NAueyqDiyPdeTJe21wGRoHBYtyMmPw=; b=PLvqKtKisdvEl8LX4DO3ERyIIvNBiMQFXHVzBgFaLzrmcgZO+82r+9WDCgoY3PYPEn weudgWhW1xyUe81NH2yyhhc+bQ2OOQS/oIZypeHeiiVCzdvdeNGXS9o753aFGYTIcfck vvPjphEh2EHyXYY7+aYEpsGR0EGQ4QmazvrKjI5seLjzqCAWvqDJrz4hyczbnlQ6Nh32 8F3Vw3xTmLW0dm9/YgJf4QpflvnaVa1dAeRcjqbHjLuQX+lvZtO9bR9fXiDWjtaNJPdD xE49z2xuQ4DYSilPreJR6xJg3ORiS+o7utXFRdFVgQZSirRVzrY+NIzhg7IbG2uJWkTM kJxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562382; x=1769167182; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=WfSQMk2tCldH+NAueyqDiyPdeTJe21wGRoHBYtyMmPw=; b=ub2Ljr0IjYCHJXmFR9nK3HDWfSx0knsWLvkIiSvjw1BSOqTuh+/flRIo19YhrnxS3I bS8innV1yjufEQUcGDZ07ICmxwZL38x8YD018UbJ/G9lpDDQ9Wc8vrabnum1qQgem1Ij JTwN0XLHnAQal7eBWcz0pHieN94hABZmzyLv2Zzj2WD6/8DEsNVupiFaGHYC9X7mh2hk YYzQynYOBj9Z3X4poSO1I3NNucLXdyOFG86s43OEnrCh5wBxKXgwZbZncKblkxhfX5gB ZDK1/5AI4l5odktE0RVr3ulwbqQDis7+05AW1Val3Hk9UEMENSsKNaxwINZflEtlis8c ISoQ== X-Gm-Message-State: AOJu0YwT+cA4Z+H/2qcjkg4pIKqlueq2ViAD056MiYfN3Sld/DBAj+VW 9Ye9oNHA96+9xk/HpPk7vLIupN2FnM4hn+KBBJmv8pK4m3DvtLEGGiKSIJHnmxN2eTPdLfCY6ZV g/EDAs1g= X-Gm-Gg: AY/fxX4QQUh5iaLIh8oA4cfO0AwQXGLPaq/BeyoPcI+cgB6wV7Davu/j3qp5sEYUQ0V smBqvXUP8bpAqBIyYX0tHBmzed3WVLdTRkwwFHPZKJovOGN00zv4et4cF6fCaHRPOdti9DXoOhQ kS7XjMaFYue8aj34uUOKG5yHv3I1N+enZ2Kl2jdL67vkX0seEdgyQUco8tkqKqbHAlx9QM3yJzL W3fUysGPTrIB0IyZUpzsjGHyDTEmfXWywfFeUSlJMkMEjUL9yobtk/cWltEFVMMo82JAQqR+JCD zLnQw8X3wrTuBMsI1yMM9irCFVPidhN0rGeMG8bkx8TdyEeRRaIb/JsaRyE/B1iGZ0Z+u4arMIf wObdUYl0Jc6+cgtQ2Ku9DUxJp6mZGnl4oDfUVmP6FLcb1ISn3YLiw7D7SKqrHnGljoMBgSUJxYl RaKghn/W2kyRSycJkLboacv/kvwf0e/51MMToIbkODmERsM4FLVDvs7P1+XDIh X-Received: by 2002:a05:600c:354a:b0:479:3a86:dc1f with SMTP id 5b1f17b1804b1-4801e3503c2mr27264325e9.37.1768562382575; Fri, 16 Jan 2026 03:19:42 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 14/30] accel/hvf: Move hvf_log_sync to hvf_log_clear Date: Fri, 16 Jan 2026 12:17:51 +0100 Message-ID: <20260116111807.36053-15-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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: 1768562404039158501 From: Richard Henderson Right idea, wrong hook. log_sync is called before using dirty bit data (which for hvf is already up-to-date), whereas log_clear is called before cleaning the range. Signed-off-by: Richard Henderson Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Akihiko Odaki Message-ID: <20260112103034.65310-8-philmd@linaro.org> --- accel/hvf/hvf-all.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c index bbb0403d246..3b6b9d6ea6a 100644 --- a/accel/hvf/hvf-all.c +++ b/accel/hvf/hvf-all.c @@ -224,12 +224,13 @@ static void hvf_log_stop(MemoryListener *listener, } } =20 -static void hvf_log_sync(MemoryListener *listener, - MemoryRegionSection *section) +static void hvf_log_clear(MemoryListener *listener, + MemoryRegionSection *section) { /* - * sync of dirty pages is handled elsewhere; just make sure we keep - * tracking the region. + * The dirty page bits within section are being cleared. + * Some number of those pages may have been dirtied and + * the write permission enabled. Reset the range read-only. */ hvf_protect_clean_range(section->offset_within_address_space, int128_get64(section->size)); @@ -254,7 +255,7 @@ static MemoryListener hvf_memory_listener =3D { .region_del =3D hvf_region_del, .log_start =3D hvf_log_start, .log_stop =3D hvf_log_stop, - .log_sync =3D hvf_log_sync, + .log_clear =3D hvf_log_clear, }; =20 static int hvf_accel_init(AccelState *as, MachineState *ms) --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562484; cv=none; d=zohomail.com; s=zohoarc; b=OVEJPsAlgdGasMSMo+KAvAmK441rKTm4y6P3yVFoPPE4KleOh5Xhvf7Bl4twkZIav8FhP95+LvcmL7KjB3PV6rccC7zZdRwjQgQ+Jfk9Ys7j8cMXFcEdWBDElqSlMZUxVfeTYu9wh5FLbCD6ZK4ORxAOTKGM+WNUv93kSDmQa6E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562484; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=aRMKdOegR9TAtg6WXTn5Wxg1PnV20QrVFX34e8Mfs8A=; b=ZGj+Bp46Dh5DB1rhxIs+6/RGpWo5H7ZC3oJmyF48vm4kkSS60EEh8ELR/OkrzhhXicjxlQ4N0OAFfM752l3AzjgDCMBdqD/Ms8rkndTe2/aguwUkvFkAHo8JkxGdFzKQPIP8PfigHWcpE3ZNe2L1UMXIajl4OQX+PmCSXFCEsOE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768562484792757.0878381991561; Fri, 16 Jan 2026 03:21:24 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghsW-0002Aw-7w; Fri, 16 Jan 2026 06:20:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghrt-0001ig-Se for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:19:58 -0500 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 1vghrr-0006Sx-Ax for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:19:52 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-47ee2715254so8954675e9.3 for ; Fri, 16 Jan 2026 03:19:50 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47f429071besm92492975e9.10.2026.01.16.03.19.48 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:19:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562389; x=1769167189; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=aRMKdOegR9TAtg6WXTn5Wxg1PnV20QrVFX34e8Mfs8A=; b=KnqG888pJbfOrrz0fowMwDV4DzdonM1pg/zqsl+LJmR7103+9fJvW+zmq6O5r6lF4n rgyN4DUEwKt134lOkSWuwf0A5KmNlhBLojATBchPlywg1HgX1hT2K6OKGi9bSLfKjtfY qiMmKekFYY+oqvNKUgNun4Mtc0iC3gwPK3TStB3jM2ibQyI0rK8taCenmzh07isemmE8 32xPaW1qolzC1qPkmLc2gg0IN16Tti+yl9VInVNnqw75zsRnPDqNbPOACvHOyXLAL1OJ 2Cpdpk49esUvf55TKpCFliKDQVwUyFcaXyQQxMqqaLpH9DcCam+OJ7HI1u8UuCxiHWqo 1mgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562389; x=1769167189; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=aRMKdOegR9TAtg6WXTn5Wxg1PnV20QrVFX34e8Mfs8A=; b=JAvQqZt3iUcyv88BuSmGP22A6eu+ZloB5IXlmVvfQ5lCSNLFSKKudVR01Sz8yEEeBz lBKvDJNDPpsN0tilDurewtvDJ6WSrNjQCjKijQRlXlc3WQdcl1/Zu7A5/yE8eh3kEJHe ne650ZybLWO/KJ44Ii5a0lWpfPgyuuG5S/JJiBt5oCKuX40Zc1G8CWZCJdtaRPVy0V8I 5YcZDIrJ/uHJuwfbhbYCURufMjYlpeqxw3Qm5tG9PGWCfA8CAYLuSDSS3LdXwmgLBArt Pkmw5riu+kxRhonCU9NugHe5Vwx/VubuCeeZoOGWSiL34/4z5F3dooZ4CfkU+xUmkbbR ft5Q== X-Gm-Message-State: AOJu0Yz37I1HsiPVOZAxQR1xLT3battCejnC8Cqp6Pxspw6C2QsFL0bW VtfzzEGXPfHrb3nkW6HRmtKAFOXSOGQpikymQbkniMjuyIVFbnuyf2Ir3SwefJa6rojN/Pv/rwW YOlqtr/M= X-Gm-Gg: AY/fxX6RMOXluC3/cE1UnY8HS6olotiv51ELm6w2sSbXvpJgBS42n21RfdNJVHOwuLy fj9P9HgnDBPuAIPTStYxnmROgwLMbQ0R0+cKoAfLitNgrfvF8q7hJhSVXt6xBKyKI1g3u6nmkcq H6pNyd82AKdFGo8/tDzDiGvJk+w5oMavkKKvWSISx72piPjIIVwN58ly0Qrl/YdGhwMPuB6vle8 Wi5E/ee7klo3m/HeyfoxfurvuLNXiGDKXan1b2gvsJgk+fwZHiTbJTcpajmFrZQa8cLWMqEKHaC 3xH2S1ua/2r7JWsgLUcr9ldDVhV8aw9ZegaqBoqaqvbOhfGdBMLQBePjprTCrVkuuw5d/2sW305 3KczAQr9QuEJCNj6TdnaPPWETLFfgRX/bempQVXv17ou/FgJ7zWvbIUkFec4Ll761DXe8OjOxAG Kop+R3tBtYSLseZO7mOEqF30YQYDKCmNwoaLoGcwT3QhlGF9lAmbD63I+6oY4Y X-Received: by 2002:a05:600c:1daa:b0:477:7991:5d1e with SMTP id 5b1f17b1804b1-4801e3468f0mr32429545e9.25.1768562389360; Fri, 16 Jan 2026 03:19:49 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 15/30] accel/hvf: Simplify hvf_set_phys_mem Date: Fri, 16 Jan 2026 12:17:52 +0100 Message-ID: <20260116111807.36053-16-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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: 1768562486902158500 From: Richard Henderson All of the complicated parts of updating the address space are handled by address_space_update_topology_pass. Do not create or use hvf_slot structures. Signed-off-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Akihiko Odaki Message-ID: <20260112103034.65310-9-philmd@linaro.org> --- accel/hvf/hvf-all.c | 111 +++++++------------------------------------- 1 file changed, 17 insertions(+), 94 deletions(-) diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c index 3b6b9d6ea6a..dd9ea641ea5 100644 --- a/accel/hvf/hvf-all.c +++ b/accel/hvf/hvf-all.c @@ -87,45 +87,16 @@ void hvf_unprotect_dirty_range(hwaddr addr, size_t size) HV_MEMORY_READ | HV_MEMORY_WRITE | HV_MEMORY_EXEC); } =20 -static int do_hvf_set_memory(hvf_slot *slot, hv_memory_flags_t flags) -{ - struct mac_slot *macslot; - hv_return_t ret; - - macslot =3D &mac_slots[slot->slot_id]; - - if (macslot->present) { - if (macslot->size !=3D slot->size) { - macslot->present =3D 0; - trace_hvf_vm_unmap(macslot->gpa_start, macslot->size); - ret =3D hv_vm_unmap(macslot->gpa_start, macslot->size); - assert_hvf_ok(ret); - } - } - - if (!slot->size) { - return 0; - } - - macslot->present =3D 1; - macslot->gpa_start =3D slot->start; - macslot->size =3D slot->size; - trace_hvf_vm_map(slot->start, slot->size, slot->mem, flags, - flags & HV_MEMORY_READ ? 'R' : '-', - flags & HV_MEMORY_WRITE ? 'W' : '-', - flags & HV_MEMORY_EXEC ? 'X' : '-'); - ret =3D hv_vm_map(slot->mem, slot->start, slot->size, flags); - assert_hvf_ok(ret); - return 0; -} - static void hvf_set_phys_mem(MemoryRegionSection *section, bool add) { - hvf_slot *mem; MemoryRegion *area =3D section->mr; bool writable =3D !area->readonly && !area->rom_device; hv_memory_flags_t flags; uint64_t page_size =3D qemu_real_host_page_size(); + uint64_t gpa =3D section->offset_within_address_space; + uint64_t size =3D int128_get64(section->size); + hv_return_t ret; + void *mem; =20 if (!memory_region_is_ram(area)) { if (writable) { @@ -139,69 +110,28 @@ static void hvf_set_phys_mem(MemoryRegionSection *sec= tion, bool add) } } =20 - if (!QEMU_IS_ALIGNED(int128_get64(section->size), page_size) || - !QEMU_IS_ALIGNED(section->offset_within_address_space, page_size))= { + if (!QEMU_IS_ALIGNED(size, page_size) || + !QEMU_IS_ALIGNED(gpa, page_size)) { /* Not page aligned, so we can not map as RAM */ add =3D false; } =20 - mem =3D hvf_find_overlap_slot( - section->offset_within_address_space, - int128_get64(section->size)); - - if (mem && add) { - if (mem->size =3D=3D int128_get64(section->size) && - mem->start =3D=3D section->offset_within_address_space && - mem->mem =3D=3D (memory_region_get_ram_ptr(area) + - section->offset_within_region)) { - return; /* Same region was attempted to register, go away. */ - } - } - - /* Region needs to be reset. set the size to 0 and remap it. */ - if (mem) { - mem->size =3D 0; - if (do_hvf_set_memory(mem, 0)) { - error_report("Failed to reset overlapping slot"); - abort(); - } - } - if (!add) { + trace_hvf_vm_unmap(gpa, size); + ret =3D hv_vm_unmap(gpa, size); + assert_hvf_ok(ret); return; } =20 - if (area->readonly || - (!memory_region_is_ram(area) && memory_region_is_romd(area))) { - flags =3D HV_MEMORY_READ | HV_MEMORY_EXEC; - } else { - flags =3D HV_MEMORY_READ | HV_MEMORY_WRITE | HV_MEMORY_EXEC; - } + flags =3D HV_MEMORY_READ | HV_MEMORY_EXEC | (writable ? HV_MEMORY_WRIT= E : 0); + mem =3D memory_region_get_ram_ptr(area) + section->offset_within_regio= n; =20 - /* Now make a new slot. */ - int x; - - for (x =3D 0; x < hvf_state->num_slots; ++x) { - mem =3D &hvf_state->slots[x]; - if (!mem->size) { - break; - } - } - - if (x =3D=3D hvf_state->num_slots) { - error_report("No free slots"); - abort(); - } - - mem->size =3D int128_get64(section->size); - mem->mem =3D memory_region_get_ram_ptr(area) + section->offset_within_= region; - mem->start =3D section->offset_within_address_space; - mem->region =3D area; - - if (do_hvf_set_memory(mem, flags)) { - error_report("Error registering new memory slot"); - abort(); - } + trace_hvf_vm_map(gpa, size, mem, flags, + flags & HV_MEMORY_READ ? 'R' : '-', + flags & HV_MEMORY_WRITE ? 'W' : '-', + flags & HV_MEMORY_EXEC ? 'X' : '-'); + ret =3D hv_vm_map(mem, gpa, size, flags); + assert_hvf_ok(ret); } =20 static void hvf_log_start(MemoryListener *listener, @@ -260,7 +190,6 @@ static MemoryListener hvf_memory_listener =3D { =20 static int hvf_accel_init(AccelState *as, MachineState *ms) { - int x; hv_return_t ret; HVFState *s =3D HVF_STATE(as); int pa_range =3D 36; @@ -281,12 +210,6 @@ static int hvf_accel_init(AccelState *as, MachineState= *ms) } assert_hvf_ok(ret); =20 - s->num_slots =3D ARRAY_SIZE(s->slots); - for (x =3D 0; x < s->num_slots; ++x) { - s->slots[x].size =3D 0; - s->slots[x].slot_id =3D x; - } - QTAILQ_INIT(&s->hvf_sw_breakpoints); =20 hvf_state =3D s; --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562497; cv=none; d=zohomail.com; s=zohoarc; b=PF4PZSuxbG5zVtZjjt/9ckYbby9+98TOliH/cbb6+Sfj/Lc2MVOtDVAwp3SGdMSlAxbPwZ7rAAIz4OVHDa01YbY/D8AFGJCxFctapSnpTMCuKrlhdJkC5VCp2PbSwoS5CF09e3aL54EjdQ+YxRNYz68kMhunlFxRPzu5vUbnKP4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562497; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=6M8GN4jcvnEKDk7kfeY+4HZK5PQay3DeaiQ4uNbj1FU=; b=F0G0ZECUKhejbXxndjmBAmD8829wQ/ZewHJdJwtOP8asTpuUr1NqD4v1n3IbCKRHg9GzfCtSTQJ5hYwn0WbxwH+3LyfSQokT8NzCyb/4AMtkcSAunqc6L317bGM/IQpZwRffCP3ElMzEk9vxp6KNpIGMnK1lqIzw/B0H7IcKzy4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768562497142677.778273235137; Fri, 16 Jan 2026 03:21:37 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghsl-0002dW-2Z; Fri, 16 Jan 2026 06:20:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghs1-0001r2-VR for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:20:07 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vghrz-0006Vi-U3 for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:20:01 -0500 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-432d28870ddso1019465f8f.3 for ; Fri, 16 Jan 2026 03:19:57 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4356992c6f2sm4755786f8f.19.2026.01.16.03.19.55 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:19:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562396; x=1769167196; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=6M8GN4jcvnEKDk7kfeY+4HZK5PQay3DeaiQ4uNbj1FU=; b=sWH3RDC4GcaWpAsADzUWlg5WbsxpvwNg+Jkm6mDApA+XS75Eawfkr/+/+eP7bbEnk5 cLxNUUhJZ2q5dJL6qxIuqLh9UimduviSvVj9EouYKiUmaXIKOxZ61Nv79d6uIJSBjsLm Kqu5X8FYkyLvid9+GORS13y5bQpxdcg9W9aikc0+fZqWUuxfmXejfXuzAWbof7w+0Juw KdZ1C/I4WZO7y27oA3gukbN6exZfrBb9SZJ9Qi73gXLflTJ+rPqQULzHsW/tphjohpBx +SRhLxv4rN4tFVAYf1rf2U2EDPIP3EYJZ0zbGPFJttoSeIcSN5R2QNvZ1X0TdxTc/QMk N7wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562396; x=1769167196; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=6M8GN4jcvnEKDk7kfeY+4HZK5PQay3DeaiQ4uNbj1FU=; b=Xya/exIaoiHi1wyOTC68AuxW2MlTqueIDvOHJ6DwtASASLpYCqS7/klGpXaJShbBF2 Mv6acYzhbqZVkueZ2sz157/C9ISjQjLDlSpBPCFpIXpdidxp/w1Hym4xyJHMXBESTo8k jHVgJDQUipicIktS06Yeunrb0DXt48mUwf+TI99RpOlpwilB8flLDbRj8pWIDrAMYQTv g+0WJMXZY8KO494FikkBpu5cSl1C/FH+4u1JprpgYGVdxH6sC1k2eUZd/RMTvFziIj5A 4X1BKXMNuov29QeWbqos9muNB0tLcIyeiqx1LW1hkb/iWX/mqcHI63IlenkBUyndWW/w O/yQ== X-Gm-Message-State: AOJu0YyDYjRJ3HcM8c+E0H6/64ztHIJWCVRXio+ETNcZHzDpe+7NjAao j2Ijc5ZEbDXdNc9VLSNcCqOjFLmlBJ1JEMOB5n+W8hfAuBhwkiKVGmnK261ixDRMBoQywYOokK6 xH09bs3U= X-Gm-Gg: AY/fxX4jk2Bo6Pa8oaTymUtJggRoCK41yn38EfhunWP1VDhc4n2Sr9jllwdJpHqJy2l 7J1+JeoBpSVDNgPj/Miz1AI4CbB/+B5T0k7M0nRxu+mJziLEjxZCZMtj+0wFEDu5eQ4lVY37Giz HWQNdw30Ui4PRnhEhCf/6XsGyK4lq5X9u40PZLw/RCFISgL5pjuvPZT0/Axs46hLBN2dsu61fuR vpIVQY/pC7sMLRfvM6xkKVZaGciUU+RsHFp9l/d+VB6mRn8FSNiYgLSgweEJN/MnxkNbjz+Xj8s iulCH/bTkoUhqKsHnDrJissAjLbwUxzgT20mi4ZPJ9M8mhpgSLQ2TvgCaWDSsYdBmFm2IMqNrqb lilDAn+ACV83DDMQ1CDnqQF+IR7swMxYKqG+WE7n8SZ+rLyAfxq3m+Su+XbWXkRFhjDSgwkxhwM Ineftj+ctAgwrMuTniJ6zemXWEMPCrYqfVEojPz3xiD0OgXlxWAumtaCKR//gMqM6gA2XyGDE= X-Received: by 2002:a5d:67d0:0:b0:432:852d:5276 with SMTP id ffacd0b85a97d-435699787a4mr2494819f8f.12.1768562396044; Fri, 16 Jan 2026 03:19:56 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 16/30] accel/hvf: Drop hvf_slot and hvf_find_overlap_slot Date: Fri, 16 Jan 2026 12:17:53 +0100 Message-ID: <20260116111807.36053-17-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philmd@linaro.org; helo=mail-wr1-x432.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: 1768562498964158500 From: Richard Henderson These are now unused. Signed-off-by: Richard Henderson Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Akihiko Odaki Message-ID: <20260112103034.65310-10-philmd@linaro.org> --- include/system/hvf_int.h | 13 ------------- accel/hvf/hvf-accel-ops.c | 14 -------------- 2 files changed, 27 deletions(-) diff --git a/include/system/hvf_int.h b/include/system/hvf_int.h index ee7ab689f45..d842d4b2b99 100644 --- a/include/system/hvf_int.h +++ b/include/system/hvf_int.h @@ -24,15 +24,6 @@ typedef hv_vcpu_t hvf_vcpuid; typedef hv_vcpuid_t hvf_vcpuid; #endif =20 -typedef struct hvf_slot { - uint64_t start; - uint64_t size; - uint8_t *mem; - int slot_id; - uint32_t flags; - MemoryRegion *region; -} hvf_slot; - typedef struct hvf_vcpu_caps { uint64_t vmx_cap_pinbased; uint64_t vmx_cap_procbased; @@ -45,9 +36,6 @@ typedef struct hvf_vcpu_caps { struct HVFState { AccelState parent_obj; =20 - hvf_slot slots[32]; - int num_slots; - hvf_vcpu_caps *hvf_caps; uint64_t vtimer_offset; QTAILQ_HEAD(, hvf_sw_breakpoint) hvf_sw_breakpoints; @@ -70,7 +58,6 @@ void assert_hvf_ok_impl(hv_return_t ret, const char *file= , unsigned int line, const char *hvf_return_string(hv_return_t ret); int hvf_arch_init(void); hv_return_t hvf_arch_vm_create(MachineState *ms, uint32_t pa_range); -hvf_slot *hvf_find_overlap_slot(uint64_t, uint64_t); void hvf_kick_vcpu_thread(CPUState *cpu); =20 /* Must be called by the owning thread */ diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c index e4c62522e10..d931412975c 100644 --- a/accel/hvf/hvf-accel-ops.c +++ b/accel/hvf/hvf-accel-ops.c @@ -64,20 +64,6 @@ HVFState *hvf_state; =20 /* Memory slots */ =20 -hvf_slot *hvf_find_overlap_slot(uint64_t start, uint64_t size) -{ - hvf_slot *slot; - int x; - for (x =3D 0; x < hvf_state->num_slots; ++x) { - slot =3D &hvf_state->slots[x]; - if (slot->size && start < (slot->start + slot->size) && - (start + size) > slot->start) { - return slot; - } - } - return NULL; -} - static void do_hvf_cpu_synchronize_state(CPUState *cpu, run_on_cpu_data ar= g) { if (!cpu->vcpu_dirty) { --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562481; cv=none; d=zohomail.com; s=zohoarc; b=NAVZJwLOWJCxTQhIfEvqBRQmDjXNzwcXT/L/Z/t1p1Y2Nyyec2J26J04LH/sEek5vXrufm/5/6R2+u+XW2DRmFzRbudVvm1MWWGuScz/x1QT8FnnFbFa14hw8g2KHt2L27WWZAgXaScKF+hMPVKIQAQKZ5Ur/2Qdl3JMHZ4LvbY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562481; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=f7vtYZjTZIbM1emS2SExissy1xMjac0XjSqy3auA5as=; b=M1wXhDEJcl/IZR2bhgipNnms/h6d4N7Ci2iwpRWeOvPub6ZAr+oMy3WGByLMyR4slC2x/knjcA0s+an+Wx+F+ZOTLtAuBlOAop4bs2Z09e2w5lacpp3JPyRf011vzlmu8dFpa1EpgRBIUaHqb8duGtJ+WCAWGsR7tv37pxw+7Ao= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768562481506549.4268458029785; Fri, 16 Jan 2026 03:21:21 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghsl-0002ec-4h; Fri, 16 Jan 2026 06:20:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghs6-0001yz-7K for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:20:09 -0500 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 1vghs4-0006ZA-P1 for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:20:05 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-47fedb7c68dso12977095e9.2 for ; Fri, 16 Jan 2026 03:20:04 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47f428acd0csm93501945e9.6.2026.01.16.03.20.01 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:20:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562403; x=1769167203; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=f7vtYZjTZIbM1emS2SExissy1xMjac0XjSqy3auA5as=; b=BuP2e8XU2h3zy30Fzj4Vt2+NN9a6BqCXZ7GtUzp/k+HBfSxBjWDvEHgUDTWYFSXlDz sR0RVKx9yQl5rSPubA8XAg0VSWofXIP4Jvpm0yV6MdBayvnL8RyfjcTjEK2Mru7q8U+4 L08b1uZKmUxo4cnrev8LDzeqb06BeJL8nxQ7UcIFvLlNhpBpmO5YHad7RebK6ECf1KQq SZtoU3KW/vWngJlPYMwAEpjdtoMHIOm7ln9wwg0QrC81sSClYU6e4rFI2rabf4rdOLuh 7IPJFfa004RVQDS82SbidWzWDJK0U4gDsae52xRwfzhJAe4Y/Y6xNbpke8khdmLlqcN3 xyrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562403; x=1769167203; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=f7vtYZjTZIbM1emS2SExissy1xMjac0XjSqy3auA5as=; b=TdjuR4JEk6jOQqvvaPt3xBsewhZ7o0aaLqK+LwM4pHQZh9stDHUlXa/z7g/6rJX53g sffMdVB0HZ3UgkyButqe7fdlaMdj6V7YUFxvJvHCblmqGqlyKrssSQBO18/zUPGZsBJd tSSHTQ88rHx0BevIhVQuL0LHqZdhMqk5AXAfX4kU56fXxbHyYNArBUjY1K6WOK5mddlI vxqMahGPSw2CoZBIseNN2Gq9wcRDsw0C86bAFq2SAdz/T8+Hp9wCewAw3SS1a9BgZZgF BMobL81ij2W/45EGAxNbYKo+LpCy8BRpA2ZtFkUSfxXkJIvr2TlyJgb22qjaDRMf+dNj sMVA== X-Gm-Message-State: AOJu0YxZ177Y4DfgVoAgvKdy9Hfe8Kcvv5/VB7iA6rzmMxqSSr7a8L6N 7yKDBlyArzZ0Ff8gEi9tyygvcbgpOR+KIN5ZNigpDhce9lhxJ3te1GCYibD14JXchZjVnQn2OZ+ F5ERmJhQ= X-Gm-Gg: AY/fxX7YMwD96GYMfB5JmOdiZbZ1DMB6/gy7MnqnuqzoWrp3/TjzBQUdq7LyJJPvuNS 4ZckeUa/5VQHcjYkcvZKyacc4FSMcNk2QuW0BmcZmjjdgbKQV+ByhhcHcK3SobirladPkkdqt3q k3d+yiPgv8DIlcn6jLou7G+dBdw2w7JK3DDkpQUG5qUB8PRDa4L22uibV95Au6ep6cBqa35RI+o Da4XBw9JFRKbo3kc9Rn/FZUcW96a48ox13XMoKqiSoMrasnWARMm/GYN1fualFgSbITxK2oMDOq 3e4uVSP53hiwIFTxm9Pvl8KXXra27Ceum0TuFALxy+LOmsquG67NLSnlXBqPnEVrXLlYwD4It2b 8hfUn9Xk5X77VjqgB0eyt3ngtCMWWrMTdQgdTBiFVOz48OFGpsm+Hc2DcCikIkObOfghc+PNlKe Ml9ZamxDtM2ScJoMfLTvR5KyLj4WKrE/JcvA1H9+askywoTK9eLcxzu3HPRiSMXNyX7TkylrE= X-Received: by 2002:a05:600c:1f12:b0:47e:e9c9:23bc with SMTP id 5b1f17b1804b1-4801e34ce8emr29339485e9.30.1768562403023; Fri, 16 Jan 2026 03:20:03 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 17/30] accel/hvf: Remove mac_slots Date: Fri, 16 Jan 2026 12:17:54 +0100 Message-ID: <20260116111807.36053-18-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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=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: 1768562482806158500 From: Richard Henderson This data structure is no longer used. Signed-off-by: Richard Henderson Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Akihiko Odaki Message-ID: <20260112103034.65310-11-philmd@linaro.org> --- accel/hvf/hvf-all.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c index dd9ea641ea5..0fbe27dfa26 100644 --- a/accel/hvf/hvf-all.c +++ b/accel/hvf/hvf-all.c @@ -22,15 +22,6 @@ =20 bool hvf_allowed; =20 -struct mac_slot { - int present; - uint64_t size; - uint64_t gpa_start; - uint64_t gva; -}; - -struct mac_slot mac_slots[32]; - const char *hvf_return_string(hv_return_t ret) { switch (ret) { --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562533; cv=none; d=zohomail.com; s=zohoarc; b=FryaPsH0Gzr7ozsjCHSvUV4v01QOCdFvTn00yYmKckwFJd8MJTAvQwm1I3I29dnTRfbMcyIQFfDr3OMI7x8CH3Mavax3GdlHNYcVEltPXbHT3H8zMVBluhNdkcsN8GIWQKecXheAFJJUYDlaIYaNBhtdCG/2xDeFReIssBA4Zzo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562533; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=Jlctq5vKHYkeEDFI7uZ1fcRMPddROuIgRymQ+Ihf0vE=; b=bgsaa7uLSWVXZkDw6Q3snnLUzORlbX4ZVfLqqg5/XrVi60bzgZ9gGGW5AlPP8Jg9rFQpQkAbK2EXSCuOlwFVo4VnB+X1jXJE4wC39fPM1OIQmIp2dIXO/724cojOkO+LpWZVHs7BEU+AXvQw88yb2JMQXmzlrUFQvovTEdSfCY8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768562533034956.8377563861312; Fri, 16 Jan 2026 03:22:13 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghss-00037I-Ct; Fri, 16 Jan 2026 06:20:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghsL-0002DS-5Z for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:20:26 -0500 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 1vghsE-0006rP-VW for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:20:18 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4801d98cf39so6299185e9.1 for ; Fri, 16 Jan 2026 03:20:11 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4801fe67780sm13781605e9.16.2026.01.16.03.20.09 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:20:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562410; x=1769167210; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Jlctq5vKHYkeEDFI7uZ1fcRMPddROuIgRymQ+Ihf0vE=; b=oaydNj8mDedOdtlViYk2w4PEdgPBPd+OP3Owsms+/bpV1DB5Ek5TAsSrGtHlQltNTO 0vm9BWzTdnQ62wy/4d8/k8+QdCDgyYxCyFKfmaAaEnFCUaQF9hNs+33RLF30oEAuyuWW wsII68Y3l0Rtu3xleYoGK2bR4CBYct88BHf8X5OBpxcOU2uF/Ed29oGVKwK3y/C+18xm 8n+4I8LmzKP5feDGCsghkiBoG+Dxi+7LMx32dH1PFvMQp0G+yZI8hQCDBvlmh+qqDhfx g90UDYqjhAY5L5vltlQL/hhPnIKCouUdxQgzv/4pqsAOeYuGZIvTNA5vczsbWlnZx5X1 IxZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562410; x=1769167210; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Jlctq5vKHYkeEDFI7uZ1fcRMPddROuIgRymQ+Ihf0vE=; b=wGFrXzh2NH3DJvsVgQUGleFJ4CuPFhZqdXiEcqY4KQSHqYZNP6Di5OV57CTTRCzL/a sLBFM2ujRnAb7h4ARvUOt2z6EnofR43+SQARcPVE8T/QYKHvqgL1odSdEdafoFN8PxXd XU2wXTcRqZMKqsNQs0yVj0tSuaGPPVP2dJdnqY0Yamqb2oF3ryUsrsGAyYikct8utH1T gems5zBNw0adW4xLOrXOXGqqEcKM+TvgYCclOVXrZOqA/nh5MFYN3ARArwxjJTL0h+Va CyHhfPeLGPU3WnYwxFz7L72YWmTXfdgTNNo/Crq2kVT1zi6yGZnAri4+QmEmAuKp8URa mJKw== X-Gm-Message-State: AOJu0YzDhJOKt1yTm6q2cVl0V6T9N/77YpOwgTYzmE25LXc7EGKsCW8k D3nlKX3alFYhjjilDz1lwVjJNHQK9BsKeyWKtp66/FQTZcdhOxlqSGR51vu5jk4o5KQR2O9dvkb R959RlME= X-Gm-Gg: AY/fxX66hiiaNPNBuO5qnEb2SJEcgB5ZO8KXm5ZWAggbTxBaoifb+gmdZq5IZCFd6zg S7qVb7/tZyQ3MhogWSkufpjI8FbnvJWimykf5I3AxOGHnUrNWZ3rRLE+jVQGBNphROk4rVYIErw AvwxyMC76HXdPYZ+QaggZTmUnxmctK1ULkdMPk2m/ibwKNfxAu3zf4Ui+/I4uWB4ENdfd3A2Fp4 W19/BdpVlio8qN8o8PUXnxZTlEkbj60Qfc4yKP0FVsn5jiJ0GR4pg7ukrDv8eylHhnsJwabUUGU Bnk49drzGyn6ykD4MMWc+T1ve4w9469cbcDn+9VNNXAIyFMu3kvwzsj7c+oQMn4PtpzUdZR5FWX ljxAmKvZb5RYalF3JdFyBE/2ECuoGh/mj87JTp6DXHjVUWJC0B1ZisGKBt587y14ia6JquEucMc tHLre85ni7dzrsXmrkhrV0JDS0y1Bz/1L5zDHGxETaf/X3OQynH6BUf+Aya1+2 X-Received: by 2002:a05:600c:4fc6:b0:47a:7fd0:9f01 with SMTP id 5b1f17b1804b1-4801eacf142mr29859025e9.16.1768562410413; Fri, 16 Jan 2026 03:20:10 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 18/30] target/arm/hvf: Implement dirty page tracking Date: Fri, 16 Jan 2026 12:17:55 +0100 Message-ID: <20260116111807.36053-19-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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: 1768562535154158500 From: Richard Henderson Notice writes to pages which are being monitored. Mark the page dirty, re-enable writes, and retry the instruction without emulation. Assert the fault is not from a stage1 page table walk. Signed-off-by: Richard Henderson Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Akihiko Odaki Message-ID: <20260112103034.65310-12-philmd@linaro.org> --- target/arm/hvf/hvf.c | 52 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 9 deletions(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index fa26f63a61a..af28b8e8825 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1869,9 +1869,10 @@ static int hvf_handle_exception(CPUState *cpu, hv_vc= pu_exit_exception_t *excp) uint32_t srt =3D (syndrome >> 16) & 0x1f; uint32_t cm =3D (syndrome >> 8) & 0x1; uint64_t val =3D 0; + uint64_t ipa =3D excp->physical_address; + AddressSpace *as =3D cpu_get_address_space(cpu, ARMASIdx_NS); =20 - trace_hvf_data_abort(excp->virtual_address, - excp->physical_address, isv, + trace_hvf_data_abort(excp->virtual_address, ipa, isv, iswrite, s1ptw, len, srt); =20 if (cm) { @@ -1880,23 +1881,56 @@ static int hvf_handle_exception(CPUState *cpu, hv_v= cpu_exit_exception_t *excp) break; } =20 + /* Handle dirty page logging for ram. */ + if (iswrite) { + hwaddr xlat; + MemoryRegion *mr =3D address_space_translate(as, ipa, &xlat, + NULL, true, + MEMTXATTRS_UNSPECIF= IED); + if (memory_region_is_ram(mr)) { + uintptr_t page_size =3D qemu_real_host_page_size(); + intptr_t page_mask =3D -(intptr_t)page_size; + uint64_t ipa_page =3D ipa & page_mask; + + /* TODO: Inject exception to the guest. */ + assert(!mr->readonly); + + if (memory_region_get_dirty_log_mask(mr)) { + memory_region_set_dirty(mr, ipa_page + xlat, page_size= ); + hvf_unprotect_dirty_range(ipa_page, page_size); + } + + /* Retry with page writes enabled. */ + break; + } + } + + /* + * TODO: If s1ptw, this is an error in the guest os page tables. + * Inject the exception into the guest. + */ + assert(!s1ptw); + + /* + * TODO: ISV will be 0 for SIMD or SVE accesses. + * Inject the exception into the guest. + */ assert(isv); =20 + /* + * Emulate MMIO. + * TODO: Inject faults for errors. + */ if (iswrite) { val =3D hvf_get_reg(cpu, srt); - address_space_write(&address_space_memory, - excp->physical_address, - MEMTXATTRS_UNSPECIFIED, &val, len); + address_space_write(as, ipa, MEMTXATTRS_UNSPECIFIED, &val, len= ); } else { - address_space_read(&address_space_memory, - excp->physical_address, - MEMTXATTRS_UNSPECIFIED, &val, len); + address_space_read(as, ipa, MEMTXATTRS_UNSPECIFIED, &val, len); if (sse) { val =3D sextract64(val, 0, len * 8); } hvf_set_reg(cpu, srt, val); } - advance_pc =3D true; break; } --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562462; cv=none; d=zohomail.com; s=zohoarc; b=ZRa4aXG4mNOhRtECIsKrAyzn7nALFYf0aWLM9M7t/7LFKGdYWoL+kYSbcpceXIbMKDyHQmUGjmNzQ6EX42pB4AKzNvTlz2+r97+R7ODgZrAjcROeVpEgk17oBsHR59BXKn5VJCZ8een45graMb0GBtQeh0d8Q/z3vLn8SoJtB5s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562462; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=JqMxH9hKNHMGm8UIIiwO7kE7bFNqCnI01NlYSC3IPms=; b=eh15pBk8e+tLWVQRUfh94nSvez2OXUZAfN1dhngw1BALOmzq9lbOv0BQ2KuzJX5QL/VoPTbOiwQawaQSdEW2O5G8Iw2lOBdmSj11Kq+5VPtW54UuXIjjs8HhVC2GjTv2pWUCD3DwgYbt9/SCJ3cdaQfNy0uVU+0hNL+HZVK72jU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768562462685270.079403056518; Fri, 16 Jan 2026 03:21:02 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghsq-00035m-Oo; Fri, 16 Jan 2026 06:20:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghsO-0002G0-IB for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:20:30 -0500 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 1vghsL-0006uv-Gp for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:20:22 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4801c731d0aso9357545e9.1 for ; Fri, 16 Jan 2026 03:20:18 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4801e879542sm39864435e9.4.2026.01.16.03.20.16 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:20:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562417; x=1769167217; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=JqMxH9hKNHMGm8UIIiwO7kE7bFNqCnI01NlYSC3IPms=; b=J/4eknik2DeKuTrBDwBdOs3uhoQt9CS8dz+0xRJffV0PwdOj4UuPF/bOklJchEM5zi 7GzEXSkRBzYCWCjy7vMoNV7f/mpf4iaHSNvikzY5xARysB5o+jlRg0duX0kQ9FDJD+a+ 1s3jdAvIb3ocQ084Uff+dp3lewDwevd1Nov8WM242riFhcTn9xj92TbR2J9qTcq+WcaJ eVoXXzHE38YGv4Vg0YhsPtz8uy0GlYn3Fk9TvekU9Vk0S5W5o9gYsx94DJKBMUFpqd/J ArY17pR5eyMTe18RTfT+PaM8aKlzCpDgDbjD2RZ1ABXCuy7hc8jYd4oFm0bOQBNyhl0k tlgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562417; x=1769167217; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=JqMxH9hKNHMGm8UIIiwO7kE7bFNqCnI01NlYSC3IPms=; b=s843EvqC9RntROuqKV5PxE2rvDUtgOjo2DmOVK47OQBmV6Bi4BD7wxt1lOjyAMa7kA RM6IalckvFFIrHxmPcwbX5023C0NkWkOjkkCI1zMYxkczjl18PsW6qPWuATkz7MiTtw+ wg/5aIcF7bBIvARBSlWLx/oBiy38UliVuvGQ/nswKavZsuRsG1KtTbTq59UvXhDwiqzE SFPlNLklb7pSed383QoQs4PR4vpwjPOyXycZErs3jhK/5NVV63mqbZbJPLmc5zziX79f jJq2MnMt234pbsuNMsMIa84O/ZQvw1RyN7KJ/871Q8VCxD0sZrTbAclU4eazrgHii5p+ kJUg== X-Gm-Message-State: AOJu0YwYIrICNoYu39trwyoeXQ3xtHQnCL7DOK/0pOpOvR6uiVnDBjoZ IdibKwgR2UuEBUdF1lzwBzoMS08vaWbGk3zHNzO0dVAzZ5U1o81EaYkhyjN7uHf5ooUMgHcYBX4 tVuLk1HI= X-Gm-Gg: AY/fxX4ZxwJjfCGABBBvxZlPlYuKDQUhHrfH9f2ynmczi3y7C/NsHxL6+beiSd77BPo FF/OFdFBPNf4eCtZLrNRrxHj8jxk9VsXTfm4uocyeK9gIDAkB8g3gxJqENO9FNzDsqEc9p7ZOm0 YeU1jWt/q2qRmnVK9R/dNNXnprXB72v4ny27gtYxtZhcfiY2gcZGrdc6k6Ub9RLBCKWXy+XlXnb jFC+eifVzHxu4aFGvZQ/1kcfpSmBVFQF/4oPJovWb0MXA1M9UZC+FwzE2uEfUgd2EZ1DYv3efBW Q+kEvz9YQIJExJfS5bJ/OQeUiUSvwzeOAgR0LvvUU+3kPaG6OMam4TYm1HwmO10OGtP0ExGX6gO efpLBpm8oEWXHXsS2KRB9ZhrnndzcKOhEzzn4fykVyO4/EOhdmMucanRo6g7YWCbXpnIYL1UsXy EdEj1S3PLDn7VGVC0NviRaWe4VEOpbj6yoVtHHtokUsqJ8WNOT6CSmFHyUD+kY X-Received: by 2002:a05:600c:3554:b0:47a:8154:33e3 with SMTP id 5b1f17b1804b1-4801e34cac0mr28814305e9.28.1768562417052; Fri, 16 Jan 2026 03:20:17 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 19/30] accel/hvf: Skip WFI if CPU has work to do Date: Fri, 16 Jan 2026 12:17:56 +0100 Message-ID: <20260116111807.36053-20-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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: 1768562464769158500 Avoid sleeping vCPU thread for any pending work, not just IRQs. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Reviewed-by: Akihiko Odaki Message-ID: <20260112103034.65310-13-philmd@linaro.org> --- target/arm/hvf/hvf.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index af28b8e8825..d74703a3d55 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1737,8 +1737,11 @@ static void hvf_wfi(CPUState *cpu) uint64_t nanos; uint32_t cntfrq; =20 - if (cpu_test_interrupt(cpu, CPU_INTERRUPT_HARD | CPU_INTERRUPT_FIQ)) { - /* Interrupt pending, no need to wait */ + if (cpu_has_work(cpu)) { + /* + * Don't bother to go into our "low power state" if + * we would just wake up immediately. + */ return; } =20 --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562597; cv=none; d=zohomail.com; s=zohoarc; b=bwUY7LwFqoV1rH3YyXWFlix28ehAR0crAFqRD3+kEz1a9P19EcdbdEIeTNew+BRDnU6+Nd+QW6xKYxVHBtCJPNmqHCyPIRfTCymIulC8NX+Rs8mQCNW82VJrQZJ+zU3rwN18uFN1l9ci5J1ridB2jPscYzDgL3VxEN1RZ44xo5o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562597; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=LNVsTjccttAt6SRISjcT5M1xP1Gq1uF1qJFqk6djuLU=; b=SoTw5DDTzTCZfOEi7/0XpffDbRWMyiXYYrV+OAjeyhDDPHB/8aDOEybQo1Ub8c/m4EkHQK1r6frXwV3M2/8esFcZh/QG4IsQAgjn+TNZB0OMsPsHhpj9I9eJdpOPUNNZmwCDQh6bjlPoQfM5uCn0jbePKpSj8Y1QXlP5OjVy/QI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768562597400936.7605638170221; Fri, 16 Jan 2026 03:23:17 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghst-0003QX-3s; Fri, 16 Jan 2026 06:20:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghsU-0002Kp-Ay for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:20:34 -0500 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 1vghsQ-0006xY-3S for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:20:28 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-47d59da3d81so12785825e9.0 for ; Fri, 16 Jan 2026 03:20:25 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4801e8c0475sm46881045e9.10.2026.01.16.03.20.22 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:20:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562424; x=1769167224; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=LNVsTjccttAt6SRISjcT5M1xP1Gq1uF1qJFqk6djuLU=; b=LhtAFG0Zh5xF0LoFqC0dX8+h15b2HL8o52IgbZZKh+8irXabLC7IwmbyyVHH9ID95H irH350uqoaZOOhLmyTsjpv7Am/ybjxMbpSgkOcAXDHa8rGbp/AsI/xSjL6My8/fUrsu5 4sI5yfZHteufSxc6tOmG1LWeWNwz1BMGm5kOn///nxJut43NvwKvx3zbMSDmLSO+yYYz Wkedwv4kEzulDOzsbN46pSkZUlW4qYVJJumHg0zdRIgpPQ4CcrzBulU4/76A0oevoWN/ XtXWDTjLHFLEqng5tgyhWfEPuVCdqJdjj0Hg+5mVFzsOK1Xyahyk9LJGVW5MFY/HUyIc qpJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562424; x=1769167224; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=LNVsTjccttAt6SRISjcT5M1xP1Gq1uF1qJFqk6djuLU=; b=lomB4ZfVjcggTUQdm+t2YIxm8+YT1JCW2SkoxQt5BAOHQV/DMYQhTqQE04Jf/AAwhw aJvVrYKnb3tef5HmuGJI2AeC4ZZaq4i7PnzbGzBF6GyNuLDZJWlaD91JYVcHy+67ilvm W5r8sJbjFvYUG+iVy+ic7cmEo6Yrh63DIsw3cwM8sHOm2VbIuS0Kq0CLyfhi86dUk7R9 Xc/L9s4R0o4ZXhs4vDLN2U/+zRrHt/+xM9uteuuVq2w3uMuPOOA5ETpoqilcJRIKVXwb uVDPBFUyEawufSQ6eZc5fasBlLt6lB/Gd/fJnThNc+SqQT7ElIUX+Jfx9WlKIxeAkbWe 9XgA== X-Gm-Message-State: AOJu0YxhhAeVaVBHR/ss/5vcRUcYIQA73AWgtEH2RCn5pg042x2uThLu RTlYfilwB8JVjepryfVtOtX1TUoNVPqvUtodK/28lvqHJFTxnA9b+eI97zC61OUtABuItalVOx5 a/VQ0pjQ= X-Gm-Gg: AY/fxX74hZxWr+t1/HYj7rS80U1I7qVxoBXW+V1ei17PYSOqduICVNAIOYMP2RyJuIm C+/TWTdYcuBL6zZkXe4RiCF62S8YSbYrEuqwloCIaZW/nAoTJCsmLVxjIYInmpBhm8QAGtmYvHw wrenYsxXRgaPY0olGmINyp1pvUoAj1qmZzNSm1+CmA/28CWwjkWJ01n9GIXPFrCZ4rVVQa0anql THCPuGSfjyclh80gbFACrpLIvNEZ5LBSXOQdjou29/WzaGiZJVFAf3DHaRjwpC1epuHHedyrRnH M3F03AmmalphWLSQpzpwRpIbE3JDsA+q4fwMTdmrmlgB5r1pUuU96HvW8KtfHHbksQ3Jp9fWSyl 9p2Ji9oh5u7tOCbZ8XNgWT8LPZl9i426xMOo9jIadV8/nGpTz/nay7i+goKEecTYvi3I3+eFPRH XZTHr4tU5T/+sPKvE3lR+LNF5+wbHUYYOMQiE3QtWLQkZXWs0mXYChBio0TJbYjekhnkKwWOE= X-Received: by 2002:a05:600c:5545:b0:47e:e051:79ee with SMTP id 5b1f17b1804b1-47f4289ac05mr44975895e9.3.1768562423583; Fri, 16 Jan 2026 03:20:23 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 20/30] accel/hvf: Implement WFI without using pselect() Date: Fri, 16 Jan 2026 12:17:57 +0100 Message-ID: <20260116111807.36053-21-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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: 1768562599505158500 Return to the main loop where we'll be waken again. This avoid a tricky race with signals introduced in commit 219c101fa7f ("Add HVF WFI handler"). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Akihiko Odaki Message-ID: <20260112103034.65310-14-philmd@linaro.org> --- include/system/hvf_int.h | 1 - accel/hvf/hvf-accel-ops.c | 2 -- target/arm/hvf/hvf.c | 74 +++------------------------------------ 3 files changed, 5 insertions(+), 72 deletions(-) diff --git a/include/system/hvf_int.h b/include/system/hvf_int.h index d842d4b2b99..c8e407a1463 100644 --- a/include/system/hvf_int.h +++ b/include/system/hvf_int.h @@ -47,7 +47,6 @@ struct AccelCPUState { #ifdef __aarch64__ hv_vcpu_exit_t *exit; bool vtimer_masked; - sigset_t unblock_ipi_mask; bool guest_debug_enabled; #endif }; diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c index d931412975c..ffcfe9663b5 100644 --- a/accel/hvf/hvf-accel-ops.c +++ b/accel/hvf/hvf-accel-ops.c @@ -135,8 +135,6 @@ static int hvf_init_vcpu(CPUState *cpu) sigaction(SIG_IPI, &sigact, NULL); =20 #ifdef __aarch64__ - pthread_sigmask(SIG_BLOCK, NULL, &cpu->accel->unblock_ipi_mask); - sigdelset(&cpu->accel->unblock_ipi_mask, SIG_IPI); cpu->accel->guest_debug_enabled =3D false; =20 r =3D hv_vcpu_create(&cpu->accel->fd, diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index d74703a3d55..b936098d257 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -301,7 +301,7 @@ void hvf_arm_init_debug(void) #define TMR_CTL_IMASK (1 << 1) #define TMR_CTL_ISTATUS (1 << 2) =20 -static void hvf_wfi(CPUState *cpu); +static int hvf_wfi(CPUState *cpu); =20 static uint32_t chosen_ipa_bit_size; =20 @@ -1703,81 +1703,17 @@ static uint64_t hvf_vtimer_val_raw(void) return mach_absolute_time() - hvf_state->vtimer_offset; } =20 -static uint64_t hvf_vtimer_val(void) +static int hvf_wfi(CPUState *cpu) { - if (!runstate_is_running()) { - /* VM is paused, the vtimer value is in vtimer.vtimer_val */ - return vtimer.vtimer_val; - } - - return hvf_vtimer_val_raw(); -} - -static void hvf_wait_for_ipi(CPUState *cpu, struct timespec *ts) -{ - /* - * Use pselect to sleep so that other threads can IPI us while we're - * sleeping. - */ - qatomic_set_mb(&cpu->thread_kicked, false); - bql_unlock(); - pselect(0, 0, 0, 0, ts, &cpu->accel->unblock_ipi_mask); - bql_lock(); -} - -static void hvf_wfi(CPUState *cpu) -{ - ARMCPU *arm_cpu =3D ARM_CPU(cpu); - struct timespec ts; - hv_return_t r; - uint64_t ctl; - uint64_t cval; - int64_t ticks_to_sleep; - uint64_t seconds; - uint64_t nanos; - uint32_t cntfrq; - if (cpu_has_work(cpu)) { /* * Don't bother to go into our "low power state" if * we would just wake up immediately. */ - return; + return 0; } =20 - r =3D hv_vcpu_get_sys_reg(cpu->accel->fd, HV_SYS_REG_CNTV_CTL_EL0, &ct= l); - assert_hvf_ok(r); - - if (!(ctl & 1) || (ctl & 2)) { - /* Timer disabled or masked, just wait for an IPI. */ - hvf_wait_for_ipi(cpu, NULL); - return; - } - - r =3D hv_vcpu_get_sys_reg(cpu->accel->fd, HV_SYS_REG_CNTV_CVAL_EL0, &c= val); - assert_hvf_ok(r); - - ticks_to_sleep =3D cval - hvf_vtimer_val(); - if (ticks_to_sleep < 0) { - return; - } - - cntfrq =3D gt_cntfrq_period_ns(arm_cpu); - seconds =3D muldiv64(ticks_to_sleep, cntfrq, NANOSECONDS_PER_SECOND); - ticks_to_sleep -=3D muldiv64(seconds, NANOSECONDS_PER_SECOND, cntfrq); - nanos =3D ticks_to_sleep * cntfrq; - - /* - * Don't sleep for less than the time a context switch would take, - * so that we can satisfy fast timer requests on the same CPU. - * Measurements on M1 show the sweet spot to be ~2ms. - */ - if (!seconds && nanos < (2 * SCALE_MS)) { - return; - } - - ts =3D (struct timespec) { seconds, nanos }; - hvf_wait_for_ipi(cpu, &ts); + return EXCP_HLT; } =20 /* Must be called by the owning thread */ @@ -1967,7 +1903,7 @@ static int hvf_handle_exception(CPUState *cpu, hv_vcp= u_exit_exception_t *excp) case EC_WFX_TRAP: advance_pc =3D true; if (!(syndrome & WFX_IS_WFE)) { - hvf_wfi(cpu); + ret =3D hvf_wfi(cpu); } break; case EC_AA64_HVC: --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562599; cv=none; d=zohomail.com; s=zohoarc; b=O5CDIwpACldEiWu2VE/sG3Mg2oflr2WqeIUwD7vI24Xn55GRb9K+D70vQO1L7pItkPXR7nCK5Za35robw3AE0Jd5d0IWwGx4mIn8CLTLuaFyImACPeBbY0YI0rrVngcsqYl1M17ocMhb1Et55BV5EdLPzw4g2VeUHoemY548NTE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562599; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=1AA9O3Oy1LC1a26OjN56Jb2vi15fizc8/aL/r4eofks=; b=DA5QfsVUtqCTNXIXcs5SmrhZaTJ806Rm9IcQyoQpidxobTSFkTkFgkgZObMtj8PBLa7OqzCMgMlhSBgbdqsbQceSArtN5DAIAbQV4K6s5+qZ8oCgHQJPUPKTQKgxAGa723PhlHqyEixdVeRxFjkNoQIX8aD2df/KX5uW5GN+41o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768562599646114.54037000185144; Fri, 16 Jan 2026 03:23:19 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghst-0003Qa-5b; Fri, 16 Jan 2026 06:20:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghsb-0002Oi-Pa for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:20:42 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vghsW-000742-3W for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:20:33 -0500 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-42fbc305882so1000663f8f.0 for ; Fri, 16 Jan 2026 03:20:31 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43569921facsm4594048f8f.5.2026.01.16.03.20.29 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:20:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562430; x=1769167230; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=1AA9O3Oy1LC1a26OjN56Jb2vi15fizc8/aL/r4eofks=; b=ZuyWhUOyguuLZOStiae4K8GaF44VpLBKPinx27dub8Tjv8s+nFsOvtI9dkMUopuDkZ cjBNxpmUlIjWPPu7oepkcLRTy7ZvrHWuYjCm3AK7qeLVtFWtTMpo8ZNjbDpmQq/zcyqM 06PwFnV7cd1xUX8PmeZB4Bl9ayDerZ9wRHVpa3IZ6kl++a7++in+Xyab6Or9cqjIWN/B RL6qy+FYxch5Z0TYd/OJXwy7cWHk0uBAnhwxKtaoXiBBSAaOSIT5AC+DkNyBOvV99B+T Vq8i1Miot4l1TeqAWzpvAUYGPQhX/285GxtnGMdC6Gzig+PYdD3zJu3qw7gTSJfNV0Br 6SsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562430; x=1769167230; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=1AA9O3Oy1LC1a26OjN56Jb2vi15fizc8/aL/r4eofks=; b=UJPjENBprRsz4xo0VzhMmICwhqDpKclpsZR6gQusWZ4plyeAvfL4PMXU3kcrXEiUg2 pOOTEl1x5csaitMjeqhiEpSkYZY/uMOotOoM8Kma503V29dhH9E+jL4Q7MRDSSHyMTMO BMWw50NfgvIehrufC0DliwCb6otsqpPzyoMqh/zkTC0+68iaybn7f8lWZnG/lfjssvPB Re1d51Vz7sgYbh99mD9pOlnAksoEoDds9cpgO+bwgIEneRlRGPyBZsp5M9VGYLd2Jduf wC5c9NV3eZcnTlqnHvo8RT8sYsNF1ZBJ5Ph2DYnAgmnP+y+eoMYi7irtFpW4bwnnjfvr RV5A== X-Gm-Message-State: AOJu0YwbtKIF1cKRvPHjws6E98O1wBZc68EHRjMpt9rKQjyaRVm0lTPR uf+1wd9GjNHishO3gJ2vOihDz+4wK3AhKlOoBg7Su8H2FnQRmBYaHPx3dSydPhQ7CUvYS2lrzUJ PQsWC/jc= X-Gm-Gg: AY/fxX6Q1n5dXXflXRNJLBf3yro03vF8Q50/2mTmMUkmNCZcCAB4utMLEyOyoLnv2Ki IjfztpAeTJn00bSqTa90RhOGNkYdMk8Sqns+JHucCt2lEyb4HtXvSAdXbyvqFcD/B59fhhDyx46 aLg2/pzkg7l+nZzp/QpdhZMIbTnDXfYc/spynt5oHrtrIahWP8WIFGrOAL4fgZ7sLBPAOysqmxX PdvGNLGFw1OZGX98XZYGc1wl9Glgl+KFoPneYttMvYktu2qKfO/+f0YB01Yys8cUblovULM0gU+ 4A70MIYMhMJy+ZeSsPsRwk9O0huEJR8ZTZVnINaC6R6R7Sm9d9Uci+MNny5K7+fFawtOsP8fY0+ tGR4aqh1jwGtVa9lVVkNaMIMLRXzhCiyYNGbVB6u5W0y6/2r1jOogBegU5Nu6BxZL8WfP9lWwmp olX7coEhDbpZ8Qk1KG0i8CaylOW/kCMh7YCC/ldE6/nnMJwlKaTNkq+eD9R9tH X-Received: by 2002:a05:6000:428a:b0:430:f23f:4bc5 with SMTP id ffacd0b85a97d-43569bc77a2mr3109141f8f.45.1768562430221; Fri, 16 Jan 2026 03:20:30 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 21/30] accel/hvf: Have PSCI CPU_SUSPEND halt the vCPU Date: Fri, 16 Jan 2026 12:17:58 +0100 Message-ID: <20260116111807.36053-22-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.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: 1768562601481158500 Return EXCP_HLT to the main loop. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Akihiko Odaki Message-ID: <20260112103034.65310-15-philmd@linaro.org> --- target/arm/hvf/hvf.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index b936098d257..718414cc53c 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -301,8 +301,6 @@ void hvf_arm_init_debug(void) #define TMR_CTL_IMASK (1 << 1) #define TMR_CTL_ISTATUS (1 << 2) =20 -static int hvf_wfi(CPUState *cpu); - static uint32_t chosen_ipa_bit_size; =20 typedef struct HVFVTimer { @@ -1008,7 +1006,7 @@ static void hvf_psci_cpu_off(ARMCPU *arm_cpu) * Returns 0 on success * -1 when the PSCI call is unknown, */ -static bool hvf_handle_psci_call(CPUState *cpu) +static bool hvf_handle_psci_call(CPUState *cpu, int *excp_ret) { ARMCPU *arm_cpu =3D ARM_CPU(cpu); CPUARMState *env =3D &arm_cpu->env; @@ -1091,9 +1089,8 @@ static bool hvf_handle_psci_call(CPUState *cpu) ret =3D QEMU_PSCI_RET_INVALID_PARAMS; break; } - /* Powerdown is not supported, we always go into WFI */ env->xregs[0] =3D 0; - hvf_wfi(cpu); + *excp_ret =3D EXCP_HLT; break; case QEMU_PSCI_0_1_FN_MIGRATE: case QEMU_PSCI_0_2_FN_MIGRATE: @@ -1910,7 +1907,7 @@ static int hvf_handle_exception(CPUState *cpu, hv_vcp= u_exit_exception_t *excp) cpu_synchronize_state(cpu); if (arm_cpu->psci_conduit =3D=3D QEMU_PSCI_CONDUIT_HVC) { /* Do NOT advance $pc for HVC */ - if (!hvf_handle_psci_call(cpu)) { + if (!hvf_handle_psci_call(cpu, &ret)) { trace_hvf_unknown_hvc(env->pc, env->xregs[0]); /* SMCCC 1.3 section 5.2 says every unknown SMCCC call ret= urns -1 */ env->xregs[0] =3D -1; @@ -1927,7 +1924,7 @@ static int hvf_handle_exception(CPUState *cpu, hv_vcp= u_exit_exception_t *excp) /* Secure Monitor Call exception, we need to advance $pc */ advance_pc =3D true; =20 - if (!hvf_handle_psci_call(cpu)) { + if (!hvf_handle_psci_call(cpu, &ret)) { trace_hvf_unknown_smc(env->xregs[0]); /* SMCCC 1.3 section 5.2 says every unknown SMCCC call ret= urns -1 */ env->xregs[0] =3D -1; --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562478; cv=none; d=zohomail.com; s=zohoarc; b=RPiCLWwFa2twF99FaPyyewLOz17FkC5JaYcciw9hTs6+IWyatjXpMrtPBrBKnGqf/Akk3oxXC5c2ra82Smn8HSls7z98NMThFRO7+FmWt3mbqRunSDwrWl3S55bhG9liXAJlu2Rry6S3J356RZRrdz6xaAWNybl4Gdb/JoItdyc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562478; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=KstmbcyqBDmNKiirh3lzOKShkET70rsL+d/5h23NuT8=; b=SQrIkPn/W+G1jJ2hMMw7GTYdIyBNA5iBffOaUWXN0QOE4MH5zGhloBYadr4riDz9WhzICjPPGkU+bZJUgo76U5eBkv3Ld96yG+DWcsFFzci2mlON9rsr2xOzz2Ue/Eq2W7za6LWYjEUwyNfdy3Q2qFBpHgsFSMPeIV3CIcYwqec= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768562478127369.64694530523093; Fri, 16 Jan 2026 03:21:18 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghsw-0003kP-7n; Fri, 16 Jan 2026 06:21:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghsf-0002RC-LT for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:20:42 -0500 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vghse-0007CH-3I for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:20:41 -0500 Received: by mail-wm1-x344.google.com with SMTP id 5b1f17b1804b1-47ee3da7447so11391545e9.0 for ; Fri, 16 Jan 2026 03:20:39 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47f42907141sm93961735e9.9.2026.01.16.03.20.36 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:20:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562438; x=1769167238; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=KstmbcyqBDmNKiirh3lzOKShkET70rsL+d/5h23NuT8=; b=YIcCuywZJgD7wA8zsWip5eLD01xdYXKkyY1NwyHqgRNXyWX8x3Dq5EnG57QcLkaUQF hmdrKEOECp30pLdLUF+8d/D00gEW4IG8I2dHfIm1XzEAidIdMNNv6GDiQJ67JYOkSbQN vuF/b2WbNh/Bt4i6uCx8crT2fBG+WMu2/7DG1dKVW7GnN6sHG5DAFNWxatZHS2pkJmdG k+B+AilJSJ4iS18ap3xNLSPsXL0KrjX9RrJIjWjVVdkIEsKL+r5uXoJazP0VMzHL+v6j JMk2L50ASa16dIl+mURUDWtTV5BJBZJnetuSlJKgWrq3MnxvKMDUeELwzrwsvgt8N3P+ t6YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562438; x=1769167238; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=KstmbcyqBDmNKiirh3lzOKShkET70rsL+d/5h23NuT8=; b=Q0sXhB/ZUTYsu01qEUy27DySrgGdXGSOSoi5oYMwKPt0T8FljhuruPGcksYkU/1KiW 7Gi72HHJ7qIeWeAHMCzEpSnxB1qwyjNuRpdZcLyhWB8UxviXhNfaebyEsZ4WLgP6XFB9 uYS++go4mpEOpmW+bB+kwB8RAtXy/9TVPDk3sMWpzUzE4G/DZ1X1mK9RCIZC5RknL8u/ g+xgP8WxORUhR+bmGc0U7Lds+GWkJjkswG+Q7I/fX2sE6soqxCNB5jpIeQ3HAC8SwqSv fcCFjhzu19gygK9K1wimsRhRTCK4/BobrIDO4R2Yfe0C/99mzZf/Jnk8YUwF1gTrlRJI hqyw== X-Gm-Message-State: AOJu0YyRV2ZXuCPaMAoIje7Ko6oTkH8voGTKf45C8kQWb3ts6lPGS8gc xHotXfsHJfcBcS3ONxqDPE6N0dd9GGjc+wLaq9yeOxuVogwJtC64cZ59DFyohiR6rrE7MVIPlXe WEpIw4MVTsQ== X-Gm-Gg: AY/fxX7M9lj+AmuDfQX8jp1qndolITZFW9cxm2nIziKpvrQ0snv/OzTa5e/wiQDLVSi p2xDzCo+QTwryHxF08Hu3iL7fRuFu6wmKoQHWOtXg/pDV0jylEZrCpPlBh0TNpoUMIWKf7Vqhkc Z3vQ7x7yfALdbwwcMdCjvTgN+x8fRqxyIzGRJ41lYJDBhBho/MwFOtKxgz3skHQN1Mr8O3wznl7 lbRns77TC8BOIYe6obtCHlkHPoxLfS/GTFPYmaKrDk01ogQsHOn8nHAJLthMk2wkVeTb2j12RT/ HZ5QU2r+wF7h9zo80kgsowm2Wm87K7octRQ3Ea+aACaMU3BeZuzAD8lZ4CnfoAyCXO8ZAErFyhH spR7yaKbDIrVbECnG1sy7oiGLVgMJFTnGSrusqgaKVTVBHRRaR7y/yAiseF+f6zMn7E6JOU7kVK FW25p2JPqN0thsFhTmn2OG+fSf1thyPRH8pCixtU1283QVL5kKF1qzp9MhYuzPDA/aUhhIsn4= X-Received: by 2002:a05:600c:458c:b0:47d:6856:9bd9 with SMTP id 5b1f17b1804b1-4801e3342bamr23479895e9.23.1768562437787; Fri, 16 Jan 2026 03:20:37 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 22/30] accel: Introduce AccelOpsClass::cpu_target_realize() hook Date: Fri, 16 Jan 2026 12:17:59 +0100 Message-ID: <20260116111807.36053-23-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::344; envelope-from=philmd@linaro.org; helo=mail-wm1-x344.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: 1768562478814158500 Allow accelerators to set vCPU properties before its realization. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Akihiko Odaki Message-ID: <20251103101034.59039-16-philmd@linaro.org> --- include/accel/accel-cpu-ops.h | 1 + accel/accel-common.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/include/accel/accel-cpu-ops.h b/include/accel/accel-cpu-ops.h index 0674764914f..9c07a903ea0 100644 --- a/include/accel/accel-cpu-ops.h +++ b/include/accel/accel-cpu-ops.h @@ -34,6 +34,7 @@ struct AccelOpsClass { /* initialization function called when accel is chosen */ void (*ops_init)(AccelClass *ac); =20 + bool (*cpu_target_realize)(CPUState *cpu, Error **errp); bool (*cpus_are_resettable)(void); void (*cpu_reset_hold)(CPUState *cpu); =20 diff --git a/accel/accel-common.c b/accel/accel-common.c index 850c5ab4b8e..eecb2a292af 100644 --- a/accel/accel-common.c +++ b/accel/accel-common.c @@ -106,6 +106,11 @@ bool accel_cpu_common_realize(CPUState *cpu, Error **e= rrp) if (acc->cpu_common_realize && !acc->cpu_common_realize(cpu, errp)) { return false; } + if (acc->ops + && acc->ops->cpu_target_realize + && !acc->ops->cpu_target_realize(cpu, errp)) { + return false; + } =20 return true; } --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562521; cv=none; d=zohomail.com; s=zohoarc; b=WKooQ854bm3gfJo9gYg3z1qlF34BYWfKJ8+uj3SAxepCunoyqwn6qcKfzBpZd4aWrLY2dD5WS33w8q/eIFi206uXYOR9HKHIDol9uxjwMBv1CImNjucJWvWGvdE30pTawh1BSMTn/Mwdf62ZzVtYAqrLGO5IBxCTAp9npQoEu1c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562521; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=iiZoddP8opHtKuhdgUe6gxbSyVqZgSbFQm+3ARlNvQE=; b=GroyYNcxKSh7uno5pU3+NP5QoXn6jCXAhd3istY/q6G09Je9TP1MiEq03AaBp6GU9s7cq7HdfFGKbjUrVsbVvCR4jFFG8nKSJmG5uSzaZY0StnDQT99xeszb6FNTp8nArE+Qn1xZFqMQ9H87CORnZRGDnHP+rYcuvCpQ+CviXNs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17685625217151010.235001641431; Fri, 16 Jan 2026 03:22:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghsv-0003Sc-1t; Fri, 16 Jan 2026 06:20:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghsm-0002qk-Be for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:20:48 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vghsk-0007FW-JU for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:20:48 -0500 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-432d256c2e6so1508688f8f.3 for ; Fri, 16 Jan 2026 03:20:46 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43569922032sm4687643f8f.8.2026.01.16.03.20.43 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:20:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562445; x=1769167245; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=iiZoddP8opHtKuhdgUe6gxbSyVqZgSbFQm+3ARlNvQE=; b=i9od5EMAnQdER/NpDXDjz0hKkQIgaZm1stmaLYGSLxT6i1Sc7R8m7hkFrxRU0LYXgD nPpvWMm42dBds2YpnYTOvxWR21M/0bO1+IYUAZyKs2sfDMSzpF+fVNSinRHpDvjl1ft9 fhxjhXEojfgohm9H6S34Huhw4a4EmYNIESMRVEtfU2Jw+vaziBHqXFoutRrQypYkhXS1 zO2C97lNpDx3MGfTl0vXzM1dKbSmkUL2NHUDPM0ik1wcxlTrMxaCq11+d0951ANkgfR8 y8zun5ThFfqq1yY3CEZnASy0KFvd+2/O7MBnYaIfSaMf4OdWfyUXf3qWT+cKbo/61hOC dFcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562445; x=1769167245; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=iiZoddP8opHtKuhdgUe6gxbSyVqZgSbFQm+3ARlNvQE=; b=Ooodz50CpGolBsNb6mZHONE8e62Kg8tnpco0WTa3Fu1j+G08BJxcpiu3YnqtUHpKfm DUWJYyna9TBJa5u3lNeWq4ABpx5z6Zq11HM+OqBjqIKSe4dPgWsy0FHG8ZMLUowt22ko GdbqsooqjhTZHoVMVP870yFDCJ6VWDbfjDzvNhfGRcSBsg01Hny3yusemA7jl6y6Fljp Wi/NxDeTVCsLwcPg/Wv40QnaHveP28B3uYXUG1o+FsDhYBvK8dqaO0cuelkJ2tgcLwLP L+leSe6aaqeNVvxVwaivYXv8ThgCVn/idWjOe5Xh9EFHrnlYemfLHGNqLt5FUIHVPuYE fpoA== X-Gm-Message-State: AOJu0YzAILFZq9j8X4e3W8iuxV82sBMHFzAgJ55TKznckjVEZHkg/fG2 WD9K36McAcwPT7j4xyK8hL+1QM8IMVxdOhvWPt+z39/ZObpKBMFoh1+Owk4nMakG2VYsfb8O5ba euUafmiI= X-Gm-Gg: AY/fxX4gdY2fSXmrjGigLWmm9TI2AH4WSsSGjpStxQAyxbVNOzCRfQ6Y2T9nfFh+2Bg I1dwnFL5gCgTUWMudrpjK+okteCwIS+TN+47bAQi1Ok8K/UHX7iDNEi1/WeMcAh/8wo7uS1cd8l BXxjMVRAok11luG3PkC9HVf2NTzeCxC1samX/YKOafytu/zRhvjO7j6XnHTLxo8V8Ph74NlyZAG Acx3+WskB/sxcjWwh//+Ccfw0p5h6qwjdhn/h+g+WD8mkvhuTH2/Kq1O6Mw720JRTX1836PwdLx tvhVU4o7y+3wFPGR5herrB8IGd3DgCswv9yj80E0y7CzZNXfdW0cJpeORfvjERRnJXCr8DrCEOd OnYyyCzwrZ9hyLYkBhiJYRALjw9hagqvVgXRkwdwJCYGC4iAHf2s4Wz8cocDL9TIEar+xC1Fy3m mEOgx0IsGvxw8kOMF1T1DW8clHwK1Jo8PmNbH0Pp4kIzyDO0V+Pyg9Y8NgLYwo X-Received: by 2002:a05:6000:26ce:b0:432:8651:4070 with SMTP id ffacd0b85a97d-4356996f7ffmr3258090f8f.10.1768562444547; Fri, 16 Jan 2026 03:20:44 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 23/30] accel/hvf: Add hvf_arch_cpu_realize() stubs Date: Fri, 16 Jan 2026 12:18:00 +0100 Message-ID: <20260116111807.36053-24-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.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: 1768562523033158500 Implement HVF AccelOpsClass::cpu_target_realize() hook as empty stubs. Target implementations will come separately. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Peter Maydell Reviewed-by: Akihiko Odaki Message-ID: <20260112103034.65310-17-philmd@linaro.org> --- include/system/hvf_int.h | 2 ++ accel/hvf/hvf-accel-ops.c | 2 ++ target/arm/hvf/hvf.c | 5 +++++ target/i386/hvf/hvf.c | 5 +++++ 4 files changed, 14 insertions(+) diff --git a/include/system/hvf_int.h b/include/system/hvf_int.h index c8e407a1463..96790b49386 100644 --- a/include/system/hvf_int.h +++ b/include/system/hvf_int.h @@ -106,4 +106,6 @@ int hvf_update_guest_debug(CPUState *cpu); */ bool hvf_arch_supports_guest_debug(void); =20 +bool hvf_arch_cpu_realize(CPUState *cpu, Error **errp); + #endif diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c index ffcfe9663b5..b74a5779c3d 100644 --- a/accel/hvf/hvf-accel-ops.c +++ b/accel/hvf/hvf-accel-ops.c @@ -356,6 +356,8 @@ static void hvf_accel_ops_class_init(ObjectClass *oc, c= onst void *data) { AccelOpsClass *ops =3D ACCEL_OPS_CLASS(oc); =20 + ops->cpu_target_realize =3D hvf_arch_cpu_realize; + ops->create_vcpu_thread =3D hvf_start_vcpu_thread; ops->kick_vcpu_thread =3D hvf_kick_vcpu_thread; ops->handle_interrupt =3D generic_handle_interrupt; diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 718414cc53c..bf8bed1495d 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -972,6 +972,11 @@ int hvf_arch_init_vcpu(CPUState *cpu) return 0; } =20 +bool hvf_arch_cpu_realize(CPUState *cs, Error **errp) +{ + return true; +} + void hvf_kick_vcpu_thread(CPUState *cpu) { hv_return_t ret; diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 8532e0fcffd..7cfaee389e7 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -370,6 +370,11 @@ int hvf_arch_init_vcpu(CPUState *cpu) return 0; } =20 +bool hvf_arch_cpu_realize(CPUState *cs, Error **errp) +{ + return true; +} + static void hvf_store_events(CPUState *cpu, uint32_t ins_len, uint64_t idt= vec_info) { X86CPU *x86_cpu =3D X86_CPU(cpu); --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562522; cv=none; d=zohomail.com; s=zohoarc; b=Eh1gzcPqQlllAUbjYJCIaDZ4Dl4iZ8IUj9EcV/opBGOdLUeZIjg/8VT5eCDNJNC0YDb0xG+lNqbwTH9fpekAn7KJGIh0CUZxd4/aZe4G4R9pYyH8WGXOAd3JSTVJMaSTTZjWT56/ldlC2DTSYiYES8QaKyA/AfAJ71Q97nQzXXE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562522; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=mdL+wHf2jb8vzNgdW5aXH6N99ClOOaSA46aED8I1stE=; b=hGjWQlzBOGzuCy1IuMqh2NyGd11WfU85yCLYgsG/nRjRNi/+Q5MO/3tN3AdYu6BMK7PB4PkOVbuAZxcWN3QwCQ3reeYflmSS4B+7tPP8jDP/NBZqZWIFvEKl4AA0N3eeVV0itO4q/Cgqw5A6jXbfBduseezr4HsFWeKGSoy0Rgk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768562522487437.0191052247617; Fri, 16 Jan 2026 03:22:02 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghtF-0004Lz-Cm; Fri, 16 Jan 2026 06:21:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghsu-0003Tz-3F for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:20:56 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vghsr-0007Iu-7R for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:20:55 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-432da746749so918499f8f.0 for ; Fri, 16 Jan 2026 03:20:52 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4356999810bsm4699628f8f.40.2026.01.16.03.20.50 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:20:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562451; x=1769167251; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=mdL+wHf2jb8vzNgdW5aXH6N99ClOOaSA46aED8I1stE=; b=x8Y/WCjEyUNBUs19Kv6D5OKEqN2pDsahqw8eW/eoQS3xrLdsCJjdGacg08bCrbwZJq ykxQINHvBKZ0VdTbZrE85U05NjSJRKJShEYh3uroezA6rz6b+sMkHlYjzUIJvGMZUft0 0LBLTwU+HciyqvP9QVUi1PDw5DiJmjdaYMRgrhTUp6taH+T6nuUr7t9synrnmi8Yzf2P buvaoSuBXYwfwGlN7VFXmUaVF4eY6jiZ+57nmLQAJR9rHlduHvvoWguHqgrFzIkmjso/ MIFmsj0VfjX1z1XcKz8BYzAWqNZQcTPp4xLVu4NqYqEwc443Bydez4hOEKNlFiBbO1VU VEhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562451; x=1769167251; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=mdL+wHf2jb8vzNgdW5aXH6N99ClOOaSA46aED8I1stE=; b=Jqy6HvbHQu5uLjWKAH1fU3nYy4g3HQj8rMIQ+ZTSAQP6GXIg7FB7DywIlJJD5tUsfd 1vRkkspEQDVx3VpymlM+UjeZY4yEXeMYHx7Zoadshs8m/kaRL/JIIyNwK0CrGA0NNQYX CNHugCSOqjEYq1FjO+jMZEg3zF5El4p3C5o4DlsM+ZeDPGL/4KEwuw97fvp7oTM6Dvo4 wEgbkjB42Lo4SlL1N0K7Ir6Q+BlHv4FXq8Xsl1Gv5h7eRGZ1b+n0iFjxLCq80hZC7GcJ wHrTsp6XD1inh85jBAL7OvRx/hn27NYnWnePQGIE0d5y/1sLci89/ONUt61eWMmMojUi iOMg== X-Gm-Message-State: AOJu0YzkaPslNcKH259U8wZ6YHCJp13xLljW7OQXJbU+kD1DBQwXNjyL 3/ROlTWExZDGRlfyoxp2brtBm7FVHEomPQuUDGxehxAHUiXm5LYQkHZt0G80heX4d94UDJ3kH41 ToJ4KS0s= X-Gm-Gg: AY/fxX5VJ3dRw+7UT3ItsQAFrVARgL8sQBKFjX01z2lHBF2qirJUabo8ZUTi+ZRjJuy CIupzTirPX0ZSaSj2XOmhYrcTrueCHsJTvbCub5/ulLiKU/lht3HFAriOwpn68Ud5ZnbAAtLx+1 RZxAuOUFGF/7ZlMcZfcd28W9hQnbX24GuAMaNGBj5TOEh/net6+GpICP9l8tdgKMuvVlaiEOtiA 4Gk0hxe/5PjUHjR1YNtWPGIYIvu7p2CmXtIN+EsTwVA2pIsYKueC3ZYiNdBFlQYN6RehCilsXZC wGwXgkcDsgTkVIS/LqwSldd1GBJIaIORDBAxdy0Zf1XVRJj3YBqKXFhG85w6nCCuRwfTnitCOW7 sd/73spPpjf3z3OcNAtM78T0jGt/Le2IYMnxl5nODqQLPYbe/tU5DdCf7ONk+JfU48xQwEzbcmg 2JbwfMwOMD/jUkX+vBqAw3daINiYgFNJabJe1iNBfPAwTB0eKmlIhFChlm5ngc X-Received: by 2002:a05:6000:144a:b0:42f:bab5:953d with SMTP id ffacd0b85a97d-43569bcbc8emr3056582f8f.47.1768562451200; Fri, 16 Jan 2026 03:20:51 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 24/30] target/arm: Create GTimers *after* features finalized / accel realized Date: Fri, 16 Jan 2026 12:18:01 +0100 Message-ID: <20260116111807.36053-25-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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: 1768562523143158500 Call generic (including accelerator) cpu_realize() handlers *before* setting @gt_cntfrq_hz default Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Peter Maydell Reviewed-by: Akihiko Odaki Message-ID: <20251103101034.59039-18-philmd@linaro.org> --- target/arm/cpu.c | 65 ++++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index caf7980b1fc..c1087bf5b92 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1636,26 +1636,6 @@ static void arm_cpu_realizefn(DeviceState *dev, Erro= r **errp) return; } =20 - if (!cpu->gt_cntfrq_hz) { - /* - * 0 means "the board didn't set a value, use the default". (We al= so - * get here for the CONFIG_USER_ONLY case.) - * ARMv8.6 and later CPUs architecturally must use a 1GHz timer; b= efore - * that it was an IMPDEF choice, and QEMU initially picked 62.5MHz, - * which gives a 16ns tick period. - * - * We will use the back-compat value: - * - for QEMU CPU types added before we standardized on 1GHz - * - for versioned machine types with a version of 9.0 or earlier - */ - if (arm_feature(env, ARM_FEATURE_BACKCOMPAT_CNTFRQ) || - cpu->backcompat_cntfrq) { - cpu->gt_cntfrq_hz =3D GTIMER_BACKCOMPAT_HZ; - } else { - cpu->gt_cntfrq_hz =3D GTIMER_DEFAULT_HZ; - } - } - #ifndef CONFIG_USER_ONLY /* The NVIC and M-profile CPU are two halves of a single piece of * hardware; trying to use one without the other is a command line @@ -1702,7 +1682,40 @@ static void arm_cpu_realizefn(DeviceState *dev, Erro= r **errp) return; } } +#endif =20 + cpu_exec_realizefn(cs, &local_err); + if (local_err !=3D NULL) { + error_propagate(errp, local_err); + return; + } + + arm_cpu_finalize_features(cpu, &local_err); + if (local_err !=3D NULL) { + error_propagate(errp, local_err); + return; + } + + if (!cpu->gt_cntfrq_hz) { + /* + * 0 means "the board didn't set a value, use the default". (We al= so + * get here for the CONFIG_USER_ONLY case.) + * ARMv8.6 and later CPUs architecturally must use a 1GHz timer; b= efore + * that it was an IMPDEF choice, and QEMU initially picked 62.5MHz, + * which gives a 16ns tick period. + * + * We will use the back-compat value: + * - for QEMU CPU types added before we standardized on 1GHz + * - for versioned machine types with a version of 9.0 or earlier + */ + if (arm_feature(env, ARM_FEATURE_BACKCOMPAT_CNTFRQ) || + cpu->backcompat_cntfrq) { + cpu->gt_cntfrq_hz =3D GTIMER_BACKCOMPAT_HZ; + } else { + cpu->gt_cntfrq_hz =3D GTIMER_DEFAULT_HZ; + } + } +#ifndef CONFIG_USER_ONLY { uint64_t scale =3D gt_cntfrq_period_ns(cpu); =20 @@ -1723,18 +1736,6 @@ static void arm_cpu_realizefn(DeviceState *dev, Erro= r **errp) } #endif =20 - cpu_exec_realizefn(cs, &local_err); - if (local_err !=3D NULL) { - error_propagate(errp, local_err); - return; - } - - arm_cpu_finalize_features(cpu, &local_err); - if (local_err !=3D NULL) { - error_propagate(errp, local_err); - return; - } - #ifdef CONFIG_USER_ONLY /* * User mode relies on IC IVAU instructions to catch modification of --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562576; cv=none; d=zohomail.com; s=zohoarc; b=kpCKplFu15NpxfTLGw+Y2XtRxzRI+KHnQXfxy29/TPT3unQlz0T9iAj7Gqz8bvEj6aVEV585GKlzFPyV+ZCYoroW6SSAFWcgBe25o7esNAnwa9G8LHFPknfhYHQjA7xY83a8ka/n52qx7PxIAEUZ4f38DMPX7FQkfs2SMv8LR1A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562576; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=jLRYK6we5h/yu2QPNnJNrmjTWkLPDUWx0vKsKYLQdpc=; b=ecBn8jfp0ncuLhH30fX3KUEQJVyf9njFrwB9STtgBWn427aCFNeG7qB+ZQvmEJk6Ecwmy9Qo7R1tg438f16nZ+pObuZ+4YKgYA2Xjdj+rBQNm+xs+PtLtHIrXGyiMC5/76uGldZAmbcgvvqgkvjgYM5wqg5SfdWS28Y4qX8cLLk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768562576492177.33778210807725; Fri, 16 Jan 2026 03:22:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghtM-00053R-1N; Fri, 16 Jan 2026 06:21:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghsz-0003xJ-2M for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:21:02 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vghsx-0007KA-HP for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:21:00 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4801c1ad878so11394395e9.1 for ; Fri, 16 Jan 2026 03:20:59 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4801e879542sm39894845e9.4.2026.01.16.03.20.57 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:20:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562458; x=1769167258; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=jLRYK6we5h/yu2QPNnJNrmjTWkLPDUWx0vKsKYLQdpc=; b=jUd7QIEaqD98ZjvcYtGCO6v88JcnVR0QIhRdQUbeSl5OvVNC5cJyi/fiMjaa4kJrr6 SNEufWPVJXJHtLEyYdauIbzlq5wLbfhio/C1KP7ATTcN7XP1qq/lwO8OO+ToQihv2U1A eKQDAhVMCk/5BlutSMJShYGnOZEn2yjLxHZDdNBwnlSG8I5CuuV7QmawuMppaGCKrMpc qiRkqQcVpftcXQiVKB6Kq0EMBJSPJqlKpXQT0zYfB6dSDEq0sJDlryBoJMwsWSZgSRz9 Zk2PKmbORfsAm1BmXx0bdfLIXp16oqT6TkuToHJ2dMCzR/0+vvOgA3nGWWkEotmYsSfe jU5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562458; x=1769167258; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=jLRYK6we5h/yu2QPNnJNrmjTWkLPDUWx0vKsKYLQdpc=; b=MGvE/BblxPj+kaO5pyWCdLIX/t6Opzk8/39BhA/OmUO3PDIm+ArQteUjIJMGTX5lRV 8G8fy8C0OixLoIpl+rziqn3HtVFHnl5Pq4Bn6zo8e/EBjBSA3Ku+N6Vynh1rFY4zwcrJ FOY8phHtRlluN6TTrzFnafvDYYd04DjKzGLn7ssCExbUGr1LacDsny1iuSsP9DeUqMVh WG3sjSayYJ765b7xXurQ3ahw5LGISPbvV2EhbHmuH0ZGB3kQYpWRKPam4xxLBicZibSF RTpJr/r1TGtnSM2/irKYfKMIB1V4heO57r1sdpfQMpRO+29EeGEESv3JjRQSv1MqCjab QLAQ== X-Gm-Message-State: AOJu0Ywx5PS1bQo2Plt+9zANHF4vD9zcFFg7BLYAGn4Dc2N2xhkWI3Qm qkMgV0GZ7fZ2/CNuSIVm7usJA+TEAsLcEEQDAb+c1miLLhWmK2j3zp0PlYZ6aEZsfv2oePiVhvn 3QVUPplk= X-Gm-Gg: AY/fxX7U5f44QCPAZl8Ik3sOYdC2ils1spe//76WLaOL9myF+4iMYaZJ04gYaCmz3Jm Sywp9RlhHPOdkPxj1PmIFwkDXMdoQklxjgy0DrGyoxaHzC/l43udWV4rruUjDdqT02YRuC/olE+ buleVg2JyyMklPbSxCI1Pxfifer85w3ZShzcxP9OL4UlR1g4GhbYemYbzH+3mpifIrnc/nWDWeh H0zWgP7cE93F8E5VTt+35UjG3rarssVQhV/pmdHjB0rNCI6VO25NLmHXrfnMf+30KyQ0z4aA72z x2fAVRrMACAxeeF1FTkaJu7Sc8mkfvcqI4xGtyrqvXXYckXq4fX9JJYSLhkH8zfB5HJ37X5YTdO K0YMRZkeBLt4mn87oOAuG91LcpRK1VZBlWqyK59A64LqnUTtjpArFLevLqiS94rgHL6r5vCq49j LsE6Ve9uYWf7LSI8Eeub3HyNrnC7qOkTCGHzvmypGnH9K3I8y4giKKTHVxK7Yi X-Received: by 2002:a05:600c:890b:b0:47a:935f:61a0 with SMTP id 5b1f17b1804b1-4801fd3bdbemr20014705e9.0.1768562457825; Fri, 16 Jan 2026 03:20:57 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 25/30] target/arm/hvf: Really set Generic Timer counter frequency Date: Fri, 16 Jan 2026 12:18:02 +0100 Message-ID: <20260116111807.36053-26-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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: 1768562577332158500 Setting ARMCPU::gt_cntfrq_hz in hvf_arch_init_vcpu() is not correct because the timers have already be initialized with the default frequency. Set it earlier in the AccelOpsClass::cpu_target_realize() handler instead, and assert the value is correct when reaching hvf_arch_init_vcpu(). Fixes: a1477da3dde ("hvf: Add Apple Silicon support") Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Akihiko Odaki Message-ID: <20251103101034.59039-19-philmd@linaro.org> --- target/arm/hvf/hvf.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index bf8bed1495d..e4c0d936f1f 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -897,6 +897,13 @@ cleanup: return ret; } =20 +static uint64_t get_cntfrq_el0(void) +{ + uint64_t freq_hz =3D 0; + asm volatile("mrs %0, cntfrq_el0" : "=3Dr"(freq_hz)); + return freq_hz; +} + int hvf_arch_init_vcpu(CPUState *cpu) { ARMCPU *arm_cpu =3D ARM_CPU(cpu); @@ -908,7 +915,9 @@ int hvf_arch_init_vcpu(CPUState *cpu) int i; =20 env->aarch64 =3D true; - asm volatile("mrs %0, cntfrq_el0" : "=3Dr"(arm_cpu->gt_cntfrq_hz)); + + /* system count frequency sanity check */ + assert(arm_cpu->gt_cntfrq_hz =3D=3D get_cntfrq_el0()); =20 /* Allocate enough space for our sysreg sync */ arm_cpu->cpreg_indexes =3D g_renew(uint64_t, arm_cpu->cpreg_indexes, @@ -974,6 +983,15 @@ int hvf_arch_init_vcpu(CPUState *cpu) =20 bool hvf_arch_cpu_realize(CPUState *cs, Error **errp) { + ARMCPU *cpu =3D ARM_CPU(cs); + + /* + * We must set the counter frequency HVF will be using + * early, before arm_cpu_realizefn initializes the timers + * with it. + */ + cpu->gt_cntfrq_hz =3D get_cntfrq_el0(); + return true; } =20 --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562489; cv=none; d=zohomail.com; s=zohoarc; b=AV0JmUzRYsejossINSlDxtGorSGv2gg6k+1RxhW/mHmOs7bCCwQPseImA9ecGIZ/AYFCmoj1p6Nb0IPws/S7B9Cp5hfgnCu68XZI9WiQ3S+IKnoID8hu4ujv3ac1ZXvtqen8ECn9qlGKnCulmILi/gHNvolHkohnQtyJHzdnINg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562489; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=UA5gOsxTA/GrWaYHRcJrMgSSYpRnnrE20/jFtsf2ofc=; b=PfTADkk79HiVP1MsIDvsoGpr+xTQquxzMQRitSxT4wkPaOQsHOduZfG2cZ1FX+hFxMB6M52qjLPDTEzAChplKlZ0b2B8VqYn4QmpfbP2lNl/W7iWqsiVERVYvBpkaCPmkTfbzIDv+n3D6u/i0OiJeNXjD9D6gxQyRIKbczOGQoc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768562489183982.1988236981235; Fri, 16 Jan 2026 03:21:29 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghtG-0004T0-Se; Fri, 16 Jan 2026 06:21:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vght6-00045w-P5 for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:21:11 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vght4-0007LB-Rl for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:21:08 -0500 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-4327555464cso1055524f8f.1 for ; Fri, 16 Jan 2026 03:21:05 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43569926648sm4780071f8f.10.2026.01.16.03.21.03 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:21:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562465; x=1769167265; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=UA5gOsxTA/GrWaYHRcJrMgSSYpRnnrE20/jFtsf2ofc=; b=ghxEN/CZQ0biUv2HT5ggFwFgqUrjn6TZ+NsCTDHDlpR7fuEoKY3g8XCNehOvwCHxiF IA3uRbep4NmiHQF3BdRUl58zoj1sVVYUIBntSBC/q8ToalF1cc+D/ogDmqOghVzsPcCx +s2jnY2hyXfXiV3W+TSPlIA4zfEjY9oNgqtdOYQxrwIz7QgIiFcX21ZcdyMpD3glay9L 4mbNEXIFNnc+3q+drvF/cDGHd/aH6Q4qBYH82Ic51w2UlrYWflmNOt3MN92R3lzkctFB WATUqG6r/dE5gQFzDMtn0ChhcBKhse/gWUWTd39KD15bMppnv70p3SduYD4wfKmXKbL/ Ittg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562465; x=1769167265; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=UA5gOsxTA/GrWaYHRcJrMgSSYpRnnrE20/jFtsf2ofc=; b=wrPuINw7E5r3I+kFqJtHCErWdS0/FLZ05Neh0vy3ipurw1Iv4HamEiJM6xQhIklmTe 3mv+CybgTxGT9KLD5MRqQCAd60wR53Ip8KXzcNKJ5mBxi+++4x6H0sRiz15h5JROE9B+ zTKg81g3/FOQfAkYzWhGdYKbYgZRiGK04orCRALOaGxRBkAaq2SdS9Aaa/Hs/paXQiYR IYdq0jFvtkTLO5nM5TaMWIQo1qSxdPFJ5q7V01k4W5+E3nnzWd7F3YtoLxrGP5s6Fln1 AN8DX+5Jh6W1GJbcUhZPmfVXXvSBOCu3A2U6PVZoPnMgBe+6WRKywWCXxkIFwC1vbNI0 5qbg== X-Gm-Message-State: AOJu0YynqahZU9Ea833aTrLQXpIcm1muWn5dxLF8q87LCgSmFPZkuqfM 3vqU1G9EzY5F3bMCNNwhJjOwe4u0scKQ5ZjS2lUPEGLLcyibSAwG7nwsSS5T4PVMZXa2hDVGbP8 LGZFnqdY= X-Gm-Gg: AY/fxX5rA00QNC5pYLBL+Mq2rjzMI+LqymMGpTXH2RSpodlpq1ke8qJs+nrshQC9gdz P+Q7N44O036Qcn80m87uzuwuWehRja4WQTmSR07JRIKQ2pg6yadlmhAGxM4E8mGDf2kO/pqHkOJ oxqur06nKmzpeD2dgyJM/AWCHqeREO7BhIJKN8j2UdPjvrgtigCvq2+5wFZWiPfgxP3QNIi4Rb1 CRxyHIwmYW8JKlLDPZRLV2nLOhaXf9paLA+IeMYGRtTYArCk/ubAvWR34hxCtMnnX+BvNsHy4l2 pIYUpLU3WJkgpq3ASrF7e6Kth0COEKhddJlVb/q8leJL+n4r8CK1JcBgXpmaV9KyqVTmwEijoHv 8zTvP/Bwj3yVLPXDy+MVjSce/3T9K08dfS08nddiSSIyqUrPrZUU2+GYZLy/gKKX44xBMbzinEB mtc834QhFubYruIqj4vPogMaZnHE38roJdFtwitr3T8duvqdGZgjQQJ7Rl46iHwC3086yDbrk= X-Received: by 2002:a05:6000:288a:b0:42b:55a1:214c with SMTP id ffacd0b85a97d-43569bd341amr2669188f8f.55.1768562464555; Fri, 16 Jan 2026 03:21:04 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 26/30] target/arm: Only allow disabling NEON when using TCG Date: Fri, 16 Jan 2026 12:18:03 +0100 Message-ID: <20260116111807.36053-27-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.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: 1768562490928158500 Only allow disabling NEON when using TCG. This avoids confusing user experience: $ qemu-system-aarch64 -M virt -accel hvf \ -cpu host,neon=3Doff,vfp=3Doff,vfp-d32=3Doff qemu-system-aarch64: AArch64 CPUs must have both VFP and Neon or neither $ qemu-system-aarch64 -M virt -accel hvf \ -cpu host,neon=3Doff,vfp=3Doff,vfp-d32=3Doff qemu-system-aarch64: ARM CPUs must have both VFP-D32 and Neon or neither $ qemu-system-aarch64 -M virt -accel hvf \ -cpu host,neon=3Doff,vfp=3Doff,vfp-d32=3Doff qemu-system-aarch64: can't apply global host-arm-cpu.vfp-d32=3Doff: Prope= rty 'host-arm-cpu.vfp-d32' not found Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Akihiko Odaki Message-ID: <20260112103034.65310-20-philmd@linaro.org> --- target/arm/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index c1087bf5b92..05fa3339b1a 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1460,7 +1460,7 @@ static void arm_cpu_post_init(Object *obj) =20 if (arm_feature(&cpu->env, ARM_FEATURE_NEON)) { cpu->has_neon =3D true; - if (!kvm_enabled()) { + if (tcg_enabled() || qtest_enabled()) { qdev_property_add_static(DEVICE(obj), &arm_cpu_has_neon_proper= ty); } } --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562514; cv=none; d=zohomail.com; s=zohoarc; b=Nrkz1h/1S4h5pLu7wawfI4KWKATSCkR1ksFEW305PmndImoQUxIGeRXEQaYBEnY/gBQvBXyjzMr3mLroTqjKcbAPNZP5f71OSaooSliQqgXR6H1ZQIPlZkHMID94Fd0/4ag2XymLy5aM9QDB6169iSWoL2G4Cfd3MPOD67L6k1k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562514; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=DG6xVSgLd1ecTCM0FB2VlxI6VWJT+wNzYdwEngDQW+4=; b=IIZ6VzV19xOVDkc635ar+0usz14mUOngt7x3pRn0IlRY9jOLoxX5A+2RlH29ISQNLUaUAj5n4SpEHX6vhPLG9sOUHxO+qi9E2g47HK+A3coZuZGrX393/RLGYp/aqKi33FBsAPZpLaxIrvPFRK8xe7ZIYgDvLX1NmpSu+7eM35U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768562514622432.15512065141775; Fri, 16 Jan 2026 03:21:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghtK-0004fW-3N; Fri, 16 Jan 2026 06:21:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghtE-0004E2-2P for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:21:16 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vghtC-0007MJ-3C for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:21:15 -0500 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-47d6a1f08bbso6848255e9.2 for ; Fri, 16 Jan 2026 03:21:12 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4801e8d77besm39553365e9.14.2026.01.16.03.21.10 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:21:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562471; x=1769167271; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=DG6xVSgLd1ecTCM0FB2VlxI6VWJT+wNzYdwEngDQW+4=; b=zwFqse9MdJBjIchZ2WvY0HZdpYcsnX7iO9pgn2U1gCzTB3mFeXk79ozZZ9K+367Ett VLE96NmIPZ4yZQkUt3A1K3jk9uDCF6YjIeDlqHxx9Zlrw2w3yA03PZ332cLTmYWYLkTI fvT9czBpZl6I32h0lBBJOQJuqWtzVYxMeuV+3QAvAIYH2+Yf88vd7iStms5xQ2y6gaaR s1TqhdByVfhfVVgS6oasur3f6Uoj1KdgAWTijLEvH9C53cKX/er6o73nU6SQ5N+qvsTG KdoW3QFRAyZSkr2X1D/PPs4EwicYyVolurbN0ltaajJzojeS3K+mvYwzAFgl/Vq5Qv39 lQRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562471; x=1769167271; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=DG6xVSgLd1ecTCM0FB2VlxI6VWJT+wNzYdwEngDQW+4=; b=B7zp/LalSeoKEWt52d/IMRpB9bNj9I7gtPZbmnIGlS0/YKWTnjpmksHNb/A2mPBMOb rqgy3l90KTqXTfeCUWDKIs4KZStwkUqN2plUE4YYI6WGJUqudtrFZExW2Nuo9+wLiLNN F8c71bE/FLFod4kyQAQRPeuPCICOpuW/12xB9tb/6o2t/m40Hr8fGBEjFHqdmPfsaZUw +DCsq1CBYhrqSvCL7SlKnjqFgtODEZMshcUtAVRyKpR3e2/HxMGsCGEtbclbVdbdy7He ubminZcdEk8hxAdiF/Uc2LSYMTiNNZjFCO1ZOzjt2P42qieOD8DJZIQWViKV1c/7pyU7 VQug== X-Gm-Message-State: AOJu0YzbbTSAbU4AZN74np4NfzSMYyXhUvitC/WgP0t5pibRd1GJj5wD JOK7EPjKfz7alwQjDskdmdcZn/XPOCHcPK3aB5m6+C9hYQdO0wGQpE/0SR3afY4X1gpl3j72iAj 0A5NtHpA= X-Gm-Gg: AY/fxX5QdyIZEZ9Fq3TCdtQujPJUkdri63mZod6PJXRAjmwDuvsJJbFzaLxRGTDflRi fEOr4mC4qqvN0c/Dk/MdMX497GQtCr0WiXF+6ira7dOHMEF2pUH0/f/5nlEFwiQBuT1Zy4n3O/g J8BNlkmkJU+oAvLfN1jjI4MooVSrFuCKvORCbMpAugZ+bU9xokxVAYJUPVmfC99t1cMqt0yK5C/ S1jBP5wuiUw5TWcJRRXIUcdahJaTBsKk1VROuOBedl+tMlK/1uv1sEXjNa0igvw/qFVQgugijct QUk8Hkfj2H5zoq3iP7AGJlaXmTRyyKAhbz4Zrv7ZcKMZ40CqeA4uMeC9g5YVFYgEbJxmg6uTLTg Bfo//E7kk7EgTi71OAs6xAka/l8RoXsyMMzPIveSqRKtCgVmmjXUha25H3LFVeDmm8GpKkBVSdR vqg2g4mc02li+uCg4Id6Fl1B+nwEjTYlNLS9/7bKjcqND47kwD8QrSbJjcdXO/ X-Received: by 2002:a05:600c:8b64:b0:47a:8cce:2940 with SMTP id 5b1f17b1804b1-4801eac0f22mr24726705e9.14.1768562471174; Fri, 16 Jan 2026 03:21:11 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 27/30] hmp-commands-info.hx: Move definition of "info accel" Date: Fri, 16 Jan 2026 12:18:04 +0100 Message-ID: <20260116111807.36053-28-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1768562515100158500 From: Markus Armbruster Commit c10eb740108 (accel/system: Add 'info accel' on human monitor) inserted "info accel" in the middle of "info sync-profile". Move it behind "info sync-profile". Signed-off-by: Markus Armbruster Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20260116005050.376616-2-dave@treblig.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hmp-commands-info.hx | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx index 41674dcbe1e..74c741f80e2 100644 --- a/hmp-commands-info.hx +++ b/hmp-commands-info.hx @@ -267,18 +267,6 @@ ERST .cmd =3D hmp_info_sync_profile, }, =20 - { - .name =3D "accel", - .args_type =3D "", - .params =3D "", - .help =3D "show accelerator statistics", - }, - -SRST - ``info accel`` - Show accelerator statistics. -ERST - SRST ``info sync-profile [-m|-n]`` [*max*] Show synchronization profiling info, up to *max* entries (default: 10), @@ -294,6 +282,18 @@ SRST being coalesced. ERST =20 + { + .name =3D "accel", + .args_type =3D "", + .params =3D "", + .help =3D "show accelerator statistics", + }, + +SRST + ``info accel`` + Show accelerator statistics. +ERST + { .name =3D "kvm", .args_type =3D "", --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562576; cv=none; d=zohomail.com; s=zohoarc; b=fAHeRQ3iAY9tjFkz1FfxzwP7L0o7SjcxTC8dNcP4xtZcKoyYTumFvtMPAklHhFsOSSDVldX5mtIalM82ikauJHJnl7G2BddClRr1C6FQIt7O0kg3GHNPU4dvcZocsPIIYg6Wm8Ek09FVEGIPqCBv5U1PeSJWaFtYgmrpsMvwJcw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562576; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=eHLs8AUi0uIKt/UnDT2O1wmc+fAIIzrx7AQFHa6gfgQ=; b=el3ztrDvvLM5PbnkPVDNBtHmgGnjoHvDkdpgoXBm397YiP6p3YwRlqY1Y0HAyTK1rQRMTgS2XxP+WXq0KIFzSPJGAyB1rjmle/lQHWSG94gzC7SKeKEDxlECh0Kv+J+8GPK7rCBZKQryYdffcLYNQgXAkgCfMYdpmN0QmKo2oXY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768562576343999.4182817736521; Fri, 16 Jan 2026 03:22:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghtM-000580-QO; Fri, 16 Jan 2026 06:21:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghtJ-0004fE-KM for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:21:21 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vghtH-0007Mp-Oy for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:21:21 -0500 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-42fbc305882so1001127f8f.0 for ; Fri, 16 Jan 2026 03:21:19 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4356996cecasm4304496f8f.26.2026.01.16.03.21.17 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:21:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562478; x=1769167278; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=eHLs8AUi0uIKt/UnDT2O1wmc+fAIIzrx7AQFHa6gfgQ=; b=RO83T/FMQmjFaPIlIK90SMGV18bZEIfTzgJsJ6vebo7CCyumRqfBEEFjG4zu6HZaJm pUHSu364a2Tl07jSy7g4wM4G9Q4PcfJqfes+CshBdZL3HbuOKKgipLE0G1Oqhhj2L9xj u4FM9KXhkJxymTorJRCDfVbzNOEWFw05hLUrorjgIQsaqO0dH+O3wLEMNFBeJGFX0HHz Oh17sXDBT+H01Bas1NCXflgVk+afTquFSSwq1s8fu5WoHJphWOYJzPkxDSSy60FYUd5U 24wauaoeHf16YxL2O4RmMrosLlqSgCMLXmQaKXIyDgvwQAx7JDe6pC2MqfwQ6NuIrBNi Om/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562478; x=1769167278; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=eHLs8AUi0uIKt/UnDT2O1wmc+fAIIzrx7AQFHa6gfgQ=; b=KeRuVO7hK4mit25lSb/sd5pKVD1q4qatFG2r/H+T39D+sQD5nvygsysm93jHWjF1JZ StWo4IcZccFE0z+SD31OsbWYmHZzBQKSE0uNfA9Nr6aIO6j20jNwEZdnUY9FzwkjfvX7 t2PsQ3B5VCacfqh7/esmqKzvs2FjelRgwstUtX76hEpaTOCikzsuVAbugHdff2TJ4Nlc vsqf9aihwWpWwTrax2Q3grmgErtiEgvV3Gti9aSx7v0ee1mDYPUGh/z8NFDcIxOrTxoM FKc2MNab1bV97N2wmLnzGUKnQaTj9p+XAkUVVHcPZitEKsRdj/Lhz5NU2cVcixrQPHVL ISdA== X-Gm-Message-State: AOJu0YypoP39IsqpEK6IFt5PvLIggyNtrQEAmFOEJlhTZrYwl6i7uCET TAkdNH9/tSCdawnnP9lW3HcsW1cSXt7Hdqx724J6uKfGfAp7NwdyFpGxLWyzfCzGR/pEEdVsQY1 Vm2wXt+U= X-Gm-Gg: AY/fxX7kllukvbgMi8GYSAxLzONBTZBBdaJm4eFAzbkegCz5MQYrBSFHdOTalEdGCAl rBnc9UQRnuz+hCGwapuv4s4JfF5U+JDzEPLQ8UXgJJxD3gaBSVI1ec112m/7HSYPmm9SMgLLiox r1WSOembWBqx67uPIXYPIJ8MkT79GLVsdx0aTVZaXCO9+7Q5fXwns10q2trUTXzcHa78HovGtHq LBF9H+Z8JDD2PqLsQcsN41rzWEahNpz0nlzQjpFZh8Z+WJ14wARQIdHtkmLogC61NBw94M/84b0 ApHRn7xGQp1V766htZvL599NDSfg517jjJcOQpxhXcjGTIJEStxfhljNBRh23yMcsnA9VVk/gfb KETdrLkJhhfkthrj/5ExVdkADkqFr+R7AY8Ozojpl/U67hglvUzJjyrc2swE44Onnxwq7C7V5Kj OsfOk6ArfqFupJeLUBxk5WBESN0+tRGE7EhiwWeRxuqQcW9RhYnZeZ+oXd3cEe X-Received: by 2002:a05:6000:1845:b0:432:c0e6:cfcd with SMTP id ffacd0b85a97d-4356998af3emr3176524f8f.22.1768562477904; Fri, 16 Jan 2026 03:21:17 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 28/30] accel/nvmm: Fix 'cpu' typo in nvmm_init_vcpu() Date: Fri, 16 Jan 2026 12:18:05 +0100 Message-ID: <20260116111807.36053-29-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.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: 1768562577326158500 Fix typo to avoid the following build failure: target/i386/nvmm/nvmm-all.c: In function 'nvmm_init_vcpu': target/i386/nvmm/nvmm-all.c:988:9: error: 'AccelCPUState' has no member n= amed 'vcpu_dirty' 988 | qcpu->vcpu_dirty =3D true; | ^~ Cc: qemu-stable@nongnu.org Reported-by: Thomas Huth Fixes: 2098164a6be ("accel/nvmm: Replace @dirty field by generic CPUState::= vcpu_dirty field") Signed-off-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Thomas Huth Reviewed-by: Pierrick Bouvier Tested-by: Pierrick Bouvier Message-ID: <20260113203924.81560-1-philmd@linaro.org> --- target/i386/nvmm/nvmm-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/nvmm/nvmm-all.c b/target/i386/nvmm/nvmm-all.c index b9bd9ed985a..f808828d492 100644 --- a/target/i386/nvmm/nvmm-all.c +++ b/target/i386/nvmm/nvmm-all.c @@ -985,7 +985,7 @@ nvmm_init_vcpu(CPUState *cpu) } } =20 - qcpu->vcpu_dirty =3D true; + cpu->vcpu_dirty =3D true; cpu->accel =3D qcpu; =20 return 0; --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562584; cv=none; d=zohomail.com; s=zohoarc; b=jmsjScKat4ZONv0nH4ubOGsRfFbAsg1MXQ2nC45utMHBWMZMH/BaYpOG8OqN4Xhi8zfPUDaCbMa7I81NIDVnzlm/BEj+yr2lECSEbiBc1EmIpMmsF3b9+J7Hv5IF9J0J73qnB3nSSla52Pnr53D9wQFsIERxIxZW6B+J9gI5AVA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562584; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=AJ2C+J8W/PdiTCId1bKgsQdGDEMoeG3PAJYMq0CzxlY=; b=AUxUO0InU3RKTWW1rNEM47WFF4DmQcvy5PyxpP+tpnifl7gji4nJfC1Ny3tDUntb+h8X6Nlnb1nz/eS6i95U8/V+2jrPVe36Gbx9k5Zh18nLKpgABDr0jSeIahkb+wlvzd2JKxwl0KoP/imuNjd023Zz++Kk6xuQxbuWR23YjRw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768562584107579.320544755741; Fri, 16 Jan 2026 03:23:04 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghtR-0005un-Vo; Fri, 16 Jan 2026 06:21:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghtP-0005k5-VS for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:21:28 -0500 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 1vghtO-0007N7-94 for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:21:27 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-480142406b3so8870255e9.1 for ; Fri, 16 Jan 2026 03:21:25 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43569926648sm4781082f8f.10.2026.01.16.03.21.23 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:21:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562484; x=1769167284; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=AJ2C+J8W/PdiTCId1bKgsQdGDEMoeG3PAJYMq0CzxlY=; b=SBTe1RPYssJanDDyMgFnwKabv/SclOjIh6968RSajgRnGb+0xause2ulDkUEt+qUoa 0ED3yYxYanLrtcbHwUv6tX5s//Q9rr/RksEV9R4+JOxJqJp1wLvhXOdCr3cblsufXnJ0 OWchZ6ezBh0OJNkLQA2L2pwxVDWQUq/BrmyjV6FKXGNx5kdaHvMuCfWacqTRw4D+uDzX BYmab5KY/kLavA4XEsfwQ9tqfeGKMvacXRIFOeN92oy3fAhc36NaSIu6R8yZkemMuli5 Hm0535pHjMLH9b//b2Z34qkQVSka4paKMYC0UunuRjEKJQ5SYQ72pgUTA5YPIFLwuyU1 mbcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562484; x=1769167284; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=AJ2C+J8W/PdiTCId1bKgsQdGDEMoeG3PAJYMq0CzxlY=; b=VK7xSPLncecDh16IQsZkEWAkPw+0jwsdJCvGz7hyFtyJAepqF0w1srilz4iRAzb0zG x67YJoYc10oe6zsU6qWQ+SpMweculwE+HvkiKMXPo/uLC6TCT13ioCGJbm10uyf/7YuH 4J2LAl9M/QqL4CzqUkviHIgeNuQRIMTAgiTE07GHJDV2x9GbsJ/U/qOBrIzYp8DhT1MH w47ihunuxxmsssA5zKhuL+8hxGLqCPMiTRBX+32vJpS1ZMUCuvE36lLbf4Lc1cM3EAj6 yij9SI48tEh01rfw4ODlnyvelG+XOEPUXSqrL1ybw7grytmHtgxG696xckV/vBnwm3Eo liZA== X-Gm-Message-State: AOJu0YxXcnnRlwrzsrX7JvME7JzgNj8hsoUxh24eX7YdgTsPRPejh32N vQS56TDBH2K5MGRkexh7L99fTej7LEMLsf0qE0EqhmI1Bv6QVRv+mvY/FaW1xsvHvlumc0TwIpo oGwOnAAM= X-Gm-Gg: AY/fxX68voSg+GxDFD1GEqwOletFpe8LSl+wbrBO7eMEKob73rFshOV9VutDWjN7l+P j821kUameCbLL8HWnaz0G/jcLD04OHnSuhcPMU68qNriBVTxRB6Lg7/36I+jeGbbeAmYcw6Ooke jlykFFLQ4r5tWw/NcYI///nSxnzIbXf0L4j5EXODKMd2hrmqcx5D+3in/ZI80VjVMqNJEXGzIVY MzdCksS7ITzPmoHJw1wkKKM/dH/a6Z80DOGBuAHZVw4Hogljr///Ta6dmfabgjPj8YHkCAFX7Cb SlfjvTf7a9PxlX/ZGMKioQ/fkJoHAy4YQh85O7mYhPOogJ3rqzez+b43vRSB1U5WCeEikjra5BZ JTOlhE4iJIbD/izPFMCJfQnO85NuX3RUW4tCWqAIw4jN3053FbyQatuPyHpHR7C34KiIUNykTCh RKz7wZsTTJTYAzc/HzZvXfVOC8teFN8e0yE0NsxjPBY/1Awyu6Mn/zBUu7bm9S X-Received: by 2002:a05:600c:1986:b0:475:da1a:53f9 with SMTP id 5b1f17b1804b1-4801e30ba86mr32955375e9.14.1768562484476; Fri, 16 Jan 2026 03:21:24 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 29/30] target/i386/nvmm: Include missing ramlist.h header Date: Fri, 16 Jan 2026 12:18:06 +0100 Message-ID: <20260116111807.36053-30-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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: 1768562585416158500 From: Thomas Huth Compiling on NetBSD currently fails with: ../src/target/i386/nvmm/nvmm-all.c:1136:22: error: unknown type name 'RAMB= lockNotifier' 1136 | nvmm_ram_block_added(RAMBlockNotifier *n, void *host, size_t size, | ^~~~~~~~~~~~~~~~ ../src/target/i386/nvmm/nvmm-all.c:1152:15: error: variable 'nvmm_ram_noti= fier' has initializer but incomplete type 1152 | static struct RAMBlockNotifier nvmm_ram_notifier =3D { | ^~~~~~~~~~~~~~~~ ../src/target/i386/nvmm/nvmm-all.c:1153:6: error: 'struct RAMBlockNotifier= ' has no member named 'ram_block_added' 1153 | .ram_block_added =3D nvmm_ram_block_added | ^~~~~~~~~~~~~~~ ../src/target/i386/nvmm/nvmm-all.c:1153:24: error: 'nvmm_ram_block_added' = undeclared here (not in a function) 1153 | .ram_block_added =3D nvmm_ram_block_added | ^~~~~~~~~~~~~~~~~~~~ Include the right header to get this fixed. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Pierrick Bouvier Reviewed-by: Pierrick Bouvier Acked-by: Paolo Bonzini Message-ID: <20260114083812.18496-1-thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/i386/nvmm/nvmm-all.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/i386/nvmm/nvmm-all.c b/target/i386/nvmm/nvmm-all.c index f808828d492..8a1af35ed32 100644 --- a/target/i386/nvmm/nvmm-all.c +++ b/target/i386/nvmm/nvmm-all.c @@ -16,6 +16,7 @@ #include "system/nvmm.h" #include "system/cpus.h" #include "system/memory.h" +#include "system/ramlist.h" #include "system/runstate.h" #include "qemu/main-loop.h" #include "qemu/error-report.h" --=20 2.52.0 From nobody Mon Feb 9 03:17:04 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=1768562547; cv=none; d=zohomail.com; s=zohoarc; b=eN0FhhSRxre+PSDiCdpObrL5JeWDBNkILI+nDS5mgnH7FCD3yllTdnoWwGxa5VE5wS+WSRGTzh5V29OW86uHWc9v27mT2ABYuDMtD57+Z0yYycIg8LS0sjjpiF1g8RD4AZxO3EuGkFE4qwCTIpFTG/ip8HErze2HzEwv32qbAXw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562547; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=hYBppovx5aTKboLp6qMxPvKWQRGV5NsjKuRsihbv0cc=; b=KjVf8B/Fxyh1Bx86V3SLnP9l58+NYvAbNS/FvnmJDekkGL8RsJfYK8da2BvT5/LIwgO02YhYk49wCb0uR6j/f65la5NC+5Kunf23luSoFTEmwu5izTB7axUrYkO4usGtqB88lTaS+XRq0mx9ItVYXGPNGtMXzAdWI0Wi4YpI0Ow= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768562547774270.91056088385426; Fri, 16 Jan 2026 03:22:27 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghtY-0006sr-Vf; Fri, 16 Jan 2026 06:21:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghtW-0006ip-Nx for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:21:35 -0500 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vghtV-0007Ne-4r for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:21:34 -0500 Received: by mail-wr1-x442.google.com with SMTP id ffacd0b85a97d-432dc56951eso1238901f8f.0 for ; Fri, 16 Jan 2026 03:21:32 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4356996d02dsm4581186f8f.23.2026.01.16.03.21.30 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:21:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562491; x=1769167291; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=hYBppovx5aTKboLp6qMxPvKWQRGV5NsjKuRsihbv0cc=; b=WSxUESZwOcYUEZDb1iG2HEp04ik0dSm/xMAG7YEthY0M/uAZffBUNOE6L55UJz29ZZ bo+galtlegvHPhRKlqSB5LLNg6XQl6Vys1faNemkFroy5vW8P7BSy/fqhtjmlrn7ywBo B0E6w+aiDhpRsMTJZbrLNYA6f1EXlyiG7BVcEAv7LAwMbON7oAvM5lZsxq51/0Kf4bR0 A9zuP1dceYEMZ0eNrA6JkWZNq2Vxrt/ncvjXTp/YuAX8m9ABe68qTxjynfqguC9pfG6F 0i2Idrm8tiPhNUp9AW95tWugz5X0UvHQdGfQPDZ487VWbSFJxL2WIzFeK6cmNc6CQM9v 6OPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562491; x=1769167291; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=hYBppovx5aTKboLp6qMxPvKWQRGV5NsjKuRsihbv0cc=; b=fn2kheec8HpRvnkJpLwQkLNgEwcB54mE4dOrdBIsU3/ai38u/tuPxa68ykcTnOngbX mMGKiQcE0kgm+rbSQmnazd7PB0w/RcagyJV/lfr1bBHlSPuPtlZqh9jsgVm3+8smS/jP Fv+b+B8LhNt/6xKDXIQ70RNBCYqzvTBPC83AfsFkKsnx2dXpDl3jVyI5nPlz9DAejFEi IGuESsOC3lVnqhLHFH1Q3a58bHAY9oFbDohOxnQv6UTRIkoQfXNu1PyQ6Piqz1gYTqsK 1Qk9VMEpRIvl5dZP4xunDb+6hhO72gpQ6YKTVIjeSISbFvM9Cs8Tr4hwhT3G5x0sopR3 teog== X-Gm-Message-State: AOJu0YzUtLnf/ujo+Pk7WDg5c9aektOI8eclX6ABapld8sHnClOHGOA6 zGvzAtjkBao8Ey+uUQsCexp9cp2ZorAr7T/NreIRMCyXWWF6RYRQo5jf6UdxYpeECmhCBfLd/Vh khoe7y1A= X-Gm-Gg: AY/fxX6r0vD0qw3kyMr9l5aQMen8k0ZPq0KZYg3opypwMwYx1y6q5QDrZHzbzXg2H0y Kl2zWSuBJ3MOH3YYJHkz+XtXLqPkrqOZwx3+ymy4au3El468dS4x25YCti2tW3DzHAmk3c7a8ur EswxIaTf79eb+31R7wyn47Hu/Y0XEyN8HVPxCWfxY5EgQg3CC4Z+L+X1k18WgXQj2tYW/Smr7vC NVRyVOxNy6pumgE87f9YeOiuHiH7Z4RP8emBOcCDH4vaoP1Y9RNbVlJZ5Lo092de85lz/fqhvPw CNnWDibxd6kP0hcaIfpAHDRGzncJzmCrL4fevyDLVGmA91ZzbFnH/NBb7eyhnfU7f5PzRM4qMV3 zueCKXWOIMiXG1JKcLSi3SurVWdKfqE1FSoldhr0tSDO6eeqc0zUj+mwb62S4C7u2sqKZyBn6ce tmpWuxPwnpdI7AjFe4VINvbSnN4AVjrFbBjuCXoJCRaPILVnRk8cWn5zINXWEm X-Received: by 2002:a05:6000:2389:b0:430:fd9f:e6e2 with SMTP id ffacd0b85a97d-4356996f593mr2867406f8f.9.1768562491069; Fri, 16 Jan 2026 03:21:31 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 30/30] tests/functional: Require TCG to run reverse debugging tests Date: Fri, 16 Jan 2026 12:18:07 +0100 Message-ID: <20260116111807.36053-31-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-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=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::442; envelope-from=philmd@linaro.org; helo=mail-wr1-x442.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: 1768562549227158500 Record/replay is specific to TCG. Require it to avoid failure when using a HVF-only build on Darwin: qemu-system-aarch64: -icount shift=3D7,rr=3Drecord,rrfile=3D/scratch/repl= ay.bin,rrsnapshot=3Dinit: cannot configure icount, TCG support not available Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Alex Benn=C3=A9e Message-ID: <20260115161029.24116-1-philmd@linaro.org> --- tests/functional/reverse_debugging.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/functional/reverse_debugging.py b/tests/functional/rever= se_debugging.py index 8b9507674a0..8e6f0b0e923 100644 --- a/tests/functional/reverse_debugging.py +++ b/tests/functional/reverse_debugging.py @@ -67,6 +67,8 @@ def vm_get_icount(vm): def reverse_debugging(self, gdb_arch, shift=3D7, args=3DNone, big_endi= an=3DFalse): from qemu_test import GDB =20 + self.require_accelerator("tcg") + # create qcow2 for snapshots self.log.info('creating qcow2 image for VM snapshots') image_path =3D os.path.join(self.workdir, 'disk.qcow2') --=20 2.52.0