From nobody Tue Apr 7 04:47:54 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 ARC-Seal: i=1; a=rsa-sha256; t=1773645249; cv=none; d=zohomail.com; s=zohoarc; b=Oaevp7YsxXrBNbgjuzFTTNFE5iNmyBpgCTm9aRY1V+ryuV4cLMYOknX8tjDPSqK2sLXZFyy2YsXmYnt62Vugt0uA9BMHv7mGsFwtwaLBuezfxq7wW4VYAJWbIw/MDFhcK5gHOVpqhtll4A0FjfpQXYH7xyQ1gjwejQv5jl+ucMQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773645249; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=nDfEWbifZ42yW5hR+K7Q7148bwwlMCjBkeNIOj6alUA=; b=dSy8uqbcMm1dVyypOdwsirjUeYLA2eYZskGrd0riyvJ6HskKgBVQ/jW+ie4l323CeRDYFpiJOzhtBYKEWBstjRJ20f066omQybqgeUR+tCcSl+OcFh4PACaJI4QtvujgnFGP/3TiDNu031CeL4/vxUnYrV4QpM9dvodFcW1yDJo= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177364524993836.20441344209826; Mon, 16 Mar 2026 00:14:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w226R-0007qD-AZ; Mon, 16 Mar 2026 03:11:03 -0400 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 1w225c-0007Tq-2q; Mon, 16 Mar 2026 03:10:12 -0400 Received: from isrv.corpit.ru ([212.248.84.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w225Y-0007jc-V1; Mon, 16 Mar 2026 03:10:11 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 6B497193C23; Mon, 16 Mar 2026 10:10:02 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 738D038004B; Mon, 16 Mar 2026 10:10:05 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tls.msk.ru; s=202602; t=1773645002; bh=1vJ3glu4hYTQGumw1VmumcQjcBoRBkkjsNqx/2fzMLY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=muMKQrcgAu5/OlUGi0v3VDos9Z+2mp3ZRyT//aXdspDUKH1y0RsjIJoEXKTKzgp00 IeR7QlCScCga8zP3AlzeP7BMR2c6sOp1Ij8yapAiF75CblIrJM7BKM2VfRu6OVY08Y mbjYT2YHoeS63PFcWGTKinxag5+nS74kYpMuZ/xdtdlvAJ0p4AXaUU4pP48dZBzRXA CNzjxpAS+Z0wT9irDIxdswXPfN3pWAcOqZuHorZc80SsmatBJ3KvDa3MBJ95pSvqDu TDupA16WtYVW3114vWdmBla0CK6bkFFcTrSSS7VBsLdNjVGX6Ruxe6oVaepwaFYt9i xYm5shWiSMHxQ== From: Michael Tokarev To: qemu-devel@nongnu.org Cc: Christopher Palmer-Richez , qemu-trivial@nongnu.org, Michael Tokarev Subject: [PULL 01/14] net/slirp: allow hostfwd socket paths with dashes Date: Mon, 16 Mar 2026 10:09:49 +0300 Message-ID: <20260316071005.91624-2-mjt@tls.msk.ru> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260316071005.91624-1-mjt@tls.msk.ru> References: <20260316071005.91624-1-mjt@tls.msk.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=212.248.84.144; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -2 X-Spam_score: -0.3 X-Spam_bar: / X-Spam_report: (-0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 @tls.msk.ru) X-ZM-MESSAGEID: 1773645251222154100 Content-Type: text/plain; charset="utf-8" From: Christopher Palmer-Richez Adds get_last_str_sep, a variant of get_str_sep that checks for the last occurence of a separator. Updates slirp_hostfwd to parse unix domain socket paths with dashes. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/347 Signed-off-by: Christopher Palmer-Richez Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- net/slirp.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/net/slirp.c b/net/slirp.c index 04925f3318..968be9cc99 100644 --- a/net/slirp.c +++ b/net/slirp.c @@ -69,6 +69,26 @@ static int get_str_sep(char *buf, int buf_size, const ch= ar **pp, int sep) return 0; } =20 +static int get_last_str_sep(char *buf, int buf_size, const char **pp, int = sep) +{ + const char *p, *p1; + int len; + p =3D *pp; + p1 =3D strrchr(p, sep); + if (!p1) + return -1; + len =3D p1 - p; + p1++; + if (buf_size > 0) { + if (len > buf_size - 1) + len =3D buf_size - 1; + memcpy(buf, p, len); + buf[len] =3D '\0'; + } + *pp =3D p1; + return 0; +} + /* slirp network adapter */ =20 #define SLIRP_CFG_HOSTFWD 1 @@ -848,7 +868,7 @@ static int slirp_hostfwd(SlirpState *s, const char *red= ir_str, Error **errp) =20 #if !defined(WIN32) && SLIRP_CHECK_VERSION(4, 7, 0) if (is_unix) { - if (get_str_sep(buf, sizeof(buf), &p, '-') < 0) { + if (get_last_str_sep(buf, sizeof(buf), &p, '-') < 0) { fail_reason =3D "Missing - separator"; goto fail_syntax; } --=20 2.47.3 From nobody Tue Apr 7 04:47:54 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 ARC-Seal: i=1; a=rsa-sha256; t=1773645071; cv=none; d=zohomail.com; s=zohoarc; b=AezT+6DXx2zkmclv/DBXXwyJfqdeHZbQ0KDBhncguiBaQUga2foClItS7s+Sa1OTE1JaoYkKgxce9R9vJ475BR4yYbTYmNIG0ZFXNCCjvq9yQjz/moyX/iALDSFkoJssMjuoPoCXbVSNN9eBOBSF1l/25xurdq7AQcGezBhik7A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773645071; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=JIblTnwUwOXA+jwfMKJEsI7L6ZbfLWkGXchhibpTagc=; b=AWijmbCAe/agYBKyWaDnqUcNuD+uGHs+qhykgwfFD0fscCUKeKAcSQ3VnYUid7jDXcND1DuhCY1sKKEMoJEp59aeZuu5AX965oUbB9632U4MP/A7nJvNDQBLvoLmrqQqAIJTGiFxGm6HjXuTlGlnPOeSjosg3DM0iUYZulLxcco= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773645071491666.0076504698222; Mon, 16 Mar 2026 00:11:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w226O-0007f6-AV; Mon, 16 Mar 2026 03:11:00 -0400 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 1w225k-0007VM-II; Mon, 16 Mar 2026 03:10:25 -0400 Received: from isrv.corpit.ru ([212.248.84.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w225d-0007kb-MY; Mon, 16 Mar 2026 03:10:15 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 82759193C24; Mon, 16 Mar 2026 10:10:02 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 806E038004C; Mon, 16 Mar 2026 10:10:05 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tls.msk.ru; s=202602; t=1773645002; bh=vvOQEhgJE84u8KF7BBEN5DfHHC1YU/ts6vzHN7FBIOE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=k7Wk2BptcJYQlSYs9TDogLNS830u3pF/NREVR1szee1fWWAbEWMPu0xLwIdFcBQKp o3wgEsPY0slFxdNSfudw+zWIMoqzlk7ycRc64/m0LWdjrgx6vtvPoF3MIwB5Cxiji4 cjxb/XmRnwKQ2B4v2xuS493wonEcVV3uxMg6CyJrI6SbFxfSK9YzlOaGLZjLUg0WDu RVyNHUM3OUFglvJhqaZRYMcwHLNDa3SIWvpU8bC7CwarwKWgK7e++thgrTonQdczby hrR40u/Y70/VA9t+ouAogy0k3c/FYcCppERYSXVOeLF/0SeExOK9LMJ9DmLvRducqa 9Kz7wtAcKcFoA== From: Michael Tokarev To: qemu-devel@nongnu.org Cc: Sergei Heifetz , qemu-trivial@nongnu.org, Michael Tokarev Subject: [PULL 02/14] migration/savevm.c: reorder usage and assertion of mis->from_src_file Date: Mon, 16 Mar 2026 10:09:50 +0300 Message-ID: <20260316071005.91624-3-mjt@tls.msk.ru> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260316071005.91624-1-mjt@tls.msk.ru> References: <20260316071005.91624-1-mjt@tls.msk.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=212.248.84.144; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -2 X-Spam_score: -0.3 X-Spam_bar: / X-Spam_report: (-0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 @tls.msk.ru) X-ZM-MESSAGEID: 1773645072898154100 Content-Type: text/plain; charset="utf-8" From: Sergei Heifetz Reorder the code so the assertion of mis->from_src_file occurs before the call to migration_ioc_unregister_yank_from_file, which dereferences it in qemu_file_get_ioc. Fixes: 39675ffffb3394 ("migration: Move the yank unregister of channel_clos= e out") Signed-off-by: Sergei Heifetz Reviewed-by: Laurent Vivier Reviewed-by: Peter Xu Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- migration/savevm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/migration/savevm.c b/migration/savevm.c index 197c89e0e6..dd58f2a705 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -2875,13 +2875,14 @@ static bool postcopy_pause_incoming(MigrationIncomi= ngState *mis) =20 assert(migrate_postcopy_ram()); =20 + assert(mis->from_src_file); + /* * Unregister yank with either from/to src would work, since ioc behin= d it * is the same */ migration_ioc_unregister_yank_from_file(mis->from_src_file); =20 - assert(mis->from_src_file); qemu_file_shutdown(mis->from_src_file); qemu_fclose(mis->from_src_file); mis->from_src_file =3D NULL; --=20 2.47.3 From nobody Tue Apr 7 04:47:54 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 ARC-Seal: i=1; a=rsa-sha256; t=1773645249; cv=none; d=zohomail.com; s=zohoarc; b=IDufGIg7vj0gJMiYF7iyLkDr2KAlWOEPy1navMvgjDSZHQzp3IU1LPtKgvY1hPbPow+84PaDgQ8GcjNTLafMW532b3dvsKLlOxAJv7fIjIdmWjz5TEvLGqNDhlF5PcPDGm6bltnGXqSP3zDtW+f79Yz0Ef4U6Gf/tY2uDriKayE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773645249; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=oTbAI5nQwt8L3qE7iScD8wYy0OZjyqx7A4iwVeRG2DM=; b=bunHepWgQztTykipAgxvsT9oIG/FBAT59QOMu9lMg9gDfNrfxz48hRzvnwm6PtY3YRizJAZC7OjGBuAqUOomzLMFPkQl5Nk/mEUmR9RMAarBYDxAarhE6wwchxPYP9Wr9SetkBdLGUx31GyyEDhy9UN6Ae6OETTiywNJqqi6OVs= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773645249895178.68336331375156; Mon, 16 Mar 2026 00:14:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w226W-00080c-Rl; Mon, 16 Mar 2026 03:11:08 -0400 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 1w225k-0007VL-I3; Mon, 16 Mar 2026 03:10:25 -0400 Received: from isrv.corpit.ru ([212.248.84.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w225d-0007kf-Tp; Mon, 16 Mar 2026 03:10:15 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 9A015193C25; Mon, 16 Mar 2026 10:10:02 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 97E6138004D; Mon, 16 Mar 2026 10:10:05 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tls.msk.ru; s=202602; t=1773645002; bh=yS6wJVRyK2NZzmnCyDXLV5GJr4GKcXKiMWKEFsAE4xo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=IIG0MwG5Ld9LXWYQB4q+4UVxcU1f0N4lKjmPlfoYP6hANS04Qc77LwXA5A/obFsOr BCfyBp/HaR42qG/2sQSYym0gNUHw/yHMefLqUuAHN+qBZDLMJl7wL/wgxljig/rEgk TvwMTV59WZItjtWCrSYO8tHqmQC83NZRMBK54VgjSGG8xh7ht+ap22V0bMseF4eDkw bVBD5RkPPzKaXlx8VQX6a0Z2zRDMm+0Uw7yNkxgft/fu8NWH8rVrSxLhhj77E2GkIR i54Wwo3/wBQMovEDh7j9V67A0VpfiD4O26ECahG6qOs4ChuBP56FYB1KehBTVNohhr My4NTHhizUiqg== From: Michael Tokarev To: qemu-devel@nongnu.org Cc: Sergei Heifetz , qemu-trivial@nongnu.org, Michael Tokarev Subject: [PULL 03/14] dump/dump.c: reorder usage and assertion of block Date: Mon, 16 Mar 2026 10:09:51 +0300 Message-ID: <20260316071005.91624-4-mjt@tls.msk.ru> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260316071005.91624-1-mjt@tls.msk.ru> References: <20260316071005.91624-1-mjt@tls.msk.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=212.248.84.144; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -2 X-Spam_score: -0.3 X-Spam_bar: / X-Spam_report: (-0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 @tls.msk.ru) X-ZM-MESSAGEID: 1773645250913158500 Content-Type: text/plain; charset="utf-8" From: Sergei Heifetz Reorder the code so the assertion of block occurs before it is used in the subsequent lines. Signed-off-by: Sergei Heifetz Reviewed-by: Laurent Vivier Reviewed-by: Peter Xu Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- dump/dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dump/dump.c b/dump/dump.c index f7a99a7af2..80ed6c8d21 100644 --- a/dump/dump.c +++ b/dump/dump.c @@ -1288,6 +1288,7 @@ static bool get_next_page(GuestPhysBlock **blockptr, = uint64_t *pfnptr, /* block =3D=3D NULL means the start of the iteration */ if (!block) { block =3D QTAILQ_FIRST(&s->guest_phys_blocks.head); + assert(block); *blockptr =3D block; addr =3D block->target_start; *pfnptr =3D dump_paddr_to_pfn(s, addr); @@ -1295,7 +1296,6 @@ static bool get_next_page(GuestPhysBlock **blockptr, = uint64_t *pfnptr, *pfnptr +=3D 1; addr =3D dump_pfn_to_paddr(s, *pfnptr); } - assert(block !=3D NULL); =20 while (1) { if (addr >=3D block->target_start && addr < block->target_end) { --=20 2.47.3 From nobody Tue Apr 7 04:47:54 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 ARC-Seal: i=1; a=rsa-sha256; t=1773645084; cv=none; d=zohomail.com; s=zohoarc; b=D7OzeH//pjn8bOpg3IpC3DMeBxAgfmJMdTcY3i2CHUkHJC9mQxl0IeTKeydLFma0clH78fW04Ro0r2pytHTRSF5ZWcBvUZBSiVr4yIZWEAGrQgL548QT1YYrb+JNuw7ximPzL1ZInbsj+PU7xTiAeV83FFFpZp294KS9MrG8LqE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773645084; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=K0nXwiekL/pSe/PQJJUSu2+WP+B7V5eUDdyKd2xOrY0=; b=HdYEY5Ig1fgYeQWygn58jdQveJmtRj866dcT31ZcTtvJaHeifputoxf/LeTZEf/XaDKmTHTpAXu/8xC0KfI9maNzET17XpNhqFPtAO67B1P9u8qgtswcpVKIqJXKuGBNCI5dygb/ruBbbkH5sBHv0juVGbNa92OFXA/fqXF4/vI= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773645084042493.9894791671337; Mon, 16 Mar 2026 00:11:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w226T-0007vL-JU; Mon, 16 Mar 2026 03:11:05 -0400 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 1w225n-0007VX-L6; Mon, 16 Mar 2026 03:10:29 -0400 Received: from isrv.corpit.ru ([212.248.84.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w225m-0007lY-2j; Mon, 16 Mar 2026 03:10:23 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id A700E193C26; Mon, 16 Mar 2026 10:10:02 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id AF5D338004E; Mon, 16 Mar 2026 10:10:05 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tls.msk.ru; s=202602; t=1773645002; bh=CmDa9F5nfz3aUSXpzzrFQot+GvJGuvW4S/3odYMM1j0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=v1dAAbLixcAvtx3h+20Ub9jTuDTLLRo7STJCLFUF4dJ2KhjaHerZLaUTVW96+ixZl SkdwPds6V/S9l4+YHZE9tMTaYEc3kQTxyiHRBLDrH0wyALsKCXW1xGyQBfDIZbt23P Xy+kwaPGRAwOmR9L1EeHyyQ/bSN8NRc3+tcE4v/srDQ5MvoNYsGnNEE216g45SZwwB XRi8M3jGopyUhTMBBG43+v5Pu0KreTTDJlGKTF3FFUVBjTOEq2LiWySEb2vqDoRhbw 0QZwqjt5MrMuamA9xHBAuozSvLk2i8OzxwJ5C7sziIbM/yKsqWf8k6R43XGZrow2Kj 3DKAOmk61ey3g== From: Michael Tokarev To: qemu-devel@nongnu.org Cc: Sergei Heifetz , qemu-trivial@nongnu.org, Michael Tokarev Subject: [PULL 04/14] system/physmem.c: remove useless assertion of block Date: Mon, 16 Mar 2026 10:09:52 +0300 Message-ID: <20260316071005.91624-5-mjt@tls.msk.ru> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260316071005.91624-1-mjt@tls.msk.ru> References: <20260316071005.91624-1-mjt@tls.msk.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=212.248.84.144; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -2 X-Spam_score: -0.3 X-Spam_bar: / X-Spam_report: (-0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 @tls.msk.ru) X-ZM-MESSAGEID: 1773645086578158500 Content-Type: text/plain; charset="utf-8" From: Sergei Heifetz It is useless to assert that block is not NULL because it is already dereferenced in the first line of the function. The assertion is also unnecessary because the function is called in only two places, and `block` can't be NULL in either of them: - In `migration/ram.c`, we have already dereferenced `block` in the code just before the call. - In `system/memory.c`, we assert `mr->ram_block` before passing it to the function. (We could split the declaration and initialization of oldsize, but then we would need to remove the const qualifier. As the assertion is useless anyway, removing the const qualifier seems worse.) Signed-off-by: Sergei Heifetz Reviewed-by: Peter Maydell Reviewed-by: Peter Xu Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- system/physmem.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/system/physmem.c b/system/physmem.c index 4a9e076004..4e26f1a1d4 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -2028,8 +2028,6 @@ int qemu_ram_resize(RAMBlock *block, ram_addr_t newsi= ze, Error **errp) const ram_addr_t oldsize =3D block->used_length; const ram_addr_t unaligned_size =3D newsize; =20 - assert(block); - newsize =3D TARGET_PAGE_ALIGN(newsize); newsize =3D REAL_HOST_PAGE_ALIGN(newsize); =20 --=20 2.47.3 From nobody Tue Apr 7 04:47:54 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 ARC-Seal: i=1; a=rsa-sha256; t=1773645095; cv=none; d=zohomail.com; s=zohoarc; b=liniuT0dqfQTO//20RX10cVyTCOCIJQ9S2NZMrRk2nSCC5/hEv4c6BkvuiGzpjifToT+Vmv6X2h6Wf0rwCPsk8jTrCjbOFZxYH7BbAtGhrQzIAzQg305dW1Qh5O4ObF6iLbvB/YirgBWnJ33TSeVWNFkYW1MJjbAIFUoGrG6E6Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773645095; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=y/myh9ANRvyOT+0hU3pgdvC+7ks9adxwfaZ8oi9VqAw=; b=kB1dJq8bdTGM4qcXVNgqANJfYzw0u20PrbGDotk1uOWclgQ1pqsYFLj/8/Esc4aHzS7ZWegoKIWai9S/DE1FGm5kc7MLHPoFps20LS8dm8WDLU2YWNN4I2fjANu9/Z3G5X9nRYODU2cZkIRNXeTr2g/mQRL+P0JoiZ7h0ROeLmQ= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773645094024400.59461110417396; Mon, 16 Mar 2026 00:11:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w226V-0007zL-Mk; Mon, 16 Mar 2026 03:11:08 -0400 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 1w225n-0007VY-LD; Mon, 16 Mar 2026 03:10:27 -0400 Received: from isrv.corpit.ru ([212.248.84.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w225m-0007lZ-2C; Mon, 16 Mar 2026 03:10:23 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id BE14B193C27; Mon, 16 Mar 2026 10:10:02 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id BC4F738004F; Mon, 16 Mar 2026 10:10:05 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tls.msk.ru; s=202602; t=1773645002; bh=jVK/qfgVEH5cnnXZl16F3o/kjCyYnwZdxeWXTPL7H1c=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=aGUrQMbJTZhpJ6dqM33ZKVb43Tx9HJ3YgZLySPYWiC++2avDEMEX2QerC3RxALOHg GtT1giz/dsMYhBsMH71F0z97XePlpyKyNr2N73UqQ5Xf+sggIa4ll25ECQf9N0StAh dS5xutmVfTubKMYDZUNqlRajaZoWLwnCaFd6nzI24q4q/9P82hF1lNmmLHorlv2V/I OMW1+IubOGsmuukY/UrHS8WTBh1WXkM77s1R07tOQRBsk7K0Ka7hF2P/jgj6KpsnNB zTX2J/A33+CzyA/D3oG9b26ktkAIpHhm+e+W21uNo5l/3JKIsBn+3LPU4aCcbPZsMl DfkPDjhmLYilw== From: Michael Tokarev To: qemu-devel@nongnu.org Cc: Sergei Heifetz , qemu-trivial@nongnu.org, Michael Tokarev Subject: [PULL 05/14] hw/usb/core.c: reorder usage and assertion of p->ep Date: Mon, 16 Mar 2026 10:09:53 +0300 Message-ID: <20260316071005.91624-6-mjt@tls.msk.ru> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260316071005.91624-1-mjt@tls.msk.ru> References: <20260316071005.91624-1-mjt@tls.msk.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=212.248.84.144; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -2 X-Spam_score: -0.3 X-Spam_bar: / X-Spam_report: (-0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 @tls.msk.ru) X-ZM-MESSAGEID: 1773645098977154100 Content-Type: text/plain; charset="utf-8" From: Sergei Heifetz Reorder the code so the assertion of p->ep occurs before it is used in the subsequent lines. Signed-off-by: Sergei Heifetz Reviewed-by: Laurent Vivier Reviewed-by: Peter Xu Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- hw/usb/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/core.c b/hw/usb/core.c index b3f811c513..9572a870cc 100644 --- a/hw/usb/core.c +++ b/hw/usb/core.c @@ -423,10 +423,10 @@ void usb_handle_packet(USBDevice *dev, USBPacket *p) p->status =3D USB_RET_NODEV; return; } + assert(p->ep); assert(dev =3D=3D p->ep->dev); assert(dev->state =3D=3D USB_STATE_DEFAULT); usb_packet_check_state(p, USB_PACKET_SETUP); - assert(p->ep !=3D NULL); =20 /* Submitting a new packet clears halt */ if (p->ep->halted) { --=20 2.47.3 From nobody Tue Apr 7 04:47:54 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 ARC-Seal: i=1; a=rsa-sha256; t=1773645062; cv=none; d=zohomail.com; s=zohoarc; b=nh58sam6WMk/+G/P+eUmeFod3g3iXYznwLUterPqBtp6Zj4kSlLkosEPopfsoYgVhq3m25mWADxA+tpIgMzS4RFdLYYS/BEARC+5yfwVx+GCkPqTCV1sw9f5BPFp++1c8OMUgaI3G1fwa7hxo5PpIYnnS6Ywn58nZ451EVsUx1A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773645062; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=0sQvGD4mLE1PTHsrmlLO4cSbsFsQwyCjvQ4cOsM9pGE=; b=Dv8j2JheD5dGYlt0rNpoaK+eAMgWUt4PP3yxc6f78nD+pWOLt9mfPCKn37H5qDyI8rlfZ59FLiIyKZkfjK0FRHO1Lhgr9+tFhXZBdxHWa8h3/GvCRhVOLDZoQ3RnDTWXBaFs75e0NF/27db+uQ7sFUVwXLGnYp2xt52jWRHQjFE= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773645062381460.4383663237695; Mon, 16 Mar 2026 00:11:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w226M-0007eC-89; Mon, 16 Mar 2026 03:10:58 -0400 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 1w225t-0007Vz-EJ; Mon, 16 Mar 2026 03:10:32 -0400 Received: from isrv.corpit.ru ([212.248.84.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w225p-0007lz-D3; Mon, 16 Mar 2026 03:10:26 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id CB50C193C28; Mon, 16 Mar 2026 10:10:02 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id D3D14380050; Mon, 16 Mar 2026 10:10:05 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tls.msk.ru; s=202602; t=1773645002; bh=9IpVhPyCFj+eYKjRuj7uW3sNmKuxLubWVST1vOIbdUk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=fMsEcutiZotXTh9GWnw4RQjQSGld7l6kgYvRm9uNmyZhAX+akkWOCm7tCAK4RIQAw AbWwmAP4+W24xynqbdithhWhU4guJ26ynvzd1kDDmYTMLY74/bmror6jptPuNhC1t4 8TZRnSWkT9hebA5FOKA0Cxpy7NZf87XPxtO6axZH8rNKootiajP3aNeMTmW+7oI+jc 6IwjlDVXygEw+HiWKCx5B685nRfMQyUKdIjnu0clkm2+GLhsVfQWYE7F88oNGtlHtb vVRod/cJmEkXhsdZz+ztp1V1FTCW9tamJthUvXfWwSzQRaWOw/Spb6nndWcpqoP6f6 vgcraOx8UTDmA== From: Michael Tokarev To: qemu-devel@nongnu.org Cc: Sergei Heifetz , qemu-trivial@nongnu.org, Michael Tokarev Subject: [PULL 06/14] target/i386: fix NULL pointer dereference in legacy-cache=off handling Date: Mon, 16 Mar 2026 10:09:54 +0300 Message-ID: <20260316071005.91624-7-mjt@tls.msk.ru> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260316071005.91624-1-mjt@tls.msk.ru> References: <20260316071005.91624-1-mjt@tls.msk.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=212.248.84.144; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -2 X-Spam_score: -0.3 X-Spam_bar: / X-Spam_report: (-0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 @tls.msk.ru) X-ZM-MESSAGEID: 1773645065509154100 Content-Type: text/plain; charset="utf-8" From: Sergei Heifetz The check that xcc->model is not NULL occurs after it is dereferenced inside x86_cpu_get_versioned_cache_info(), so something like `-cpu host,legacy-cache=3Doff` leads to a segfault rather than an error. This patch fixes that. Fixes: cca0a000d06f897411a8a ("target/i386: allow versioned CPUs to specify= new cache_info") Signed-off-by: Sergei Heifetz Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Zhao Liu Reviewed-by: Michael Tokarev [Mjt: simplify the following condition too] Signed-off-by: Michael Tokarev --- target/i386/cpu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 5b9ae79f16..b5e483e8cd 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -10107,10 +10107,11 @@ static void x86_cpu_realizefn(DeviceState *dev, E= rror **errp) =20 /* Cache information initialization */ if (!cpu->legacy_cache) { - const CPUCaches *cache_info =3D - x86_cpu_get_versioned_cache_info(cpu, xcc->model); + const CPUCaches *cache_info =3D xcc->model + ? x86_cpu_get_versioned_cache_info(cpu, xcc->model) + : NULL; =20 - if (!xcc->model || !cache_info) { + if (!cache_info) { g_autofree char *name =3D x86_cpu_class_get_model_name(xcc); error_setg(errp, "CPU model '%s' doesn't support legacy-cache=3Doff"= , name); --=20 2.47.3 From nobody Tue Apr 7 04:47:54 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 ARC-Seal: i=1; a=rsa-sha256; t=1773645251; cv=none; d=zohomail.com; s=zohoarc; b=bVkeQ2U16q7x6SBrs52PL1nJX6o71O/gBakJT2zYfKqnflMvtgUzB2v60XXYFqInlcQFVRJa2fIPPwWgxL+3XkZuaUGkaxToVGXA6eqdiyUmeVH2Zp/U/sYzcEJK0KNejaAWUgz2IPle7HpsDcdCY9PH0jJguYJkokzX6jHMYoM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773645251; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=diP3xyNUd3ZEg7N2XiBrEuaQ9ghYMt/w1qHZdpyEdMI=; b=EabzLs6FjpQzV56sjN/DivYS+5Dky3dmuHJxlOS/lRpf5tgrcXwigvepGhjtwMscngD6Qiy1NU/qlthTbldHxOZ7U9RWVaW7gPHcZys0r13ExaGOsHEKBuf9tsTvjw+xMUEpFlnP2QDeLa55K8rc6x/tcN2mjD4dlaTZkcG7ZCM= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177364525154387.64321785178299; Mon, 16 Mar 2026 00:14:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w226Q-0007pU-Mb; Mon, 16 Mar 2026 03:11:02 -0400 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 1w225t-0007Vy-EJ; Mon, 16 Mar 2026 03:10:32 -0400 Received: from isrv.corpit.ru ([212.248.84.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w225p-0007m0-DP; Mon, 16 Mar 2026 03:10:27 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id D8879193C29; Mon, 16 Mar 2026 10:10:02 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id E1253380051; Mon, 16 Mar 2026 10:10:05 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tls.msk.ru; s=202602; t=1773645002; bh=9L7t5ss71R6N1H6jAb9ssg+VvhN8SmRC3QAN3PvN090=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=uEjMThPdNNmeB13Vzh3Dc0Mr5AIOfnV++U9PH7s9jjYYY1F4B2iyI1x6C2r6BkmMZ 5Mq/KQduGGh6BF6Wy+WEkc4d7Y78KJDf85TkIH/t6S5fkDc3LVYHprXtm6CpUs1uwb f5FW83rE1fu9IEiBx58R1cVf5gKLxqw8xZsOLE+e3JdxzxRKqw8a13ygnBt/Qm4HTE ljeCK3P+XMmKd94q70bisC4zE9HWiDSL0scmNJIleT28YnKUG7izuGMQQNYBJ5GILh s+LGzHu+pvCRMPcl+KcAADriW6MNXae18YM2oiIfLmXYrFBFMPQt3LBi8OkGAYmoK3 QQzj93TXRm0nw== From: Michael Tokarev To: qemu-devel@nongnu.org Cc: Thomas Huth , qemu-trivial@nongnu.org, Michael Tokarev Subject: [PULL 07/14] docs: Move xbzrle.txt into the migration folder and convert to rst Date: Mon, 16 Mar 2026 10:09:55 +0300 Message-ID: <20260316071005.91624-8-mjt@tls.msk.ru> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260316071005.91624-1-mjt@tls.msk.ru> References: <20260316071005.91624-1-mjt@tls.msk.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=212.248.84.144; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -2 X-Spam_score: -0.3 X-Spam_bar: / X-Spam_report: (-0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, WEIRD_PORT=0.001 autolearn=no 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 @tls.msk.ru) X-ZM-MESSAGEID: 1773645253418154100 Content-Type: text/plain; charset="utf-8" From: Thomas Huth xbzrle is a feature of migration and thus this file should go into the docs/devel/migration/ folder. While we're at it, turn it into proper .rst format, too. Signed-off-by: Thomas Huth Reviewed-by: Peter Xu Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- docs/devel/migration/features.rst | 1 + .../migration/xbzrle.rst} | 106 +++++++++++------- 2 files changed, 65 insertions(+), 42 deletions(-) rename docs/{xbzrle.txt =3D> devel/migration/xbzrle.rst} (74%) diff --git a/docs/devel/migration/features.rst b/docs/devel/migration/featu= res.rst index 8f431d52f9..9aef79e7fa 100644 --- a/docs/devel/migration/features.rst +++ b/docs/devel/migration/features.rst @@ -15,3 +15,4 @@ Migration has plenty of features to support different use= cases. qpl-compression uadk-compression qatzip-compression + xbzrle diff --git a/docs/xbzrle.txt b/docs/devel/migration/xbzrle.rst similarity index 74% rename from docs/xbzrle.txt rename to docs/devel/migration/xbzrle.rst index bcb3f0c901..d4f4007261 100644 --- a/docs/xbzrle.txt +++ b/docs/devel/migration/xbzrle.rst @@ -20,7 +20,7 @@ A small cache size will result in high cache miss rate. Cache size can be changed before and during migration. =20 Format -=3D=3D=3D=3D=3D=3D=3D +------ =20 The compression format performs a XOR between the previous and current con= tent of the page, where zero represents an unchanged value. @@ -29,17 +29,19 @@ A zero run is represented by its length (in bytes). A non zero run is represented by its length (in bytes) and the new data. The run length is encoded using ULEB128 (http://en.wikipedia.org/wiki/LEB1= 28) =20 -There can be more than one valid encoding, the sender may send a longer en= coding -for the benefit of reducing computation cost. +There can be more than one valid encoding, the sender may send a longer +encoding for the benefit of reducing computation cost. =20 -page =3D zrun nzrun - | zrun nzrun page +:: =20 -zrun =3D length + page =3D zrun nzrun + | zrun nzrun page =20 -nzrun =3D length byte... + zrun =3D length =20 -length =3D uleb128 encoded integer + nzrun =3D length byte... + + length =3D uleb128 encoded integer =20 On the sender side XBZRLE is used as a compact delta encoding of page upda= tes, retrieving the old page content from the cache (default size of 64MB). The @@ -55,24 +57,34 @@ instead. XBZRLE has a sustained bandwidth of 2-2.5 GB/s for typical workloads makin= g it ideal for in-line, real-time encoding such as is needed for live-migration. =20 -Example +Example: + old buffer: -1001 zeros -05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 68 00 00 6b 00 6d -3074 zeros + +.. code:: batch + + 1001 zeros + 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 68 00 00 6b 00 6d + 3074 zeros =20 new buffer: -1001 zeros -01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 68 00 00 67 00 69 -3074 zeros + +.. code:: batch + + 1001 zeros + 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 68 00 00 67 00 69 + 3074 zeros =20 encoded buffer: =20 -encoded length 24 -e9 07 0f 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 03 01 67 01 01 69 +.. code:: batch + + encoded length 24 + e9 07 0f 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 03 01 67 01 01 69 =20 Cache update strategy -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +--------------------- + Keeping the hot pages in the cache is effective for decreasing cache misses. XBZRLE uses a counter as the age of each page. The counter will increase after each ram dirty bitmap sync. When a cache conflict is @@ -80,21 +92,27 @@ detected, XBZRLE will only evict pages in the cache tha= t are older than a threshold. =20 Usage -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D -1. Verify the destination QEMU version is able to decode the new format. - {qemu} info migrate_capabilities - {qemu} xbzrle: off , ... +----- =20 -2. Activate xbzrle on both source and destination: - {qemu} migrate_set_capability xbzrle on +1. Verify the destination QEMU version is able to decode the new format:: + + (qemu) info migrate_capabilities + xbzrle: off + ... + +2. Activate xbzrle on both source and destination:: + + (qemu) migrate_set_capability xbzrle on =20 3. Set the XBZRLE cache size - the cache size is in MBytes and should be a -power of 2. The cache default value is 64MBytes. (on source only) - {qemu} migrate_set_parameter xbzrle-cache-size 256m + power of 2. The cache default value is 64 MBytes (on source only):: + + (qemu) migrate_set_parameter xbzrle-cache-size 256m =20 -4. Start outgoing migration - {qemu} migrate -d tcp:destination.host:4444 - {qemu} info migrate +4. Start outgoing migration:: + + (qemu) migrate -d tcp:destination.host:4444 + (qemu) info migrate capabilities: xbzrle: on Migration status: active transferred ram: A kbytes @@ -114,6 +132,7 @@ power of 2. The cache default value is 64MBytes. (on so= urce only) =20 xbzrle cache miss: the number of cache misses to date - high cache-miss ra= te indicates that the cache size is set too low. + xbzrle overflow: the number of overflows in the decoding which where the d= elta could not be compressed. This can happen if the changes in the pages are t= oo large or there are many short changes; for example, changing every second = byte @@ -123,16 +142,19 @@ Testing: Testing indicated that live migration with X= BZRLE was completed in 110 seconds, whereas without it would not be able to complete. =20 A simple synthetic memory r/w load generator: -.. include -.. include -.. int main() -.. { -.. char *buf =3D (char *) calloc(4096, 4096); -.. while (1) { -.. int i; -.. for (i =3D 0; i < 4096 * 4; i++) { -.. buf[i * 4096 / 4]++; -.. } -.. printf("."); -.. } -.. } + +.. code-block:: c + + #include + #include + int main() + { + char *buf =3D (char *) calloc(4096, 4096); + while (1) { + int i; + for (i =3D 0; i < 4096 * 4; i++) { + buf[i * 4096 / 4]++; + } + printf("."); + } + } --=20 2.47.3 From nobody Tue Apr 7 04:47:54 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 ARC-Seal: i=1; a=rsa-sha256; t=1773645251; cv=none; d=zohomail.com; s=zohoarc; b=ZiI8574bM7UUX30guM+CgzGZvjKqtlCcmFif6pleFvVPf9aBJwPwnjHMe2qS6CtP7EIlhv8scz+JLo8Q2BqGcNMD312NTlHtOroTpI932Nx0iqYG0sjKUlbCOt9E84r+3e54Q6UHwd7Ik7CzFcFaOdg3jITYUbzhpQT2rGQEZkM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773645251; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=cPyzakDRHEn9oerst7QGZsFSOtnRE5S4XRQvz5D+uaY=; b=mw9Zlwg1/mDOnH13ELiO0VBGxwRTxGD7zthEuMsRsvfq9VjF0S0lqQZvW218mYBqI3qYWK1r5t6gYh3M99n/XmEIBn/VtUXc+zq/u79K37OdHF83g7xuhJZgv0FA3XCdz4W9/o7cGQ6QMVkyUojQpDvfRiNaAbnXVqp4Px0pfAY= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773645250694760.8762260135725; Mon, 16 Mar 2026 00:14:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w226W-00080K-LO; Mon, 16 Mar 2026 03:11:08 -0400 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 1w225z-0007Xe-HO; Mon, 16 Mar 2026 03:10:36 -0400 Received: from isrv.corpit.ru ([212.248.84.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w225w-0007mS-JD; Mon, 16 Mar 2026 03:10:33 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id E3513193C2A; Mon, 16 Mar 2026 10:10:02 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id ED5C7380052; Mon, 16 Mar 2026 10:10:05 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tls.msk.ru; s=202602; t=1773645002; bh=OypHeseeUnisNWsxoYu0ufPJCoq2DAtpiWgkXRZ3XeU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=u8tnG2D0CbZph5RLc+Zak+tr6iXLrxQ6N95WNzRUkOQf0Tei9uWrQMaLw6nRJodNU WuxsWWwotWtFYP8CeiNb5lyKwKk2Feee3efid5c+06dQ559z2J4vKvHtiqJZaIMkZB FMLIQWUPVLafo/S7EY4+c6mISUNsKvJK7ivlLwXzhz/UHNNlpfJRa8lnKOkIDF4KuC +SiPlcKbhA0Cs0Tp37QyzQOLeQhubfRJCsMeQJ3GjQC84fYZdwJvTd3vK/yks7wIA+ 9S1QB7X9AScFw/6nOQVJyeT87rvI11iVYLmoF1cfyPZYdbay8IUgdwBeiHOP4vfRde 1dBis+t3C2QWg== From: Michael Tokarev To: qemu-devel@nongnu.org Cc: Michael Tokarev , qemu-trivial@nongnu.org Subject: [PULL 08/14] linux-user/syscall.c: assume splice is always present Date: Mon, 16 Mar 2026 10:09:56 +0300 Message-ID: <20260316071005.91624-9-mjt@tls.msk.ru> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260316071005.91624-1-mjt@tls.msk.ru> References: <20260316071005.91624-1-mjt@tls.msk.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=212.248.84.144; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -2 X-Spam_score: -0.3 X-Spam_bar: / X-Spam_report: (-0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 @tls.msk.ru) X-ZM-MESSAGEID: 1773645252926158500 Content-Type: text/plain; charset="utf-8" splice() &Co are defined since linux 2.6.17 (glibc 2.5). Assume it is always present. Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson Signed-off-by: Michael Tokarev --- linux-user/syscall.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 064bc604c9..87f9c22b68 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -13624,15 +13624,9 @@ static abi_long do_syscall1(CPUArchState *cpu_env,= int num, abi_long arg1, return ret; #endif =20 -#ifdef CONFIG_SPLICE -#ifdef TARGET_NR_tee case TARGET_NR_tee: - { - ret =3D get_errno(tee(arg1,arg2,arg3,arg4)); - } + ret =3D get_errno(tee(arg1, arg2, arg3, arg4)); return ret; -#endif -#ifdef TARGET_NR_splice case TARGET_NR_splice: { loff_t loff_in, loff_out; @@ -13662,9 +13656,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, = int num, abi_long arg1, } } return ret; -#endif -#ifdef TARGET_NR_vmsplice - case TARGET_NR_vmsplice: + case TARGET_NR_vmsplice: { struct iovec *vec =3D lock_iovec(VERIFY_READ, arg2, arg3, 1); if (vec !=3D NULL) { @@ -13675,8 +13667,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, = int num, abi_long arg1, } } return ret; -#endif -#endif /* CONFIG_SPLICE */ + #ifdef CONFIG_EVENTFD #if defined(TARGET_NR_eventfd) case TARGET_NR_eventfd: --=20 2.47.3 From nobody Tue Apr 7 04:47:54 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 ARC-Seal: i=1; a=rsa-sha256; t=1773645252; cv=none; d=zohomail.com; s=zohoarc; b=PlpxslcD7ScjFI7SovMYwGiGV0qrf/5vJqv7miO8KM5+5KLnJVCUABr1yw5jISe9KAO63FexJBLWTPNl24GOpqtFeg42CvC5BCobc/8WdttI8FHjUiqtaYnTplSo7yekwDZepx3wRlw6QSQ2JjJl5SNls030Dnnd6p4mEPlZSiQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773645252; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=0hnDpZzzs0VRmfhRwdqieNQ8exxIV5ldcm9S4mqySc0=; b=cX0TvLoDgSdkgPJj8LYsAHUtq9QjOOtVu74MGj1xQ7HSlXbYq5IKph8qxq4UQpoCkOiVtGMmoLgPc7C4WKBnwaLKiw6pC3nWxfeyXfbjQHNMnDaOTdGBQRk88PAR4cIJzKT4j8gg4Qwz9RpHi4VNewQ6h2dUJufsd3lVz7Bdd7s= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773645252318331.8522505059017; Mon, 16 Mar 2026 00:14:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w226Q-0007o3-6O; Mon, 16 Mar 2026 03:11:02 -0400 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 1w225z-0007Xd-HN; Mon, 16 Mar 2026 03:10:36 -0400 Received: from isrv.corpit.ru ([212.248.84.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w225w-0007mQ-Jo; Mon, 16 Mar 2026 03:10:34 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 037BE193C2B; Mon, 16 Mar 2026 10:10:03 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 04542380053; Mon, 16 Mar 2026 10:10:06 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tls.msk.ru; s=202602; t=1773645003; bh=3oPGCPWf4oBSqpr1NBJFg+oiDZJOMIoxaB0KK+BxLqQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=KNcydI6F6JRfwhRMa76hcJXxKBCjpGqAZTkN9va1QVYwpR84z2LO4crHyRYkSlx2q mab3JehOEG0jIqph8eBobPLJpITs0yPFlK7cwAC7FT3XnfMHbCWXes+CBP4QwLpmPw PQKlb56h11c+YdVXQPKc7NQaaTDQHav4fzn6sctNvgw3Yda8CQ0ASLoeoYIThqAfEX 4trUvKI9VIvS3gLKxUeY6ZSExX4gtrjnbN/C7WR28EVeQUpuCSVJr0Mbr5CvLkLGbT uaNQFlsM6g57JPv9pe1fWN1XkFAv4ABHeGFuxH22+IjM2kZR8Tq9NUaAM1zVTr2awr pZKrGDOvMZXYQ== From: Michael Tokarev To: qemu-devel@nongnu.org Cc: Michael Tokarev , qemu-trivial@nongnu.org Subject: [PULL 09/14] meson.build: stop checking for splice() Date: Mon, 16 Mar 2026 10:09:57 +0300 Message-ID: <20260316071005.91624-10-mjt@tls.msk.ru> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260316071005.91624-1-mjt@tls.msk.ru> References: <20260316071005.91624-1-mjt@tls.msk.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=212.248.84.144; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -2 X-Spam_score: -0.3 X-Spam_bar: / X-Spam_report: (-0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 @tls.msk.ru) X-ZM-MESSAGEID: 1773645255280154100 Content-Type: text/plain; charset="utf-8" CONFIG_SPLICE was only needed for linux-user/, where it is not used anymore (assuming splice &Co is always present) Reviewed-by: Richard Henderson Signed-off-by: Michael Tokarev --- meson.build | 8 -------- 1 file changed, 8 deletions(-) diff --git a/meson.build b/meson.build index 11139f540b..59ed1a527a 100644 --- a/meson.build +++ b/meson.build @@ -2908,14 +2908,6 @@ config_host_data.set('CONFIG_PTHREAD_AFFINITY_NP', c= c.links(osdep_prefix + ''' config_host_data.set('CONFIG_SIGNALFD', cc.links(osdep_prefix + ''' #include int main(void) { return signalfd(-1, NULL, SFD_CLOEXEC); }''')) -config_host_data.set('CONFIG_SPLICE', cc.links(osdep_prefix + ''' - int main(void) - { - int len, fd =3D 0; - len =3D tee(STDIN_FILENO, STDOUT_FILENO, INT_MAX, SPLICE_F_NONBLOCK); - splice(STDIN_FILENO, NULL, fd, NULL, len, SPLICE_F_MOVE); - return 0; - }''')) =20 config_host_data.set('HAVE_MLOCKALL', cc.links(osdep_prefix + ''' #include --=20 2.47.3 From nobody Tue Apr 7 04:47:54 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 ARC-Seal: i=1; a=rsa-sha256; t=1773645162; cv=none; d=zohomail.com; s=zohoarc; b=inwXgcp9O5fMRxvX/m9A6TGfLxKUYrjoW4nHzxzsvQz+HBClE+Jcdsy+2BSMvmE50UTe87EzW1KgT62oYsM1xBqobDqdXTzmG22s3xWI8Am9GSdfc+rQXyJoQATQGCtJzuaSXR7f2fxxHUYkwLemk/tsDHftt0si6LC5ua1+2mU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773645162; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=F3wR57gaMw+IFUFOgElQaNFDyzCf6PH1hNChKFRh7Ko=; b=PIr9L+GL+bzt0xhw28yt8RzEpJh1BOIro52WfK1veqk2ArZIO+mj1wTj693/gCHUo85aeHZqXpzPEDdBkQG79vTDLSHLus2PUVlDpnfmDWjc5eVcish+xK8xcc8WkYsudLqTbRzaos1+vU3eKAZoW5uB+IO3QH6dpnphdix9X40= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177364516191118.875943539421996; Mon, 16 Mar 2026 00:12:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w226u-0000LQ-9w; Mon, 16 Mar 2026 03:11:32 -0400 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 1w2267-0007aX-VR; Mon, 16 Mar 2026 03:10:46 -0400 Received: from isrv.corpit.ru ([212.248.84.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2264-0007nZ-7n; Mon, 16 Mar 2026 03:10:42 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 0EA06193C2C; Mon, 16 Mar 2026 10:10:03 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 1884C380054; Mon, 16 Mar 2026 10:10:06 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tls.msk.ru; s=202602; t=1773645003; bh=2ZQAMKNvsoITqJfmAT8LBeZf1cS/n75aHcbFq2pkSWs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=srRgOF90OAUzBL7900mzBsNl8zNafBXX62tXwBS52/eeaPoUBGnji7FgmQ41ljQBa fb/dIUGrWMHqcH0OhPUcSKc00rK8OhrL0S90HztgRSWMujRE9iw/bzztoBdoxYWGbu 9X0v2eJTCXBqxDiw4lKpUsTg57sN5J+sAVFM4RZKJ0Y2GV/jILPBjgFfDYHp/fgviV Yhxf7PXNO7EweND1IKDaCsv8Bmei5QSCuYbo0bQ0REB/N+Z6MyWltJCWvoqzWumkrP vKoYXXVdcLEeDTFSWAQXAUUMQUPrTuxpTUqGmfk89KBB13HrF9JAeUWCqsnfqmhYb7 VZHrOWljb8PkQ== From: Michael Tokarev To: qemu-devel@nongnu.org Cc: Michael Tokarev , qemu-trivial@nongnu.org Subject: [PULL 10/14] linux-user: assume inotify sycalls are always present Date: Mon, 16 Mar 2026 10:09:58 +0300 Message-ID: <20260316071005.91624-11-mjt@tls.msk.ru> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260316071005.91624-1-mjt@tls.msk.ru> References: <20260316071005.91624-1-mjt@tls.msk.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=212.248.84.144; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -2 X-Spam_score: -0.3 X-Spam_bar: / X-Spam_report: (-0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 @tls.msk.ru) X-ZM-MESSAGEID: 1773645163975154100 Content-Type: text/plain; charset="utf-8" inotify_init() and other syscalls appeared in linux 2.6.13, inotify_init1() - in linux 2.6.27. There's no need to check their presence on linux anymore. Keep condition on TARGET_NR_inotify_init because modern architectures have only more generic inotify_init1(). Other, not linux-specific, places of the code checks for inotify_init1() syscall only. Signed-off-by: Michael Tokarev --- linux-user/fd-trans.c | 5 ----- linux-user/fd-trans.h | 4 ---- linux-user/syscall.c | 19 ++----------------- 3 files changed, 2 insertions(+), 26 deletions(-) diff --git a/linux-user/fd-trans.c b/linux-user/fd-trans.c index f83d1f79d5..64dd0745d2 100644 --- a/linux-user/fd-trans.c +++ b/linux-user/fd-trans.c @@ -18,9 +18,7 @@ #include #include #include -#ifdef CONFIG_INOTIFY #include -#endif #include #ifdef CONFIG_RTNETLINK #include @@ -1861,8 +1859,6 @@ TargetFdTrans target_timerfd_trans =3D { .host_to_target_data =3D swap_data_u64, }; =20 -#if defined(CONFIG_INOTIFY) && (defined(TARGET_NR_inotify_init) || \ - defined(TARGET_NR_inotify_init1)) static abi_long host_to_target_data_inotify(void *buf, size_t len) { struct inotify_event *ev; @@ -1885,4 +1881,3 @@ static abi_long host_to_target_data_inotify(void *buf= , size_t len) TargetFdTrans target_inotify_trans =3D { .host_to_target_data =3D host_to_target_data_inotify, }; -#endif diff --git a/linux-user/fd-trans.h b/linux-user/fd-trans.h index e14f96059c..3bbc15fa1f 100644 --- a/linux-user/fd-trans.h +++ b/linux-user/fd-trans.h @@ -141,9 +141,5 @@ extern TargetFdTrans target_netlink_audit_trans; extern TargetFdTrans target_signalfd_trans; extern TargetFdTrans target_eventfd_trans; extern TargetFdTrans target_timerfd_trans; -#if (defined(TARGET_NR_inotify_init) && defined(__NR_inotify_init)) || \ - (defined(CONFIG_INOTIFY1) && defined(TARGET_NR_inotify_init1) && \ - defined(__NR_inotify_init1)) extern TargetFdTrans target_inotify_trans; #endif -#endif diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 87f9c22b68..1f28e7e93f 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -514,15 +514,7 @@ static int sys_renameat2(int oldfd, const char *old, #endif #endif /* TARGET_NR_renameat2 */ =20 -#ifdef CONFIG_INOTIFY #include -#else -/* Userspace can usually survive runtime without inotify */ -#undef TARGET_NR_inotify_init -#undef TARGET_NR_inotify_init1 -#undef TARGET_NR_inotify_add_watch -#undef TARGET_NR_inotify_rm_watch -#endif /* CONFIG_INOTIFY */ =20 #if defined(TARGET_NR_prlimit64) #ifndef __NR_prlimit64 @@ -13441,8 +13433,8 @@ static abi_long do_syscall1(CPUArchState *cpu_env, = int num, abi_long arg1, case TARGET_NR_futex_time64: return do_futex(cpu, true, arg1, arg2, arg3, arg4, arg5, arg6); #endif -#ifdef CONFIG_INOTIFY -#if defined(TARGET_NR_inotify_init) + +#ifdef TARGET_NR_inotify_init case TARGET_NR_inotify_init: ret =3D get_errno(inotify_init()); if (ret >=3D 0) { @@ -13450,7 +13442,6 @@ static abi_long do_syscall1(CPUArchState *cpu_env, = int num, abi_long arg1, } return ret; #endif -#if defined(TARGET_NR_inotify_init1) && defined(CONFIG_INOTIFY1) case TARGET_NR_inotify_init1: ret =3D get_errno(inotify_init1(target_to_host_bitmask(arg1, fcntl_flags_tbl))); @@ -13458,19 +13449,13 @@ static abi_long do_syscall1(CPUArchState *cpu_env= , int num, abi_long arg1, fd_trans_register(ret, &target_inotify_trans); } return ret; -#endif -#if defined(TARGET_NR_inotify_add_watch) case TARGET_NR_inotify_add_watch: p =3D lock_user_string(arg2); ret =3D get_errno(inotify_add_watch(arg1, path(p), arg3)); unlock_user(p, arg2, 0); return ret; -#endif -#if defined(TARGET_NR_inotify_rm_watch) case TARGET_NR_inotify_rm_watch: return get_errno(inotify_rm_watch(arg1, arg2)); -#endif -#endif =20 #if defined(TARGET_NR_mq_open) && defined(__NR_mq_open) case TARGET_NR_mq_open: --=20 2.47.3 From nobody Tue Apr 7 04:47:54 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 ARC-Seal: i=1; a=rsa-sha256; t=1773645142; cv=none; d=zohomail.com; s=zohoarc; b=L/gTKIqtMnKi9URIFMPbt2lEuHy/IUvOnvq+SQoOGlSFENsn41r3k0yM4hCqwYLLVbxu+0vIGAHdxJPg+7lqpgaw2Q39ThzaVySfHtDu829fiuzSa5FmOQKjnjor+ZuQtJjE0S07tLLxc2Mny4v+kkXgnOlH61rWEzK/JmC+yZA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773645142; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Ge9R2XAjYmV6q7vYWtXzfI0ieZ/+iKsv8abQCYD1Y5A=; b=CEC4DXaz5W8STFOS+xFOSVgOsiJLuTxwj1WlLXrgAdEjDEcOp0XHutdmjWoKsPGKIOhd7myJVPtes1QvEazq6QfOb1tTpJH1gSZ9qBOyga4DVOHLlFIO12Ze0tcarnWtA+rGoydEULfAEeavqA8nmRtp42+FtZe51Gb+aIt2Eik= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773645142369251.8114693643521; Mon, 16 Mar 2026 00:12:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w226g-0008Ij-9c; Mon, 16 Mar 2026 03:11:20 -0400 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 1w2265-0007aN-Ca; Mon, 16 Mar 2026 03:10:44 -0400 Received: from isrv.corpit.ru ([212.248.84.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2263-0007na-Jl; Mon, 16 Mar 2026 03:10:41 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 236C2193C2D; Mon, 16 Mar 2026 10:10:03 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 23FE0380055; Mon, 16 Mar 2026 10:10:06 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tls.msk.ru; s=202602; t=1773645003; bh=CT78znMoqlimioiS3DCVYWSp9dDqIuP3u5vUnyJl+7Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=rItyYghhnhE/pkKNHGjhyI2Jk2rmGaRyAUmKgMG3cmC2wtfchB65EnEWScXqlEja7 Yvn23IjYlcppzBwhPniitU14syuFVaAgPFMGoG9XeML5IB3zD69hm0lRJv3wJjbHxT 2dNHee4NuKQGLt0vGVoUFyAzCt5guUq7NAeRkndT7ZeROy2Nv/tzv8yaTz4lqEApeM AwtlwWf4FLchATKmgvMrBzDPxCmkZr0XACqd0EroaNqaQwgXXoNkkOtowVIS1HFIns eHqLilHzvfNvEpIbLhCAsOvbgBGiox+POdCR6lxW2fZYIPdYk9b5VYw9/eS56dFk5n QrrJSwkgHk7ZA== From: Michael Tokarev To: qemu-devel@nongnu.org Cc: Michael Tokarev , qemu-trivial@nongnu.org Subject: [PULL 11/14] meson.build: stop checking for inotify_init() Date: Mon, 16 Mar 2026 10:09:59 +0300 Message-ID: <20260316071005.91624-12-mjt@tls.msk.ru> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260316071005.91624-1-mjt@tls.msk.ru> References: <20260316071005.91624-1-mjt@tls.msk.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=212.248.84.144; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -2 X-Spam_score: -0.3 X-Spam_bar: / X-Spam_report: (-0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 @tls.msk.ru) X-ZM-MESSAGEID: 1773645145404158500 Content-Type: text/plain; charset="utf-8" the only place in qemu which used the check for inotify_init() was linux-user, which now assumes inotify_init() is always present. There's no need to check for this function anymore. Signed-off-by: Michael Tokarev --- meson.build | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index 59ed1a527a..a0f5e900be 100644 --- a/meson.build +++ b/meson.build @@ -2675,15 +2675,12 @@ endif config_host_data.set('CONFIG_ASAN_IFACE_FIBER', have_asan_fiber) =20 inotify =3D not_found -have_inotify_init =3D cc.has_header_symbol('sys/inotify.h', 'inotify_init') have_inotify_init1 =3D cc.has_header_symbol('sys/inotify.h', 'inotify_init= 1') -if (have_inotify_init or have_inotify_init1) and not cc.has_function('inot= ify_init1') +if have_inotify_init1 and not cc.has_function('inotify_init1') # FreeBSD 14 and older need libinotify-kqueue wrapper inotify =3D cc.find_library('inotify') - have_inotify_init =3D have_inotify_init and inotify.found() - have_inotify_init1 =3D have_inotify_init1 and inotify.found() + have_inotify_init1 =3D inotify.found() endif -config_host_data.set('CONFIG_INOTIFY', have_inotify_init) config_host_data.set('CONFIG_INOTIFY1', have_inotify_init1) =20 # has_header_symbol --=20 2.47.3 From nobody Tue Apr 7 04:47:54 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 ARC-Seal: i=1; a=rsa-sha256; t=1773645100; cv=none; d=zohomail.com; s=zohoarc; b=Gp1gc9NawQ/V4wlv5ym1Ep/GFekolfpb+8cdr9DXpL/Tlu32M3Q0P1AuAVy6JE9Txh5Wy725USYGd1eyQk9UPbOWXGDcL2NsvOpoxbKYlssB8xS3Q2YOuLR84T/zkji9MNW6BJPPzfWoFb8QHWnbYUrcluGMAsp642GpbhJZh1g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773645100; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=2qVl7QEYj/cG67w4WMpHzKvP3d45+BfryP7DmZUj8Wk=; b=L2HldhjZGXBGIUmtV+GSBMYZ64DrsGI/Xw6/lk/BRUHwiTLgE4eMWSYgwu+PmG8QJulh1YYQCjbMqkmmHVVHY9dvXPgCAYmZY9jtMxQP16YupDO1oACAqCGSlJs2PUGsTszgKMYtY+9MfJgeSPxc7JmkVUOf+TQjEojiYDPR+OU= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773645100387793.2078296120274; Mon, 16 Mar 2026 00:11:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w226a-00087x-FD; Mon, 16 Mar 2026 03:11:12 -0400 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 1w2269-0007bO-WD; Mon, 16 Mar 2026 03:10:47 -0400 Received: from isrv.corpit.ru ([212.248.84.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2268-0007oI-37; Mon, 16 Mar 2026 03:10:45 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 2E9A9193C2E; Mon, 16 Mar 2026 10:10:03 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 38932380056; Mon, 16 Mar 2026 10:10:06 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tls.msk.ru; s=202602; t=1773645003; bh=AcNMYIFDrEN54FI0tN/yss+Qg87nVMQ2Wyhg1uY/8v4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=fTUFqLYZeTdXsf/bbzvYejIBTF22JvNTowKf6F2sLkqxZonUPxP5S6UhQuSgLtJM7 /289IUYXOfse1Ry7R3omMbVsEr/SPOCHP0UDrEsidd1IfaIvatHbfe5D7hI2FO/8VA ylg1mT52VptGKH/+DvMKV0xBZXb6B6wPtFfxrypTSK5bKtdJSLGEJGYTflzPInxqup vF5dn5+s6gMzlmY+5yHTf2Eem8E6L0gSVHFXWADZ/VJH6r4//KWVETZ0G7/87bHael HsE7pipG1zIjXqiSCsq71DKIq0mjceBagUs+qH9BbCnxwRO6Npr0bRJWyS+AYwYpb9 wxjgPtn7xavNA== From: Michael Tokarev To: qemu-devel@nongnu.org Cc: Michael Tokarev , qemu-trivial@nongnu.org Subject: [PULL 12/14] linux-user: assume epoll is always present Date: Mon, 16 Mar 2026 10:10:00 +0300 Message-ID: <20260316071005.91624-13-mjt@tls.msk.ru> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260316071005.91624-1-mjt@tls.msk.ru> References: <20260316071005.91624-1-mjt@tls.msk.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=212.248.84.144; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -2 X-Spam_score: -0.3 X-Spam_bar: / X-Spam_report: (-0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 @tls.msk.ru) X-ZM-MESSAGEID: 1773645103012154100 Content-Type: text/plain; charset="utf-8" epoll is in linux since 2.6 (glibc 2.3.2). epoll_init1 has been added in 2.6.27 (glibc 2.9). There's no need to check for its presence, including all other epoll-related syscalls. Modern architectures don't have epoll_create(), only epoll_create1(), so keep conditional around the former. Reviewed-by: Richard Henderson Signed-off-by: Michael Tokarev --- linux-user/syscall.c | 10 ++-------- linux-user/syscall_defs.h | 3 --- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 1f28e7e93f..7832a1aba5 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -73,9 +73,7 @@ #ifdef CONFIG_EVENTFD #include #endif -#ifdef CONFIG_EPOLL #include -#endif #ifdef CONFIG_ATTR #include "qemu/xattr.h" #endif @@ -13732,16 +13730,13 @@ static abi_long do_syscall1(CPUArchState *cpu_env= , int num, abi_long arg1, case TARGET_NR_signalfd: return do_signalfd4(arg1, arg2, 0); #endif -#if defined(CONFIG_EPOLL) + #if defined(TARGET_NR_epoll_create) case TARGET_NR_epoll_create: return get_errno(epoll_create(arg1)); #endif -#if defined(TARGET_NR_epoll_create1) && defined(CONFIG_EPOLL_CREATE1) case TARGET_NR_epoll_create1: return get_errno(epoll_create1(target_to_host_bitmask(arg1, fcntl_= flags_tbl))); -#endif -#if defined(TARGET_NR_epoll_ctl) case TARGET_NR_epoll_ctl: { struct epoll_event ep; @@ -13770,7 +13765,6 @@ static abi_long do_syscall1(CPUArchState *cpu_env, = int num, abi_long arg1, } return get_errno(epoll_ctl(arg1, arg2, arg3, epp)); } -#endif =20 #if defined(TARGET_NR_epoll_wait) case TARGET_NR_epoll_wait: @@ -13856,7 +13850,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, = int num, abi_long arg1, g_free(ep); return ret; } -#endif /* CONFIG_EPOLL */ + #ifdef TARGET_NR_prlimit64 case TARGET_NR_prlimit64: { diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 20d862fd8b..aac8b0c574 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -2595,7 +2595,6 @@ struct target_drm_i915_getparam { #define FUTEX_CLOCK_REALTIME 256 #define FUTEX_CMD_MASK ~(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIM= E) =20 -#ifdef CONFIG_EPOLL #if defined(TARGET_X86_64) #define TARGET_EPOLL_PACKED QEMU_PACKED #else @@ -2616,8 +2615,6 @@ struct target_epoll_event { =20 #define TARGET_EP_MAX_EVENTS (INT_MAX / sizeof(struct target_epoll_event)) =20 -#endif - struct target_ucred { abi_uint pid; abi_uint uid; --=20 2.47.3 From nobody Tue Apr 7 04:47:54 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 ARC-Seal: i=1; a=rsa-sha256; t=1773645109; cv=none; d=zohomail.com; s=zohoarc; b=fx0AESU5D6iAFIJlbaLv6eCJVAhUw6pTApBZMGc8PsFGjNzYfRZX15z+NaknJ84XrUZ0NaIiO8mbPB4uf2Rk4VbxfOKR8CvqLZgin7JHayu+QnSh4bqow6XJMf/8fpbqlRgcNUJj27OCdzWS5ilv7OSVoU5Z4jSOoW/N1ncvut0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773645109; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=1wLrSO28zsIKL3GWSoeMDND5iPsYtmoTabrafH0Bd+I=; b=mXBYT3m5cHablwRzTqN/4d+/0nDUcndVcGGetOQsIdDK4vKyyz3uFwRp/YQLxivtilVQOk1xYn8K3AUzZUq1o1Kpxj9bNOv67yREY1WKrunVDaI1CEkJW257ucUsy/Gw8Qb1ZIfPn+G6jZG9V4Gi6TFqhyRPY2R7cA6YQGw3eIk= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773645109159396.83713222288713; Mon, 16 Mar 2026 00:11:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2273-0000dG-6Z; Mon, 16 Mar 2026 03:11:41 -0400 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 1w226V-00080F-KF; Mon, 16 Mar 2026 03:11:07 -0400 Received: from isrv.corpit.ru ([212.248.84.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w226U-0007oa-2h; Mon, 16 Mar 2026 03:11:07 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 442E7193C2F; Mon, 16 Mar 2026 10:10:03 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 43753380057; Mon, 16 Mar 2026 10:10:06 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tls.msk.ru; s=202602; t=1773645003; bh=TkWaQgp9jhEp4k+GJCTApTpP59lyB+/awqTiFbyQpNI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Kwbz+yYN6uebNR0D36PRxQ6n7JEfKC8f59NEHSiUQTO4+3nNKY5lZURtxMk9yqDIn kBewDwxEqU1EjuvksZvuCveTWengp2MB98osmDcMItbDMAkEIG5GZJuxlCsCkPjzU5 kRRnQxy3OzSiahSyN0l47qraZ5YMA9U0aQSGGEj+UMjMS3vEa85L4Yaas3xCi55kNx ofGv1hXFMVHNNVv+UNwGRWIeJvnwvpYIvVrmos/WhIjO/BJBl4y3FQtP1Fu/u+ECet all0k2+ktHy55Pn+bVn/euE9gJ9n6W5szks4f2NBAcoqEAn4HO0xPKE12ONnO4UMkV yiUym39s53t7w== From: Michael Tokarev To: qemu-devel@nongnu.org Cc: Michael Tokarev , qemu-trivial@nongnu.org Subject: [PULL 13/14] meson.build: do not check for epoll.h (CONFIG_EPOLL) Date: Mon, 16 Mar 2026 10:10:01 +0300 Message-ID: <20260316071005.91624-14-mjt@tls.msk.ru> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260316071005.91624-1-mjt@tls.msk.ru> References: <20260316071005.91624-1-mjt@tls.msk.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=212.248.84.144; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -2 X-Spam_score: -0.3 X-Spam_bar: / X-Spam_report: (-0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 @tls.msk.ru) X-ZM-MESSAGEID: 1773645111155154100 Content-Type: text/plain; charset="utf-8" The only place where we used CONFIG_EPOLL was linux-user, which now enables it unconditionally. Reviewed-by: Richard Henderson Signed-off-by: Michael Tokarev --- meson.build | 1 - 1 file changed, 1 deletion(-) diff --git a/meson.build b/meson.build index a0f5e900be..264a1c4b72 100644 --- a/meson.build +++ b/meson.build @@ -2595,7 +2595,6 @@ config_host_data.set('CONFIG_FSFREEZE', qga_fsfreeze) config_host_data.set('CONFIG_FSTRIM', qga_fstrim) =20 # has_header -config_host_data.set('CONFIG_EPOLL', cc.has_header('sys/epoll.h')) config_host_data.set('CONFIG_LINUX_MAGIC_H', cc.has_header('linux/magic.h'= )) valgrind =3D false if get_option('valgrind').allowed() --=20 2.47.3 From nobody Tue Apr 7 04:47:54 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 ARC-Seal: i=1; a=rsa-sha256; t=1773645169; cv=none; d=zohomail.com; s=zohoarc; b=L/sc0PqMY6pUHNedwmn1+KhwcHAfP1NFuTIrmFV81qo8Eoz+wYmVA5UZn4xXrEabUPilfOVQLmVXMwOfT+ynHS3lJQnGmcaP/HwCcn07kW6YKCEJGGJ5cLMgWVCNq7Xg7rQPZAqE+P6iJXzlXXalYIs/q9I0lk9us6/zyvzEEPE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773645169; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=uv4v+Jt19mQRYRi+5Pbm0gYy9GVL1ZiMNf4o8rts29o=; b=i05aOhLqdAk/s5nnrZ3Pc7OQhFs2k7pDYvEiEICefFQu/SlW7vB6jZemrSg+L/MOGCK5mP5w/YVcoIYRjRZcnYxO7ZpNWeE+BVpzMFZfIT+ge9nuayExFotruamXl5R/bOnWL5pK1fDOu/iaGkOrqBT13FTrAnYMtZr882794EI= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773645169475120.87751201892524; Mon, 16 Mar 2026 00:12:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w226p-0000Az-Hx; Mon, 16 Mar 2026 03:11:27 -0400 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 1w226X-00082e-8o; Mon, 16 Mar 2026 03:11:09 -0400 Received: from isrv.corpit.ru ([212.248.84.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w226V-0007p2-GT; Mon, 16 Mar 2026 03:11:08 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 4EB15193C30; Mon, 16 Mar 2026 10:10:03 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 5947A380058; Mon, 16 Mar 2026 10:10:06 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tls.msk.ru; s=202602; t=1773645003; bh=O/QobWZYO3a1Slm7Q6FoRbaGyn2a5zCc8rwbvewyogg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=V4gu9l8g2Zgky7Hv3DkVnA4wLAOsv5AmdajrxiJ6bnADU5xPSBR2qglvJGJFArzqm emFql9oPMYEM7HeSL2tTkm+rzxAf+P+0yZb6NiGacJInzUmTR+Dpqb4lGrb2PqHpUY GquKDcmk/HRIUatUfaEWG9vyTpG4yKPDXRL8Ei1SYkv5QO1Js6DookEwRc/b1ZlUcX eXKW7MyUjpsZ9ns3JTpGfNzaHNoM0Iyawopix2maV1Qgto9cjSU3PQUVHo4pi6XpiU VwAMZrC+yTPDtnHDpXfrhAWY7Ci+hQhmJffqCMPnImXfiOitg9GskgN1AViEgeTjjX 53n0sE1BcbZWg== From: Michael Tokarev To: qemu-devel@nongnu.org Cc: Michael Tokarev , qemu-trivial@nongnu.org Subject: [PULL 14/14] rename CONFIG_EPOLL_CREATE1 to CONFIG_EPOLL, and stop checking for epoll in meson.build Date: Mon, 16 Mar 2026 10:10:02 +0300 Message-ID: <20260316071005.91624-15-mjt@tls.msk.ru> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260316071005.91624-1-mjt@tls.msk.ru> References: <20260316071005.91624-1-mjt@tls.msk.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=212.248.84.144; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -2 X-Spam_score: -0.3 X-Spam_bar: / X-Spam_report: (-0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 @tls.msk.ru) X-ZM-MESSAGEID: 1773645172070154100 Content-Type: text/plain; charset="utf-8" Since CONFIG_EPOLL is now unused, it's okay to perform this rename, to make it less ugly. Since epoll is linux-specific and is always present on linux, define CONFIG_EPOLL to 1 on linux, without compile-time test. Signed-off-by: Michael Tokarev --- meson.build | 3 +-- util/aio-posix.h | 4 ++-- util/meson.build | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index 264a1c4b72..b2154bb928 100644 --- a/meson.build +++ b/meson.build @@ -2685,8 +2685,7 @@ config_host_data.set('CONFIG_INOTIFY1', have_inotify_= init1) # has_header_symbol config_host_data.set('CONFIG_BLKZONED', cc.has_header_symbol('linux/blkzoned.h', 'BLKOPENZONE= ')) -config_host_data.set('CONFIG_EPOLL_CREATE1', - cc.has_header_symbol('sys/epoll.h', 'epoll_create1')) +config_host_data.set('CONFIG_EPOLL', host_os =3D=3D 'linux') config_host_data.set('CONFIG_FALLOCATE_PUNCH_HOLE', cc.has_header_symbol('linux/falloc.h', 'FALLOC_FL_PUN= CH_HOLE') and cc.has_header_symbol('linux/falloc.h', 'FALLOC_FL_KEE= P_SIZE')) diff --git a/util/aio-posix.h b/util/aio-posix.h index 0cedb8d189..ab894a3c0f 100644 --- a/util/aio-posix.h +++ b/util/aio-posix.h @@ -52,7 +52,7 @@ extern const FDMonOps fdmon_poll_ops; /* Switch back to poll(2). list_lock must be held. */ void fdmon_poll_downgrade(AioContext *ctx); =20 -#ifdef CONFIG_EPOLL_CREATE1 +#ifdef CONFIG_EPOLL bool fdmon_epoll_try_upgrade(AioContext *ctx, unsigned npfd); void fdmon_epoll_setup(AioContext *ctx); =20 @@ -71,7 +71,7 @@ static inline void fdmon_epoll_setup(AioContext *ctx) static inline void fdmon_epoll_disable(AioContext *ctx) { } -#endif /* !CONFIG_EPOLL_CREATE1 */ +#endif /* !CONFIG_EPOLL */ =20 #ifdef CONFIG_LINUX_IO_URING bool fdmon_io_uring_setup(AioContext *ctx, Error **errp); diff --git a/util/meson.build b/util/meson.build index e7a2a2a64c..33132c04ad 100644 --- a/util/meson.build +++ b/util/meson.build @@ -3,7 +3,7 @@ util_ss.add(files('thread-context.c'), numa) if host_os !=3D 'windows' util_ss.add(files('aio-posix.c')) util_ss.add(files('fdmon-poll.c')) - if config_host_data.get('CONFIG_EPOLL_CREATE1') + if config_host_data.get('CONFIG_EPOLL') util_ss.add(files('fdmon-epoll.c')) endif util_ss.add(files('compatfd.c')) --=20 2.47.3