From nobody Sat May 30 17:43:32 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779294187; cv=none; d=zohomail.com; s=zohoarc; b=P6f5cLS3iZ46vDEJ2S17u4edl43U4b3JrP/bFlpqpFjJhbAxWCSnEsYdiivxXMMXkZsPkk8rhQsSwyGZdf12JhBKTQaJ82o2DqHnrmila54gigMhFW5ka4xe9wzXZeJieKT138KidkgHHkTwaa8sRTkU9OEVAYwe9qUmkDb8juc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779294187; 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=ynNoKp1399ThNit6mItDV+aSFCek+66uccDM7kPqA/o=; b=Y+cXCYBSgHiMDBD64ON/rk/UyOjRn86iJ7XolaukmvPUA42DnNB+SAx9jwwU2bvwCz8oOrKZ+FtZwFVGy0l432J3sYHI+hmaflRA1gIvCKWLToClzCcnm+Ty9/F1P/Q0QTUSL1CSa5+jCtNzDrG+EfmSqumHXQ7/Lkt8ZYQIL3E= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779294187084468.693768635869; Wed, 20 May 2026 09:23:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wPjgA-00068t-Ku; Wed, 20 May 2026 12:21:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wPjfu-0005qf-OK for qemu-devel@nongnu.org; Wed, 20 May 2026 12:21:39 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wPjfl-0008UD-NW for qemu-devel@nongnu.org; Wed, 20 May 2026 12:21:33 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-182-9ofTEChYOuGx-wZTUzwV6Q-1; Wed, 20 May 2026 12:21:23 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id F2AB0195608A; Wed, 20 May 2026 16:21:21 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.34.136]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B5A0719560A6; Wed, 20 May 2026 16:21:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779294087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ynNoKp1399ThNit6mItDV+aSFCek+66uccDM7kPqA/o=; b=UEhCXevXtEpPF5uKC2U1veiSOY6ffEVqyZAAtgM5T8hYFyLm0BgVa9+Oh+6x3NvqBJqBS5 EBWLKHrh4N6kg1OBgJGKPDuAnbGhV2fJSgQ5ofNnlMk9DS/UPLci7Se1ggnnM7fNnjJ1aJ liOrFDTU6s0etcZ6r0Pa1scGB03ukjM= X-MC-Unique: 9ofTEChYOuGx-wZTUzwV6Q-1 X-Mimecast-MFC-AGG-ID: 9ofTEChYOuGx-wZTUzwV6Q_1779294082 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Eric Farman , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Farhan Ali , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Matthew Rosato Subject: [PULL 01/11] target/s390x: restore cpu_models for system builds Date: Wed, 20 May 2026 18:21:05 +0200 Message-ID: <20260520162115.1613601-2-clg@redhat.com> In-Reply-To: <20260520162115.1613601-1-clg@redhat.com> References: <20260520162115.1613601-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-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 @redhat.com) X-ZM-MESSAGEID: 1779294188691158500 From: Eric Farman Commit 0b83acf2f05 stated: Introduce a source set common to system / user. Start it with the files built in both sets: 'cpu_models_user.c' and 'gdbstub.c' No logical change intended. Except that's not true: git show 0b83acf2f0 | grep cpu_models with the files built in both sets: 'cpu_models_user.c' + 'cpu_models_user.c', - 'cpu_models_system.c', - 'cpu_models_user.c', Restore the s390x_user_ss section, move "cpu_models_user.c" back into it, and re-add "cpu_models_system.c" to the common_system section. Reported-by: C=C3=A9dric Le Goater Fixes: 0b83acf2f05 ("target/s390x: Introduce common system/user meson sourc= e set") Signed-off-by: Eric Farman Reviewed-by: Farhan Ali Reviewed-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Matthew Rosato Tested-by: C=C3=A9dric Le Goater Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20260511163541.192533-1-farman@lin= ux.ibm.com Signed-off-by: C=C3=A9dric Le Goater --- target/s390x/meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/s390x/meson.build b/target/s390x/meson.build index bc4459e8ed7b036e2ee5668dd338c5785a364fc0..c2cb4aca469ab49a43c22800c99= 6cf94b09fd572 100644 --- a/target/s390x/meson.build +++ b/target/s390x/meson.build @@ -22,7 +22,6 @@ gen_features_h =3D custom_target('gen-features.h', =20 s390x_common_ss.add(gen_features_h) s390x_common_ss.add(files( - 'cpu_models_user.c', 'gdbstub.c', )) =20 @@ -39,6 +38,11 @@ s390x_common_system_ss.add(files( 'mmu_helper.c', 'sigp.c', 'cpu-system.c', + 'cpu_models_system.c', +)) + +s390x_user_ss.add(files( + 'cpu_models_user.c', )) =20 subdir('tcg') --=20 2.54.0 From nobody Sat May 30 17:43:32 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779294139; cv=none; d=zohomail.com; s=zohoarc; b=YDVoI3lrSJjIM+uRkFbMyvfT8clQcXcnFrhWlz6ZZj3ShVA6iM8H6icY65AgXViY+ecOKB14AqZZ5sU1+e5NOK0/mHMWMDcDA5aJ+hwhhkGJa8d7qQKy0xt2oBWOh4CGEjDIgWpiQanO7Ahy1FvFbT1sQmVWLD9IFpCkDWn5/rM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779294139; 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=YF5aWONhslK61UxnSzkuh8Pk2hNGcw48dh3ZUZxcAis=; b=VkWQ9DkuOV8nKxu7YKcIThZLEMmf+grWU0rs2K1dgzJ0Ftt2tPvCgFiG/Ou+RCnpWtRPM4cBix4lJ9t10VVjKGW3V39k7AAO+cUFDlNerN1j9evUMvVLySCZtKCrUce8GHLVTfHW5nECH2zcKTRlBxVb61B6ADPJ1dSyhzhaX5w= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779294139682454.96922591081477; Wed, 20 May 2026 09:22:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wPjgI-0006Kt-H0; Wed, 20 May 2026 12:22:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wPjfu-0005qe-OK for qemu-devel@nongnu.org; Wed, 20 May 2026 12:21:39 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wPjfm-0008UJ-9u for qemu-devel@nongnu.org; Wed, 20 May 2026 12:21:33 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-584-8_MsUdJJNr6BRU6EherKvA-1; Wed, 20 May 2026 12:21:25 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 50CBC1956080; Wed, 20 May 2026 16:21:24 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.34.136]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8F82A19560A2; Wed, 20 May 2026 16:21:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779294087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YF5aWONhslK61UxnSzkuh8Pk2hNGcw48dh3ZUZxcAis=; b=DvL0rxhVE+g7ISuoffOXNql1iN07SNc25doZr/Obdakaqm/FsQXdrP/Nx492PM0WBFZFaq GuOcYP5p2oXeAzR8un4errcW+JeDy98RUUjv4bxIDmBnX9OcCjdb6/iDGQhKWfPFAnlDFL /HCZUlMNT2SiHEd076NcbiAty92YdWk= X-MC-Unique: 8_MsUdJJNr6BRU6EherKvA-1 X-Mimecast-MFC-AGG-ID: 8_MsUdJJNr6BRU6EherKvA_1779294084 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Pierrick Bouvier , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 02/11] hw/vfio: Drop superfluous inclusion of hw-error.h Date: Wed, 20 May 2026 18:21:06 +0200 Message-ID: <20260520162115.1613601-3-clg@redhat.com> In-Reply-To: <20260520162115.1613601-1-clg@redhat.com> References: <20260520162115.1613601-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-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 @redhat.com) X-ZM-MESSAGEID: 1779294142192154100 From: Thomas Huth None of these files use the hw_error() function, so there is no need to include hw-error.h here. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Link: https://lore.kernel.org/qemu-devel/20260428163702.3224323-1-thuth@red= hat.com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio/device.c | 1 - hw/vfio/helpers.c | 1 - hw/vfio/igd.c | 1 - hw/vfio/kvm-helpers.c | 1 - 4 files changed, 4 deletions(-) diff --git a/hw/vfio/device.c b/hw/vfio/device.c index 3ffd69a579b8ac135ef729d3d836c8545e36786b..ccf14743e954bdf23b76d4e4c3a= b2647a428f050 100644 --- a/hw/vfio/device.c +++ b/hw/vfio/device.c @@ -24,7 +24,6 @@ #include "hw/vfio/vfio-device.h" #include "hw/vfio/pci.h" #include "hw/core/iommu.h" -#include "hw/core/hw-error.h" #include "trace.h" #include "qapi/error.h" #include "qemu/error-report.h" diff --git a/hw/vfio/helpers.c b/hw/vfio/helpers.c index 65c6dba0428954170ce8a889edffa34ce9b24b13..c719864b92fb5b73170218a10c1= eb66fdbe2edaa 100644 --- a/hw/vfio/helpers.c +++ b/hw/vfio/helpers.c @@ -24,7 +24,6 @@ =20 #include "exec/cpu-common.h" #include "hw/vfio/vfio-device.h" -#include "hw/core/hw-error.h" #include "qapi/error.h" #include "vfio-helpers.h" =20 diff --git a/hw/vfio/igd.c b/hw/vfio/igd.c index 6aacf27284f86da401fdd67e359500dd0545222b..e091f21b6a3aea0013e0b3094d2= ca13588200c98 100644 --- a/hw/vfio/igd.c +++ b/hw/vfio/igd.c @@ -16,7 +16,6 @@ #include "qapi/error.h" #include "qapi/qmp/qerror.h" #include "hw/core/boards.h" -#include "hw/core/hw-error.h" #include "hw/nvram/fw_cfg.h" #include "pci.h" #include "pci-quirks.h" diff --git a/hw/vfio/kvm-helpers.c b/hw/vfio/kvm-helpers.c index d71c9590aaa53dc4e436987a34575f57a6397c6b..5e73dddc418b51475c78489189b= d1ba8f2b3038d 100644 --- a/hw/vfio/kvm-helpers.c +++ b/hw/vfio/kvm-helpers.c @@ -25,7 +25,6 @@ #include "system/kvm.h" #include "exec/cpu-common.h" #include "hw/vfio/vfio-device.h" -#include "hw/core/hw-error.h" #include "qapi/error.h" #include "vfio-helpers.h" =20 --=20 2.54.0 From nobody Sat May 30 17:43:32 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779294185; cv=none; d=zohomail.com; s=zohoarc; b=k5/04XSsdnVkRlE5ju6I0ZkfDMK+yB5ru5Zm878CU6QWSDBE6Rp3zHCG/N3WDOSBG9wfYIIYvzCJIKkrXMMckf3Cvg3Ne+ri6xhU3TmtmyxvJYy8N26vT0MFbzYQo7fM0CEtZ37kUQ9RZoAqVdwaMgGLmiftSIJW/MtsnCBVfFg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779294185; 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=Jt/0r2kAI8GW/ArGOzx8u5PHjaCwN41vvI9taYRF/1w=; b=G9Ly7A3WcOt9HBVcQ7/rbxTVY90z3SIJyQVb6+Z0iyO/OpwumFS+9g9Ukb7t5pqXQ5dOWUIWkDY8M86f/x+tf7UKmAYjCHpt4sy2zH8ABYjJPThTEsMuxr1OtMyHvTcavpv2AFiE3+Xe50DBFQodXh5lzgbGKWNVh+6cK6gE/p4= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779294185036918.2894260034103; Wed, 20 May 2026 09:23:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wPjgG-0006Ja-A3; Wed, 20 May 2026 12:22:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wPjfy-0005sw-NR for qemu-devel@nongnu.org; Wed, 20 May 2026 12:21:44 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wPjfu-0008VB-Fr for qemu-devel@nongnu.org; Wed, 20 May 2026 12:21:41 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-453-aVVS88KUMlygCuyqaIYGig-1; Wed, 20 May 2026 12:21:28 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6D9E61800628; Wed, 20 May 2026 16:21:26 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.34.136]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C12F019560A3; Wed, 20 May 2026 16:21:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779294093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Jt/0r2kAI8GW/ArGOzx8u5PHjaCwN41vvI9taYRF/1w=; b=UnjsVSCpROJXH31vlVIu2gsTz++KiKsJs2CtSPaHZykPYdYtj1WGo+x9f+3UToFjI5ARZY HZG9lmI4lFhriuQCmaodZm3YeooDCNNRXwUF5bZ2+ggkpVSBGbOM9hossh/jnFByb0QsKY w/91StsgJUCheMYic4JraADy917r0qc= X-MC-Unique: aVVS88KUMlygCuyqaIYGig-1 X-Mimecast-MFC-AGG-ID: aVVS88KUMlygCuyqaIYGig_1779294087 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: GuoHan Zhao , John Levon , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 03/11] vfio-user: avoid leaking duplicate device name Date: Wed, 20 May 2026 18:21:07 +0200 Message-ID: <20260520162115.1613601-4-clg@redhat.com> In-Reply-To: <20260520162115.1613601-1-clg@redhat.com> References: <20260520162115.1613601-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1779294187014158500 From: GuoHan Zhao vfio_user_pci_realize() assigns vbasedev->name before connecting to the server, then assigns the same name again after installing the request handler. The second assignment overwrites the first allocation, so only the second string can be freed later by vfio_device_free_name(). Drop the duplicate assignment and keep the first name allocation, which is also available on connection failures for error reporting. Fixes: 36227628d824 ("vfio-user: implement message send infrastructure") Signed-off-by: GuoHan Zhao Reviewed-by: John Levon Link: https://lore.kernel.org/qemu-devel/20260424032209.297458-1-zhaoguohan= @kylinos.cn Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio-user/pci.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/vfio-user/pci.c b/hw/vfio-user/pci.c index facc79727acb82c35fec5b4bef79e78b3878531a..e7573d4a9f088c1afc8ed270993= 2842247abf6ac 100644 --- a/hw/vfio-user/pci.c +++ b/hw/vfio-user/pci.c @@ -280,8 +280,6 @@ static void vfio_user_pci_realize(PCIDevice *pdev, Erro= r **errp) vbasedev->proxy =3D proxy; vfio_user_set_handler(vbasedev, vfio_user_pci_process_req, vdev); =20 - vbasedev->name =3D g_strdup_printf("vfio-user:%s", sock_name); - if (udev->send_queued) { proxy->flags |=3D VFIO_PROXY_FORCE_QUEUED; } --=20 2.54.0 From nobody Sat May 30 17:43:32 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779294158; cv=none; d=zohomail.com; s=zohoarc; b=fXCe0smk9WhRZibPaq/mM3ohU+EC6PJCBM5ILSZTHDC8blCxe03B2hPr+7jEReH4fgCMEz9g7+ngEIseBNDxO0mQLBCJU+3ajV8X1Os38sXvcU6vWup865AvJq/ChtlY1H+iWymZhvwN3/RXfiyk2gMMX+W3Ym7m8pMLCIJD7Ao= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779294158; 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=G2jImiozVJErYq/ci1rD78+LwSY/Bi8CoEEiY61D/BM=; b=g6V3dKOU9PA7Zli9ly4DSCZMvFAN7a/d4PHgxatcVNa/vwaVKio4mb3A39lrl8LePz16sfAVq54wNtMp4TosSw+mzAacwBjccEvAtUI8t4VVyHxrFNY9JD4QVgzpa6ZzXwv2G8f84xhxsjY7MRjIlMcDQJWoQUyZB7Ru3YYrz1s= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779294158541608.2911333751618; Wed, 20 May 2026 09:22:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wPjg8-00066d-8L; Wed, 20 May 2026 12:21:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wPjfy-0005t0-U6 for qemu-devel@nongnu.org; Wed, 20 May 2026 12:21:45 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wPjfu-0008VJ-GU for qemu-devel@nongnu.org; Wed, 20 May 2026 12:21:42 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-360-388Ge3HTPZCtIoasIQUFZg-1; Wed, 20 May 2026 12:21:30 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A4F4A18005BB; Wed, 20 May 2026 16:21:28 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.34.136]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DEF4319560A7; Wed, 20 May 2026 16:21:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779294094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G2jImiozVJErYq/ci1rD78+LwSY/Bi8CoEEiY61D/BM=; b=V6K1kFU8+69TFVoI0eCuYKQgo2LXx98+3O1OpxcOGNxWJ8KYiSWvQNM0aA02lvFZZcdAK3 2h7hQHyNkFNjdPZHxx+SAs+HWsT4macZV3t56qMkkhur3+lPUU1fYQPpo2SHWAtuQZa9ln Vce5aJiTiz/VjIonIDFxYSBrG0+jFnM= X-MC-Unique: 388Ge3HTPZCtIoasIQUFZg-1 X-Mimecast-MFC-AGG-ID: 388Ge3HTPZCtIoasIQUFZg_1779294089 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: GuoHan Zhao , John Levon , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 04/11] vfio-user: reject malformed migration capabilities Date: Wed, 20 May 2026 18:21:08 +0200 Message-ID: <20260520162115.1613601-5-clg@redhat.com> In-Reply-To: <20260520162115.1613601-1-clg@redhat.com> References: <20260520162115.1613601-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1779294160733158500 From: GuoHan Zhao check_migr() sets an error when the migration capability is not an object, but still returns true. This lets version negotiation continue with an Error set and reports the wrong capability name in the diagnostic. Return false for the malformed capability, and report the migration capability name. Fixes: 36227628d824 ("vfio-user: implement message send infrastructure") Signed-off-by: GuoHan Zhao Reviewed-by: John Levon Link: https://lore.kernel.org/qemu-devel/20260424031259.289211-1-zhaoguohan= @kylinos.cn Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio-user/proxy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio-user/proxy.c b/hw/vfio-user/proxy.c index 314dfd23d8af385532bb87219fb3153961942cba..8b7cc36231ab276493e252064b5= 60dcea13ae749 100644 --- a/hw/vfio-user/proxy.c +++ b/hw/vfio-user/proxy.c @@ -1190,8 +1190,8 @@ static bool check_migr(VFIOUserProxy *proxy, QObject = *qobj, Error **errp) QDict *qdict =3D qobject_to(QDict, qobj); =20 if (qdict =3D=3D NULL) { - error_setg(errp, "malformed %s", VFIO_USER_CAP_MAX_FDS); - return true; + error_setg(errp, "malformed %s", VFIO_USER_CAP_MIGR); + return false; } return caps_parse(proxy, qdict, caps_migr, errp); } --=20 2.54.0 From nobody Sat May 30 17:43:32 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779294136; cv=none; d=zohomail.com; s=zohoarc; b=nOQSVhLHT9Vvou8mGrdCDIu4TKcvEFCNxt5Ql+hkI2VfLI85gM46pGUrJyoEp5KJK8/0YGm0Ca4f71otNtmCg5Sw/DPFJMcrwAlvFG4reZGN4lmJjWvkf7VCf+dowmqzprFxMRUeH7c2gx3Bg/BGAfEyg4PLxWwZSWV9Q0MvK3M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779294136; 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=EGPeBunpbm8QEFeJGdbZqMQvXjlV/srJXK26/N5Gukc=; b=J5+gAO4Ldcel91GQsZ7t/swaUVllj749V7tBui2tFjoFH9N2uTMszFrwhG71/KhUhLpPhgAyI+U/i1ShYfVt23C4NgGjD0mJupB/ynSyC0Rq4TBidSqMkyL5KFVhvw3RWjxCxdZZ3ZMpcQV9OAycDvbKQWGKHfZmO9hE7cYsEIY= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779294136540419.94260755443497; Wed, 20 May 2026 09:22:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wPjgA-0006B8-PU; Wed, 20 May 2026 12:21:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wPjg1-0005tf-Rg for qemu-devel@nongnu.org; Wed, 20 May 2026 12:21:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wPjfy-0008WM-F2 for qemu-devel@nongnu.org; Wed, 20 May 2026 12:21:43 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-68-0zPzlx5KOY-CaLCqEhpvqw-1; Wed, 20 May 2026 12:21:32 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E5E2E195606E; Wed, 20 May 2026 16:21:30 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.34.136]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 229A819560A2; Wed, 20 May 2026 16:21:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779294098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EGPeBunpbm8QEFeJGdbZqMQvXjlV/srJXK26/N5Gukc=; b=C+oQZSaG548jABtGaGps9ekVGBpDCEVzaZGd5TnbGQaNtcFYiJicx1Cvxh2NzUKiLoe4GC 1f0k4oNyud6SRr9pHDZ3rr1QdPT6qzMY6X+l0ivuC9CSGPkiXB++IFy3UdaiSDVYu7Rvri UzXnVTRgycz0wFQHXRFcXEkKOB0ZRds= X-MC-Unique: 0zPzlx5KOY-CaLCqEhpvqw-1 X-Mimecast-MFC-AGG-ID: 0zPzlx5KOY-CaLCqEhpvqw_1779294091 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: John Levon , Jagannathan Raman , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 05/11] hw/remote: update libvfio-user subproject Date: Wed, 20 May 2026 18:21:09 +0200 Message-ID: <20260520162115.1613601-6-clg@redhat.com> In-Reply-To: <20260520162115.1613601-1-clg@redhat.com> References: <20260520162115.1613601-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-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 @redhat.com) X-ZM-MESSAGEID: 1779294138068154100 From: John Levon The currently wrapped version of libvfio-user has compilation issues on newer compilers; bump the library version. Signed-off-by: John Levon Reviewed-by: Jagannathan Raman Reviewed-by: Mark Cave-Ayland Link: https://lore.kernel.org/qemu-devel/20260422140244.2147400-1-john.levo= n@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- hw/remote/vfio-user-obj.c | 3 ++- subprojects/libvfio-user.wrap | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/remote/vfio-user-obj.c b/hw/remote/vfio-user-obj.c index 49bf5ecae0c44c6a9432fefceec964139b5fb309..87fa7b65722e4d917481bd1bd81= 16cfd39b98261 100644 --- a/hw/remote/vfio-user-obj.c +++ b/hw/remote/vfio-user-obj.c @@ -800,7 +800,8 @@ static void vfu_object_init_ctx(VfuObject *o, Error **e= rrp) goto fail; } =20 - ret =3D vfu_setup_device_dma(o->vfu_ctx, &dma_register, &dma_unregiste= r); + ret =3D vfu_setup_device_dma(o->vfu_ctx, LIBVFIO_USER_MAX_DMA_REGIONS, + &dma_register, &dma_unregister); if (ret < 0) { error_setg(errp, "vfu: Failed to setup DMA handlers for %s", o->device); diff --git a/subprojects/libvfio-user.wrap b/subprojects/libvfio-user.wrap index 416955ca4515c7da8080986681f69629046a749b..11db795f8abe9bf86e040565197= 0160629ed3f30 100644 --- a/subprojects/libvfio-user.wrap +++ b/subprojects/libvfio-user.wrap @@ -1,4 +1,4 @@ [wrap-git] url =3D https://gitlab.com/qemu-project/libvfio-user.git -revision =3D 0b28d205572c80b568a1003db2c8f37ca333e4d7 +revision =3D 4d9f663450fa80ff375612dbbafe073700e3d3d8 depth =3D 1 --=20 2.54.0 From nobody Sat May 30 17:43:32 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779294199; cv=none; d=zohomail.com; s=zohoarc; b=Ch8OIUORBEBKOQChrdkEmZG+YGJvVSw5d7N4/fMkKQr5yOfNLFvCfZzZ5czZrp/bP+MsMlG0fpCHoiuVpEi9JqCbMRejxfxNT6N3EWoO3EB7RoYn7fxX4cSwyybLepziSUXOXQm7fveLC1kQHbXu44wszO+IHTVoH9dP3uQqsD0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779294199; 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=E+8ZKvgJBxq1weQk9lZl7bEpQy3irvHq4Lqy7YF9Z0I=; b=dx7PkiymY1dxx9Sn/XcfqdcA29NwoDToFXNei693NSG8CWmk3mGjHI2+GhkX4jrrFZldSekaLK4rgE6awGS30ebhBAiHM/uH2uufKCqGlSveBt4QR0/W/ZqDHSKnza9vlANc2GTJf8mfOGoKKOfwzr7tmt7Yea7dYw8WKcTnYOw= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779294199232813.3219541887794; Wed, 20 May 2026 09:23:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wPjgK-0006MO-If; Wed, 20 May 2026 12:22:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wPjg1-0005th-SR for qemu-devel@nongnu.org; Wed, 20 May 2026 12:21:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wPjfy-00004z-MV for qemu-devel@nongnu.org; Wed, 20 May 2026 12:21:45 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-684-8hBPfVyvMWONPZ6gwGovBQ-1; Wed, 20 May 2026 12:21:36 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4252819560A5; Wed, 20 May 2026 16:21:33 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.34.136]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D022219560A2; Wed, 20 May 2026 16:21:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779294099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=E+8ZKvgJBxq1weQk9lZl7bEpQy3irvHq4Lqy7YF9Z0I=; b=hEystNL1oQ9CyOfWCrnq2sKi+E3F2T+Eig5P33OrOZ8VlcWcNhiYwwC46qsyq3QB7KcDyC Ay/dj961xwK0VfIJ6Pj8mQZkpu+PWfMgnBel1iDlH1U8Y8ujFir310IYEmduniOKlDX/Cl Nm9lMuGvCx/KY2dlR9NAwOihdC8k6OI= X-MC-Unique: 8hBPfVyvMWONPZ6gwGovBQ-1 X-Mimecast-MFC-AGG-ID: 8hBPfVyvMWONPZ6gwGovBQ_1779294093 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Alex Williamson Subject: [PULL 06/11] vfio/pci: Replace abort() with g_assert_not_reached() Date: Wed, 20 May 2026 18:21:10 +0200 Message-ID: <20260520162115.1613601-7-clg@redhat.com> In-Reply-To: <20260520162115.1613601-1-clg@redhat.com> References: <20260520162115.1613601-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-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 @redhat.com) X-ZM-MESSAGEID: 1779294200732158500 This check was originally introduced in commit b3ebc10c373e ("vfio-pci: Add debug config options to disable MSI/X KVM support") as part of a debug block to retrieve the MSI/MSIX message, and was later moved by commit 0de70dc7bab1 ("vfio/pci: Rename MSI/X functions for easier tracing") into the main interrupt handling path, becoming production code. Under normal conditions, this code path cannot be reached because the BQL serializes all handler registration, vdev->interrupt updates, and handler removal. Replace abort() with g_assert_not_reached(), which is preferred nowdays, and add a comment clarifying the purpose. Cc: Alex Williamson Acked-by: Alex Williamson Link: https://lore.kernel.org/qemu-devel/20260506152353.1657838-1-clg@redha= t.com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio/pci.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index b2a07f6bb4217bcacead194ce75b359b1896ef3a..9c06b25e6370d8bbea2828bfae6= 4a3d14fe68219 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -451,7 +451,12 @@ static void vfio_msi_interrupt(void *opaque) get_msg =3D msi_get_message; notify =3D msi_notify; } else { - abort(); + /* + * Interrupt state transitions (MSI/MSI-X -> NONE/INTx) are + * protected by the BQL, and eventfd handlers are strictly + * unregistered before vdev->interrupt is modified. + */ + g_assert_not_reached(); } =20 msg =3D get_msg(pdev, nr); --=20 2.54.0 From nobody Sat May 30 17:43:32 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779294190; cv=none; d=zohomail.com; s=zohoarc; b=ekt1HRrlDjp4t07EaUKMdp2HFy2piHxA9YwF4VmEAAuOIUzcfd3CDuJUZzcxTwX+kS1uws41fPYq5KeIEc/F16b1mOEtuI43NparMwLhS1PApKnb1ILnliSxl7yDXvgU6XbDbuWFWKVtelzkqUZQfbK1/CXy2UbsGhNao+b0LHI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779294190; 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=Rh+D13MdvJVkOTBp6eV6osngprsspgL1DvUUlZVCbaw=; b=OVIKDapSjq/1YUJRWpJgbhffVv8v+10GVRWnVZG+PB4gZ2dGh7JuR1DxXmV8prx6Kd4njRlE5NIhOKZW8H1+ykDMWgRNr/bcTP/LHkjE7Vn7dIZBOgRiqenMY1U+M5JJ/NMm49MLTaIDXUcs7nK/maqHkP4vTBEwtTD+ueIsiYI= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779294190075946.9212911357746; Wed, 20 May 2026 09:23:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wPjgE-0006Gr-5e; Wed, 20 May 2026 12:21:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wPjg1-0005tg-Ri for qemu-devel@nongnu.org; Wed, 20 May 2026 12:21:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wPjfy-00004s-FQ for qemu-devel@nongnu.org; Wed, 20 May 2026 12:21:44 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-532-W4Hww0DIP1eAZNbob2fsuw-1; Wed, 20 May 2026 12:21:37 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A01BD18005B8; Wed, 20 May 2026 16:21:35 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.34.136]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B45DE19560A2; Wed, 20 May 2026 16:21:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779294099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Rh+D13MdvJVkOTBp6eV6osngprsspgL1DvUUlZVCbaw=; b=X07psBqqc3EEV+aNd5ML0UCP3zdAm/AFOjmsWKOJWx5HY/6jb/wHxIlEzIJnnOQYBTQ6hU uLm3gmn4uoKTjc1bW65ntRK7ZPjbNmHY2bAv3JAtmHPLUrQ6Ju93tUtw6+ToFxWJHmQBJq BtJc357H5LVn1uSNqHd5H+PJ786+lDI= X-MC-Unique: W4Hww0DIP1eAZNbob2fsuw-1 X-Mimecast-MFC-AGG-ID: W4Hww0DIP1eAZNbob2fsuw_1779294096 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: GuoHan Zhao , Anthony Krowiak , Matthew Rosato , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 07/11] vfio/ap: Return false when IRQ notifier setup fails Date: Wed, 20 May 2026 18:21:11 +0200 Message-ID: <20260520162115.1613601-8-clg@redhat.com> In-Reply-To: <20260520162115.1613601-1-clg@redhat.com> References: <20260520162115.1613601-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1779294190765158500 From: GuoHan Zhao vfio_ap_register_irq_notifier() cleans up the fd handler and EventNotifier when vfio_device_irq_set_signaling() fails, but still returns true to its caller. Return false after cleanup so the caller can handle the failed registration path instead of treating it as a successful notifier setup. Fixes: cbd470f0aac5 ("vfio/ap: Make vfio_ap_register_irq_notifier() return = a bool") Signed-off-by: GuoHan Zhao Reviewed-by: Anthony Krowiak Reviewed-by: Matthew Rosato Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20260510084353.58263-2-zhaoguohan@= kylinos.cn Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio/ap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c index 276ae8c207bf2a1d7a0d5c0fc7f2ef98cec695d1..6e2a1223ea8d9ea0697d1f29ae7= 46cf39419cde0 100644 --- a/hw/vfio/ap.c +++ b/hw/vfio/ap.c @@ -193,6 +193,7 @@ static bool vfio_ap_register_irq_notifier(VFIOAPDevice = *vapdev, errp)) { qemu_set_fd_handler(fd, NULL, NULL, vapdev); event_notifier_cleanup(notifier); + return false; } =20 return true; --=20 2.54.0 From nobody Sat May 30 17:43:32 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779294199; cv=none; d=zohomail.com; s=zohoarc; b=lzgwYztM59phI91M2C/rEgW4xhOXNeDlb+hoXAWDCtJrkHdGSNQeTMHF1jOh6OZfkhSoOTPWPGSi0FmzT/4WyjkZS4u7kofpx8Mzy3C5nxj0m++bqHbQd3oh/l7wi7pRyHtlMYfDULcmD1SKwVaW4lcvcTylIXRGPHfZE8UEeRE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779294199; 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=AFLGKh3iGOhSX263EwbxOrk0d9CSN2mPmhBFSG/CKUg=; b=P8xTG1OcSjAlTIpyevYxXR1M7ydXSL2zCs29vKjzylHcEEpswW3fVS7D7eArW+/ARmnG5KTf74X2wGOnFaP5pGZp+MT/ueIN5jzSNqynt42bn935b2CxMEhdpalZO9vVZ66L7EqEG2HNWddOPpIkYLgSphxDAnxiDHu/cOgTUdk= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779294199276830.2079302433746; Wed, 20 May 2026 09:23:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wPjgL-0006Nq-1N; Wed, 20 May 2026 12:22:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wPjg5-00063K-MC for qemu-devel@nongnu.org; Wed, 20 May 2026 12:21:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wPjfz-00005i-Fu for qemu-devel@nongnu.org; Wed, 20 May 2026 12:21:46 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-59-yrNIuJJUPz6eBLUskB1siw-1; Wed, 20 May 2026 12:21:39 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D01D91956062; Wed, 20 May 2026 16:21:37 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.34.136]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1D99719560A2; Wed, 20 May 2026 16:21:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779294102; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AFLGKh3iGOhSX263EwbxOrk0d9CSN2mPmhBFSG/CKUg=; b=iaASHQms+DsM6ITzu4J21N4SSul2wgnCWsQi2awTHe8qDz+7BQXBQ2BD6tlp6apXLNAgS4 CjWvddeuNPX5ofsQ3l5IUguL+i0SrRgeAMqVKRbIeeZE2bKvjQrNqwJeFiFib1YEOW4+Ib BJ2NgUe+D5yuLNTH0Ow4HSsGEP15b/I= X-MC-Unique: yrNIuJJUPz6eBLUskB1siw-1 X-Mimecast-MFC-AGG-ID: yrNIuJJUPz6eBLUskB1siw_1779294098 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: GuoHan Zhao , Eric Farman , Matthew Rosato , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 08/11] vfio/ccw: Return false when IRQ notifier setup fails Date: Wed, 20 May 2026 18:21:12 +0200 Message-ID: <20260520162115.1613601-9-clg@redhat.com> In-Reply-To: <20260520162115.1613601-1-clg@redhat.com> References: <20260520162115.1613601-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-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 @redhat.com) X-ZM-MESSAGEID: 1779294200728158500 From: GuoHan Zhao vfio_ccw_register_irq_notifier() cleans up the fd handler and EventNotifier when vfio_device_irq_set_signaling() fails, but still returns true to its caller. Return false after cleanup so the caller can handle the failed registration path instead of treating it as a successful notifier setup. Fixes: 8aaeff97acee ("vfio/ccw: Make vfio_ccw_register_irq_notifier() retur= n a bool") Signed-off-by: GuoHan Zhao Reviewed-by: Eric Farman Reviewed-by: Matthew Rosato Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20260510084353.58263-3-zhaoguohan@= kylinos.cn Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio/ccw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c index ff6ab9a7408f01b9e64ba06f2c8da4a69fa1f9ff..c3dc7c19623556ea452344b8e4b= 76fb9a56206c7 100644 --- a/hw/vfio/ccw.c +++ b/hw/vfio/ccw.c @@ -431,6 +431,7 @@ static bool vfio_ccw_register_irq_notifier(VFIOCCWDevic= e *vcdev, VFIO_IRQ_SET_ACTION_TRIGGER, fd, er= rp)) { qemu_set_fd_handler(fd, NULL, NULL, vcdev); event_notifier_cleanup(notifier); + return false; } =20 return true; --=20 2.54.0 From nobody Sat May 30 17:43:32 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779294205; cv=none; d=zohomail.com; s=zohoarc; b=JYrSTb0mmc9D6J3zktCDvxPujhSKLpfv0oR8voi7wJs1TLIVytL1qdsq3r8UZnu5glL5paQ7C+sk4dRK0dsECwrS3JRpt4FdRt1XhO4DMKvyaHHRvvCqz1+Z5sormUXyJWiMuJTdojmksilHTrRkHu4XcvJc1xezp2Q1hlWrd0k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779294205; 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=Ihs0XP3I6CFuopnX9tMtVK9NmX8qMGsW0y0Q3uEM+HI=; b=keI8VpRxhIX66kXgOyLDRPeJG021VbsBeaOG2Xf6TJRNE+jyHIwPmGsz1kvQrHbe14Pg+V+T2WitPt994eNVtPvwwH4UKOx14+NliNnfeZ70DbI2qDXg/cINByXdTfgO7sLUCl2JXYNlN5RHELhK69nrI3Hzf91FTKSBF+OvBj0= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17792942053381000.4596931137244; Wed, 20 May 2026 09:23:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wPjgK-0006NF-PQ; Wed, 20 May 2026 12:22:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wPjg5-00063e-W1 for qemu-devel@nongnu.org; Wed, 20 May 2026 12:21:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wPjg0-000061-NJ for qemu-devel@nongnu.org; Wed, 20 May 2026 12:21:47 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-628-jzJnd-arMY6U9piW7p2W9A-1; Wed, 20 May 2026 12:21:40 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 187931956075 for ; Wed, 20 May 2026 16:21:40 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.34.136]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7E8F719560A3; Wed, 20 May 2026 16:21:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779294102; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ihs0XP3I6CFuopnX9tMtVK9NmX8qMGsW0y0Q3uEM+HI=; b=WC6ackxi/lX2a70gxdl0E6EjuqSxV2OyIRO/uw+F0vVDXCs6suKQRcxk9qK9O9R5oNcHKy DMvVIso10o2qRK0WppBDTkvvjEdrQFr3nPUHpI1kZ/4ArrBd2jkDY90dEGgORq4s3UDvGM wejN8mbSknkC7vrJvYWV0B5JPNaKPBg= X-MC-Unique: jzJnd-arMY6U9piW7p2W9A-1 X-Mimecast-MFC-AGG-ID: jzJnd-arMY6U9piW7p2W9A_1779294100 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , "Michael S. Tsirkin" Subject: [PULL 09/11] update-linux-headers: Inject VIRTIO_RING_NO_LEGACY in virtio_ring.h Date: Wed, 20 May 2026 18:21:13 +0200 Message-ID: <20260520162115.1613601-10-clg@redhat.com> In-Reply-To: <20260520162115.1613601-1-clg@redhat.com> References: <20260520162115.1613601-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-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 @redhat.com) X-ZM-MESSAGEID: 1779294206812158500 The kernel commit 3c4629b68dbe ("virtio: uapi: avoid usage of libc types") changed the virtio_ring.h header and this breaks the build on Windows which requires the uintptr_t type to cast from pointer to integer. Inject '#define VIRTIO_RING_NO_LEGACY' at the top of the synced header via the update script after the include guard. This discards the code section incompatible with Windows. Acked-by: Michael S. Tsirkin Link: https://lore.kernel.org/qemu-devel/20260511111913.3327672-1-clg@redha= t.com Signed-off-by: C=C3=A9dric Le Goater --- scripts/update-linux-headers.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers= .sh index 386d7a38e7af939291d20d34ced17af823771bf7..0dea7c9551d2eb1e84aef90e82b= e92a872318706 100755 --- a/scripts/update-linux-headers.sh +++ b/scripts/update-linux-headers.sh @@ -103,6 +103,7 @@ cp_portable() { -e 's/__kernel_ulong_t/unsigned long/' \ -e 's/struct ethhdr/struct eth_header/' \ -e '/\#define _LINUX_ETHTOOL_H/a \\n\#include "net/eth.h"' \ + -e '/\#define _LINUX_VIRTIO_RING_H/a \\n\#define VIRTIO_RING_NO_LE= GACY' \ "$f" > "$to/$header"; } =20 --=20 2.54.0 From nobody Sat May 30 17:43:32 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779294187; cv=none; d=zohomail.com; s=zohoarc; b=nhepRbZofrjZ3I2khriJUPW76Ax6vZM+C4+IX3iBXo1zrl3XnHL+iQq6ISBPDnqmfoEgAW+v4i0cXyr7jc7pXb+77BTTgt6FqoOIAd+W7auuQLqZGZ4lB2aFMLha/xeQEZcZ0/DJs/g6aMk54ri5gCvh5N+V3XMSYwPHRzFrpSc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779294187; 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=qSphaj4kw81xEQCRYqZKkcS69L79PCga3KQr3uYUT8k=; b=SzrFL+r6awqLDf7fHgqXLRngzOXBvwh+CiHcEsOHteKSBtimz8jVaWJmJf31DqFrznxjm16beF3hC3b/Jk5trt9yOt9z7JbDf3nBw3/ujyzl+5CJYRo5KEvjA6eVjGfqcSvemg8xPlq/xMbI3uTcfVdkp+UEPgW5kR2qemXy74U= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779294186998297.1416547156597; Wed, 20 May 2026 09:23:06 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wPjgM-0006PW-EA; Wed, 20 May 2026 12:22:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wPjg8-000697-K7 for qemu-devel@nongnu.org; Wed, 20 May 2026 12:21:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wPjg5-00007Y-Fr for qemu-devel@nongnu.org; Wed, 20 May 2026 12:21:51 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-523-CQfUEWbeM0mC8IYZ1-DUYg-1; Wed, 20 May 2026 12:21:43 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B4ECE195608E; Wed, 20 May 2026 16:21:42 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.34.136]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id BBC4419560A2; Wed, 20 May 2026 16:21:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779294106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qSphaj4kw81xEQCRYqZKkcS69L79PCga3KQr3uYUT8k=; b=aEuv/CIF21VuT8fUry2mwtSrrytpeAWGJayIIYPTdEPPdIu8kMPRdlTTrgIFUt2PxHjQU+ xwdWlIAZ0KhBmsufwJC4BC8dbYQ4JSEYDUkwsuM0Ft3qNR/K4dK0EgfN3XjkdEEq/q7vqs cXW4BQp0G8W3GpplpEMZ316nkGU31kA= X-MC-Unique: CQfUEWbeM0mC8IYZ1-DUYg-1 X-Mimecast-MFC-AGG-ID: CQfUEWbeM0mC8IYZ1-DUYg_1779294102 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Avihai Horon , Peter Xu Subject: [PULL 10/11] vfio/migration: Detect and report overflow in migration size queries Date: Wed, 20 May 2026 18:21:14 +0200 Message-ID: <20260520162115.1613601-11-clg@redhat.com> In-Reply-To: <20260520162115.1613601-1-clg@redhat.com> References: <20260520162115.1613601-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-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 @redhat.com) X-ZM-MESSAGEID: 1779294189022154100 VFIO migration ioctls (VFIO_DEVICE_FEATURE_MIG_DATA_SIZE and VFIO_MIG_GET_PRECOPY_INFO) return device-estimated migration sizes as uint64_t values. A misbehaving kernel driver could return values that are unreasonably large, which would corrupt the size accounting used to decide migration convergence. This misbehavior occurred a few times when testing migration of a VM with an assigned NVIDIA vGPU and an MLX5 VF. In some of the save iterations, the reported precopy and stopcopy sizes were unreasonably large (close to UINT64_MAX): vfio_state_pending (4fbce62c-8ce2-4cc9-b429-41635bc94f24) stopcopy size = 0 precopy initial size 18446744073708667040 precopy dirty size 0 vfio_save_iterate (4fbce62c-8ce2-4cc9-b429-41635bc94f24) precopy initia= l size 18446744073707618464 precopy dirty size 0 vfio_state_pending (4fbce62c-8ce2-4cc9-b429-41635bc94f24) stopcopy size = 18446744073708503040 precopy initial size 18446744073707618464 precopy dirt= y size 0 vfio_state_pending (4fbce62c-8ce2-4cc9-b429-41635bc94f24) stopcopy size = 0 precopy initial size 18446744073707618464 precopy dirty size 0 vfio_state_pending (0000:b1:01.0) stopcopy size 18446744073709543408 pre= copy initial size 0 precopy dirty size 1008 This had the effect of corrupting migration convergence, as reported by the HMP migrate command: (qemu) info migrate Status: active Time (ms): total=3D21140, setup=3D86, exp_down=3D15245543488= 6355 Remaining: 16 EiB RAM info: Throughput (Mbps): 967.98 Sizes: pagesize=3D4 KiB, total=3D4 GiB Transfers: transferred=3D2.29 GiB, remain=3D4.7 MiB Channels: precopy=3D1.91 GiB, multifd=3D0 B, postcopy=3D0 B= , vfio=3D387 MiB Page Types: normal=3D499427, zero=3D559708 Page Rates (pps): transfer=3D0, dirty=3D1892 Others: dirty_syncs=3D3 Add a helper to detect values that exceed INT64_MAX, which is far beyond any realistic device state size, and report them with an error message. Return -ERANGE from the query functions so callers can abort the migration rather than proceeding with corrupted estimates. However, the callers don't yet check the return value to actually stop the migration. Cc: Avihai Horon Cc: Peter Xu Reviewed-by: Avihai Horon Reviewed-by: Peter Xu Link: https://lore.kernel.org/qemu-devel/20260513094522.346314-1-clg@redhat= .com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio/migration.c | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c index 150e28656e97c5e8198541e5b6dfc4ed4102d143..fb12b9717f773fdde657911517d= e9d74c1eb3931 100644 --- a/hw/vfio/migration.c +++ b/hw/vfio/migration.c @@ -320,6 +320,18 @@ static void vfio_migration_cleanup(VFIODevice *vbasede= v) migration->data_fd =3D -1; } =20 +static bool vfio_migration_check_overflow(VFIODevice *vbasedev, uint64_t s= ize, + const char *name) +{ + if (size > INT64_MAX) { + error_report("%s: Estimated %s size overflow: 0x%"PRIx64, + vbasedev->name, name, size); + return true; + } + + return false; +} + static int vfio_query_stop_copy_size(VFIODevice *vbasedev) { uint64_t buf[DIV_ROUND_UP(sizeof(struct vfio_device_feature) + @@ -329,7 +341,7 @@ static int vfio_query_stop_copy_size(VFIODevice *vbased= ev) struct vfio_device_feature_mig_data_size *mig_data_size =3D (struct vfio_device_feature_mig_data_size *)feature->data; VFIOMigration *migration =3D vbasedev->migration; - int ret; + int ret =3D 0; =20 feature->argsz =3D sizeof(buf); feature->flags =3D @@ -347,7 +359,10 @@ static int vfio_query_stop_copy_size(VFIODevice *vbase= dev) vbasedev->name, ret); } else { migration->stopcopy_size =3D mig_data_size->stop_copy_length; - ret =3D 0; + if (vfio_migration_check_overflow(vbasedev, migration->stopcopy_si= ze, + "stop copy size")) { + ret =3D -ERANGE; + } } =20 trace_vfio_query_stop_copy_size(vbasedev->name, @@ -361,7 +376,7 @@ static int vfio_query_precopy_size(VFIOMigration *migra= tion) struct vfio_precopy_info precopy =3D { .argsz =3D sizeof(precopy), }; - int ret; + int ret =3D 0; =20 if (ioctl(migration->data_fd, VFIO_MIG_GET_PRECOPY_INFO, &precopy)) { migration->precopy_init_size =3D 0; @@ -370,9 +385,18 @@ static int vfio_query_precopy_size(VFIOMigration *migr= ation) warn_report_once("VFIO device %s ioctl(VFIO_MIG_GET_PRECOPY_INFO) " "failed (%d)", migration->vbasedev->name, ret); } else { + bool overflow; + migration->precopy_init_size =3D precopy.initial_bytes; migration->precopy_dirty_size =3D precopy.dirty_bytes; - ret =3D 0; + + overflow =3D vfio_migration_check_overflow(migration->vbasedev, + migration->precopy_init_size, "precopy init size= "); + overflow |=3D vfio_migration_check_overflow(migration->vbasedev, + migration->precopy_dirty_size, "precopy dirty siz= e"); + if (overflow) { + ret =3D -ERANGE; + } } =20 trace_vfio_query_precopy_size(migration->vbasedev->name, --=20 2.54.0 From nobody Sat May 30 17:43:32 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779294195; cv=none; d=zohomail.com; s=zohoarc; b=ULgbzBLRZwJzbAWnd/6NNHThlhzmHozQD2kr1RzDPwzZjVR1BAXu/MsXCNmSCnzbJcxxNNkD+AsnAjWbnPbS/ol5us+q4o1qyxCWXIRAsQaa/UxhlZSNfINalKLVBUhE5DJdrz6UuNRQus3Eu0hk4LEIYKZFA1zCLbJEyEdBMoE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779294195; 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=pdmJ5Ki2koJsf/Baeh9JW90e9+yppTSyY+hiY8+gc1g=; b=ftBEmtCl5T2ERxbzs7so7VMhZtIfEeHyv3XiJcURJqZ3m7+yhxcZYuvElVMud4TcQe814z7Tsax07eXef3Klha8JQOJbbd8uEoh3aK6yPSpui14Yr9qB2jm8jZ3QuEpEraNXra1VDt1MwSQLOU2SNJZEKJuv8DyHaNj2ZymuTec= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779294195012597.6765823295349; Wed, 20 May 2026 09:23:15 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wPjgM-0006Sm-OV; Wed, 20 May 2026 12:22:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wPjgG-0006Jm-4k for qemu-devel@nongnu.org; Wed, 20 May 2026 12:22:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wPjgE-0000Dk-AN for qemu-devel@nongnu.org; Wed, 20 May 2026 12:21:59 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-154-jBvdIf0iOOSRwcZhngJuow-1; Wed, 20 May 2026 12:21:46 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 40D171800367; Wed, 20 May 2026 16:21:45 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.34.136]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3231B19560A2; Wed, 20 May 2026 16:21:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779294117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pdmJ5Ki2koJsf/Baeh9JW90e9+yppTSyY+hiY8+gc1g=; b=hcAT1AzPOSwag3YK4BZ6vQtEomQmUZ/A37BstfhhzRhmeyR7Gmv3ktL17cFgG661nibyej ssLdUpup8UyFlkMNLPH7ODGj0NXVT1yE7aO+yOmkIoCyAO+gvbnNue2l1zTe7lop4NbRKl oa/Iq786xietjSx3H+m77pHTINYE0Qs= X-MC-Unique: jBvdIf0iOOSRwcZhngJuow-1 X-Mimecast-MFC-AGG-ID: jBvdIf0iOOSRwcZhngJuow_1779294105 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Avihai Horon , Song Gao , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 11/11] scripts/update-linux-headers: Add typelimits.h Date: Wed, 20 May 2026 18:21:15 +0200 Message-ID: <20260520162115.1613601-12-clg@redhat.com> In-Reply-To: <20260520162115.1613601-1-clg@redhat.com> References: <20260520162115.1613601-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1779294197152154100 From: Avihai Horon Upstream Linux added include/uapi/linux/typelimits.h and includes it from ethtool.h [1][2]. Teach update-linux-headers.sh to install that header into standard-headers to be able to update kernel headers to versions that include the above changes. [1] ca9d74eb5f6a ("uapi: add INT_MAX and INT_MIN constants") [2] a8a11e5237ae ("ethtool: uapi: Use UAPI definition of INT_MAX") Signed-off-by: Avihai Horon Reviewed-by: Song Gao Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20260505081423.28326-2-avihaih@nvi= dia.com Signed-off-by: C=C3=A9dric Le Goater --- scripts/update-linux-headers.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers= .sh index 0dea7c9551d2eb1e84aef90e82be92a872318706..3c3a0e9394d277766e613dd5ef4= e9c7407ec0033 100755 --- a/scripts/update-linux-headers.sh +++ b/scripts/update-linux-headers.sh @@ -60,6 +60,7 @@ cp_portable() { -e 'drm.h' \ -e 'limits' \ -e 'linux/const' \ + -e 'linux/typelimits' \ -e 'linux/kernel' \ -e 'linux/sysinfo' \ -e 'asm/setup_data.h' \ @@ -251,6 +252,7 @@ for i in "$hdrdir"/include/linux/*virtio*.h \ "$hdrdir/include/linux/pci_regs.h" \ "$hdrdir/include/linux/ethtool.h" \ "$hdrdir/include/linux/const.h" \ + "$hdrdir/include/linux/typelimits.h" \ "$hdrdir/include/linux/kernel.h" \ "$hdrdir/include/linux/kvm_para.h" \ "$hdrdir/include/linux/vhost_types.h" \ --=20 2.54.0