From nobody Sat Nov 15 07:40:55 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1753790383; cv=none; d=zohomail.com; s=zohoarc; b=G44OQZSuM6j6VqXS+b6ppVuJjGK5HjOKBUDDFXj9YFovwxfJH/L37a07TC8zD0bbjDbAqziKjUu+SRtcybZqkZRZP0E8ObJ5IDN7P2l5m0VuBS9MBfj5YZenTCwc4QwFkUMBtB9NnQf8aGbYdY94TRITQVdQSLGgkjjxATVGdwQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1753790383; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=qlMPsFcRkecAJn4sG0LZ+bCyhxVU/WClwqhj9h0KqLU=; b=i0owm4bu0dD64zcAhUbTv9UZYEc0bdIVJ6VPihiQXrZApl6tenUsmQSNKWtD8RmxvEfubbxt0zYLOiOq/zaoIohMRBTrQaDavxMorqlO2efAKz6khv6xU3rizz9ToRxKRJu8O+ThvbkCzVF01wqTBGmjxPTgJTEvaF/2eRC8VYU= 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 1753790383097926.5208505846589; Tue, 29 Jul 2025 04:59:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ugixw-0002Kk-VN; Tue, 29 Jul 2025 07:57:57 -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 1ugixt-00028U-Er for qemu-devel@nongnu.org; Tue, 29 Jul 2025 07:57:53 -0400 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 1ugixm-0006CZ-3K for qemu-devel@nongnu.org; Tue, 29 Jul 2025 07:57:53 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-45618ddd62fso54610465e9.3 for ; Tue, 29 Jul 2025 04:57:43 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-458705bcb61sm191001725e9.20.2025.07.29.04.57.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 29 Jul 2025 04:57:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1753790262; x=1754395062; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qlMPsFcRkecAJn4sG0LZ+bCyhxVU/WClwqhj9h0KqLU=; b=nc2OrzsiuOcAp2UDvWG68LZ0MYbtJGgGABaNEH245pnnsfE2A16WJdK4X/eMghxOqx g2f6QnSBNTkms+Z9Hedvk7MpQgTbhJj3FcFxujPW8xWchY8/xNxDxTiIaO7kAxA1ZSg9 cN67lRoYF4ufSzQfs5iUBQ4hU1hrr9ghE4iUlhv+BM6wCUZlzBndnTImxOqOBSfI9n5h BZzFZKwgSbkNujkvmHFAEJSTNXBZj2IKgJeWUq1Ejrjurgc+od5vL73EiEJ9ibB+HTU3 QUXAI2WvzzaLjNyJvtHAb+B8Sn7eolcnL4Mlxqm0XMjaUEg/WtMqIw1eQV4uaI5pOYQt 2n7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753790262; x=1754395062; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qlMPsFcRkecAJn4sG0LZ+bCyhxVU/WClwqhj9h0KqLU=; b=Bs5qX0UJHflqEXCjvkybmnW7sjl9HjBNHA1KGXkWySJQjwgA+vabIQXE6oRIM+4rdH Cpd1Y/lK6Y/wuYI4LwyCGwU/G4w0AkXjHnbQe9TBFsCnMD+4e5giXtydUi1s4kJr1x6i IgNSpLTKrbkBH1gScXsxufkNz3mXYnSpOjeW5iXuUYkIs5LlMhEczyabjKdoTk8ady7U ksg18N/mtX0tAL1iMJVdXwaA6RRDoSAM1/UTiBzZkm+r5U7nbHXEpCP8zFYkj9tUbGuS 7DJLfqo3ZnoBgrUBwEYSN3pZNcv2AmqdnabFzxAKlKEapOYlpIEMSzLhUUGKvvvM+FT7 dnlQ== X-Gm-Message-State: AOJu0YwH3tDxDAegEsu1X7Ahs7yVViTcjl+r0oqEIektDuArMw81CcxI fV8gvbCpIz4FCf7tOlZOIxgAY2Ji5Xx1jWJHYZ0VTzO4BtmIYjBNj9UkuP55jaOK10DOQqgXxPo pe4Gw X-Gm-Gg: ASbGnct6KFxGDmSxSLXRK/SzS0f02pXRrz07qn4BfiPveEvnYQgtRWX07yNhEVagzo6 SbN7uKMhXtTZ0NsnqU2aBbKJBuh0MBzxSaeZr+0eLfSssfz9vjpfhgfNQI/vldAQ4JD5I+/7atR zjYJ7gwBZu8KNHf/GX4cBOtmotzLCN1NBdNl3XZw6bOkQSySu+jbA577GtMIBM6A/uvV2Po3nLk 58nE5MPKh/eg9Om2j1zrW2lBNxoyQTRUoQRQ8219cjhKtYVrG1ylJCmi8d7wswoLvxlaPmoksdz 9b1OIalN8woiLR8vDpYnPTdVCmflwd8Gm27Rt2Jp/GLnstIGFavwEmGYm8dHj1rpkxPvwil1o3V F8EWBWOYnSMZnkL2r/HsGv3F327wR1NkT7//51JJr5fkTCcvCA8hRi+OvsgQEnuewScOgH/dU X-Google-Smtp-Source: AGHT+IHaLH4m3hWKP+mnTa4+aJppGB3FqFEQNseWODpswY5ubtPIlj3Y23GMTmWKAH57lkvxrmRTjA== X-Received: by 2002:a05:600c:3ace:b0:456:25aa:e9b0 with SMTP id 5b1f17b1804b1-4587654b626mr154620205e9.16.1753790261828; Tue, 29 Jul 2025 04:57:41 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-stable@nongnu.org, Jiaxun Yang , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno , Aleksandar Rikalo Subject: [PULL 1/9] target/mips: Only update MVPControl.EVP bit if executed by master VPE Date: Tue, 29 Jul 2025 13:57:26 +0200 Message-ID: <20250729115735.33619-2-philmd@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250729115735.33619-1-philmd@linaro.org> References: <20250729115735.33619-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 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_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1753790385680116600 From: Philippe Mathieu-Daud=C3=A9 According to the 'MIPS MT Application-Speci=EF=AC=81c Extension' manual: If the VPE executing the instruction is not a Master VPE, with the MVP bit of the VPEConf0 register set, the EVP bit is unchanged by the instruction. Modify the DVPE/EVPE opcodes to only update the MVPControl.EVP bit if executed on a master VPE. Cc: qemu-stable@nongnu.org Reported-by: Hansni Bu Buglink: https://bugs.launchpad.net/qemu/+bug/1926277 Fixes: f249412c749 ("mips: Add MT halting and waking of VPEs") Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Jiaxun Yang Message-ID: <20210427133343.159718-1-f4bug@amsat.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/mips/tcg/system/cp0_helper.c | 32 ++++++++++++++++------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/target/mips/tcg/system/cp0_helper.c b/target/mips/tcg/system/c= p0_helper.c index 101b1e65fdd..b69e70d7fcf 100644 --- a/target/mips/tcg/system/cp0_helper.c +++ b/target/mips/tcg/system/cp0_helper.c @@ -1562,12 +1562,14 @@ target_ulong helper_dvpe(CPUMIPSState *env) CPUState *other_cs =3D first_cpu; target_ulong prev =3D env->mvp->CP0_MVPControl; =20 - CPU_FOREACH(other_cs) { - MIPSCPU *other_cpu =3D MIPS_CPU(other_cs); - /* Turn off all VPEs except the one executing the dvpe. */ - if (&other_cpu->env !=3D env) { - other_cpu->env.mvp->CP0_MVPControl &=3D ~(1 << CP0MVPCo_EVP); - mips_vpe_sleep(other_cpu); + if (env->CP0_VPEConf0 & (1 << CP0VPEC0_MVP)) { + CPU_FOREACH(other_cs) { + MIPSCPU *other_cpu =3D MIPS_CPU(other_cs); + /* Turn off all VPEs except the one executing the dvpe. */ + if (&other_cpu->env !=3D env) { + other_cpu->env.mvp->CP0_MVPControl &=3D ~(1 << CP0MVPCo_EV= P); + mips_vpe_sleep(other_cpu); + } } } return prev; @@ -1578,15 +1580,17 @@ target_ulong helper_evpe(CPUMIPSState *env) CPUState *other_cs =3D first_cpu; target_ulong prev =3D env->mvp->CP0_MVPControl; =20 - CPU_FOREACH(other_cs) { - MIPSCPU *other_cpu =3D MIPS_CPU(other_cs); + if (env->CP0_VPEConf0 & (1 << CP0VPEC0_MVP)) { + CPU_FOREACH(other_cs) { + MIPSCPU *other_cpu =3D MIPS_CPU(other_cs); =20 - if (&other_cpu->env !=3D env - /* If the VPE is WFI, don't disturb its sleep. */ - && !mips_vpe_is_wfi(other_cpu)) { - /* Enable the VPE. */ - other_cpu->env.mvp->CP0_MVPControl |=3D (1 << CP0MVPCo_EVP); - mips_vpe_wake(other_cpu); /* And wake it up. */ + if (&other_cpu->env !=3D env + /* If the VPE is WFI, don't disturb its sleep. */ + && !mips_vpe_is_wfi(other_cpu)) { + /* Enable the VPE. */ + other_cpu->env.mvp->CP0_MVPControl |=3D (1 << CP0MVPCo_EVP= ); + mips_vpe_wake(other_cpu); /* And wake it up. */ + } } } return prev; --=20 2.49.0 From nobody Sat Nov 15 07:40:55 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1753790361; cv=none; d=zohomail.com; s=zohoarc; b=Cz5tfXf1ZzOJFDE/vzqYd2ntlysvdZKW+n9sR065nrATUeTo/pAY5VOlwFTyqa/ugcLMHEjBxxJJINkv0EyUuX2aBtyGoUAx5HkoX7HzKcAd1r5MaqxkE3jCY4vXA0JWu0vtiA05d/p5/6F4tnhqBQr33FIS0d3xIICZGMbok50= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1753790361; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=jGU6a5L962cXOl9z6iat7nkHOVFeV0lVntYAA1OoA9c=; b=nNopbe6cIjkN/TYgeYEF90Uq+3FliWyPVeChwTNk50vjysQOg4PqmUTy9ePYVkTQrL36zFQ6B0e8DxSeI3f4kjppGLRVVoSSDQ++1ALGnskmBLQE9l7+t0aOjqk+GCC9x4lvAvITZKR/CvOo16S4P8qH+SOcO5Ii2BkK1L9ax78= 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 175379036098898.4919414699715; Tue, 29 Jul 2025 04:59:20 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ugixv-0002Ii-Jc; Tue, 29 Jul 2025 07:57:55 -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 1ugixt-00028z-Jc for qemu-devel@nongnu.org; Tue, 29 Jul 2025 07:57:53 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ugixo-0006Cr-Lv for qemu-devel@nongnu.org; Tue, 29 Jul 2025 07:57:53 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-3b78b2c6ecfso1117501f8f.0 for ; Tue, 29 Jul 2025 04:57:48 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3b7842a3e59sm8582557f8f.44.2025.07.29.04.57.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 29 Jul 2025 04:57:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1753790266; x=1754395066; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jGU6a5L962cXOl9z6iat7nkHOVFeV0lVntYAA1OoA9c=; b=FSKyX+1UDbeCJT9Q/WHq8o87dKbBVqSUNM4gP2ylgKGCz1pyaj1315sYoqvweX1pbH RFFHkLXy0Ld6qE1N5I5UnvO/0lLkiMKN6bSh/9+HYkEJ6F0GZIrbzjl+YtgGwObKWBjX WNjAc5G31CtSdnwvb2NKnYIRR+oM1AmlBUNTY0mZ51FlkqtE8dUQxrk7lk8d1U9/F1/6 0Bu3lmpKHa8pjUfn1r/LQ+bM/QaL6qsMw0QvzsdeNToiERqyUFaAmnW6AHZUaHXX1XY0 gNFsJccdIKIvkxCJ1pGbUWqXAil7Z9MRh6DVHT+6tIdwWqiX4545H9NnxT+pkVl0T3De mK4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753790266; x=1754395066; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jGU6a5L962cXOl9z6iat7nkHOVFeV0lVntYAA1OoA9c=; b=TH8TxrO9DcXlALuWcaWYJyaLGXsda6v9TVN3I4CtUNUUw2ESOzlRdYE3KS5EYesLcN fjEdukMgSkCusaM6/FGXdVDIzu7KlOM+EdjMzUUtx5dhw1VtPq+5qaNNPq+9gxJqCHCy x5gr1urDFRO3LNy0EMQXVMIv6qRqa3ebfWbzpUZbxJyx/h20y3ZrUftv7SdjyZa3v3bS m9JvTXTgBls2OLYu8hMJ92QFrsM1NlqeFUNpwaL9zWSa+HqURRqiNwpf0o11uAz6y7BN xBDUFIyWkq6KjfTl0UnEYqQyZcJ5f/5QTLNx/cuXW8djBuArIfDSEFXrj5zuAxai2DHi DweA== X-Gm-Message-State: AOJu0Yww8hJMczy9F4ulQ8nQgRyrYIs8smxJNydIantOVitx0qfanQV1 Zf2vBXIFYdyX6+sohQNMc/CMNoNLXdnlLpv2y1YP0ywMslS/LL/o9QInorl8NnvxodIKOq0cAT5 hFZui X-Gm-Gg: ASbGncva3zJtaV/tgmktLzP9KD796ENzp9X9L/M1yzQaWhhgraLoLW6br50yFjOgvRZ VFqMdLlODfIRt2LjnJPRj/CQuDekP8I/xQvcPbiLsw+dOzaushrQvZOj/6QOC9tFJ98MTJYEX1u XnXrfeKiJORE1xv9xcTMe4IDfn573RneHgiE3K+P8uOFRu+LcgSyx3imNnCKIoUrTJCkIhLqs2d t5XCeiVD05Yz7Lxfe8wgWjfR1S1/b0el0GCEVWLAqrRRiu4t66GWempP5xkWycs/iiHytm2mD5s MVFRAbm/Z270eLAucd2sf+MbHIrxmaBWYgtRzSMCPvDvokqb8OoEwT/yPfYfLhXvAxWJX9iYssv tmTeGbFfaTrJTnBywoXfliOyDwrWz/MALHhkvXDRsiCNcx5OYB/MDrXLJrdLgSySE3o6koRwm X-Google-Smtp-Source: AGHT+IGaUxUieApgTi5kqO6K6S0Ni/KFXUn6oguOcYa0zF8XTiYVC1AMPEjqsTEY7f0iVnu1k3AhuA== X-Received: by 2002:a05:6000:40c9:b0:3b7:879c:c15c with SMTP id ffacd0b85a97d-3b7879cca06mr5994638f8f.47.1753790266442; Tue, 29 Jul 2025 04:57:46 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Michael Tokarev , Thaddeus Hogan , Vadim Zeitlin , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 2/9] hw/display/qxl-render: fix qxl_unpack_chunks() chunk size calculation Date: Tue, 29 Jul 2025 13:57:27 +0200 Message-ID: <20250729115735.33619-3-philmd@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250729115735.33619-1-philmd@linaro.org> References: <20250729115735.33619-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 client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1753790363341116600 From: Michael Tokarev In case of multiple chunks, code in qxl_unpack_chunks() takes size of the wrong (next in the chain) chunk, instead of using current chunk size. This leads to wrong number of bytes being copied, and to crashes if next chunk size is larger than the current one. Based on the code by Gao Yong. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1628 Tested-by: Thaddeus Hogan Tested-by: Vadim Zeitlin Signed-off-by: Michael Tokarev Reviewed-by: Thomas Huth Message-ID: <20250221134856.478806-1-mjt@tls.msk.ru> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/display/qxl-render.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hw/display/qxl-render.c b/hw/display/qxl-render.c index eda6d3de37c..c6a9ac1da10 100644 --- a/hw/display/qxl-render.c +++ b/hw/display/qxl-render.c @@ -222,6 +222,7 @@ static void qxl_unpack_chunks(void *dest, size_t size, = PCIQXLDevice *qxl, uint32_t max_chunks =3D 32; size_t offset =3D 0; size_t bytes; + QXLPHYSICAL next_chunk_phys =3D 0; =20 for (;;) { bytes =3D MIN(size - offset, chunk->data_size); @@ -230,7 +231,15 @@ static void qxl_unpack_chunks(void *dest, size_t size,= PCIQXLDevice *qxl, if (offset =3D=3D size) { return; } - chunk =3D qxl_phys2virt(qxl, chunk->next_chunk, group_id, + next_chunk_phys =3D chunk->next_chunk; + /* fist time, only get the next chunk's data size */ + chunk =3D qxl_phys2virt(qxl, next_chunk_phys, group_id, + sizeof(QXLDataChunk)); + if (!chunk) { + return; + } + /* second time, check data size and get data */ + chunk =3D qxl_phys2virt(qxl, next_chunk_phys, group_id, sizeof(QXLDataChunk) + chunk->data_size); if (!chunk) { return; --=20 2.49.0 From nobody Sat Nov 15 07:40:55 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1753790406; cv=none; d=zohomail.com; s=zohoarc; b=Jnklk1qCtDHH1a6Y//l2ZASOepJTH0+O/FKfYxWPYbOvqIzBt2tQOlXeUTnjpNFkLcGvBVJasspywt/tOMvFubPeGT2zU57HMRO6fbtX3h9pXZzEFV+PpAcbLqqPhSTklaY5fv0qLAHCnmlP67J8QLf4s8yo4Iv+n2GLIZ0Izb8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1753790406; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=TG80+zF9cKTj43CmNOK9rOUn4HX8lMYw2LzKA/8cZOU=; b=QzKjvZIBTxa447HvdULUFLhHEvwTnqoAOz4kES/+7OrtJIpW5yn+mRdSXS6e/nHrkgNnCqTYzt7lXp2XynWv8buZLoipJU68nD3NssIVVHKxyZdDKakTTPS4EewUC2MFuyE2K72Tk1btmB0a15hgvbgPW52JMivPRWn/LFpmkhA= 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 175379040623479.10811816015496; Tue, 29 Jul 2025 05:00:06 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ugixx-0002TV-Az; Tue, 29 Jul 2025 07:57:57 -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 1ugixw-0002Ku-9U for qemu-devel@nongnu.org; Tue, 29 Jul 2025 07:57:56 -0400 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 1ugixu-0006DD-4S for qemu-devel@nongnu.org; Tue, 29 Jul 2025 07:57:55 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-3b78a034f17so1610461f8f.2 for ; Tue, 29 Jul 2025 04:57:53 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3b78ba267e3sm4298065f8f.59.2025.07.29.04.57.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 29 Jul 2025 04:57:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1753790271; x=1754395071; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TG80+zF9cKTj43CmNOK9rOUn4HX8lMYw2LzKA/8cZOU=; b=gMgofA3Z1nwEmubRRDOlwcg4w/gEC/8kvXm0fEk+uEjur4mmeLaXrKa13XjiGSGnIZ uZ2nc2yMGylklFCM1zbJzHxAo4HAAvVNQ1r+dPV5PFQt6q6/yEI7cP/PbzV0U5KEZFD0 ksUXqv5sRAwgZLvYEzh76tkwvy0gA62CWMFEdgmSlp0rUOeW82+e7k3kmbxfpaODziU3 0Ul+WpOQUgZe/DWXaya3ODVGHdFJ2bdVFLzTgmy7KQB1j2JNYb01adpDpQ3MtUoav/We WwqE2+tDjqoC063lht3l7v36bVcQc1DUZ1J2iiimRejYctBlFGTWMGr8YjboIuJDNsdX q1/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753790271; x=1754395071; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TG80+zF9cKTj43CmNOK9rOUn4HX8lMYw2LzKA/8cZOU=; b=keScX/M+yQL149eNb5ixfIZxfGUgMxEkGxlSOfElh+dMX383nmbmyowk18mdjHDyUJ UMktspEKYTVHa/75LNduSyfDJmEIZO9qkWmlHXMGTXcP46U4XWzMaQv6s8ky9DAvwQPq 5E3CblgXkOdbl+A4JU5bK1qIDy4rUeFQQUjsB5lwhzj0uMSiHGficAmwq12hZhaiTN1x hPvSZTgRsEpIASvhOGBMSg3YzpIckeddZ6H+tMTNQEdu5iH9K86sIK1maPHJpNOjZRCm 3dPTQgbPBsD0OCZkFoQH2AA9VGNDsMHae0u8qBpZwUga7BD/uz9xrRE83vmsLghshgXj 14+w== X-Gm-Message-State: AOJu0YxLvIB71BpllwjbM2irk7vsmWgPPgqaXtgkCY4mgKOkqWI9qOet 97sbbiiuKrVZ2GGfg0+Fs2lk7yeEK/4sSmYt+g/d/51SnUhCcW1YAsJHLAOc4+iWkLwYtFP7tmp 0Mlxh X-Gm-Gg: ASbGncuot63XS2ejYcjlH6zpf+0rwl/kgZGf5H14StGD5M6EoOPXNMhZgZjEqe9PQtM Pn9TCY9Lun/xFunTcD3pBC/bYfuckFY++uQ9IibmcCl2P38XEYX4i98ZcRX927x5bgr5T8ztVWU K3q6mCWGknTqmhTsckZIlk0C8IzBKpK8sapWveGu8bBap6LFl7MsP7GjE56XnaD45RKxh9teOdG ejeF+meZqNq0zv+NOZBFCs6IzOTMEfROJycR2zYGUAVm6qpDkY9UZJ4V2gV+UUUdyPh5PpdZgxo 6aMC+Lbc6N14xeH4rHvKmsCTbdCWHbNHG7etI7QBIU2EwRQqjODJeHZzUqj0vrk6nwsPUlr34aE IkyZhhp5LlZL1yYe98Kk55JgvlNI4hpj1I+HsLv5X0jEQttBt0qEkgGI51Bf2g50lly5Ny8qS X-Google-Smtp-Source: AGHT+IFclYbd4WOVimBxVNDWFVn3DGNRqOYThxeo2rGiI6yuZAUvHFBHslxuyrd9G8czP7ZJQaXTgQ== X-Received: by 2002:a05:6000:2083:b0:3b7:924a:998f with SMTP id ffacd0b85a97d-3b7924a9d34mr1521035f8f.5.1753790271000; Tue, 29 Jul 2025 04:57:51 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Alex Williamson Subject: [PULL 3/9] hw/vfio/vfio-migration: Remove unnecessary 'qemu/typedefs.h' include Date: Tue, 29 Jul 2025 13:57:28 +0200 Message-ID: <20250729115735.33619-4-philmd@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250729115735.33619-1-philmd@linaro.org> References: <20250729115735.33619-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 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: 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: 1753790407978116600 "qemu/typedefs.h" is already included by "qemu/osdep.h". Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20250708085859.7885-3-philmd@linaro.org> --- hw/vfio/vfio-migration-internal.h | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/vfio/vfio-migration-internal.h b/hw/vfio/vfio-migration-int= ernal.h index 54141e27e6b..814fbd9ebae 100644 --- a/hw/vfio/vfio-migration-internal.h +++ b/hw/vfio/vfio-migration-internal.h @@ -13,7 +13,6 @@ #include #endif =20 -#include "qemu/typedefs.h" #include "qemu/notify.h" =20 /* --=20 2.49.0 From nobody Sat Nov 15 07:40:55 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1753790385; cv=none; d=zohomail.com; s=zohoarc; b=lfZQOCONe/S9gPJRGBycJ/aTMXL9EzUv/5x+/Zg1x1CcEMe1g556y2awRIOrSFaWOI2eHKXtL93ZAtzq8NNqeTK1/q/N0iIvg9efroVU5UaGI/qcc97kYvn0gIWPPbrkL+50AT5dg2chhAgrCTmqjWQyvGic2bJhbWrolwXsPXQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1753790385; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=BpijfTk5ey8lbtSr1qjZ36lDbCV/5lAhHeBTCJwFvjc=; b=FHB0VTgY40HzqtxsoZ6dI0anmEOvgAL/RpaOqpdvi6HRmN2H5HGi+nVXW9loAb1/QT8JrJ3dLPl724u7Tk0pH30yTZEBg5TGk9Y3IWfsyzwQwi6KEXTKoES0/gc/v5RCF+7oISThEUNGJBHudKPtg147WVtZo8xypNVOrpFv2Qo= 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 1753790385723848.2471690120681; Tue, 29 Jul 2025 04:59:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ugiy8-0003Lj-1C; Tue, 29 Jul 2025 07:58: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 1ugiy6-0003Cl-ET for qemu-devel@nongnu.org; Tue, 29 Jul 2025 07:58:06 -0400 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 1ugixy-0006Dw-GN for qemu-devel@nongnu.org; Tue, 29 Jul 2025 07:58:06 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-455b002833bso20952195e9.0 for ; Tue, 29 Jul 2025 04:57:57 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4587054f686sm191217305e9.14.2025.07.29.04.57.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 29 Jul 2025 04:57:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1753790275; x=1754395075; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BpijfTk5ey8lbtSr1qjZ36lDbCV/5lAhHeBTCJwFvjc=; b=INPen6fkuRDtVXBE/VyR6IbzzNyb4E3uui/a4euhSqo3SDrhX76O9RmCLbGrtgfThG N+g1zcDGA5DvouDCOPDcmTViZ+ISTj70tgDbPcgivFxOnCMf12cYfgG6pUmW9uVlr/4b zJIVXvz6RunV2pPT0PPjzgZ6CPKV/wpPIu4RWm0XjUQUI0o2CalOnGpSMhhL8zkQyuCD PBVCvs7vDTv5zARbx5yP2doVIn+2ULtnx5IAsAX5m+xCCfKZHwKAosIcFfqQppt2rINM sPaylKyqtCvkkz1OAZ3UKJ9lFkmci1Bfz9IinuEwI5ePBXORGtemG83I0mmM/V2qnjnT DnqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753790275; x=1754395075; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BpijfTk5ey8lbtSr1qjZ36lDbCV/5lAhHeBTCJwFvjc=; b=vUptEXroCRqNC33HWS4+vdCtOi93ghUuOmCi7LvIO+q803AbRLGcwO685mF/obTtSy xsdFnIQ6GLsjWNsVzKzRsShpI1YFs8B0AgrR9+3gf3WeuFjQyXHrAm7pEvgmDcPV0XA9 R82aqdLeOm/vc4a/zYe7RH8FVEG/lcgu3BGnHwlbg5Z9O4GcjcVeW+iu+Jy6YY0XyB7q YvZO67xitCE2SxLEqA8s89UWgrn1pbyDCc0t0u0GIRJwsN5YG9s8/PYmZ02030a9fnf5 +BH+eobI7lsESr3fYYIEcN+Y61urjyXi+HDr7y/RQpMqw0IX/mYLn2X51JS8KnYGdVwl 5kGg== X-Gm-Message-State: AOJu0YyeEKuQ19gFdDjMO7ZsuS9WsV4SrMTZBsmf3NaUpc0g8dr4W4Vz bjo3WcUELGUsXjOjeoAC+FTvizoY//WSnVf3WALe+h6O1R7+3cf/SujpWYVkWnKEcgj+fCyWqta xlVz6 X-Gm-Gg: ASbGnctTb/QhO4q+fMVatsqaMOCftT92tvG4BRstlJblVosJqlURjAdPdyOWG5BIoaM 8obTsJqf8M4JTUw/MbVeBHWKU0CUY1VyyA4kmH/PT0arPix7QcJtrrkyi4FvtZB1+wAqiYrWdlq d4RbKD5rOP5RGj96+pU8s6rkHetzDYzIk7UyyiOajmEoiQ7GoZuBubkJ+krAsHTlCrt6ZIqbsLl ZCMGaOj4rDMOe+VK8T51hvgES2YveQBz08YLG2hE/0v5rvDtFElz0mGrGH0bzPM4bgUMgcsThRC ivVzRkIYfCVZmAT3Ao4Eh22yqVY70vIzn5arzCgj7EdQGHfWsi+TQEdGPVL4V/J6+Q+Jpo+ti7i LVuYoBy1xjK64FG0pkF/Mrvrh9NBuw2synGUh33izxvoKR0gsK3bGOhmsP5ArbpPZP3s2NAzU X-Google-Smtp-Source: AGHT+IGo2b9BijLrwmPTeoGevbU0PgrlM/bbdRCieWVnBQ0qoZSk74t97htyig6evKPznenY30TpXQ== X-Received: by 2002:a05:600c:3f0b:b0:442:e9eb:cba2 with SMTP id 5b1f17b1804b1-4588b7d28f2mr50826645e9.0.1753790275530; Tue, 29 Jul 2025 04:57:55 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Richard Henderson , Fabiano Rosas , Peter Xu , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 4/9] migration: rename target.c to vfio.c Date: Tue, 29 Jul 2025 13:57:29 +0200 Message-ID: <20250729115735.33619-5-philmd@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250729115735.33619-1-philmd@linaro.org> References: <20250729115735.33619-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 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: 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: 1753790387442116600 From: Pierrick Bouvier Signed-off-by: Pierrick Bouvier Reviewed-by: Richard Henderson Acked-by: Fabiano Rosas Reviewed-by: Peter Xu Message-ID: <20250725201729.17100-3-pierrick.bouvier@linaro.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- migration/{target.c =3D> vfio.c} | 2 +- migration/meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename migration/{target.c =3D> vfio.c} (90%) diff --git a/migration/target.c b/migration/vfio.c similarity index 90% rename from migration/target.c rename to migration/vfio.c index 12fd399f0c5..0b64e49ef06 100644 --- a/migration/target.c +++ b/migration/vfio.c @@ -1,5 +1,5 @@ /* - * QEMU live migration - functions that need to be compiled target-specific + * QEMU live migration - VFIO * * This work is licensed under the terms of the GNU GPL, version 2 * or (at your option) any later version. diff --git a/migration/meson.build b/migration/meson.build index 9aa48b290e2..276da3be5a3 100644 --- a/migration/meson.build +++ b/migration/meson.build @@ -51,4 +51,4 @@ system_ss.add(when: qatzip, if_true: files('multifd-qatzi= p.c')) =20 specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: files('ram.c', - 'target.c')) + 'vfio.c')) --=20 2.49.0 From nobody Sat Nov 15 07:40:55 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1753790372; cv=none; d=zohomail.com; s=zohoarc; b=VVwiYDCGQQ6vG4mUGeQDoJyJS/DjxGry4df0RzPt7/AFuFuWenL5xmi2JME6gR7jsynexKo4i9WU8xf85GCpm83Ws9hgBTjvLa7QmP3QG23onATbyW1ajy5SOx2xdBxWPDawCiBUEqS5HqpmmukDIaGh0xwDGFlYh+iWfKmOnuw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1753790372; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=lRnxsxDSzCOpoWZVRmPH/J8Ta9I3EJlki8/3qSZwuX4=; b=JmrQlcBMQiGJp3AvM0rF2Teqfm8gAtqqmV1Hieo7pKaEnf/ILvF6eOC3F/yu/Cr4bG7lm6lyf/ijLouVJV3TxuV69w/Qq8oeAZvkb8rD3eYDfFfFzKKoytv/AM2Lbc5SmgFJPxaExTw5wM+CCA4+xJtwdqJpGeWxgIlabLFA0zU= 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 1753790372161122.43220676898488; Tue, 29 Jul 2025 04:59:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ugiy9-0003UI-MV; Tue, 29 Jul 2025 07:58:09 -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 1ugiy7-0003KP-OQ for qemu-devel@nongnu.org; Tue, 29 Jul 2025 07:58:07 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ugiy3-0006FO-Kp for qemu-devel@nongnu.org; Tue, 29 Jul 2025 07:58:07 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-455ecacfc32so22838585e9.3 for ; Tue, 29 Jul 2025 04:58:03 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4588ee11c91sm11240745e9.4.2025.07.29.04.57.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 29 Jul 2025 04:58:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1753790281; x=1754395081; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lRnxsxDSzCOpoWZVRmPH/J8Ta9I3EJlki8/3qSZwuX4=; b=sf8PRfMiHN37rRxYa429vEhHDOkpvUDiw7fV0zccD0AjVx4U9/aSZQI+6BkinJQ4fK T7aspd8GXEqmPiPzWmQKSuF83yCDxrtOjI/4M0AZsRqP6UikMS3M+/q832GIm8fYjMUo xMKy2yJZNXpf8u2dKlz6uo6ywbSWhhwlFpH46Fw9ork5Y2KQlwpwIiSHr13CuA0yp2YS WNRaWMj3ZVpX7nfU+VRHEzt6vHyu9bEdPtjL3cJggVozY+0e8VuIdVkrtuKb6XnrFQHr 89tkQvxOSMSEfCNFQvjcPs2e6yNqd58HMfFO62yV4r7t4k8apO/9iDvjxUTjvfgz+lIf rwaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753790281; x=1754395081; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lRnxsxDSzCOpoWZVRmPH/J8Ta9I3EJlki8/3qSZwuX4=; b=OfkIgKGGMLg1G/XwSdL52rw+N973+KcZVaQkiyneNmlHIbXDPrkYaXODLo7a6186w4 FaKx4SYrKCuyi3PhxeFeNZl8peRU3FfwftIf1Q8S8RBOxpiZz41+ggnmZIyoKrovyHNG t1Gn+Qk6QWoLD08xGRM0D03lwIMwcultWJfrgkgdfecz5GMOfKphJmO5jGeFi0Cuj8QV 8hFKnD2xbmIiaTzxzfu8uK/c2y66AukIngbBm9PGwZdqlv2jlGLAf6q6pUGF8008484p Setwd7PeS7yrNxMBd7iGTOUIVZnai5fzjqUGFBQPrK8He63jzl1i12K91r0cn5ZW5Xlx NaJw== X-Gm-Message-State: AOJu0YxbUDGMqHX/Se9QQhp+CWQxPe00THzc9v1pJFQM7TZjYxXnQYa8 zy9kpw3cs00CKCBX67zP2addg/1MQ509nwGmeCRnGAN8QK8lxhxpSXejN2yH6I9ItCWmm0+l6HA Strl+ X-Gm-Gg: ASbGncuoVLTUM2SnzNmBfeope83VmPh/N/zTHo90NtAPM+5VrRMNHXXFMev/eDKybV9 mabWoczd9U01DCKDpCuH1mypV2rz3EsvjtK2G18cs5kguzS0YHX1BuXBAqbRuJMKMvrHDOKi2HC NBB6qH/7VLteRYwPxeNCy0fkZUbMizCHn6Zpk+wQA3pi6AFJkDdGnyARsk1oD4Wjh0nBMe37eKm 0DmFDZJmb6n6hPM0NbRD9/IYo4Rigtl3H7kRONTQKky1864vfG03gl21nYiA+yFSn+xUgG242M7 UPDaRZTmpOaa8nMpFaIraDj+2Ou4ab0Z9z36mqVJZ5Kd0D/zezNBeStLwA/3KjNiquYxVE/+iZH 8CkBZhdjMRCcM7Me4+Ahd4+jBGoqCse2Yz1QTP5CLtvOibqase6GRApdos/wYt3r32MhcDvtG X-Google-Smtp-Source: AGHT+IHu2fbOTUGSX2J/50N6V/iYeoAU6KhTTfxUYFj1XtrQ9l0Wno1Kfm+k6IpEyK7/bej9Jg6qBw== X-Received: by 2002:a05:600c:1914:b0:456:c50:1b3 with SMTP id 5b1f17b1804b1-45879bf0bd8mr86388555e9.29.1753790281186; Tue, 29 Jul 2025 04:58:01 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Luc Michel , qemu-stable@nongnu.org, Francisco Iglesias , Sai Pavan Boddu , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Edgar E. Iglesias" , Alistair Francis , Peter Maydell , Jason Wang , qemu-arm@nongnu.org Subject: [PULL 5/9] hw/net/cadence_gem: fix register mask initialization Date: Tue, 29 Jul 2025 13:57:30 +0200 Message-ID: <20250729115735.33619-6-philmd@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250729115735.33619-1-philmd@linaro.org> References: <20250729115735.33619-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 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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1753790373394116600 From: Luc Michel The gem_init_register_masks function was called at init time but it relies on the num-priority-queues property. Call it at realize time instead. Cc: qemu-stable@nongnu.org Fixes: 4c70e32f05f ("net: cadence_gem: Define access permission for interru= pt registers") Signed-off-by: Luc Michel Reviewed-by: Francisco Iglesias Reviewed-by: Sai Pavan Boddu Message-ID: <20250716095432.81923-2-luc.michel@amd.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/net/cadence_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index 50025d5a6f2..44446666deb 100644 --- a/hw/net/cadence_gem.c +++ b/hw/net/cadence_gem.c @@ -1756,6 +1756,7 @@ static void gem_realize(DeviceState *dev, Error **err= p) sysbus_init_irq(SYS_BUS_DEVICE(dev), &s->irq[i]); } =20 + gem_init_register_masks(s); qemu_macaddr_default_if_unset(&s->conf.macaddr); =20 s->nic =3D qemu_new_nic(&net_gem_info, &s->conf, @@ -1776,7 +1777,6 @@ static void gem_init(Object *obj) =20 DB_PRINT("\n"); =20 - gem_init_register_masks(s); memory_region_init_io(&s->iomem, OBJECT(s), &gem_ops, s, "enet", sizeof(s->regs)); =20 --=20 2.49.0 From nobody Sat Nov 15 07:40:55 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1753790315; cv=none; d=zohomail.com; s=zohoarc; b=TMmLU2v+/V01oHDxYjaljW7zgHnsZ6QZjiOkd8MzpkbmrY4B4cXXLvI4OmYp5Y6T2H1vkdsbf0XhSL3L6d6HO02aI1pIKq8xjMArYtcsz1/6yqmqyXLJlv9YNEx0ZHBWWxw6aBGEb+b1/B9BfwMqZcCv0Ko/8dwp9GHgPWJMXiA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1753790315; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=hZLCuI32mRLDzwfhzdD0trdugKB1fD2xZRFNlNXmbIw=; b=a0p7dyI3oR2Kz76A9jDEnuDLfw9RwHDBWFaiRm1yYA4h2FK1nlZDfYmC7FN1XHXWyGOzO71wdd5sbuCB8KEA8ulw5F74YYNgrTgziWpHY/Zj8Zja5ptVwmfQhVJkgICSN2IUU1daAZs6SvNvm69uik7P+aw4l9pONs8i5dt+JTs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1753790315375440.09313296165476; Tue, 29 Jul 2025 04:58:35 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1062570.1428284 (Exim 4.92) (envelope-from ) id 1ugiyH-0002FC-NF; Tue, 29 Jul 2025 11:58:17 +0000 Received: by outflank-mailman (output) from mailman id 1062570.1428284; Tue, 29 Jul 2025 11:58:17 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ugiyH-0002F5-KY; Tue, 29 Jul 2025 11:58:17 +0000 Received: by outflank-mailman (input) for mailman id 1062570; Tue, 29 Jul 2025 11:58:16 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ugiyG-0002Ez-PY for xen-devel@lists.xenproject.org; Tue, 29 Jul 2025 11:58:16 +0000 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [2a00:1450:4864:20::32b]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 49c9907a-6c73-11f0-b895-0df219b8e170; Tue, 29 Jul 2025 13:58:06 +0200 (CEST) Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-4561ed868b5so35817145e9.0 for ; Tue, 29 Jul 2025 04:58:06 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3b789a31c4asm5676065f8f.17.2025.07.29.04.58.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 29 Jul 2025 04:58:05 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 49c9907a-6c73-11f0-b895-0df219b8e170 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1753790286; x=1754395086; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hZLCuI32mRLDzwfhzdD0trdugKB1fD2xZRFNlNXmbIw=; b=VeqPWnI2CeBQRJdRpBXXZDA4bBtYist3iu0Kzeife8eorTmiWSXr48gVLZYiJjKJs9 98brj4x5DOpOVytThxW1HbSJyEXzYveGJVjsTLipcvmdwJ7LMJIjunKD6KvuQEbhMa41 c3EyFvb08neEjri0D8Ie0xehHUIwCPnI/W2ORbEIYzMbzdU6NM4NCoX3VmvGgDSpzBki t7RxE9kzxf6Nr9Hmf2FRwsL0lj7z1ngDOCZJgfy88Mr4TLOB/yBUY8taK8EFyZDg3Y6e EJIckEh57vToZjrVZe8kuyH3XMTjq3dgSAsza35ldVxapkj11MHa7fEVISu3ww2tWTXS eMYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753790286; x=1754395086; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hZLCuI32mRLDzwfhzdD0trdugKB1fD2xZRFNlNXmbIw=; b=TqMV1l2f8S1WdvD8BK/Zx3HYZerv7KZa9ypEmCvjwvpN8Yrlq67ThvlGnLJUqQzZ22 Av5PltYO7XkmnSRtr+k6vknxiZy/TaPFnMCO20Ek8kU5lIy0pOKBnAdS76jZPGnjZ70N O3Drtn+vyXHw8z+plMIxWnciYFSVbzaDcAoZoXntDjXcT7JQtbjxDsGeCfYtsBX0LObZ weypYXlraB+g1oIUR1PPBFl2nC/LCojeFjxmGxds5wdZIx7HxK5+GcvtPy2g1cShFURB llcsEkhKuS2fvGKP8JH5u6i6x2noNVyXkPfhqoaje22MPD8qkIDOjBZTYGSHvonXmr7k sZBg== X-Forwarded-Encrypted: i=1; AJvYcCWYFK0o7DEfcUBj2kBUlHXF5RC3OZFPdK0i94ytGHPL/ZrNOvIraFn/CTG1S96Llal5wsVLQwP8BNU=@lists.xenproject.org X-Gm-Message-State: AOJu0YyIFBH4Ff7LQ3K0ax7/ht78ZDAzsIjmbKueBO05f+/mLGQzAnke JSKEFKhgatWJ41+MMBV6Kt4ubfvqSyVYk/FrUp0fL/P2FrVVxGCuClWM3fE7XkrWdok= X-Gm-Gg: ASbGncsVrREJd27L68tHnrvXbQzDrEKKcM9sxD3C0ASAxoHVt9Lh0gq4o3f9rG1gN5b Ei7fODRk8N9NqXeHcxdnRKGitqSXaPO0yf+YHnq1zxIiL94dGdka+KdnxIBcZUT7/fF6K8MKxqA ioaJXxRCwtIbyiiLxbcuslaVUk6ZWJU5qeHHTpfYd5hlM1LJk21Di/CyeACU21t92opZR1vvgMv bIuQUCawbdmia0xFKPM3CZBZLM+AZT0uYmgAjXBii9OWXUAVMs6isMst1yaqAAd/W25vJnEscMC WWcui+1k7WhRG4zZRwQSWfGMCM6CNVxGk3XgJwBuEjzx+0mg2lYVYM3pwduSVh9MrG1pc/c+4wT f2Z6wvxcBkUhpoIMFGywtar1+Vrji5f2X35a5MKlqNAhEY6GHFmHXhtpFbxEAXEsIPijQHx9V X-Google-Smtp-Source: AGHT+IFm9e3gIXrKykE7g+jz/UvSig1IqrhOgcqxaEPGlK2m9NH3XLC6gGAvWtwPWiefgqfVJO61Aw== X-Received: by 2002:a05:600c:1e22:b0:456:2ac6:cca4 with SMTP id 5b1f17b1804b1-45876311cd0mr112740315e9.13.1753790285847; Tue, 29 Jul 2025 04:58:05 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Adam Williamson , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Stefano Stabellini , Anthony PERARD , Paul Durrant , "Edgar E. Iglesias" , xen-devel@lists.xenproject.org Subject: [PULL 6/9] hw/xen/passthrough: add missing error-report include Date: Tue, 29 Jul 2025 13:57:31 +0200 Message-ID: <20250729115735.33619-7-philmd@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250729115735.33619-1-philmd@linaro.org> References: <20250729115735.33619-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1753790316811116600 From: Adam Williamson In commit cfcacbab38e ("xen/passthrough: use gsi to map pirq when dom0 is PVH") an `error_report` was added to this file, but the corresponding include of `qemu/error-report.h` was missed. This only becomes apparent when building against Xen 4.20+ with trace backend log disabled. Fixes: cfcacbab38e4 (xen/passthrough: use gsi to map pirq when dom0 is PVH) Signed-off-by: Adam Williamson Reviewed-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20250717220207.171040-1-awilliam@redhat.com> [PMD: Improved commit description, added Fixes: tag] Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/xen/xen_pt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index 9d16644d82e..006b5b55f24 100644 --- a/hw/xen/xen_pt.c +++ b/hw/xen/xen_pt.c @@ -54,6 +54,7 @@ =20 #include "qemu/osdep.h" #include "qapi/error.h" +#include "qemu/error-report.h" #include =20 #include "hw/pci/pci.h" --=20 2.49.0 From nobody Sat Nov 15 07:40:55 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1753790384; cv=none; d=zohomail.com; s=zohoarc; b=SOxs9ZFOOoPzO5tG5RtkTK1P5Lfeu4H6DzILcQAPBc/5OOrnfCp5wFAdih4im1Z3g+p1HKTuuG9WMkyoY7XFQLWYZZ7mn5/J51PyZZ7ovOW06eePDMO7Rf3w4BsDWxuDLi8wbjQ5teymBqh48FJkbYeRfWf/sopJGAH4+3zn1TM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1753790384; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=k8b/30qkT0PhlffF6po8huOnkUUESaq/pyXWD4wq1m4=; b=V+tLmpBiihsdq7u4yDOfJATPl4H8JiqYLLlr4xY4QOclLWnKTXxQcVOB+eu+C+rTyaO0K78HYmWwa6Moncwl1EFKXqmH6FPkfrZSWuwoM50muAyWPaGgbh4FO4rTV1UsknVNiNNX2wmqiCmn7CtiYNWnyMxEOKJyH5KEN2ayoLs= 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 1753790384967212.85666062095254; Tue, 29 Jul 2025 04:59:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ugiym-0004ec-M6; Tue, 29 Jul 2025 07:58:49 -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 1ugiyL-0004Cu-Bo for qemu-devel@nongnu.org; Tue, 29 Jul 2025 07:58:21 -0400 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 1ugiyD-0006HO-Qv for qemu-devel@nongnu.org; Tue, 29 Jul 2025 07:58:20 -0400 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-3b791736d12so395140f8f.1 for ; Tue, 29 Jul 2025 04:58:13 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4588e5df43fsm22744695e9.28.2025.07.29.04.58.09 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 29 Jul 2025 04:58:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1753790291; x=1754395091; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=k8b/30qkT0PhlffF6po8huOnkUUESaq/pyXWD4wq1m4=; b=E5mJhp0RfbCXKM5/fAx4n9OW83TEoTtnFZBPnBPEeqUf/QT6EAWY1fFGAQQCXC980l wvEHjSI7RLvmQB2TaZqw93BcwJ29t/Cy7Jo/uoduYD8qIJxSdKTXiRqt34yUV/5xXPkp biRS5nP5GygaIpTOqax6+dcZsikjNezA5YYN3TNmZo7OwfA9cmqQIn8Cc9RDfhKecb27 PUvHJEgBYaag7zCDbWgOP60zxAgp+LaC2nYx4LfDBcXbxKbPv3Ni5PkWrdEBqRI+swBo fTFajeWHkyZFdw3hOrShm1NG5b+9FyEhIRVUiRkNQhrkl1Ir/YvQ10dmcvj0HzhWLEEY Dr3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753790291; x=1754395091; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k8b/30qkT0PhlffF6po8huOnkUUESaq/pyXWD4wq1m4=; b=ePrIng0sd28ZIlWCQTDuY3cCdjTLbAf2Pxv14a3CTTSBnYgUwJHPPC3OwCHegipkLJ WEV//3SX7G5aGLrNncWkswJRT9w0PcOGN7XQ5h4laEIskuMHXSCUjE85jYSHnGQRPOH5 Jfz/1P3Nr5ItVSRKOswzwk6oEPmNfgFEfkKMaK/iALT9KhrspWzvtDpLiaA3el9O/jT7 NxE6ZCfTdE1nvJZv/sfgzeIQEkk5NErUHoD73cn+lomG6sVZfDx4Fny91SX9Uam31LCO Mr5sHuykrPzTEkDumEe+3h7PyrXe6iI8T/DUaf8vAt8ivl10TxxFDc6yqMcOU+EeJnbg fqhA== X-Gm-Message-State: AOJu0YwkVWRM9/6BB/rqpopt85MX7FcX4nXJKyZgU29qk2cQEnK5Y98O 4fXGgJ0dBnaxtZPgWtWRUNTZPEJHZ79ZW5UeYdSB3Y6AOs5giLQlWP4I2zU75CVjEhKpFHE0M/1 +RP40 X-Gm-Gg: ASbGncuw6RDLMt9GslUqsPYwQcDzSvRvyNJZS73z+t35IOeccfPG4CW2sOgcPsvND4C bq/t3UogVDhlpqS8heOOYrAmEC0O7HdtUEnXzmudMa4GVk2ySF0l4n/WMadmNesOOphi0uYLYqS RfJe6qz8nCvfFJtZMlKboJMkubs83wEX6CfalRtMCrb9ZnnyYFO/yg9gjS3sAEzUOHVVeZ1q2zX oqW0XqFwYI6UtukhEIh3wOsO7GNtZ+HJbOqFpHsBAfPCW0K5jOBXVO3iKl3bHJdqHJZ8Ff4cyBV mds/nezXX9DXtJk0XWfszhLWjRSnEpq8Z28GVtnrx79Xg6lu0GTn2rd9eYUfjX7Acn1VTeRrU1c vXnC3SutrFIXs+Vv3KMQRVk3Pnydaskn1BJgDirIR5kHOa3ebiT0iBfZyzN09jgFFp3tvGFJf X-Google-Smtp-Source: AGHT+IGcv1zB5f8fyr3PmL4zyH3/+aoUb06DKEhJ3IPelxqaB9MU24/8gvnIk2TUSpIeIQx7V78MJA== X-Received: by 2002:a5d:5f8e:0:b0:3a4:e480:b5df with SMTP id ffacd0b85a97d-3b7766808a4mr11794943f8f.44.1753790291289; Tue, 29 Jul 2025 04:58:11 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , qemu-stable@nongnu.org, Richard Henderson , Michael Tokarev , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini , Peter Xu , David Hildenbrand Subject: [PULL 7/9] system/physmem: fix use-after-free with dispatch Date: Tue, 29 Jul 2025 13:57:32 +0200 Message-ID: <20250729115735.33619-8-philmd@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250729115735.33619-1-philmd@linaro.org> References: <20250729115735.33619-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 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: 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: 1753790385643116600 From: Pierrick Bouvier A use-after-free bug was reported when booting a Linux kernel during the pci setup phase. It's quite hard to reproduce (needs smp, and favored by having several pci devices with BAR and specific Linux config, which is Debian default one in this case). After investigation (see the associated bug ticket), it appears that, under specific conditions, we might access a cached AddressSpaceDispatch that was reclaimed by RCU thread meanwhile. In the Linux boot scenario, during the pci phase, memory region are destroyed/recreated, resulting in exposition of the bug. The core of the issue is that we cache the dispatch associated to current cpu in cpu->cpu_ases[asidx].memory_dispatch. It is updated with tcg_commit, which runs asynchronously on a given cpu. At some point, we leave the rcu critial section, and the RCU thread starts reclaiming it, but tcg_commit is not yet invoked, resulting in the use-after-free. It's not the first problem around this area, and commit 0d58c660689 [1] ("softmmu: Use async_run_on_cpu in tcg_commit") already tried to address it. It did a good job, but it seems that we found a specific situation where it's not enough. This patch takes a simple approach: remove the cached value creating the issue, and make sure we always get the current mapping for address space, using address_space_to_dispatch(cpu->cpu_ases[asidx].as). It's equivalent to qatomic_rcu_read(&as->current_map)->dispatch; This is not really costly, we just need two dereferences, including one atomic (rcu) read, which is negligible considering we are already on mmu slow path anyway. Note that tcg_commit is still needed, as it's taking care of flushing TLB, removing previously mapped entries. Another solution would be to cache directly values under the dispatch (dispatch themselves are not ref counted), keep an active reference on associated memory section, and release it when appropriate (tricky). Given the time already spent debugging this area now and previously, I strongly prefer eliminating the root of the issue, instead of adding more complexity for a hypothetical performance gain. RCU is precisely used to ensure good performance when reading data, so caching is not as beneficial as it might seem IMHO. [1] https://gitlab.com/qemu-project/qemu/-/commit/0d58c660689f6da1e3feff8a9= 97014003d928b3b Cc: qemu-stable@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3040 Signed-off-by: Pierrick Bouvier Reviewed-by: Richard Henderson Reviewed-by: Michael Tokarev Tested-by: Michael Tokarev Message-ID: <20250724161142.2803091-1-pierrick.bouvier@linaro.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- system/physmem.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/system/physmem.c b/system/physmem.c index 130c148ffb5..e5dd760e0bc 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -165,13 +165,11 @@ static bool ram_is_cpr_compatible(RAMBlock *rb); * CPUAddressSpace: all the information a CPU needs about an AddressSpace * @cpu: the CPU whose AddressSpace this is * @as: the AddressSpace itself - * @memory_dispatch: its dispatch pointer (cached, RCU protected) * @tcg_as_listener: listener for tracking changes to the AddressSpace */ typedef struct CPUAddressSpace { CPUState *cpu; AddressSpace *as; - struct AddressSpaceDispatch *memory_dispatch; MemoryListener tcg_as_listener; } CPUAddressSpace; =20 @@ -692,7 +690,7 @@ address_space_translate_for_iotlb(CPUState *cpu, int as= idx, hwaddr orig_addr, IOMMUTLBEntry iotlb; int iommu_idx; hwaddr addr =3D orig_addr; - AddressSpaceDispatch *d =3D cpu->cpu_ases[asidx].memory_dispatch; + AddressSpaceDispatch *d =3D address_space_to_dispatch(cpu->cpu_ases[as= idx].as); =20 for (;;) { section =3D address_space_translate_internal(d, addr, &addr, plen,= false); @@ -753,7 +751,7 @@ MemoryRegionSection *iotlb_to_section(CPUState *cpu, { int asidx =3D cpu_asidx_from_attrs(cpu, attrs); CPUAddressSpace *cpuas =3D &cpu->cpu_ases[asidx]; - AddressSpaceDispatch *d =3D cpuas->memory_dispatch; + AddressSpaceDispatch *d =3D address_space_to_dispatch(cpuas->as); int section_index =3D index & ~TARGET_PAGE_MASK; MemoryRegionSection *ret; =20 @@ -2780,9 +2778,6 @@ static void tcg_log_global_after_sync(MemoryListener = *listener) =20 static void tcg_commit_cpu(CPUState *cpu, run_on_cpu_data data) { - CPUAddressSpace *cpuas =3D data.host_ptr; - - cpuas->memory_dispatch =3D address_space_to_dispatch(cpuas->as); tlb_flush(cpu); } =20 @@ -2798,11 +2793,7 @@ static void tcg_commit(MemoryListener *listener) cpu =3D cpuas->cpu; =20 /* - * Defer changes to as->memory_dispatch until the cpu is quiescent. - * Otherwise we race between (1) other cpu threads and (2) ongoing - * i/o for the current cpu thread, with data cached by mmu_lookup(). - * - * In addition, queueing the work function will kick the cpu back to + * Queueing the work function will kick the cpu back to * the main loop, which will end the RCU critical section and reclaim * the memory data structures. * --=20 2.49.0 From nobody Sat Nov 15 07:40:55 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1753790429; cv=none; d=zohomail.com; s=zohoarc; b=ij8STkWZHq1vrp5/YN4GotyUCFd3xurbWkyRfBp4NsMAGW3xuHJUNZnqwBSwgj0co3iNSghorq4uVCqjGiSXwmS2SSXLDea7WZq0rCIyo9fOIJsaKfFrlYGQjU2nOXHBmQa/gIFYWOmlW5zegl2XFfapOeegR2f4jgS5c/Q5Yqo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1753790429; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8k1VWDR5NkXCZxjy6qK+jjWf6Lwqctes1t+lFXTWiY0=; b=gUV0seIgPbLiebtbnTiGzNXmiO2yMn2/OhN3keUwlBXuuLenBO5X7F8h/i9QvQdk1lfquDy6PMJfNVIwlgmfdO95uAOHMZR+B6HZLLutVZz/m8hzHAJLuqkYUaOYK0tAsieckpSbh/dCWsP6AtNa3P67PEXuszKmt0zAFIUYPFk= 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 1753790429395805.2648319232645; Tue, 29 Jul 2025 05:00:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ugiz8-0005eK-1u; Tue, 29 Jul 2025 07:59:10 -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 1ugiyV-0004TD-0D for qemu-devel@nongnu.org; Tue, 29 Jul 2025 07:58:32 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ugiyM-0006Ht-EP for qemu-devel@nongnu.org; Tue, 29 Jul 2025 07:58:29 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-4563cfac2d2so56897535e9.3 for ; Tue, 29 Jul 2025 04:58:17 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4587272b405sm172160525e9.19.2025.07.29.04.58.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 29 Jul 2025 04:58:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1753790296; x=1754395096; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8k1VWDR5NkXCZxjy6qK+jjWf6Lwqctes1t+lFXTWiY0=; b=gVLGqHaJcTEztHGuLL7UdyPCWQTVvMq1u7sVZJuSEfSDYxwsoWkd8IKx57mqi0gR/z W0u/DXAcx3VlN32KIDIvKEhGM3x4mKCaCZLMg/hnl1VnepLI4F26/jVu5AGCeU5C/UGN UshwkUkNi4jowmBmgfgOYWzWe7hDaIu3KHzoKamdTsO7jCqukri7+OERkJaI/1Kzs1rQ 0V4ls6G1dH059aGy+snXume1yX4gnGUTfaK9vVrOoqX25T7l6f8RmGEF6Ft422qdi7NU Gnd6V9ja1rICrwQG9IBfbYYGwhhEgZ9PEm94+WQJQCeGVW1tt+m+f83lQ28QY3Xjta4H 0kXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753790296; x=1754395096; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8k1VWDR5NkXCZxjy6qK+jjWf6Lwqctes1t+lFXTWiY0=; b=d1bNUX5t9O+hqsmFtykxNL9ZcwCMdialo47eby0Kpf6hPiYhaFdAlVi1m5JxZCzDmp 92Sh+Dsh8f+NrrhaG3AH54wQl/YNENlzTMOprGltqj8CMHjWigzgzqkH5FjjnupfAz7y 3RENuwcNdRD9ZbDmAEjrkeXqaBKU9FLmMCOEZkL1q4UuLDJHOUGeK39JWgv1BHd5Tvja TqeJAfxdBWRK14beTl37YaOj7Wj/mYjpwELendi/9HPF5ltWLiqFiL9nSIk+OS6GVsaF 7RI5CDC2GCW0HhCahjpLy4HBxB2dFNUluQB8ZO0LQO9I6B9bkcDqu6lLP7oyR85PnZ6K dzfQ== X-Gm-Message-State: AOJu0YzVM6YRK9WAL9QaIp6ULyn8OdG31lK+F0/mnVMIwZ7xeMPn/+PU h6JlagK/czFyO07B4rY1nxmD3qcCVr/yU55qkuOGIQeF8misbg4fsmIZwn3PWIGWns0zcODMdw8 St2ii X-Gm-Gg: ASbGncs3UTBbNyOMfwKIqgE7b0pYMHbkY+kvmiKB8jnDj6Zq0vOQ+J35rdjeFxlIX+6 WJHAFILlMOzxQjrt6TpyonK/3+bg9MEPCPsybu2WwxJHOgMeHXkERKYPdnNUo3WrxODxhZ+1mAa KA+rVcPpL+4jdLJaGGtKs93TIXMX+93/ytcO2Hwq+AL/IAYGdCz3w2cWaZbhIH8HYYo/hE3xtV2 ozMzlE6ex80DptbGPWTqXH7aDmuwCWYOcyqtGDmTYwS8hSUOa7rYnfLRPhu5b4wQg17f5zOn2o8 uVXLAlmpdO5c2vBqDh0lvSJcLMouX0OjX5NwdPjceqmTVWBjFaGO3/DSRZG4F8ZCz1f8yX/Y1Ke uY248jl7LT0G+Z4WPLVtBM7Gf2xZZpq22fRv2kPewyOBmR3dakMd1ARY8EjEA/MbmH/wv0dKxoE B3JB+XDPo= X-Google-Smtp-Source: AGHT+IHra7rFXFucz6wq1J1jpzusPCMuSvwop5muRiCJ1KmnClcXLn84E4A26jZE4H5OckCn6Cv1Gg== X-Received: by 2002:a5d:584e:0:b0:3b5:e084:283b with SMTP id ffacd0b85a97d-3b776726b06mr10991742f8f.17.1753790295764; Tue, 29 Jul 2025 04:58:15 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Michael Tokarev , qemu-stable@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 8/9] roms/Makefile: fix npcmNxx_bootrom build rules Date: Tue, 29 Jul 2025 13:57:33 +0200 Message-ID: <20250729115735.33619-9-philmd@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250729115735.33619-1-philmd@linaro.org> References: <20250729115735.33619-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 client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1753790432652116600 From: Michael Tokarev Since commit 70ce076fa6dff60, the actual rom source dirs are subdirs of vbootrom/ submodule, not in top-level of it. Fixes: 70ce076fa6dff60 "roms: Update vbootrom to 1287b6e" Fixes: 269b7effd90 ("pc-bios: Add NPCM8XX vBootrom") Cc: qemu-stable@nongnu.org Signed-off-by: Michael Tokarev Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20250727215511.807880-1-mjt@tls.msk.ru> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- roms/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roms/Makefile b/roms/Makefile index beff58d9d50..6af68a922f3 100644 --- a/roms/Makefile +++ b/roms/Makefile @@ -193,12 +193,12 @@ qboot: cp qboot/build/bios.bin ../pc-bios/qboot.rom =20 npcm7xx_bootrom: - $(MAKE) -C vbootrom CROSS_COMPILE=3D$(arm_cross_prefix) - cp vbootrom/npcm7xx_bootrom.bin ../pc-bios/npcm7xx_bootrom.bin + $(MAKE) -C vbootrom/npcm7xx CROSS_COMPILE=3D$(arm_cross_prefix) + cp vbootrom/npcm7xx/npcm7xx_bootrom.bin ../pc-bios/npcm7xx_bootrom.bin =20 npcm8xx_bootrom: - $(MAKE) -C vbootrom CROSS_COMPILE=3D$(aarch64_cross_prefix) - cp vbootrom/npcm8xx_bootrom.bin ../pc-bios/npcm8xx_bootrom.bin + $(MAKE) -C vbootrom/npcm8xx CROSS_COMPILE=3D$(aarch64_cross_prefix) + cp vbootrom/npcm8xx/npcm8xx_bootrom.bin ../pc-bios/npcm8xx_bootrom.bin =20 hppa-firmware: $(MAKE) -C seabios-hppa parisc --=20 2.49.0 From nobody Sat Nov 15 07:40:55 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1753790382; cv=none; d=zohomail.com; s=zohoarc; b=cjV6qojuy0bTmlAnUx8buZ5tXfxMsxSpH0hdBx2GgWlOlun5JpfVoqjCNgGcioIlVvFPQg9O+c2Q6SQRWZBc3qe81qsSVtJdY0OZOK18v0iSQS91rvptb4NPBkyqNkmLMf+AcCxdG47W4h6PPkXUvClE0b7gQh7Kap4N8Xsizuk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1753790382; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=vwDXkIv74V96n3Lc/dGOrgAXOY9PemtQuzZoNiGgaBI=; b=I3JrxpinRWKlvJB7gBERilbm3WbxMERVDUzvBIDZnB2HE9y9K/nYSiQW0fgOfJHc2ioujD47TsbjJkYWTrXerHAHJOJkhYMQ0v29MY8q+UK4rR8fFXUAbp+qf4/f5URcxAE7MRhV5RDiOlHdGesi60gORKpBft6C1Ck3emUJkuk= 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 1753790382306721.3356075572749; Tue, 29 Jul 2025 04:59:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ugiz7-0005Lt-0v; Tue, 29 Jul 2025 07:59:09 -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 1ugiyV-0004U2-KI for qemu-devel@nongnu.org; Tue, 29 Jul 2025 07:58:32 -0400 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 1ugiyN-0006II-NI for qemu-devel@nongnu.org; Tue, 29 Jul 2025 07:58:31 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4563cfac2d2so56898195e9.3 for ; Tue, 29 Jul 2025 04:58:23 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4587054f338sm189376535e9.13.2025.07.29.04.58.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 29 Jul 2025 04:58:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1753790300; x=1754395100; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vwDXkIv74V96n3Lc/dGOrgAXOY9PemtQuzZoNiGgaBI=; b=SkGyAivLZNX2XdYTjb/wGzPxwGZUpA4sf8l6VNirhm1JUOl3Cr5q5d4FBIIohQLcox b6euOQRSRVJiHVfiXZH2pBY4p5Y4lYYCuXvjf9OmHWZcFoCaQOidsbKhzkL386+iUH8l pDpx3vw3WTlnDVA1Gdqip7LIyxEZVG/mGgnCA1gNUAd6QCecQ7SlnNpyifSgaPPM3qF1 gsRG56gucCa4wPK5+XgEWxrNqD9/ylRh8zbt38HqgWmp5o7SELvyfxeutix68F+sBh1f hDXkZY7Dah32q2jn8I/Q8hE2M5sEnZtPmzv+rzpAS5Q0ALFF1/auIsDyj0o9CEzYPkpn TVHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753790300; x=1754395100; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vwDXkIv74V96n3Lc/dGOrgAXOY9PemtQuzZoNiGgaBI=; b=tGYW+IJOlMdxSp3CD5C9zfKH9oAiABPc2gduCjSa7A4s+ILjcmIqXa97M+Dvi0ehkM 16b3CzaRJ+aX/1c/j63T/ZrTlTCOO/qRhUzKor+/naGrJ5RNNyrdbygbamUxPdICV0W7 77MwuC4aJIobBIKha+QHCpvAufVeloZ58R0KxatoHR0eSCc/YeVoRVN5pby2Z2RZtv/t wP9l6NPfjaYnZZ5HBdlrYLayUa9BJexRIwjbN6wy1w4nHGAmxj31BGhG4d0lC9ai2ivb 1ga3KhArke4qQrbLXuzAJxKyDpCgrnPxqlOH6DRzcPcNVSPaaxwy9YBLZG5GEeE/+L2+ Ip/Q== X-Gm-Message-State: AOJu0Yxm0PTYfmT5wI5cgSzpNFfFzAyE7yPAb2Dso6l34SOy/7yI708D dCMXKDPlls5AvzCyU0Me/1VOGQFBlVsS5YnNApz8XJ7CMtYIBzuyfuqAk7Ca+ftO9aF+8cSoW/i 8E01Q X-Gm-Gg: ASbGnctuRJXl4D2n64DnqpQlF1pq3rBhRl5hpSP8A2phWa0E6H5FAIlF3CT039Wp70o hisQaAxQpvk+EOoBKLeSUKYlv/pN12sgWvMa487SmOGYDz/0GZ0BMZkX/Z7aNTxMQ0p+4OaWS/F Qq78BWY8pKmfZnMcxoduqXYbf5f4aDAEhavDa3F3p8mopGXM7v/BsWVWOCUvf/+RSOcxLeqrNtK kk8r4IEn/eRXwWYmdYxVudEfqJL758Q7/oTlPIdNhxc8XMr1P2ZpporfLezF+MLfNtggOryzlAI FINYEDeWFwzUB15RGHmOOhcE/woSukb9HTmH4tx8hBFfsWnffaUXBuEual8GUG2Dd4Cq+fZzutF XGHlbo/lFZFOHWr8G9dpswAnBVmfua2zXRGh5iTkP1gszJ45YY4qah83dimwORp5wqUdTGCKt X-Google-Smtp-Source: AGHT+IGniukk98M8qeG65Usji04kNtGx4KC85FQxDN8Cytq5sGnqUBZ0pXLyNs7vyuIGXeiJT0O19g== X-Received: by 2002:a05:600c:1da8:b0:456:1bca:7faf with SMTP id 5b1f17b1804b1-4587db2afc2mr110017375e9.16.1753790300337; Tue, 29 Jul 2025 04:58:20 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , BALATON Zoltan , qemu-ppc@nongnu.org Subject: [PULL 9/9] hw/display/sm501: fix missing error-report.h Date: Tue, 29 Jul 2025 13:57:34 +0200 Message-ID: <20250729115735.33619-10-philmd@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250729115735.33619-1-philmd@linaro.org> References: <20250729115735.33619-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 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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1753790383739116600 From: Cl=C3=A9ment Chigot "qemu/error-report.h" was previously implicitly included. This is no longer the case following 012842c075520dbe1bd96a2fdcf4e218874ba443. However, the issue predates this change as `error-report.h` should have been included when the `warn_report` call was introduced. Fixes: fa140b9562 ("hw/sm501: allow compiling without PIXMAN") Signed-off-by: Cl=C3=A9ment Chigot Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Message-ID: <20250728090518.963573-1-chigot@adacore.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/display/sm501.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/display/sm501.c b/hw/display/sm501.c index 6d2f18684c3..bc091b3c9fb 100644 --- a/hw/display/sm501.c +++ b/hw/display/sm501.c @@ -26,6 +26,7 @@ #include "qemu/osdep.h" #include "qemu/units.h" #include "qapi/error.h" +#include "qemu/error-report.h" #include "qemu/log.h" #include "qemu/module.h" #include "hw/usb/hcd-ohci.h" --=20 2.49.0