From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758864946; cv=none; d=zohomail.com; s=zohoarc; b=KYWLbIpksFiO8We6nDL8PFofQWfuyTTPPJMutZcswVenMeQ7VJiRWE4CR7kK5LgHdH/YfkQE23P66pnaDVUAOMCtIUEb+JRfRZWxJ5eD3POH/tm4pzCSgiEdZEz2Wv5zWkqeTFtT13YuFGo5Gngdt+rAeshliROkaY5BAtD+rHs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758864946; 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=LG8f7f/BKceVvi+dHjXJIpPGDrEsR8S5Y6r6UkC5W54=; b=OA/G/fnxZgXAWgQKNHEVd+4hMA6Wq59f2rKnCaGiOtFNmWly5GRPqSmZp2ARN7zCwHnm/XptIbmWUVeU0w9KFB3ExbLmVAJkuK0+S4veRqQmBjlXOC4cZREIdHaJoc54fK762z5ajo4jRwSQyg3sxGLysNojeuzVrvIe8MCMvmM= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758864946117197.29641937272652; Thu, 25 Sep 2025 22:35:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v216F-0008DW-2X; Fri, 26 Sep 2025 01:34:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v216C-0008Bi-EX for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:29 -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 1v2165-0000im-OP for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:27 -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-587-gR4gzjhLPBeO7Qb9XPGLEA-1; Fri, 26 Sep 2025 01:34:07 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 2687118004D4; Fri, 26 Sep 2025 05:34:06 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C16401800452; Fri, 26 Sep 2025 05:34:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864849; 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=LG8f7f/BKceVvi+dHjXJIpPGDrEsR8S5Y6r6UkC5W54=; b=E11sqtRob1A/u3VsVbM9dX2eiQcxJcP5ioux1ggP9O7fYxiEYBumye7Rx8OGzqEnC2wxRy 7BUParVUjAxP4ZbjXZvaF14r0ViM1SxS7lpFS7M3NSrEXrX3Nhsbc5RHVzvoxA4Ytt/KFq fjDcmFD8R3+oI6ucr/QdBngyFnemM54= X-MC-Unique: gR4gzjhLPBeO7Qb9XPGLEA-1 X-Mimecast-MFC-AGG-ID: gR4gzjhLPBeO7Qb9XPGLEA_1758864846 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , John Levon , Thomas Huth , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 01/29] tests/functional: add a vfio-user smoke test Date: Fri, 26 Sep 2025 07:33:30 +0200 Message-ID: <20250926053358.308198-2-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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: 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: 1758864947615116600 From: Mark Cave-Ayland Add a basic test of the vfio-user PCI client implementation. Co-authored-by: John Levon Signed-off-by: Mark Cave-Ayland Signed-off-by: John Levon Reviewed-by: Thomas Huth Link: https://lore.kernel.org/qemu-devel/20250911210905.2070474-1-john.levo= n@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- MAINTAINERS | 1 + tests/functional/x86_64/meson.build | 1 + .../x86_64/test_vfio_user_client.py | 201 ++++++++++++++++++ 3 files changed, 203 insertions(+) create mode 100755 tests/functional/x86_64/test_vfio_user_client.py diff --git a/MAINTAINERS b/MAINTAINERS index 24b71a4fc54d820cce42830a0db83e653e91ffc5..7d134a85e666134717b526f470e= 3360e3a992201 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4318,6 +4318,7 @@ F: docs/system/devices/vfio-user.rst F: hw/vfio-user/* F: include/hw/vfio-user/* F: subprojects/libvfio-user +F: tests/functional/x86_64/test_vfio_user_client.py =20 EBPF: M: Jason Wang diff --git a/tests/functional/x86_64/meson.build b/tests/functional/x86_64/= meson.build index 967426c30c3cf1047f182ff0450e4fc12b1b08e0..f78eec5e6cf43cc919f49a2e643= a4c879bb6067b 100644 --- a/tests/functional/x86_64/meson.build +++ b/tests/functional/x86_64/meson.build @@ -33,6 +33,7 @@ tests_x86_64_system_thorough =3D [ 'replay', 'reverse_debug', 'tuxrun', + 'vfio_user_client', 'virtio_balloon', 'virtio_gpu', ] diff --git a/tests/functional/x86_64/test_vfio_user_client.py b/tests/funct= ional/x86_64/test_vfio_user_client.py new file mode 100755 index 0000000000000000000000000000000000000000..8bc16e5e314904b26414d17dc62= a67c27b6bb008 --- /dev/null +++ b/tests/functional/x86_64/test_vfio_user_client.py @@ -0,0 +1,201 @@ +#!/usr/bin/env python3 +# +# Copyright (c) 2025 Nutanix, Inc. +# +# Author: +# Mark Cave-Ayland +# John Levon +# +# SPDX-License-Identifier: GPL-2.0-or-later +""" +Check basic vfio-user-pci client functionality. The test starts two VMs: + + - the server VM runs the libvfio-user "gpio" example server inside it, + piping vfio-user traffic between a local UNIX socket and a virtio-se= rial + port. On the host, the virtio-serial port is backed by a local socke= t. + + - the client VM loads the gpio-pci-idio-16 kernel module, with the + vfio-user client connecting to the above local UNIX socket. + +This way, we don't depend on trying to run a vfio-user server on the host +itself. + +Once both VMs are running, we run some basic configuration on the gpio dev= ice +and verify that the server is logging the expected out. As this is consist= ent +given the same VM images, we just do a simple direct comparison. +""" + +import os + +from qemu_test import Asset +from qemu_test import QemuSystemTest +from qemu_test import exec_command_and_wait_for_pattern +from qemu_test import wait_for_console_pattern + +# Exact output can vary, so we just sample for some expected lines. +EXPECTED_SERVER_LINES =3D [ + "gpio: adding DMA region [0, 0xc0000) offset=3D0 flags=3D0x3", + "gpio: devinfo flags 0x3, num_regions 9, num_irqs 5", + "gpio: region_info[0] offset 0 flags 0 size 0 argsz 32", + "gpio: region_info[1] offset 0 flags 0 size 0 argsz 32", + "gpio: region_info[2] offset 0 flags 0x3 size 256 argsz 32", + "gpio: region_info[3] offset 0 flags 0 size 0 argsz 32", + "gpio: region_info[4] offset 0 flags 0 size 0 argsz 32", + "gpio: region_info[5] offset 0 flags 0 size 0 argsz 32", + "gpio: region_info[7] offset 0 flags 0x3 size 256 argsz 32", + "gpio: region7: read 256 bytes at 0", + "gpio: region7: read 0 from (0x30:4)", + "gpio: cleared EROM", + "gpio: I/O space enabled", + "gpio: memory space enabled", + "gpio: SERR# enabled", + "gpio: region7: wrote 0x103 to (0x4:2)", + "gpio: I/O space enabled", + "gpio: memory space enabled", +] + +class VfioUserClient(QemuSystemTest): + """vfio-user testing class.""" + + ASSET_REPO =3D 'https://github.com/mcayland-ntx/libvfio-user-test' + + ASSET_KERNEL =3D Asset( + f'{ASSET_REPO}/raw/refs/heads/main/images/bzImage', + '40292fa6ce95d516e26bccf5974e138d0db65a6de0bc540cabae060fe9dea605' + ) + + ASSET_ROOTFS =3D Asset( + f'{ASSET_REPO}/raw/refs/heads/main/images/rootfs.ext2', + 'e1e3abae8aebb8e6e77f08b1c531caeacf46250c94c815655c6bbea59fc3d1c1' + ) + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + + self.kernel_path =3D None + self.rootfs_path =3D None + + def configure_server_vm_args(self, server_vm, sock_path): + """ + Configuration for the server VM. Set up virtio-serial device backe= d by + the given socket path. + """ + server_vm.add_args('-kernel', self.kernel_path) + server_vm.add_args('-append', 'console=3DttyS0 root=3D/dev/sda') + server_vm.add_args('-drive', + f"file=3D{self.rootfs_path},if=3Dide,format=3Draw,id=3Ddrv0") + server_vm.add_args('-snapshot') + server_vm.add_args('-chardev', + f"socket,id=3Dsock0,path=3D{sock_path},telnet=3Doff,server=3Do= n,wait=3Doff") + server_vm.add_args('-device', 'virtio-serial') + server_vm.add_args('-device', + 'virtserialport,chardev=3Dsock0,name=3Dorg.fedoraproject.port.= 0') + + def configure_client_vm_args(self, client_vm, sock_path): + """ + Configuration for the client VM. Point the vfio-user-pci device to= the + socket path configured above. + """ + + client_vm.add_args('-kernel', self.kernel_path) + client_vm.add_args('-append', 'console=3DttyS0 root=3D/dev/sda') + client_vm.add_args('-drive', + f'file=3D{self.rootfs_path},if=3Dide,format=3Draw,id=3Ddrv0') + client_vm.add_args('-snapshot') + client_vm.add_args('-device', + '{"driver":"vfio-user-pci",' + + '"socket":{"path": "%s", "type": "unix"}}' % sock_path) + + def setup_vfio_user_pci_server(self, server_vm): + """ + Start the libvfio-user server within the server VM, and arrange + for data to shuttle between its socket and the virtio serial port. + """ + wait_for_console_pattern(self, 'login:', None, server_vm) + exec_command_and_wait_for_pattern(self, 'root', '#', None, server_= vm) + + exec_command_and_wait_for_pattern(self, + 'gpio-pci-idio-16 -v /tmp/vfio-user.sock >/var/tmp/gpio.out 2>= &1 &', + '#', None, server_vm) + + # wait for libvfio-user socket to appear + while True: + out =3D exec_command_and_wait_for_pattern(self, + 'ls --color=3Dno /tmp/vfio-user.sock', '#', None, server_= vm) + ls_out =3D out.decode().splitlines()[1].strip() + if ls_out =3D=3D "/tmp/vfio-user.sock": + break + + exec_command_and_wait_for_pattern(self, + 'socat UNIX-CONNECT:/tmp/vfio-user.sock /dev/vport0p1,ignoreeo= f ' + + ' &', '#', None, server_vm) + + def test_vfio_user_pci(self): + """Run basic sanity test.""" + + self.set_machine('pc') + self.require_device('virtio-serial') + self.require_device('vfio-user-pci') + + self.kernel_path =3D self.ASSET_KERNEL.fetch() + self.rootfs_path =3D self.ASSET_ROOTFS.fetch() + + sock_dir =3D self.socket_dir() + socket_path =3D os.path.join(sock_dir.name, 'vfio-user.sock') + + server_vm =3D self.get_vm(name=3D'server') + server_vm.set_console() + self.configure_server_vm_args(server_vm, socket_path) + + server_vm.launch() + + self.log.debug('starting libvfio-user server') + + self.setup_vfio_user_pci_server(server_vm) + + client_vm =3D self.get_vm(name=3D"client") + client_vm.set_console() + self.configure_client_vm_args(client_vm, socket_path) + + try: + client_vm.launch() + except: + self.log.error('client VM failed to start, dumping server logs= ') + exec_command_and_wait_for_pattern(self, 'cat /var/tmp/gpio.out= ', + '#', None, server_vm) + raise + + self.log.debug('waiting for client VM boot') + + wait_for_console_pattern(self, 'login:', None, client_vm) + exec_command_and_wait_for_pattern(self, 'root', '#', None, client_= vm) + + # + # Here, we'd like to actually interact with the gpio device a litt= le + # more as described at: + # + # https://github.com/nutanix/libvfio-user/blob/master/docs/qemu.md + # + # Unfortunately, the buildroot Linux kernel has some undiagnosed i= ssue + # so we don't get /sys/class/gpio. Nonetheless just the basic + # initialization and setup is enough for basic testing of vfio-use= r. + # + + self.log.debug('collecting libvfio-user server output') + + out =3D exec_command_and_wait_for_pattern(self, + 'cat /var/tmp/gpio.out', + 'gpio: region2: wrote 0 to (0x1:1)', + None, server_vm) + + gpio_server_out =3D [s for s in out.decode().splitlines() + if s.startswith("gpio:")] + + for line in EXPECTED_SERVER_LINES: + if line not in gpio_server_out: + self.log.error(f'Missing server debug line: {line}') + self.fail(False) + + +if __name__ =3D=3D '__main__': + QemuSystemTest.main() --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758864976; cv=none; d=zohomail.com; s=zohoarc; b=Hw8eDhXKHNAe5LkY1Ir6shgv4siggGnpWT8PM8mQbhwEk6s0XRH7tftrZvE8nua8SF/zwrZIcAyWqhitExuhQXdxvZSLaGhW58umH8mGHKadhiAT5487TYEw9+C0R7AF1dRhvjwq+ZwlCucIwpHmG25uquSwqab4ZVYtExzoOzM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758864976; 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=lYzizeLc0en2xd+KmRgVyE0W8r6aBUcxApESnjU8U78=; b=PxRnXk+ifYYceZFrTbjSBVZ/cxkK4JGNi32HQJGrnKD4oHowX3ubfK685ozJZXzilyZ26/xa5x+w+PBk895hY5qB07ZNt03Ekm1hqXxiFpKB2lGa1Qv4PGYuMSnVmxzPPfBk/ozywP55fyIYz9oOfTPlyfoeIgr6Pr8U+jDK0gc= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758864976979599.7150230169973; Thu, 25 Sep 2025 22:36:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v216D-0008CM-TM; Fri, 26 Sep 2025 01:34:30 -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 1v216B-0008Bk-IZ for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:27 -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 1v215z-0000jE-MN for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:27 -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-662-eOUtebgmN1iIwl4rDIc2xA-1; Fri, 26 Sep 2025 01:34:09 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 DDAEC1800365; Fri, 26 Sep 2025 05:34:08 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D74101800579; Fri, 26 Sep 2025 05:34:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864852; 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=lYzizeLc0en2xd+KmRgVyE0W8r6aBUcxApESnjU8U78=; b=KpNjSwkIbxNCWZ4mlJufC4mQhwSU/0CBGbMIsE1RottDeEdUD+m8Jwa2Vi58lkz/b+zmYY UEidXJeAu5+/x66KIpXfPiIB8VAxLYunhlEaoTN9cC6nB4MMBDMP+o2Jy7I2N5mTaF5LXY WQD+b3hXMBywpkf6cxlKH5nhCrNL87M= X-MC-Unique: eOUtebgmN1iIwl4rDIc2xA-1 X-Mimecast-MFC-AGG-ID: eOUtebgmN1iIwl4rDIc2xA_1758864849 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 02/29] include/hw/vfio/vfio-container.h: rename VFIOContainer to VFIOLegacyContainer Date: Fri, 26 Sep 2025 07:33:31 +0200 Message-ID: <20250926053358.308198-3-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 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 @redhat.com) X-ZM-MESSAGEID: 1758864977961116600 From: Mark Cave-Ayland The VFIOContainer struct represents the legacy VFIO container even though t= he name suggests it may be the common superclass of all VFIO containers. Renam= e it to VFIOLegacyContainer to make this clearer, which is also a better match f= or its VFIO_IOMMU_LEGACY QOM type name. Signed-off-by: Mark Cave-Ayland Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-2-mark.cave= ayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- include/hw/vfio/vfio-container.h | 8 +++--- include/hw/vfio/vfio-cpr.h | 9 ++++--- hw/ppc/spapr_pci_vfio.c | 10 ++++---- hw/vfio/container.c | 42 +++++++++++++++++--------------- hw/vfio/cpr-legacy.c | 27 +++++++++++--------- hw/vfio/spapr.c | 18 +++++++------- 6 files changed, 60 insertions(+), 54 deletions(-) diff --git a/include/hw/vfio/vfio-container.h b/include/hw/vfio/vfio-contai= ner.h index 240f56699336fb6fb3a925fe7a4d83a218a26eb2..712a6914004aeb2eb83927e8c91= 377eb2dde33f5 100644 --- a/include/hw/vfio/vfio-container.h +++ b/include/hw/vfio/vfio-container.h @@ -12,20 +12,20 @@ #include "hw/vfio/vfio-container-base.h" #include "hw/vfio/vfio-cpr.h" =20 -typedef struct VFIOContainer VFIOContainer; +typedef struct VFIOLegacyContainer VFIOLegacyContainer; typedef struct VFIODevice VFIODevice; =20 typedef struct VFIOGroup { int fd; int groupid; - VFIOContainer *container; + VFIOLegacyContainer *container; QLIST_HEAD(, VFIODevice) device_list; QLIST_ENTRY(VFIOGroup) next; QLIST_ENTRY(VFIOGroup) container_next; bool ram_block_discard_allowed; } VFIOGroup; =20 -struct VFIOContainer { +struct VFIOLegacyContainer { VFIOContainerBase parent_obj; =20 int fd; /* /dev/vfio/vfio, empowered by the attached groups */ @@ -34,6 +34,6 @@ struct VFIOContainer { VFIOContainerCPR cpr; }; =20 -OBJECT_DECLARE_SIMPLE_TYPE(VFIOContainer, VFIO_IOMMU_LEGACY); +OBJECT_DECLARE_SIMPLE_TYPE(VFIOLegacyContainer, VFIO_IOMMU_LEGACY); =20 #endif /* HW_VFIO_CONTAINER_H */ diff --git a/include/hw/vfio/vfio-cpr.h b/include/hw/vfio/vfio-cpr.h index d37daffbc5b3d2bb65b60967c227df54d24437f7..04e987258719ef4cf0b6356d047= 87aa66ef012b4 100644 --- a/include/hw/vfio/vfio-cpr.h +++ b/include/hw/vfio/vfio-cpr.h @@ -12,7 +12,7 @@ #include "migration/misc.h" #include "system/memory.h" =20 -struct VFIOContainer; +struct VFIOLegacyContainer; struct VFIOContainerBase; struct VFIOGroup; struct VFIODevice; @@ -42,9 +42,10 @@ typedef struct VFIOPCICPR { NotifierWithReturn transfer_notifier; } VFIOPCICPR; =20 -bool vfio_legacy_cpr_register_container(struct VFIOContainer *container, +bool vfio_legacy_cpr_register_container(struct VFIOLegacyContainer *contai= ner, Error **errp); -void vfio_legacy_cpr_unregister_container(struct VFIOContainer *container); +void vfio_legacy_cpr_unregister_container( + struct VFIOLegacyContainer *container); =20 int vfio_cpr_reboot_notifier(NotifierWithReturn *notifier, MigrationEvent = *e, Error **errp); @@ -61,7 +62,7 @@ void vfio_cpr_load_device(struct VFIODevice *vbasedev); =20 int vfio_cpr_group_get_device_fd(int d, const char *name); =20 -bool vfio_cpr_container_match(struct VFIOContainer *container, +bool vfio_cpr_container_match(struct VFIOLegacyContainer *container, struct VFIOGroup *group, int fd); =20 void vfio_cpr_giommu_remap(struct VFIOContainerBase *bcontainer, diff --git a/hw/ppc/spapr_pci_vfio.c b/hw/ppc/spapr_pci_vfio.c index 7e1c71ef59d5c4d4449769b726c8c0053e607097..faa3ab3fe1ba86be262c233e870= 2c492978bc87c 100644 --- a/hw/ppc/spapr_pci_vfio.c +++ b/hw/ppc/spapr_pci_vfio.c @@ -32,7 +32,7 @@ * Interfaces for IBM EEH (Enhanced Error Handling) */ #ifdef CONFIG_VFIO_PCI -static bool vfio_eeh_container_ok(VFIOContainer *container) +static bool vfio_eeh_container_ok(VFIOLegacyContainer *container) { /* * As of 2016-03-04 (linux-4.5) the host kernel EEH/VFIO @@ -60,7 +60,7 @@ static bool vfio_eeh_container_ok(VFIOContainer *containe= r) return true; } =20 -static int vfio_eeh_container_op(VFIOContainer *container, uint32_t op) +static int vfio_eeh_container_op(VFIOLegacyContainer *container, uint32_t = op) { struct vfio_eeh_pe_op pe_op =3D { .argsz =3D sizeof(pe_op), @@ -83,7 +83,7 @@ static int vfio_eeh_container_op(VFIOContainer *container= , uint32_t op) return ret; } =20 -static VFIOContainer *vfio_eeh_as_container(AddressSpace *as) +static VFIOLegacyContainer *vfio_eeh_as_container(AddressSpace *as) { VFIOAddressSpace *space =3D vfio_address_space_get(as); VFIOContainerBase *bcontainer =3D NULL; @@ -111,14 +111,14 @@ out: =20 static bool vfio_eeh_as_ok(AddressSpace *as) { - VFIOContainer *container =3D vfio_eeh_as_container(as); + VFIOLegacyContainer *container =3D vfio_eeh_as_container(as); =20 return (container !=3D NULL) && vfio_eeh_container_ok(container); } =20 static int vfio_eeh_as_op(AddressSpace *as, uint32_t op) { - VFIOContainer *container =3D vfio_eeh_as_container(as); + VFIOLegacyContainer *container =3D vfio_eeh_as_container(as); =20 if (!container) { return -ENODEV; diff --git a/hw/vfio/container.c b/hw/vfio/container.c index 030c6d3f89cf57dc06e9bb2222f02e7803482c56..bdf415b3d639d62abfaca19987b= 4d90a0fe636dc 100644 --- a/hw/vfio/container.c +++ b/hw/vfio/container.c @@ -44,7 +44,8 @@ typedef QLIST_HEAD(VFIOGroupList, VFIOGroup) VFIOGroupLis= t; static VFIOGroupList vfio_group_list =3D QLIST_HEAD_INITIALIZER(vfio_group_list); =20 -static int vfio_ram_block_discard_disable(VFIOContainer *container, bool s= tate) +static int vfio_ram_block_discard_disable(VFIOLegacyContainer *container, + bool state) { switch (container->iommu_type) { case VFIO_TYPE1v2_IOMMU: @@ -67,7 +68,7 @@ static int vfio_ram_block_discard_disable(VFIOContainer *= container, bool state) } } =20 -static int vfio_dma_unmap_bitmap(const VFIOContainer *container, +static int vfio_dma_unmap_bitmap(const VFIOLegacyContainer *container, hwaddr iova, ram_addr_t size, IOMMUTLBEntry *iotlb) { @@ -124,7 +125,7 @@ static int vfio_legacy_dma_unmap_one(const VFIOContaine= rBase *bcontainer, hwaddr iova, ram_addr_t size, IOMMUTLBEntry *iotlb) { - const VFIOContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); + const VFIOLegacyContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); struct vfio_iommu_type1_dma_unmap unmap =3D { .argsz =3D sizeof(unmap), .flags =3D 0, @@ -212,7 +213,7 @@ static int vfio_legacy_dma_map(const VFIOContainerBase = *bcontainer, hwaddr iova, ram_addr_t size, void *vaddr, bool readonly, MemoryRegion *mr) { - const VFIOContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); + const VFIOLegacyContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); struct vfio_iommu_type1_dma_map map =3D { .argsz =3D sizeof(map), .flags =3D VFIO_DMA_MAP_FLAG_READ, @@ -244,7 +245,7 @@ static int vfio_legacy_set_dirty_page_tracking(const VFIOContainerBase *bcontainer, bool start, Error **errp) { - const VFIOContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); + const VFIOLegacyContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); int ret; struct vfio_iommu_type1_dirty_bitmap dirty =3D { .argsz =3D sizeof(dirty), @@ -269,7 +270,7 @@ vfio_legacy_set_dirty_page_tracking(const VFIOContainer= Base *bcontainer, static int vfio_legacy_query_dirty_bitmap(const VFIOContainerBase *bcontai= ner, VFIOBitmap *vbmap, hwaddr iova, hwaddr size, Error *= *errp) { - const VFIOContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); + const VFIOLegacyContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); struct vfio_iommu_type1_dirty_bitmap *dbitmap; struct vfio_iommu_type1_dirty_bitmap_get *range; int ret; @@ -413,12 +414,12 @@ static bool vfio_set_iommu(int container_fd, int grou= p_fd, return true; } =20 -static VFIOContainer *vfio_create_container(int fd, VFIOGroup *group, +static VFIOLegacyContainer *vfio_create_container(int fd, VFIOGroup *group, Error **errp) { int iommu_type; const char *vioc_name; - VFIOContainer *container; + VFIOLegacyContainer *container; =20 iommu_type =3D vfio_get_iommu_type(fd, errp); if (iommu_type < 0) { @@ -442,7 +443,7 @@ static VFIOContainer *vfio_create_container(int fd, VFI= OGroup *group, return container; } =20 -static int vfio_get_iommu_info(VFIOContainer *container, +static int vfio_get_iommu_info(VFIOLegacyContainer *container, struct vfio_iommu_type1_info **info) { =20 @@ -486,7 +487,7 @@ vfio_get_iommu_info_cap(struct vfio_iommu_type1_info *i= nfo, uint16_t id) return NULL; } =20 -static void vfio_get_iommu_info_migration(VFIOContainer *container, +static void vfio_get_iommu_info_migration(VFIOLegacyContainer *container, struct vfio_iommu_type1_info *in= fo) { struct vfio_info_cap_header *hdr; @@ -514,7 +515,7 @@ static void vfio_get_iommu_info_migration(VFIOContainer= *container, =20 static bool vfio_legacy_setup(VFIOContainerBase *bcontainer, Error **errp) { - VFIOContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); + VFIOLegacyContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); g_autofree struct vfio_iommu_type1_info *info =3D NULL; int ret; =20 @@ -540,8 +541,8 @@ static bool vfio_legacy_setup(VFIOContainerBase *bconta= iner, Error **errp) return true; } =20 -static bool vfio_container_attach_discard_disable(VFIOContainer *container, - VFIOGroup *group, Error **errp) +static bool vfio_container_attach_discard_disable( + VFIOLegacyContainer *container, VFIOGroup *group, Error **errp) { int ret; =20 @@ -587,8 +588,8 @@ static bool vfio_container_attach_discard_disable(VFIOC= ontainer *container, return !ret; } =20 -static bool vfio_container_group_add(VFIOContainer *container, VFIOGroup *= group, - Error **errp) +static bool vfio_container_group_add(VFIOLegacyContainer *container, + VFIOGroup *group, Error **errp) { if (!vfio_container_attach_discard_disable(container, group, errp)) { return false; @@ -604,7 +605,8 @@ static bool vfio_container_group_add(VFIOContainer *con= tainer, VFIOGroup *group, return true; } =20 -static void vfio_container_group_del(VFIOContainer *container, VFIOGroup *= group) +static void vfio_container_group_del(VFIOLegacyContainer *container, + VFIOGroup *group) { QLIST_REMOVE(group, container_next); group->container =3D NULL; @@ -616,7 +618,7 @@ static void vfio_container_group_del(VFIOContainer *con= tainer, VFIOGroup *group) static bool vfio_container_connect(VFIOGroup *group, AddressSpace *as, Error **errp) { - VFIOContainer *container; + VFIOLegacyContainer *container; VFIOContainerBase *bcontainer; int ret, fd =3D -1; VFIOAddressSpace *space; @@ -729,7 +731,7 @@ fail: =20 static void vfio_container_disconnect(VFIOGroup *group) { - VFIOContainer *container =3D group->container; + VFIOLegacyContainer *container =3D group->container; VFIOContainerBase *bcontainer =3D VFIO_IOMMU(container); VFIOIOMMUClass *vioc =3D VFIO_IOMMU_GET_CLASS(bcontainer); =20 @@ -1243,7 +1245,7 @@ hiod_legacy_vfio_get_page_size_mask(HostIOMMUDevice *= hiod) =20 static void vfio_iommu_legacy_instance_init(Object *obj) { - VFIOContainer *container =3D VFIO_IOMMU_LEGACY(obj); + VFIOLegacyContainer *container =3D VFIO_IOMMU_LEGACY(obj); =20 QLIST_INIT(&container->group_list); } @@ -1263,7 +1265,7 @@ static const TypeInfo types[] =3D { .name =3D TYPE_VFIO_IOMMU_LEGACY, .parent =3D TYPE_VFIO_IOMMU, .instance_init =3D vfio_iommu_legacy_instance_init, - .instance_size =3D sizeof(VFIOContainer), + .instance_size =3D sizeof(VFIOLegacyContainer), .class_init =3D vfio_iommu_legacy_class_init, }, { .name =3D TYPE_HOST_IOMMU_DEVICE_LEGACY_VFIO, diff --git a/hw/vfio/cpr-legacy.c b/hw/vfio/cpr-legacy.c index 8f437194fae035b37de3f7c3f88e332c4ef88302..12bf920a7de73abb8f8bde106e7= f08d57b9d6c63 100644 --- a/hw/vfio/cpr-legacy.c +++ b/hw/vfio/cpr-legacy.c @@ -17,7 +17,8 @@ #include "qapi/error.h" #include "qemu/error-report.h" =20 -static bool vfio_dma_unmap_vaddr_all(VFIOContainer *container, Error **err= p) +static bool vfio_dma_unmap_vaddr_all(VFIOLegacyContainer *container, + Error **errp) { struct vfio_iommu_type1_dma_unmap unmap =3D { .argsz =3D sizeof(unmap), @@ -41,7 +42,7 @@ static int vfio_legacy_cpr_dma_map(const VFIOContainerBas= e *bcontainer, hwaddr iova, ram_addr_t size, void *vad= dr, bool readonly, MemoryRegion *mr) { - const VFIOContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); + const VFIOLegacyContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); =20 struct vfio_iommu_type1_dma_map map =3D { .argsz =3D sizeof(map), @@ -63,12 +64,13 @@ static int vfio_legacy_cpr_dma_map(const VFIOContainerB= ase *bcontainer, static void vfio_region_remap(MemoryListener *listener, MemoryRegionSection *section) { - VFIOContainer *container =3D container_of(listener, VFIOContainer, - cpr.remap_listener); + VFIOLegacyContainer *container =3D container_of(listener, + VFIOLegacyContainer, + cpr.remap_listener); vfio_container_region_add(VFIO_IOMMU(container), section, true); } =20 -static bool vfio_cpr_supported(VFIOContainer *container, Error **errp) +static bool vfio_cpr_supported(VFIOLegacyContainer *container, Error **err= p) { if (!ioctl(container->fd, VFIO_CHECK_EXTENSION, VFIO_UPDATE_VADDR)) { error_setg(errp, "VFIO container does not support VFIO_UPDATE_VADD= R"); @@ -85,7 +87,7 @@ static bool vfio_cpr_supported(VFIOContainer *container, = Error **errp) =20 static int vfio_container_pre_save(void *opaque) { - VFIOContainer *container =3D opaque; + VFIOLegacyContainer *container =3D opaque; Error *local_err =3D NULL; =20 if (!vfio_dma_unmap_vaddr_all(container, &local_err)) { @@ -97,7 +99,7 @@ static int vfio_container_pre_save(void *opaque) =20 static int vfio_container_post_load(void *opaque, int version_id) { - VFIOContainer *container =3D opaque; + VFIOLegacyContainer *container =3D opaque; VFIOContainerBase *bcontainer =3D VFIO_IOMMU(container); VFIOIOMMUClass *vioc =3D VFIO_IOMMU_GET_CLASS(bcontainer); dma_map_fn saved_dma_map =3D vioc->dma_map; @@ -133,8 +135,8 @@ static const VMStateDescription vfio_container_vmstate = =3D { static int vfio_cpr_fail_notifier(NotifierWithReturn *notifier, MigrationEvent *e, Error **errp) { - VFIOContainer *container =3D - container_of(notifier, VFIOContainer, cpr.transfer_notifier); + VFIOLegacyContainer *container =3D + container_of(notifier, VFIOLegacyContainer, cpr.transfer_notifier); VFIOContainerBase *bcontainer =3D VFIO_IOMMU(container); =20 if (e->type !=3D MIG_EVENT_PRECOPY_FAILED) { @@ -165,7 +167,8 @@ static int vfio_cpr_fail_notifier(NotifierWithReturn *n= otifier, return 0; } =20 -bool vfio_legacy_cpr_register_container(VFIOContainer *container, Error **= errp) +bool vfio_legacy_cpr_register_container(VFIOLegacyContainer *container, + Error **errp) { VFIOContainerBase *bcontainer =3D VFIO_IOMMU(container); Error **cpr_blocker =3D &container->cpr.blocker; @@ -189,7 +192,7 @@ bool vfio_legacy_cpr_register_container(VFIOContainer *= container, Error **errp) return true; } =20 -void vfio_legacy_cpr_unregister_container(VFIOContainer *container) +void vfio_legacy_cpr_unregister_container(VFIOLegacyContainer *container) { VFIOContainerBase *bcontainer =3D VFIO_IOMMU(container); =20 @@ -263,7 +266,7 @@ static bool same_device(int fd1, int fd2) return !fstat(fd1, &st1) && !fstat(fd2, &st2) && st1.st_dev =3D=3D st2= .st_dev; } =20 -bool vfio_cpr_container_match(VFIOContainer *container, VFIOGroup *group, +bool vfio_cpr_container_match(VFIOLegacyContainer *container, VFIOGroup *g= roup, int fd) { if (container->fd =3D=3D fd) { diff --git a/hw/vfio/spapr.c b/hw/vfio/spapr.c index c41e4588d6f2f0532f80720c1a32079d1ccfdef4..b8bade90d7a0f9ef3a72abaddb3= 72418e88024b9 100644 --- a/hw/vfio/spapr.c +++ b/hw/vfio/spapr.c @@ -31,7 +31,7 @@ typedef struct VFIOHostDMAWindow { } VFIOHostDMAWindow; =20 typedef struct VFIOSpaprContainer { - VFIOContainer container; + VFIOLegacyContainer container; MemoryListener prereg_listener; QLIST_HEAD(, VFIOHostDMAWindow) hostwin_list; unsigned int levels; @@ -61,7 +61,7 @@ static void vfio_prereg_listener_region_add(MemoryListene= r *listener, { VFIOSpaprContainer *scontainer =3D container_of(listener, VFIOSpaprCon= tainer, prereg_listener); - VFIOContainer *container =3D &scontainer->container; + VFIOLegacyContainer *container =3D &scontainer->container; VFIOContainerBase *bcontainer =3D VFIO_IOMMU(container); const hwaddr gpa =3D section->offset_within_address_space; hwaddr end; @@ -121,7 +121,7 @@ static void vfio_prereg_listener_region_del(MemoryListe= ner *listener, { VFIOSpaprContainer *scontainer =3D container_of(listener, VFIOSpaprCon= tainer, prereg_listener); - VFIOContainer *container =3D &scontainer->container; + VFIOLegacyContainer *container =3D &scontainer->container; const hwaddr gpa =3D section->offset_within_address_space; hwaddr end; int ret; @@ -218,7 +218,7 @@ static VFIOHostDMAWindow *vfio_find_hostwin(VFIOSpaprCo= ntainer *container, return hostwin_found ? hostwin : NULL; } =20 -static int vfio_spapr_remove_window(VFIOContainer *container, +static int vfio_spapr_remove_window(VFIOLegacyContainer *container, hwaddr offset_within_address_space) { struct vfio_iommu_spapr_tce_remove remove =3D { @@ -239,7 +239,7 @@ static int vfio_spapr_remove_window(VFIOContainer *cont= ainer, return 0; } =20 -static bool vfio_spapr_create_window(VFIOContainer *container, +static bool vfio_spapr_create_window(VFIOLegacyContainer *container, MemoryRegionSection *section, hwaddr *pgsize, Error **errp) { @@ -352,7 +352,7 @@ vfio_spapr_container_add_section_window(VFIOContainerBa= se *bcontainer, MemoryRegionSection *section, Error **errp) { - VFIOContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); + VFIOLegacyContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); VFIOSpaprContainer *scontainer =3D container_of(container, VFIOSpaprCo= ntainer, container); VFIOHostDMAWindow *hostwin; @@ -442,7 +442,7 @@ static void vfio_spapr_container_del_section_window(VFIOContainerBase *bcontainer, MemoryRegionSection *section) { - VFIOContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); + VFIOLegacyContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); VFIOSpaprContainer *scontainer =3D container_of(container, VFIOSpaprCo= ntainer, container); =20 @@ -463,7 +463,7 @@ vfio_spapr_container_del_section_window(VFIOContainerBa= se *bcontainer, =20 static void vfio_spapr_container_release(VFIOContainerBase *bcontainer) { - VFIOContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); + VFIOLegacyContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); VFIOSpaprContainer *scontainer =3D container_of(container, VFIOSpaprCo= ntainer, container); VFIOHostDMAWindow *hostwin, *next; @@ -481,7 +481,7 @@ static void vfio_spapr_container_release(VFIOContainerB= ase *bcontainer) static bool vfio_spapr_container_setup(VFIOContainerBase *bcontainer, Error **errp) { - VFIOContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); + VFIOLegacyContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); VFIOSpaprContainer *scontainer =3D container_of(container, VFIOSpaprCo= ntainer, container); struct vfio_iommu_spapr_tce_info info; --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758864950; cv=none; d=zohomail.com; s=zohoarc; b=CI6c7agQ0DudCvIu4Wk5zNLvaPiZEyvUIhe7zS2qWA6dxywB+FlbcHpJrCw0dkGBm9bKiCjuFdk7tO8Z8HG3CmUdZ/RY//J6dygIlBxbVnjAkToU7+iw/+g5bAHq2iEFCFvtxE98QPAanJFY5iZLHma5643jMjX2UZlCOYMtWdU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758864950; 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=ucMNux+x5QwwNBDMcT59VvC0cWSlTZSLadv146WZ2K8=; b=EOk1Ss/GSXZCIxk01ylcAUBYC1On2W34OaB2czsM8OKM/DojPYchthVazk94iB0CBp/uCwIkFg+3We4Y3ZhTAoRyokFdERBp27Ccan74qGO0nC4XaSrL3VEepwVH+lSDRE1WJl9ONL1j2NZ9YQHVUHXZ5fDtbr0OwOgFZQPA+3E= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758864950206688.4465098387643; Thu, 25 Sep 2025 22:35:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v216F-0008Dk-AP; Fri, 26 Sep 2025 01:34:31 -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 1v216D-0008CU-ME for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:29 -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 1v2162-0000k0-Ru for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:28 -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-654-alCQ9DpLOkeNZAvvdwPcLw-1; Fri, 26 Sep 2025 01:34:12 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 89EF01977309; Fri, 26 Sep 2025 05:34:11 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 748E11800579; Fri, 26 Sep 2025 05:34:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864854; 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=ucMNux+x5QwwNBDMcT59VvC0cWSlTZSLadv146WZ2K8=; b=ebfD2hOONXFSv3ygoblP9G/jbV+KWsBBkYIX4P8MLzPgXWuXcnnuXXIC+XAVKy3eG675CM IpZF4FpBF8bNOGHfia97Qw8k102wJbEm0Fn76LOpYq3WM6FJgphso0egGgYlO21KHzhLOV Q/e6dgcko2EaYxzjV1jX7HmQEpR5qio= X-MC-Unique: alCQ9DpLOkeNZAvvdwPcLw-1 X-Mimecast-MFC-AGG-ID: alCQ9DpLOkeNZAvvdwPcLw_1758864851 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 03/29] include/hw/vfio/vfio-container-base.h: rename VFIOContainerBase to VFIOContainer Date: Fri, 26 Sep 2025 07:33:32 +0200 Message-ID: <20250926053358.308198-4-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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: 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: 1758864951956116600 From: Mark Cave-Ayland Now that the VFIOContainer struct name is available, rename VFIOContainerBa= se to VFIOContainer to better indicate that it is the superclass of other VFIOFooContainer structs. Signed-off-by: Mark Cave-Ayland Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-3-mark.cave= ayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio-user/container.h | 2 +- hw/vfio/vfio-iommufd.h | 2 +- hw/vfio/vfio-listener.h | 4 +- include/hw/vfio/vfio-container-base.h | 76 +++++++++++++-------------- include/hw/vfio/vfio-container.h | 2 +- include/hw/vfio/vfio-cpr.h | 8 +-- include/hw/vfio/vfio-device.h | 4 +- hw/ppc/spapr_pci_vfio.c | 2 +- hw/vfio-user/container.c | 18 +++---- hw/vfio/container-base.c | 41 ++++++++------- hw/vfio/container.c | 22 ++++---- hw/vfio/cpr-iommufd.c | 4 +- hw/vfio/cpr-legacy.c | 14 ++--- hw/vfio/device.c | 2 +- hw/vfio/iommufd.c | 18 +++---- hw/vfio/listener.c | 74 +++++++++++++------------- hw/vfio/spapr.c | 12 ++--- 17 files changed, 154 insertions(+), 151 deletions(-) diff --git a/hw/vfio-user/container.h b/hw/vfio-user/container.h index 96aa6785d9b394137f91b274a0d6a8a9e9aab672..241863ef976f5a437755358c394= 9dd02f7820726 100644 --- a/hw/vfio-user/container.h +++ b/hw/vfio-user/container.h @@ -14,7 +14,7 @@ =20 /* MMU container sub-class for vfio-user. */ struct VFIOUserContainer { - VFIOContainerBase parent_obj; + VFIOContainer parent_obj; =20 VFIOUserProxy *proxy; }; diff --git a/hw/vfio/vfio-iommufd.h b/hw/vfio/vfio-iommufd.h index 07ea0f43049645a5f3782048117fd9bf22083053..6c049d925763848b25b25cea632= cf9d1874f83e9 100644 --- a/hw/vfio/vfio-iommufd.h +++ b/hw/vfio/vfio-iommufd.h @@ -23,7 +23,7 @@ typedef struct VFIOIOASHwpt { typedef struct IOMMUFDBackend IOMMUFDBackend; =20 typedef struct VFIOIOMMUFDContainer { - VFIOContainerBase bcontainer; + VFIOContainer bcontainer; IOMMUFDBackend *be; uint32_t ioas_id; QLIST_HEAD(, VFIOIOASHwpt) hwpt_list; diff --git a/hw/vfio/vfio-listener.h b/hw/vfio/vfio-listener.h index eb69ddd374fa20683007cfc4e9a7bf6fe707f27d..a90674ca96e8cb55fd445b73322= c006bbf6941f3 100644 --- a/hw/vfio/vfio-listener.h +++ b/hw/vfio/vfio-listener.h @@ -9,7 +9,7 @@ #ifndef HW_VFIO_VFIO_LISTENER_H #define HW_VFIO_VFIO_LISTENER_H =20 -bool vfio_listener_register(VFIOContainerBase *bcontainer, Error **errp); -void vfio_listener_unregister(VFIOContainerBase *bcontainer); +bool vfio_listener_register(VFIOContainer *bcontainer, Error **errp); +void vfio_listener_unregister(VFIOContainer *bcontainer); =20 #endif /* HW_VFIO_VFIO_LISTENER_H */ diff --git a/include/hw/vfio/vfio-container-base.h b/include/hw/vfio/vfio-c= ontainer-base.h index acbd48a18a3a35ba6c5484d6d0fb12c23a983f77..b580f4a02df92276ef82c953eaf= 6942e1bf31413 100644 --- a/include/hw/vfio/vfio-container-base.h +++ b/include/hw/vfio/vfio-container-base.h @@ -26,14 +26,14 @@ typedef struct { =20 typedef struct VFIOAddressSpace { AddressSpace *as; - QLIST_HEAD(, VFIOContainerBase) containers; + QLIST_HEAD(, VFIOContainer) containers; QLIST_ENTRY(VFIOAddressSpace) list; } VFIOAddressSpace; =20 /* * This is the base object for vfio container backends */ -struct VFIOContainerBase { +struct VFIOContainer { Object parent_obj; =20 VFIOAddressSpace *space; @@ -48,17 +48,17 @@ struct VFIOContainerBase { bool dirty_pages_started; /* Protected by BQL */ QLIST_HEAD(, VFIOGuestIOMMU) giommu_list; QLIST_HEAD(, VFIORamDiscardListener) vrdl_list; - QLIST_ENTRY(VFIOContainerBase) next; + QLIST_ENTRY(VFIOContainer) next; QLIST_HEAD(, VFIODevice) device_list; GList *iova_ranges; NotifierWithReturn cpr_reboot_notifier; }; =20 #define TYPE_VFIO_IOMMU "vfio-iommu" -OBJECT_DECLARE_TYPE(VFIOContainerBase, VFIOIOMMUClass, VFIO_IOMMU) +OBJECT_DECLARE_TYPE(VFIOContainer, VFIOIOMMUClass, VFIO_IOMMU) =20 typedef struct VFIOGuestIOMMU { - VFIOContainerBase *bcontainer; + VFIOContainer *bcontainer; IOMMUMemoryRegion *iommu_mr; hwaddr iommu_offset; IOMMUNotifier n; @@ -66,7 +66,7 @@ typedef struct VFIOGuestIOMMU { } VFIOGuestIOMMU; =20 typedef struct VFIORamDiscardListener { - VFIOContainerBase *bcontainer; + VFIOContainer *bcontainer; MemoryRegion *mr; hwaddr offset_within_address_space; hwaddr size; @@ -78,32 +78,32 @@ typedef struct VFIORamDiscardListener { VFIOAddressSpace *vfio_address_space_get(AddressSpace *as); void vfio_address_space_put(VFIOAddressSpace *space); void vfio_address_space_insert(VFIOAddressSpace *space, - VFIOContainerBase *bcontainer); + VFIOContainer *bcontainer); =20 -int vfio_container_dma_map(VFIOContainerBase *bcontainer, +int vfio_container_dma_map(VFIOContainer *bcontainer, hwaddr iova, ram_addr_t size, void *vaddr, bool readonly, MemoryRegion *mr); -int vfio_container_dma_unmap(VFIOContainerBase *bcontainer, +int vfio_container_dma_unmap(VFIOContainer *bcontainer, hwaddr iova, ram_addr_t size, IOMMUTLBEntry *iotlb, bool unmap_all); -bool vfio_container_add_section_window(VFIOContainerBase *bcontainer, +bool vfio_container_add_section_window(VFIOContainer *bcontainer, MemoryRegionSection *section, Error **errp); -void vfio_container_del_section_window(VFIOContainerBase *bcontainer, +void vfio_container_del_section_window(VFIOContainer *bcontainer, MemoryRegionSection *section); -int vfio_container_set_dirty_page_tracking(VFIOContainerBase *bcontainer, +int vfio_container_set_dirty_page_tracking(VFIOContainer *bcontainer, bool start, Error **errp); bool vfio_container_dirty_tracking_is_started( - const VFIOContainerBase *bcontainer); + const VFIOContainer *bcontainer); bool vfio_container_devices_dirty_tracking_is_supported( - const VFIOContainerBase *bcontainer); -int vfio_container_query_dirty_bitmap(const VFIOContainerBase *bcontainer, + const VFIOContainer *bcontainer); +int vfio_container_query_dirty_bitmap(const VFIOContainer *bcontainer, uint64_t iova, uint64_t size, ram_addr_t ram_addr, Error **errp); =20 -GList *vfio_container_get_iova_ranges(const VFIOContainerBase *bcontainer); +GList *vfio_container_get_iova_ranges(const VFIOContainer *bcontainer); =20 static inline uint64_t -vfio_container_get_page_size_mask(const VFIOContainerBase *bcontainer) +vfio_container_get_page_size_mask(const VFIOContainer *bcontainer) { assert(bcontainer); return bcontainer->pgsizes; @@ -123,12 +123,12 @@ struct VFIOIOMMUClass { * Perform basic setup of the container, including configuring IOMMU * capabilities, IOVA ranges, supported page sizes, etc. * - * @bcontainer: #VFIOContainerBase + * @bcontainer: #VFIOContainer * @errp: pointer to Error*, to store an error if it happens. * * Returns true to indicate success and false for error. */ - bool (*setup)(VFIOContainerBase *bcontainer, Error **errp); + bool (*setup)(VFIOContainer *bcontainer, Error **errp); =20 /** * @listener_begin @@ -136,9 +136,9 @@ struct VFIOIOMMUClass { * Called at the beginning of an address space update transaction. * See #MemoryListener. * - * @bcontainer: #VFIOContainerBase + * @bcontainer: #VFIOContainer */ - void (*listener_begin)(VFIOContainerBase *bcontainer); + void (*listener_begin)(VFIOContainer *bcontainer); =20 /** * @listener_commit @@ -146,9 +146,9 @@ struct VFIOIOMMUClass { * Called at the end of an address space update transaction, * See #MemoryListener. * - * @bcontainer: #VFIOContainerBase + * @bcontainer: #VFIOContainer */ - void (*listener_commit)(VFIOContainerBase *bcontainer); + void (*listener_commit)(VFIOContainer *bcontainer); =20 /** * @dma_map @@ -156,7 +156,7 @@ struct VFIOIOMMUClass { * Map an address range into the container. Note that the memory regio= n is * referenced within an RCU read lock region across this call. * - * @bcontainer: #VFIOContainerBase to use + * @bcontainer: #VFIOContainer to use * @iova: start address to map * @size: size of the range to map * @vaddr: process virtual address of mapping @@ -165,7 +165,7 @@ struct VFIOIOMMUClass { * * Returns 0 to indicate success and -errno otherwise. */ - int (*dma_map)(const VFIOContainerBase *bcontainer, + int (*dma_map)(const VFIOContainer *bcontainer, hwaddr iova, ram_addr_t size, void *vaddr, bool readonly, MemoryRegion *mr); /** @@ -173,14 +173,14 @@ struct VFIOIOMMUClass { * * Map a file range for the container. * - * @bcontainer: #VFIOContainerBase to use for map + * @bcontainer: #VFIOContainer to use for map * @iova: start address to map * @size: size of the range to map * @fd: descriptor of the file to map * @start: starting file offset of the range to map * @readonly: map read only if true */ - int (*dma_map_file)(const VFIOContainerBase *bcontainer, + int (*dma_map_file)(const VFIOContainer *bcontainer, hwaddr iova, ram_addr_t size, int fd, unsigned long start, bool readonly); /** @@ -188,7 +188,7 @@ struct VFIOIOMMUClass { * * Unmap an address range from the container. * - * @bcontainer: #VFIOContainerBase to use for unmap + * @bcontainer: #VFIOContainer to use for unmap * @iova: start address to unmap * @size: size of the range to unmap * @iotlb: The IOMMU TLB mapping entry (or NULL) @@ -196,7 +196,7 @@ struct VFIOIOMMUClass { * * Returns 0 to indicate success and -errno otherwise. */ - int (*dma_unmap)(const VFIOContainerBase *bcontainer, + int (*dma_unmap)(const VFIOContainer *bcontainer, hwaddr iova, ram_addr_t size, IOMMUTLBEntry *iotlb, bool unmap_all); =20 @@ -234,21 +234,21 @@ struct VFIOIOMMUClass { * * Start or stop dirty pages tracking on VFIO container * - * @bcontainer: #VFIOContainerBase on which to de/activate dirty + * @bcontainer: #VFIOContainer on which to de/activate dirty * page tracking * @start: indicates whether to start or stop dirty pages tracking * @errp: pointer to Error*, to store an error if it happens. * * Returns zero to indicate success and negative for error. */ - int (*set_dirty_page_tracking)(const VFIOContainerBase *bcontainer, + int (*set_dirty_page_tracking)(const VFIOContainer *bcontainer, bool start, Error **errp); /** * @query_dirty_bitmap * * Get bitmap of dirty pages from container * - * @bcontainer: #VFIOContainerBase from which to get dirty pages + * @bcontainer: #VFIOContainer from which to get dirty pages * @vbmap: #VFIOBitmap internal bitmap structure * @iova: iova base address * @size: size of iova range @@ -256,24 +256,24 @@ struct VFIOIOMMUClass { * * Returns zero to indicate success and negative for error. */ - int (*query_dirty_bitmap)(const VFIOContainerBase *bcontainer, + int (*query_dirty_bitmap)(const VFIOContainer *bcontainer, VFIOBitmap *vbmap, hwaddr iova, hwaddr size, Error **errp); /* PCI specific */ int (*pci_hot_reset)(VFIODevice *vbasedev, bool single); =20 /* SPAPR specific */ - bool (*add_window)(VFIOContainerBase *bcontainer, + bool (*add_window)(VFIOContainer *bcontainer, MemoryRegionSection *section, Error **errp); - void (*del_window)(VFIOContainerBase *bcontainer, + void (*del_window)(VFIOContainer *bcontainer, MemoryRegionSection *section); - void (*release)(VFIOContainerBase *bcontainer); + void (*release)(VFIOContainer *bcontainer); }; =20 VFIORamDiscardListener *vfio_find_ram_discard_listener( - VFIOContainerBase *bcontainer, MemoryRegionSection *section); + VFIOContainer *bcontainer, MemoryRegionSection *section); =20 -void vfio_container_region_add(VFIOContainerBase *bcontainer, +void vfio_container_region_add(VFIOContainer *bcontainer, MemoryRegionSection *section, bool cpr_rema= p); =20 #endif /* HW_VFIO_VFIO_CONTAINER_BASE_H */ diff --git a/include/hw/vfio/vfio-container.h b/include/hw/vfio/vfio-contai= ner.h index 712a6914004aeb2eb83927e8c91377eb2dde33f5..a84dfb0dee79d8d9e310cbcd841= 66c269a877b4a 100644 --- a/include/hw/vfio/vfio-container.h +++ b/include/hw/vfio/vfio-container.h @@ -26,7 +26,7 @@ typedef struct VFIOGroup { } VFIOGroup; =20 struct VFIOLegacyContainer { - VFIOContainerBase parent_obj; + VFIOContainer parent_obj; =20 int fd; /* /dev/vfio/vfio, empowered by the attached groups */ unsigned iommu_type; diff --git a/include/hw/vfio/vfio-cpr.h b/include/hw/vfio/vfio-cpr.h index 04e987258719ef4cf0b6356d04787aa66ef012b4..26ee0c4fe15ac74b5123f57c20c= 94486171d4779 100644 --- a/include/hw/vfio/vfio-cpr.h +++ b/include/hw/vfio/vfio-cpr.h @@ -13,14 +13,14 @@ #include "system/memory.h" =20 struct VFIOLegacyContainer; -struct VFIOContainerBase; +struct VFIOContainer; struct VFIOGroup; struct VFIODevice; struct VFIOPCIDevice; struct VFIOIOMMUFDContainer; struct IOMMUFDBackend; =20 -typedef int (*dma_map_fn)(const struct VFIOContainerBase *bcontainer, +typedef int (*dma_map_fn)(const struct VFIOContainer *bcontainer, hwaddr iova, ram_addr_t size, void *vaddr, bool readonly, MemoryRegion *mr); =20 @@ -65,11 +65,11 @@ int vfio_cpr_group_get_device_fd(int d, const char *nam= e); bool vfio_cpr_container_match(struct VFIOLegacyContainer *container, struct VFIOGroup *group, int fd); =20 -void vfio_cpr_giommu_remap(struct VFIOContainerBase *bcontainer, +void vfio_cpr_giommu_remap(struct VFIOContainer *bcontainer, MemoryRegionSection *section); =20 bool vfio_cpr_ram_discard_register_listener( - struct VFIOContainerBase *bcontainer, MemoryRegionSection *section); + struct VFIOContainer *bcontainer, MemoryRegionSection *section); =20 void vfio_cpr_save_vector_fd(struct VFIOPCIDevice *vdev, const char *name, int nr, int fd); diff --git a/include/hw/vfio/vfio-device.h b/include/hw/vfio/vfio-device.h index e7e6243e2dd7cf1be37d95414d6a511666f5cb39..67b9fcdd2c011234d250bcdd23f= dcdfb259aba2f 100644 --- a/include/hw/vfio/vfio-device.h +++ b/include/hw/vfio/vfio-device.h @@ -54,7 +54,7 @@ typedef struct VFIODevice { QLIST_ENTRY(VFIODevice) container_next; QLIST_ENTRY(VFIODevice) global_next; struct VFIOGroup *group; - VFIOContainerBase *bcontainer; + VFIOContainer *bcontainer; char *sysfsdev; char *name; DeviceState *dev; @@ -252,7 +252,7 @@ struct VFIODeviceIOOps { void *data, bool post); }; =20 -void vfio_device_prepare(VFIODevice *vbasedev, VFIOContainerBase *bcontain= er, +void vfio_device_prepare(VFIODevice *vbasedev, VFIOContainer *bcontainer, struct vfio_device_info *info); =20 void vfio_device_unprepare(VFIODevice *vbasedev); diff --git a/hw/ppc/spapr_pci_vfio.c b/hw/ppc/spapr_pci_vfio.c index faa3ab3fe1ba86be262c233e8702c492978bc87c..c8175dd8a89b16e04f464e53530= 6abe83a4ca74f 100644 --- a/hw/ppc/spapr_pci_vfio.c +++ b/hw/ppc/spapr_pci_vfio.c @@ -86,7 +86,7 @@ static int vfio_eeh_container_op(VFIOLegacyContainer *con= tainer, uint32_t op) static VFIOLegacyContainer *vfio_eeh_as_container(AddressSpace *as) { VFIOAddressSpace *space =3D vfio_address_space_get(as); - VFIOContainerBase *bcontainer =3D NULL; + VFIOContainer *bcontainer =3D NULL; =20 if (QLIST_EMPTY(&space->containers)) { /* No containers to act on */ diff --git a/hw/vfio-user/container.c b/hw/vfio-user/container.c index 3cdbd44c1aac2153dd099139a3956a3a0bb9b48e..411eb7b28b72a25cd68d494ffc4= a8f9b55b4862d 100644 --- a/hw/vfio-user/container.c +++ b/hw/vfio-user/container.c @@ -22,14 +22,14 @@ * will fire during memory update transactions. These depend on BQL being= held, * so do any resulting map/demap ops async while keeping BQL. */ -static void vfio_user_listener_begin(VFIOContainerBase *bcontainer) +static void vfio_user_listener_begin(VFIOContainer *bcontainer) { VFIOUserContainer *container =3D VFIO_IOMMU_USER(bcontainer); =20 container->proxy->async_ops =3D true; } =20 -static void vfio_user_listener_commit(VFIOContainerBase *bcontainer) +static void vfio_user_listener_commit(VFIOContainer *bcontainer) { VFIOUserContainer *container =3D VFIO_IOMMU_USER(bcontainer); =20 @@ -38,7 +38,7 @@ static void vfio_user_listener_commit(VFIOContainerBase *= bcontainer) vfio_user_wait_reqs(container->proxy); } =20 -static int vfio_user_dma_unmap(const VFIOContainerBase *bcontainer, +static int vfio_user_dma_unmap(const VFIOContainer *bcontainer, hwaddr iova, ram_addr_t size, IOMMUTLBEntry *iotlb, bool unmap_all) { @@ -80,7 +80,7 @@ static int vfio_user_dma_unmap(const VFIOContainerBase *b= container, return ret; } =20 -static int vfio_user_dma_map(const VFIOContainerBase *bcontainer, hwaddr i= ova, +static int vfio_user_dma_map(const VFIOContainer *bcontainer, hwaddr iova, ram_addr_t size, void *vaddr, bool readonly, MemoryRegion *mrp) { @@ -154,14 +154,14 @@ static int vfio_user_dma_map(const VFIOContainerBase = *bcontainer, hwaddr iova, } =20 static int -vfio_user_set_dirty_page_tracking(const VFIOContainerBase *bcontainer, +vfio_user_set_dirty_page_tracking(const VFIOContainer *bcontainer, bool start, Error **errp) { error_setg_errno(errp, ENOTSUP, "Not supported"); return -ENOTSUP; } =20 -static int vfio_user_query_dirty_bitmap(const VFIOContainerBase *bcontaine= r, +static int vfio_user_query_dirty_bitmap(const VFIOContainer *bcontainer, VFIOBitmap *vbmap, hwaddr iova, hwaddr size, Error **errp) { @@ -169,7 +169,7 @@ static int vfio_user_query_dirty_bitmap(const VFIOConta= inerBase *bcontainer, return -ENOTSUP; } =20 -static bool vfio_user_setup(VFIOContainerBase *bcontainer, Error **errp) +static bool vfio_user_setup(VFIOContainer *bcontainer, Error **errp) { VFIOUserContainer *container =3D VFIO_IOMMU_USER(bcontainer); =20 @@ -202,7 +202,7 @@ static VFIOUserContainer * vfio_user_container_connect(AddressSpace *as, VFIODevice *vbasedev, Error **errp) { - VFIOContainerBase *bcontainer; + VFIOContainer *bcontainer; VFIOUserContainer *container; VFIOAddressSpace *space; VFIOIOMMUClass *vioc; @@ -260,7 +260,7 @@ put_space_exit: =20 static void vfio_user_container_disconnect(VFIOUserContainer *container) { - VFIOContainerBase *bcontainer =3D VFIO_IOMMU(container); + VFIOContainer *bcontainer =3D VFIO_IOMMU(container); VFIOIOMMUClass *vioc =3D VFIO_IOMMU_GET_CLASS(bcontainer); VFIOAddressSpace *space =3D bcontainer->space; =20 diff --git a/hw/vfio/container-base.c b/hw/vfio/container-base.c index 56304978e1e8ec456e0eb5f13e8bddc091e76208..98c5198e5043b0ecb679060116b= bac240ac76747 100644 --- a/hw/vfio/container-base.c +++ b/hw/vfio/container-base.c @@ -67,13 +67,13 @@ void vfio_address_space_put(VFIOAddressSpace *space) } =20 void vfio_address_space_insert(VFIOAddressSpace *space, - VFIOContainerBase *bcontainer) + VFIOContainer *bcontainer) { QLIST_INSERT_HEAD(&space->containers, bcontainer, next); bcontainer->space =3D space; } =20 -int vfio_container_dma_map(VFIOContainerBase *bcontainer, +int vfio_container_dma_map(VFIOContainer *bcontainer, hwaddr iova, ram_addr_t size, void *vaddr, bool readonly, MemoryRegion *mr) { @@ -92,7 +92,7 @@ int vfio_container_dma_map(VFIOContainerBase *bcontainer, return vioc->dma_map(bcontainer, iova, size, vaddr, readonly, mr); } =20 -int vfio_container_dma_unmap(VFIOContainerBase *bcontainer, +int vfio_container_dma_unmap(VFIOContainer *bcontainer, hwaddr iova, ram_addr_t size, IOMMUTLBEntry *iotlb, bool unmap_all) { @@ -102,7 +102,7 @@ int vfio_container_dma_unmap(VFIOContainerBase *bcontai= ner, return vioc->dma_unmap(bcontainer, iova, size, iotlb, unmap_all); } =20 -bool vfio_container_add_section_window(VFIOContainerBase *bcontainer, +bool vfio_container_add_section_window(VFIOContainer *bcontainer, MemoryRegionSection *section, Error **errp) { @@ -115,7 +115,7 @@ bool vfio_container_add_section_window(VFIOContainerBas= e *bcontainer, return vioc->add_window(bcontainer, section, errp); } =20 -void vfio_container_del_section_window(VFIOContainerBase *bcontainer, +void vfio_container_del_section_window(VFIOContainer *bcontainer, MemoryRegionSection *section) { VFIOIOMMUClass *vioc =3D VFIO_IOMMU_GET_CLASS(bcontainer); @@ -127,7 +127,7 @@ void vfio_container_del_section_window(VFIOContainerBas= e *bcontainer, return vioc->del_window(bcontainer, section); } =20 -int vfio_container_set_dirty_page_tracking(VFIOContainerBase *bcontainer, +int vfio_container_set_dirty_page_tracking(VFIOContainer *bcontainer, bool start, Error **errp) { VFIOIOMMUClass *vioc =3D VFIO_IOMMU_GET_CLASS(bcontainer); @@ -151,7 +151,7 @@ int vfio_container_set_dirty_page_tracking(VFIOContaine= rBase *bcontainer, } =20 static bool vfio_container_devices_dirty_tracking_is_started( - const VFIOContainerBase *bcontainer) + const VFIOContainer *bcontainer) { VFIODevice *vbasedev; =20 @@ -165,14 +165,14 @@ static bool vfio_container_devices_dirty_tracking_is_= started( } =20 bool vfio_container_dirty_tracking_is_started( - const VFIOContainerBase *bcontainer) + const VFIOContainer *bcontainer) { return vfio_container_devices_dirty_tracking_is_started(bcontainer) || bcontainer->dirty_pages_started; } =20 bool vfio_container_devices_dirty_tracking_is_supported( - const VFIOContainerBase *bcontainer) + const VFIOContainer *bcontainer) { VFIODevice *vbasedev; =20 @@ -210,8 +210,9 @@ static int vfio_device_dma_logging_report(VFIODevice *v= basedev, hwaddr iova, return vbasedev->io_ops->device_feature(vbasedev, feature); } =20 -static int vfio_container_iommu_query_dirty_bitmap(const VFIOContainerBase= *bcontainer, - VFIOBitmap *vbmap, hwaddr iova, hwaddr size, Error **er= rp) +static int vfio_container_iommu_query_dirty_bitmap( + const VFIOContainer *bcontainer, VFIOBitmap *vbmap, hwaddr iova, + hwaddr size, Error **errp) { VFIOIOMMUClass *vioc =3D VFIO_IOMMU_GET_CLASS(bcontainer); =20 @@ -220,8 +221,9 @@ static int vfio_container_iommu_query_dirty_bitmap(cons= t VFIOContainerBase *bcon errp); } =20 -static int vfio_container_devices_query_dirty_bitmap(const VFIOContainerBa= se *bcontainer, - VFIOBitmap *vbmap, hwaddr iova, hwaddr size, Error **errp) +static int vfio_container_devices_query_dirty_bitmap( + const VFIOContainer *bcontainer, VFIOBitmap *vbmap, hwaddr iova, + hwaddr size, Error **errp) { VFIODevice *vbasedev; int ret; @@ -242,8 +244,9 @@ static int vfio_container_devices_query_dirty_bitmap(co= nst VFIOContainerBase *bc return 0; } =20 -int vfio_container_query_dirty_bitmap(const VFIOContainerBase *bcontainer,= uint64_t iova, - uint64_t size, ram_addr_t ram_addr, Error **errp) +int vfio_container_query_dirty_bitmap(const VFIOContainer *bcontainer, + uint64_t iova, uint64_t size, + ram_addr_t ram_addr, Error **errp) { bool all_device_dirty_tracking =3D vfio_container_devices_dirty_tracking_is_supported(bcontainer); @@ -297,7 +300,7 @@ static gpointer copy_iova_range(gconstpointer src, gpoi= nter data) return dest; } =20 -GList *vfio_container_get_iova_ranges(const VFIOContainerBase *bcontainer) +GList *vfio_container_get_iova_ranges(const VFIOContainer *bcontainer) { assert(bcontainer); return g_list_copy_deep(bcontainer->iova_ranges, copy_iova_range, NULL= ); @@ -305,7 +308,7 @@ GList *vfio_container_get_iova_ranges(const VFIOContain= erBase *bcontainer) =20 static void vfio_container_instance_finalize(Object *obj) { - VFIOContainerBase *bcontainer =3D VFIO_IOMMU(obj); + VFIOContainer *bcontainer =3D VFIO_IOMMU(obj); VFIOGuestIOMMU *giommu, *tmp; =20 QLIST_SAFE_REMOVE(bcontainer, next); @@ -322,7 +325,7 @@ static void vfio_container_instance_finalize(Object *ob= j) =20 static void vfio_container_instance_init(Object *obj) { - VFIOContainerBase *bcontainer =3D VFIO_IOMMU(obj); + VFIOContainer *bcontainer =3D VFIO_IOMMU(obj); =20 bcontainer->error =3D NULL; bcontainer->dirty_pages_supported =3D false; @@ -338,7 +341,7 @@ static const TypeInfo types[] =3D { .parent =3D TYPE_OBJECT, .instance_init =3D vfio_container_instance_init, .instance_finalize =3D vfio_container_instance_finalize, - .instance_size =3D sizeof(VFIOContainerBase), + .instance_size =3D sizeof(VFIOContainer), .class_size =3D sizeof(VFIOIOMMUClass), .abstract =3D true, }, diff --git a/hw/vfio/container.c b/hw/vfio/container.c index bdf415b3d639d62abfaca19987b4d90a0fe636dc..dc8425efb1f68eb80b17ec2ba4b= aa8f7cb258d36 100644 --- a/hw/vfio/container.c +++ b/hw/vfio/container.c @@ -72,7 +72,7 @@ static int vfio_dma_unmap_bitmap(const VFIOLegacyContaine= r *container, hwaddr iova, ram_addr_t size, IOMMUTLBEntry *iotlb) { - const VFIOContainerBase *bcontainer =3D VFIO_IOMMU(container); + const VFIOContainer *bcontainer =3D VFIO_IOMMU(container); struct vfio_iommu_type1_dma_unmap *unmap; struct vfio_bitmap *bitmap; VFIOBitmap vbmap; @@ -121,7 +121,7 @@ unmap_exit: return ret; } =20 -static int vfio_legacy_dma_unmap_one(const VFIOContainerBase *bcontainer, +static int vfio_legacy_dma_unmap_one(const VFIOContainer *bcontainer, hwaddr iova, ram_addr_t size, IOMMUTLBEntry *iotlb) { @@ -184,7 +184,7 @@ static int vfio_legacy_dma_unmap_one(const VFIOContaine= rBase *bcontainer, /* * DMA - Mapping and unmapping for the "type1" IOMMU interface used on x86 */ -static int vfio_legacy_dma_unmap(const VFIOContainerBase *bcontainer, +static int vfio_legacy_dma_unmap(const VFIOContainer *bcontainer, hwaddr iova, ram_addr_t size, IOMMUTLBEntry *iotlb, bool unmap_all) { @@ -209,7 +209,7 @@ static int vfio_legacy_dma_unmap(const VFIOContainerBas= e *bcontainer, return ret; } =20 -static int vfio_legacy_dma_map(const VFIOContainerBase *bcontainer, hwaddr= iova, +static int vfio_legacy_dma_map(const VFIOContainer *bcontainer, hwaddr iov= a, ram_addr_t size, void *vaddr, bool readonly, MemoryRegion *mr) { @@ -242,7 +242,7 @@ static int vfio_legacy_dma_map(const VFIOContainerBase = *bcontainer, hwaddr iova, } =20 static int -vfio_legacy_set_dirty_page_tracking(const VFIOContainerBase *bcontainer, +vfio_legacy_set_dirty_page_tracking(const VFIOContainer *bcontainer, bool start, Error **errp) { const VFIOLegacyContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); @@ -267,7 +267,7 @@ vfio_legacy_set_dirty_page_tracking(const VFIOContainer= Base *bcontainer, return ret; } =20 -static int vfio_legacy_query_dirty_bitmap(const VFIOContainerBase *bcontai= ner, +static int vfio_legacy_query_dirty_bitmap(const VFIOContainer *bcontainer, VFIOBitmap *vbmap, hwaddr iova, hwaddr size, Error *= *errp) { const VFIOLegacyContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); @@ -307,7 +307,7 @@ static int vfio_legacy_query_dirty_bitmap(const VFIOCon= tainerBase *bcontainer, } =20 static bool vfio_get_info_iova_range(struct vfio_iommu_type1_info *info, - VFIOContainerBase *bcontainer) + VFIOContainer *bcontainer) { struct vfio_info_cap_header *hdr; struct vfio_iommu_type1_info_cap_iova_range *cap; @@ -492,7 +492,7 @@ static void vfio_get_iommu_info_migration(VFIOLegacyCon= tainer *container, { struct vfio_info_cap_header *hdr; struct vfio_iommu_type1_info_cap_migration *cap_mig; - VFIOContainerBase *bcontainer =3D VFIO_IOMMU(container); + VFIOContainer *bcontainer =3D VFIO_IOMMU(container); =20 hdr =3D vfio_get_iommu_info_cap(info, VFIO_IOMMU_TYPE1_INFO_CAP_MIGRAT= ION); if (!hdr) { @@ -513,7 +513,7 @@ static void vfio_get_iommu_info_migration(VFIOLegacyCon= tainer *container, } } =20 -static bool vfio_legacy_setup(VFIOContainerBase *bcontainer, Error **errp) +static bool vfio_legacy_setup(VFIOContainer *bcontainer, Error **errp) { VFIOLegacyContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); g_autofree struct vfio_iommu_type1_info *info =3D NULL; @@ -619,7 +619,7 @@ static bool vfio_container_connect(VFIOGroup *group, Ad= dressSpace *as, Error **errp) { VFIOLegacyContainer *container; - VFIOContainerBase *bcontainer; + VFIOContainer *bcontainer; int ret, fd =3D -1; VFIOAddressSpace *space; VFIOIOMMUClass *vioc =3D NULL; @@ -732,7 +732,7 @@ fail: static void vfio_container_disconnect(VFIOGroup *group) { VFIOLegacyContainer *container =3D group->container; - VFIOContainerBase *bcontainer =3D VFIO_IOMMU(container); + VFIOContainer *bcontainer =3D VFIO_IOMMU(container); VFIOIOMMUClass *vioc =3D VFIO_IOMMU_GET_CLASS(bcontainer); =20 QLIST_REMOVE(group, container_next); diff --git a/hw/vfio/cpr-iommufd.c b/hw/vfio/cpr-iommufd.c index 148a06d552ff3d8e8420366c6b71437e81a1f877..6aaf6f77a25a3d90387ca605999= 55f54dcc308de 100644 --- a/hw/vfio/cpr-iommufd.c +++ b/hw/vfio/cpr-iommufd.c @@ -176,7 +176,7 @@ void vfio_iommufd_cpr_unregister_iommufd(IOMMUFDBackend= *be) bool vfio_iommufd_cpr_register_container(VFIOIOMMUFDContainer *container, Error **errp) { - VFIOContainerBase *bcontainer =3D &container->bcontainer; + VFIOContainer *bcontainer =3D &container->bcontainer; =20 migration_add_notifier_mode(&bcontainer->cpr_reboot_notifier, vfio_cpr_reboot_notifier, @@ -189,7 +189,7 @@ bool vfio_iommufd_cpr_register_container(VFIOIOMMUFDCon= tainer *container, =20 void vfio_iommufd_cpr_unregister_container(VFIOIOMMUFDContainer *container) { - VFIOContainerBase *bcontainer =3D &container->bcontainer; + VFIOContainer *bcontainer =3D &container->bcontainer; =20 migration_remove_notifier(&bcontainer->cpr_reboot_notifier); } diff --git a/hw/vfio/cpr-legacy.c b/hw/vfio/cpr-legacy.c index 12bf920a7de73abb8f8bde106e7f08d57b9d6c63..bd3f6fc3d3936e7798df6a3c9f3= b893e428ec771 100644 --- a/hw/vfio/cpr-legacy.c +++ b/hw/vfio/cpr-legacy.c @@ -38,7 +38,7 @@ static bool vfio_dma_unmap_vaddr_all(VFIOLegacyContainer = *container, * Set the new @vaddr for any mappings registered during cpr load. * The incoming state is cleared thereafter. */ -static int vfio_legacy_cpr_dma_map(const VFIOContainerBase *bcontainer, +static int vfio_legacy_cpr_dma_map(const VFIOContainer *bcontainer, hwaddr iova, ram_addr_t size, void *vad= dr, bool readonly, MemoryRegion *mr) { @@ -100,7 +100,7 @@ static int vfio_container_pre_save(void *opaque) static int vfio_container_post_load(void *opaque, int version_id) { VFIOLegacyContainer *container =3D opaque; - VFIOContainerBase *bcontainer =3D VFIO_IOMMU(container); + VFIOContainer *bcontainer =3D VFIO_IOMMU(container); VFIOIOMMUClass *vioc =3D VFIO_IOMMU_GET_CLASS(bcontainer); dma_map_fn saved_dma_map =3D vioc->dma_map; Error *local_err =3D NULL; @@ -137,7 +137,7 @@ static int vfio_cpr_fail_notifier(NotifierWithReturn *n= otifier, { VFIOLegacyContainer *container =3D container_of(notifier, VFIOLegacyContainer, cpr.transfer_notifier); - VFIOContainerBase *bcontainer =3D VFIO_IOMMU(container); + VFIOContainer *bcontainer =3D VFIO_IOMMU(container); =20 if (e->type !=3D MIG_EVENT_PRECOPY_FAILED) { return 0; @@ -170,7 +170,7 @@ static int vfio_cpr_fail_notifier(NotifierWithReturn *n= otifier, bool vfio_legacy_cpr_register_container(VFIOLegacyContainer *container, Error **errp) { - VFIOContainerBase *bcontainer =3D VFIO_IOMMU(container); + VFIOContainer *bcontainer =3D VFIO_IOMMU(container); Error **cpr_blocker =3D &container->cpr.blocker; =20 migration_add_notifier_mode(&bcontainer->cpr_reboot_notifier, @@ -194,7 +194,7 @@ bool vfio_legacy_cpr_register_container(VFIOLegacyConta= iner *container, =20 void vfio_legacy_cpr_unregister_container(VFIOLegacyContainer *container) { - VFIOContainerBase *bcontainer =3D VFIO_IOMMU(container); + VFIOContainer *bcontainer =3D VFIO_IOMMU(container); =20 migration_remove_notifier(&bcontainer->cpr_reboot_notifier); migrate_del_blocker(&container->cpr.blocker); @@ -210,7 +210,7 @@ void vfio_legacy_cpr_unregister_container(VFIOLegacyCon= tainer *container) * The giommu already exists. Find it and replay it, which calls * vfio_legacy_cpr_dma_map further down the stack. */ -void vfio_cpr_giommu_remap(VFIOContainerBase *bcontainer, +void vfio_cpr_giommu_remap(VFIOContainer *bcontainer, MemoryRegionSection *section) { VFIOGuestIOMMU *giommu =3D NULL; @@ -235,7 +235,7 @@ void vfio_cpr_giommu_remap(VFIOContainerBase *bcontaine= r, * The ram discard listener already exists. Call its populate function * directly, which calls vfio_legacy_cpr_dma_map. */ -bool vfio_cpr_ram_discard_register_listener(VFIOContainerBase *bcontainer, +bool vfio_cpr_ram_discard_register_listener(VFIOContainer *bcontainer, MemoryRegionSection *section) { VFIORamDiscardListener *vrdl =3D diff --git a/hw/vfio/device.c b/hw/vfio/device.c index 08f12ac31f44fdebc9fc1f23f716c52f391ed53e..963cefc053d0959a173c7789801= 916dcacce552b 100644 --- a/hw/vfio/device.c +++ b/hw/vfio/device.c @@ -460,7 +460,7 @@ void vfio_device_detach(VFIODevice *vbasedev) VFIO_IOMMU_GET_CLASS(vbasedev->bcontainer)->detach_device(vbasedev); } =20 -void vfio_device_prepare(VFIODevice *vbasedev, VFIOContainerBase *bcontain= er, +void vfio_device_prepare(VFIODevice *vbasedev, VFIOContainer *bcontainer, struct vfio_device_info *info) { int i; diff --git a/hw/vfio/iommufd.c b/hw/vfio/iommufd.c index 8c27222f754a22f47fda6b6a1a86005341ec0d7f..7f2243d9d197d9aced99d8d8a90= 65e7e9d888e97 100644 --- a/hw/vfio/iommufd.c +++ b/hw/vfio/iommufd.c @@ -34,7 +34,7 @@ #define TYPE_HOST_IOMMU_DEVICE_IOMMUFD_VFIO \ TYPE_HOST_IOMMU_DEVICE_IOMMUFD "-vfio" =20 -static int iommufd_cdev_map(const VFIOContainerBase *bcontainer, hwaddr io= va, +static int iommufd_cdev_map(const VFIOContainer *bcontainer, hwaddr iova, ram_addr_t size, void *vaddr, bool readonly, MemoryRegion *mr) { @@ -46,7 +46,7 @@ static int iommufd_cdev_map(const VFIOContainerBase *bcon= tainer, hwaddr iova, iova, size, vaddr, readonly); } =20 -static int iommufd_cdev_map_file(const VFIOContainerBase *bcontainer, +static int iommufd_cdev_map_file(const VFIOContainer *bcontainer, hwaddr iova, ram_addr_t size, int fd, unsigned long start, bool readonl= y) { @@ -58,7 +58,7 @@ static int iommufd_cdev_map_file(const VFIOContainerBase = *bcontainer, iova, size, fd, start, readonly); } =20 -static int iommufd_cdev_unmap(const VFIOContainerBase *bcontainer, +static int iommufd_cdev_unmap(const VFIOContainer *bcontainer, hwaddr iova, ram_addr_t size, IOMMUTLBEntry *iotlb, bool unmap_all) { @@ -159,7 +159,7 @@ static bool iommufd_hwpt_dirty_tracking(VFIOIOASHwpt *h= wpt) return hwpt && hwpt->hwpt_flags & IOMMU_HWPT_ALLOC_DIRTY_TRACKING; } =20 -static int iommufd_set_dirty_page_tracking(const VFIOContainerBase *bconta= iner, +static int iommufd_set_dirty_page_tracking(const VFIOContainer *bcontainer, bool start, Error **errp) { const VFIOIOMMUFDContainer *container =3D @@ -190,7 +190,7 @@ err: return -EINVAL; } =20 -static int iommufd_query_dirty_bitmap(const VFIOContainerBase *bcontainer, +static int iommufd_query_dirty_bitmap(const VFIOContainer *bcontainer, VFIOBitmap *vbmap, hwaddr iova, hwaddr size, Error **errp) { @@ -464,7 +464,7 @@ static void iommufd_cdev_detach_container(VFIODevice *v= basedev, =20 static void iommufd_cdev_container_destroy(VFIOIOMMUFDContainer *container) { - VFIOContainerBase *bcontainer =3D &container->bcontainer; + VFIOContainer *bcontainer =3D &container->bcontainer; =20 if (!QLIST_EMPTY(&bcontainer->device_list)) { return; @@ -486,7 +486,7 @@ static int iommufd_cdev_ram_block_discard_disable(bool = state) static bool iommufd_cdev_get_info_iova_range(VFIOIOMMUFDContainer *contain= er, uint32_t ioas_id, Error **err= p) { - VFIOContainerBase *bcontainer =3D &container->bcontainer; + VFIOContainer *bcontainer =3D &container->bcontainer; g_autofree struct iommu_ioas_iova_ranges *info =3D NULL; struct iommu_iova_range *iova_ranges; int sz, fd =3D container->be->fd; @@ -528,7 +528,7 @@ error: static bool iommufd_cdev_attach(const char *name, VFIODevice *vbasedev, AddressSpace *as, Error **errp) { - VFIOContainerBase *bcontainer; + VFIOContainer *bcontainer; VFIOIOMMUFDContainer *container; VFIOAddressSpace *space; struct vfio_device_info dev_info =3D { .argsz =3D sizeof(dev_info) }; @@ -687,7 +687,7 @@ err_connect_bind: =20 static void iommufd_cdev_detach(VFIODevice *vbasedev) { - VFIOContainerBase *bcontainer =3D vbasedev->bcontainer; + VFIOContainer *bcontainer =3D vbasedev->bcontainer; VFIOAddressSpace *space =3D bcontainer->space; VFIOIOMMUFDContainer *container =3D container_of(bcontainer, VFIOIOMMUFDContainer, diff --git a/hw/vfio/listener.c b/hw/vfio/listener.c index e0938331659833bdca98e700ac42651a90fb1571..3b6f17f0c3aa7ef08091f8cc1c3= 230eff97b5cd7 100644 --- a/hw/vfio/listener.c +++ b/hw/vfio/listener.c @@ -52,7 +52,7 @@ */ =20 =20 -static bool vfio_log_sync_needed(const VFIOContainerBase *bcontainer) +static bool vfio_log_sync_needed(const VFIOContainer *bcontainer) { VFIODevice *vbasedev; =20 @@ -125,7 +125,7 @@ static MemoryRegion *vfio_translate_iotlb(IOMMUTLBEntry= *iotlb, hwaddr *xlat_p, static void vfio_iommu_map_notify(IOMMUNotifier *n, IOMMUTLBEntry *iotlb) { VFIOGuestIOMMU *giommu =3D container_of(n, VFIOGuestIOMMU, n); - VFIOContainerBase *bcontainer =3D giommu->bcontainer; + VFIOContainer *bcontainer =3D giommu->bcontainer; hwaddr iova =3D iotlb->iova + giommu->iommu_offset; MemoryRegion *mr; hwaddr xlat; @@ -202,7 +202,7 @@ static void vfio_ram_discard_notify_discard(RamDiscardL= istener *rdl, { VFIORamDiscardListener *vrdl =3D container_of(rdl, VFIORamDiscardListe= ner, listener); - VFIOContainerBase *bcontainer =3D vrdl->bcontainer; + VFIOContainer *bcontainer =3D vrdl->bcontainer; const hwaddr size =3D int128_get64(section->size); const hwaddr iova =3D section->offset_within_address_space; int ret; @@ -220,7 +220,7 @@ static int vfio_ram_discard_notify_populate(RamDiscardL= istener *rdl, { VFIORamDiscardListener *vrdl =3D container_of(rdl, VFIORamDiscardListe= ner, listener); - VFIOContainerBase *bcontainer =3D vrdl->bcontainer; + VFIOContainer *bcontainer =3D vrdl->bcontainer; const hwaddr end =3D section->offset_within_region + int128_get64(section->size); hwaddr start, next, iova; @@ -250,7 +250,7 @@ static int vfio_ram_discard_notify_populate(RamDiscardL= istener *rdl, return 0; } =20 -static bool vfio_ram_discard_register_listener(VFIOContainerBase *bcontain= er, +static bool vfio_ram_discard_register_listener(VFIOContainer *bcontainer, MemoryRegionSection *sectio= n, Error **errp) { @@ -328,7 +328,7 @@ static bool vfio_ram_discard_register_listener(VFIOCont= ainerBase *bcontainer, return true; } =20 -static void vfio_ram_discard_unregister_listener(VFIOContainerBase *bconta= iner, +static void vfio_ram_discard_unregister_listener(VFIOContainer *bcontainer, MemoryRegionSection *sect= ion) { RamDiscardManager *rdm =3D memory_region_get_ram_discard_manager(secti= on->mr); @@ -396,7 +396,7 @@ static bool vfio_listener_valid_section(MemoryRegionSec= tion *section, return true; } =20 -static bool vfio_get_section_iova_range(VFIOContainerBase *bcontainer, +static bool vfio_get_section_iova_range(VFIOContainer *bcontainer, MemoryRegionSection *section, hwaddr *out_iova, hwaddr *out_end, Int128 *out_llend) @@ -423,9 +423,9 @@ static bool vfio_get_section_iova_range(VFIOContainerBa= se *bcontainer, =20 static void vfio_listener_begin(MemoryListener *listener) { - VFIOContainerBase *bcontainer =3D container_of(listener, VFIOContainer= Base, - listener); - void (*listener_begin)(VFIOContainerBase *bcontainer); + VFIOContainer *bcontainer =3D container_of(listener, VFIOContainer, + listener); + void (*listener_begin)(VFIOContainer *bcontainer); =20 listener_begin =3D VFIO_IOMMU_GET_CLASS(bcontainer)->listener_begin; =20 @@ -436,9 +436,9 @@ static void vfio_listener_begin(MemoryListener *listene= r) =20 static void vfio_listener_commit(MemoryListener *listener) { - VFIOContainerBase *bcontainer =3D container_of(listener, VFIOContainer= Base, - listener); - void (*listener_commit)(VFIOContainerBase *bcontainer); + VFIOContainer *bcontainer =3D container_of(listener, VFIOContainer, + listener); + void (*listener_commit)(VFIOContainer *bcontainer); =20 listener_commit =3D VFIO_IOMMU_GET_CLASS(bcontainer)->listener_commit; =20 @@ -460,7 +460,7 @@ static void vfio_device_error_append(VFIODevice *vbased= ev, Error **errp) } =20 VFIORamDiscardListener *vfio_find_ram_discard_listener( - VFIOContainerBase *bcontainer, MemoryRegionSection *section) + VFIOContainer *bcontainer, MemoryRegionSection *section) { VFIORamDiscardListener *vrdl =3D NULL; =20 @@ -482,12 +482,12 @@ VFIORamDiscardListener *vfio_find_ram_discard_listene= r( static void vfio_listener_region_add(MemoryListener *listener, MemoryRegionSection *section) { - VFIOContainerBase *bcontainer =3D container_of(listener, VFIOContainer= Base, - listener); + VFIOContainer *bcontainer =3D container_of(listener, VFIOContainer, + listener); vfio_container_region_add(bcontainer, section, false); } =20 -void vfio_container_region_add(VFIOContainerBase *bcontainer, +void vfio_container_region_add(VFIOContainer *bcontainer, MemoryRegionSection *section, bool cpr_remap) { @@ -656,8 +656,8 @@ fail: static void vfio_listener_region_del(MemoryListener *listener, MemoryRegionSection *section) { - VFIOContainerBase *bcontainer =3D container_of(listener, VFIOContainer= Base, - listener); + VFIOContainer *bcontainer =3D container_of(listener, VFIOContainer, + listener); hwaddr iova, end; Int128 llend, llsize; int ret; @@ -744,13 +744,13 @@ typedef struct VFIODirtyRanges { } VFIODirtyRanges; =20 typedef struct VFIODirtyRangesListener { - VFIOContainerBase *bcontainer; + VFIOContainer *bcontainer; VFIODirtyRanges ranges; MemoryListener listener; } VFIODirtyRangesListener; =20 static bool vfio_section_is_vfio_pci(MemoryRegionSection *section, - VFIOContainerBase *bcontainer) + VFIOContainer *bcontainer) { VFIOPCIDevice *pcidev; VFIODevice *vbasedev; @@ -835,7 +835,7 @@ static const MemoryListener vfio_dirty_tracking_listene= r =3D { .region_add =3D vfio_dirty_tracking_update, }; =20 -static void vfio_dirty_tracking_init(VFIOContainerBase *bcontainer, +static void vfio_dirty_tracking_init(VFIOContainer *bcontainer, VFIODirtyRanges *ranges) { VFIODirtyRangesListener dirty; @@ -860,7 +860,7 @@ static void vfio_dirty_tracking_init(VFIOContainerBase = *bcontainer, memory_listener_unregister(&dirty.listener); } =20 -static void vfio_devices_dma_logging_stop(VFIOContainerBase *bcontainer) +static void vfio_devices_dma_logging_stop(VFIOContainer *bcontainer) { uint64_t buf[DIV_ROUND_UP(sizeof(struct vfio_device_feature), sizeof(uint64_t))] =3D {}; @@ -889,7 +889,7 @@ static void vfio_devices_dma_logging_stop(VFIOContainer= Base *bcontainer) } =20 static struct vfio_device_feature * -vfio_device_feature_dma_logging_start_create(VFIOContainerBase *bcontainer, +vfio_device_feature_dma_logging_start_create(VFIOContainer *bcontainer, VFIODirtyRanges *tracking) { struct vfio_device_feature *feature; @@ -962,7 +962,7 @@ static void vfio_device_feature_dma_logging_start_destr= oy( g_free(feature); } =20 -static bool vfio_devices_dma_logging_start(VFIOContainerBase *bcontainer, +static bool vfio_devices_dma_logging_start(VFIOContainer *bcontainer, Error **errp) { struct vfio_device_feature *feature; @@ -1006,8 +1006,8 @@ static bool vfio_listener_log_global_start(MemoryList= ener *listener, Error **errp) { ERRP_GUARD(); - VFIOContainerBase *bcontainer =3D container_of(listener, VFIOContainer= Base, - listener); + VFIOContainer *bcontainer =3D container_of(listener, VFIOContainer, + listener); bool ret; =20 if (vfio_container_devices_dirty_tracking_is_supported(bcontainer)) { @@ -1024,8 +1024,8 @@ static bool vfio_listener_log_global_start(MemoryList= ener *listener, =20 static void vfio_listener_log_global_stop(MemoryListener *listener) { - VFIOContainerBase *bcontainer =3D container_of(listener, VFIOContainer= Base, - listener); + VFIOContainer *bcontainer =3D container_of(listener, VFIOContainer, + listener); Error *local_err =3D NULL; int ret =3D 0; =20 @@ -1057,7 +1057,7 @@ static void vfio_iommu_map_dirty_notify(IOMMUNotifier= *n, IOMMUTLBEntry *iotlb) vfio_giommu_dirty_notifier *gdn =3D container_of(n, vfio_giommu_dirty_notifier= , n); VFIOGuestIOMMU *giommu =3D gdn->giommu; - VFIOContainerBase *bcontainer =3D giommu->bcontainer; + VFIOContainer *bcontainer =3D giommu->bcontainer; hwaddr iova =3D iotlb->iova + giommu->iommu_offset; ram_addr_t translated_addr; Error *local_err =3D NULL; @@ -1127,7 +1127,7 @@ static int vfio_ram_discard_query_dirty_bitmap(Memory= RegionSection *section, } =20 static int -vfio_sync_ram_discard_listener_dirty_bitmap(VFIOContainerBase *bcontainer, +vfio_sync_ram_discard_listener_dirty_bitmap(VFIOContainer *bcontainer, MemoryRegionSection *section) { RamDiscardManager *rdm =3D memory_region_get_ram_discard_manager(secti= on->mr); @@ -1143,7 +1143,7 @@ vfio_sync_ram_discard_listener_dirty_bitmap(VFIOConta= inerBase *bcontainer, &vrdl); } =20 -static int vfio_sync_iommu_dirty_bitmap(VFIOContainerBase *bcontainer, +static int vfio_sync_iommu_dirty_bitmap(VFIOContainer *bcontainer, MemoryRegionSection *section) { VFIOGuestIOMMU *giommu; @@ -1180,7 +1180,7 @@ static int vfio_sync_iommu_dirty_bitmap(VFIOContainer= Base *bcontainer, return 0; } =20 -static int vfio_sync_dirty_bitmap(VFIOContainerBase *bcontainer, +static int vfio_sync_dirty_bitmap(VFIOContainer *bcontainer, MemoryRegionSection *section, Error **er= rp) { ram_addr_t ram_addr; @@ -1209,8 +1209,8 @@ static int vfio_sync_dirty_bitmap(VFIOContainerBase *= bcontainer, static void vfio_listener_log_sync(MemoryListener *listener, MemoryRegionSection *section) { - VFIOContainerBase *bcontainer =3D container_of(listener, VFIOContainer= Base, - listener); + VFIOContainer *bcontainer =3D container_of(listener, VFIOContainer, + listener); int ret; Error *local_err =3D NULL; =20 @@ -1241,7 +1241,7 @@ static const MemoryListener vfio_memory_listener =3D { .log_sync =3D vfio_listener_log_sync, }; =20 -bool vfio_listener_register(VFIOContainerBase *bcontainer, Error **errp) +bool vfio_listener_register(VFIOContainer *bcontainer, Error **errp) { bcontainer->listener =3D vfio_memory_listener; memory_listener_register(&bcontainer->listener, bcontainer->space->as); @@ -1255,7 +1255,7 @@ bool vfio_listener_register(VFIOContainerBase *bconta= iner, Error **errp) return true; } =20 -void vfio_listener_unregister(VFIOContainerBase *bcontainer) +void vfio_listener_unregister(VFIOContainer *bcontainer) { memory_listener_unregister(&bcontainer->listener); } diff --git a/hw/vfio/spapr.c b/hw/vfio/spapr.c index b8bade90d7a0f9ef3a72abaddb372418e88024b9..6d462aa13caecb3e91de503ca4b= b2bc60c9d262a 100644 --- a/hw/vfio/spapr.c +++ b/hw/vfio/spapr.c @@ -62,7 +62,7 @@ static void vfio_prereg_listener_region_add(MemoryListene= r *listener, VFIOSpaprContainer *scontainer =3D container_of(listener, VFIOSpaprCon= tainer, prereg_listener); VFIOLegacyContainer *container =3D &scontainer->container; - VFIOContainerBase *bcontainer =3D VFIO_IOMMU(container); + VFIOContainer *bcontainer =3D VFIO_IOMMU(container); const hwaddr gpa =3D section->offset_within_address_space; hwaddr end; int ret; @@ -244,7 +244,7 @@ static bool vfio_spapr_create_window(VFIOLegacyContaine= r *container, hwaddr *pgsize, Error **errp) { int ret =3D 0; - VFIOContainerBase *bcontainer =3D VFIO_IOMMU(container); + VFIOContainer *bcontainer =3D VFIO_IOMMU(container); VFIOSpaprContainer *scontainer =3D container_of(container, VFIOSpaprCo= ntainer, container); IOMMUMemoryRegion *iommu_mr =3D IOMMU_MEMORY_REGION(section->mr); @@ -348,7 +348,7 @@ static bool vfio_spapr_create_window(VFIOLegacyContaine= r *container, } =20 static bool -vfio_spapr_container_add_section_window(VFIOContainerBase *bcontainer, +vfio_spapr_container_add_section_window(VFIOContainer *bcontainer, MemoryRegionSection *section, Error **errp) { @@ -439,7 +439,7 @@ vfio_spapr_container_add_section_window(VFIOContainerBa= se *bcontainer, } =20 static void -vfio_spapr_container_del_section_window(VFIOContainerBase *bcontainer, +vfio_spapr_container_del_section_window(VFIOContainer *bcontainer, MemoryRegionSection *section) { VFIOLegacyContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); @@ -461,7 +461,7 @@ vfio_spapr_container_del_section_window(VFIOContainerBa= se *bcontainer, } } =20 -static void vfio_spapr_container_release(VFIOContainerBase *bcontainer) +static void vfio_spapr_container_release(VFIOContainer *bcontainer) { VFIOLegacyContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); VFIOSpaprContainer *scontainer =3D container_of(container, VFIOSpaprCo= ntainer, @@ -478,7 +478,7 @@ static void vfio_spapr_container_release(VFIOContainerB= ase *bcontainer) } } =20 -static bool vfio_spapr_container_setup(VFIOContainerBase *bcontainer, +static bool vfio_spapr_container_setup(VFIOContainer *bcontainer, Error **errp) { VFIOLegacyContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758865270; cv=none; d=zohomail.com; s=zohoarc; b=QF/QhAYsmhpDAF0xa3F5UuyNWX9pBsv9xWP5nl8KYXMzn6+Vv2nZLGiWTkmmnOHJb1tiQb5g5HOf/i5JgJUazxUUGtXtJUolRjS2H5yZJNq8+Hm5B5qR9vjPlSx7n/ICIz/TjsmCJYFqMWau9VcS1jvldx9xSqGuj75wOt4HFU8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758865270; 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=zs8DV9S9EBu4KwMxL4Gn3/doWA0m3P/pLkeyRYvOciw=; b=IrBRsciVRn+QwF0OH1FaaxpQ3VyvEASeNde4hdSAVENFNWZY5OMNmlri0gEO11ob+s9XNUxrWRjsb64jnQMa5Xr0YnZLP8BTymxPPjYtPJgBtXdzhfWXcvOwFbxl5DeL+w48KqsvcFmEjfA++9uqkEu26kS63dlhU6NHMt/79vU= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758865270818884.2034606683242; Thu, 25 Sep 2025 22:41:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v216E-0008Cm-2O; Fri, 26 Sep 2025 01:34:30 -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 1v216C-0008Bu-WA for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:29 -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 1v2166-0000kT-R4 for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:27 -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-167-DN4SXsMkO1235RLXxEDJBg-1; Fri, 26 Sep 2025 01:34:14 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 0AB271977309; Fri, 26 Sep 2025 05:34:14 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2648D1800452; Fri, 26 Sep 2025 05:34:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864857; 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=zs8DV9S9EBu4KwMxL4Gn3/doWA0m3P/pLkeyRYvOciw=; b=QQgFCY9mr5R39lTdzeEJHC5bRxiBjm7jaiRIZzpdGZvWJfTcJ5X0EG2Qnyd1C9V6I/72T5 2nSLOL2G1xY/RzOdRaumJ9OVsue2KLqS+iAVhJ4S/SpBi+RybvWA7dhWFfcDyEj5M+Nfj9 NQB05UD1AYrrPraXPhk+JbNqNmGedtE= X-MC-Unique: DN4SXsMkO1235RLXxEDJBg-1 X-Mimecast-MFC-AGG-ID: DN4SXsMkO1235RLXxEDJBg_1758864854 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 04/29] include/hw/vfio/vfio-container.h: rename file to vfio-container-legacy.h Date: Fri, 26 Sep 2025 07:33:33 +0200 Message-ID: <20250926053358.308198-5-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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: 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: 1758865271539116600 From: Mark Cave-Ayland With the rename of VFIOContainer to VFIOLegacyContainer, the vfio-container= .h header file containing the struct definition is misleading. Rename it from vfio-container.h to vfio-container-legacy.h accordingly, fixing up the name of the include guard at the same time. Signed-off-by: Mark Cave-Ayland Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-4-mark.cave= ayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- .../hw/vfio/{vfio-container.h =3D> vfio-container-legacy.h} | 6 +++--- hw/ppc/spapr_pci_vfio.c | 2 +- hw/s390x/s390-pci-vfio.c | 2 +- hw/vfio/container.c | 2 +- hw/vfio/cpr-legacy.c | 2 +- hw/vfio/spapr.c | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) rename include/hw/vfio/{vfio-container.h =3D> vfio-container-legacy.h} (88= %) diff --git a/include/hw/vfio/vfio-container.h b/include/hw/vfio/vfio-contai= ner-legacy.h similarity index 88% rename from include/hw/vfio/vfio-container.h rename to include/hw/vfio/vfio-container-legacy.h index a84dfb0dee79d8d9e310cbcd84166c269a877b4a..ab5130d26eaa0e9fe586e49efe7= 8aef6c0450540 100644 --- a/include/hw/vfio/vfio-container.h +++ b/include/hw/vfio/vfio-container-legacy.h @@ -6,8 +6,8 @@ * SPDX-License-Identifier: GPL-2.0-or-later */ =20 -#ifndef HW_VFIO_CONTAINER_H -#define HW_VFIO_CONTAINER_H +#ifndef HW_VFIO_CONTAINER_LEGACY_H +#define HW_VFIO_CONTAINER_LEGACY_H =20 #include "hw/vfio/vfio-container-base.h" #include "hw/vfio/vfio-cpr.h" @@ -36,4 +36,4 @@ struct VFIOLegacyContainer { =20 OBJECT_DECLARE_SIMPLE_TYPE(VFIOLegacyContainer, VFIO_IOMMU_LEGACY); =20 -#endif /* HW_VFIO_CONTAINER_H */ +#endif /* HW_VFIO_CONTAINER_LEGACY_H */ diff --git a/hw/ppc/spapr_pci_vfio.c b/hw/ppc/spapr_pci_vfio.c index c8175dd8a89b16e04f464e535306abe83a4ca74f..a748a0bf4c987e604a4a8c5bea3= 148bcdc7d2db0 100644 --- a/hw/ppc/spapr_pci_vfio.c +++ b/hw/ppc/spapr_pci_vfio.c @@ -24,7 +24,7 @@ #include "hw/pci-host/spapr.h" #include "hw/pci/msix.h" #include "hw/pci/pci_device.h" -#include "hw/vfio/vfio-container.h" +#include "hw/vfio/vfio-container-legacy.h" #include "qemu/error-report.h" #include CONFIG_DEVICES /* CONFIG_VFIO_PCI */ =20 diff --git a/hw/s390x/s390-pci-vfio.c b/hw/s390x/s390-pci-vfio.c index 938a5511713dade46740dca79a8c4c738799a1ce..7760780aff7ae18034d8cbbb77c= 4d41ea95a6be5 100644 --- a/hw/s390x/s390-pci-vfio.c +++ b/hw/s390x/s390-pci-vfio.c @@ -20,7 +20,7 @@ #include "hw/s390x/s390-pci-clp.h" #include "hw/s390x/s390-pci-vfio.h" #include "hw/vfio/pci.h" -#include "hw/vfio/vfio-container.h" +#include "hw/vfio/vfio-container-legacy.h" #include "hw/vfio/vfio-helpers.h" =20 /* diff --git a/hw/vfio/container.c b/hw/vfio/container.c index dc8425efb1f68eb80b17ec2ba4baa8f7cb258d36..c0f87f774a00805cab4a8f3b338= 6ddd99c3d9111 100644 --- a/hw/vfio/container.c +++ b/hw/vfio/container.c @@ -34,7 +34,7 @@ #include "migration/cpr.h" #include "migration/blocker.h" #include "pci.h" -#include "hw/vfio/vfio-container.h" +#include "hw/vfio/vfio-container-legacy.h" #include "vfio-helpers.h" #include "vfio-listener.h" =20 diff --git a/hw/vfio/cpr-legacy.c b/hw/vfio/cpr-legacy.c index bd3f6fc3d3936e7798df6a3c9f3b893e428ec771..bbf7a0d35f0ba2b78fd40a60b6e= 47337665dcbb9 100644 --- a/hw/vfio/cpr-legacy.c +++ b/hw/vfio/cpr-legacy.c @@ -7,7 +7,7 @@ #include #include #include "qemu/osdep.h" -#include "hw/vfio/vfio-container.h" +#include "hw/vfio/vfio-container-legacy.h" #include "hw/vfio/vfio-device.h" #include "hw/vfio/vfio-listener.h" #include "migration/blocker.h" diff --git a/hw/vfio/spapr.c b/hw/vfio/spapr.c index 6d462aa13caecb3e91de503ca4bb2bc60c9d262a..acaa9c141916f127a87440d239f= acf285f9e34e0 100644 --- a/hw/vfio/spapr.c +++ b/hw/vfio/spapr.c @@ -15,7 +15,7 @@ #include "system/hostmem.h" #include "system/address-spaces.h" =20 -#include "hw/vfio/vfio-container.h" +#include "hw/vfio/vfio-container-legacy.h" #include "hw/hw.h" #include "system/ram_addr.h" #include "qemu/error-report.h" --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758864945; cv=none; d=zohomail.com; s=zohoarc; b=J2o39s2wXrZetS0Mf8y07HGuBe1bg8a2eIJPYp7t1jJ5VdLc8AKWPsxwfM+4dPjyE7/Vg0dQBpnPUjyNJ3EOoVShvJDaaE4zFHBFaRIpkt6RTgHkZBIphM+B1lUmgkkc016+5Zivi+QZnYkIml5PGGTsOXGnX0/SFgnegIy15qU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758864945; 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=TK5jfeOstzGjQhv24HnpSnyYveNLECM2e/1RdzHLfJA=; b=H1Ege/PGu43xYsSqLdPuwNXEWpxgC8whzH/+fE1PdH7xaEljUvZX9wwpcmyJA/zgT6SXZoHH7aAbUyisL34np7ARIdj14LjVM/parBHoLgfyDsdtUp63VD5b3B1rmLLZSciWPA/l3gPuRwGO5UU72oKhflXlDJTjQKwhtlSpBvw= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 175886494535182.25164197028573; Thu, 25 Sep 2025 22:35:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v216J-0008Ei-9l; Fri, 26 Sep 2025 01:34:35 -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 1v216F-0008Cz-Dd for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:31 -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 1v2167-0000lr-VO for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:29 -0400 Received: from mx-prod-mc-04.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-589-_Yb3vEXwP6-1_ZAz54duJg-1; Fri, 26 Sep 2025 01:34:18 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4760F19560AE; Fri, 26 Sep 2025 05:34:17 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9CB761800579; Fri, 26 Sep 2025 05:34:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864860; 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=TK5jfeOstzGjQhv24HnpSnyYveNLECM2e/1RdzHLfJA=; b=XTVOOAEwWH8V4wd6DMVGovPm2HPKCulr8rNku+LdPensZkvwYstTfBL3q5IwadnFxd5M0K sgpV9O5VBc8GUK5OwY7FvPERZ2s4PVLzP6+47p7xt0wA4eWs2NhQo/AZqNWwCAKTveqTBT kLVQQrENb6j/eeQN8u1zKNVZ2BBuRRY= X-MC-Unique: _Yb3vEXwP6-1_ZAz54duJg-1 X-Mimecast-MFC-AGG-ID: _Yb3vEXwP6-1_ZAz54duJg_1758864857 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 05/29] include/hw/vfio/vfio-container-base.h: rename file to vfio-container.h Date: Fri, 26 Sep 2025 07:33:34 +0200 Message-ID: <20250926053358.308198-6-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=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_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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: 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: 1758864947339116600 From: Mark Cave-Ayland With the rename of VFIOContainerBase to VFIOContainer, the vfio-container-b= ase.h header file containing the struct definition is misleading. Rename it from vfio-container-base.h to vfio-container.h accordingly, fixing up the name of the include guard at the same time. Signed-off-by: Mark Cave-Ayland Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-5-mark.cave= ayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio-user/container.h | 2 +- hw/vfio/vfio-iommufd.h | 2 +- include/hw/vfio/vfio-container-legacy.h | 2 +- include/hw/vfio/{vfio-container-base.h =3D> vfio-container.h} | 6 +++--- include/hw/vfio/vfio-device.h | 2 +- hw/vfio/container-base.c | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) rename include/hw/vfio/{vfio-container-base.h =3D> vfio-container.h} (98%) diff --git a/hw/vfio-user/container.h b/hw/vfio-user/container.h index 241863ef976f5a437755358c3949dd02f7820726..a2b42e3169dfba173308cb69404= fc3b0fa98e99a 100644 --- a/hw/vfio-user/container.h +++ b/hw/vfio-user/container.h @@ -9,7 +9,7 @@ =20 #include "qemu/osdep.h" =20 -#include "hw/vfio/vfio-container-base.h" +#include "hw/vfio/vfio-container.h" #include "hw/vfio-user/proxy.h" =20 /* MMU container sub-class for vfio-user. */ diff --git a/hw/vfio/vfio-iommufd.h b/hw/vfio/vfio-iommufd.h index 6c049d925763848b25b25cea632cf9d1874f83e9..13f412aad79abfea2e591ee0e3e= 6d7a5b2c9f68c 100644 --- a/hw/vfio/vfio-iommufd.h +++ b/hw/vfio/vfio-iommufd.h @@ -9,7 +9,7 @@ #ifndef HW_VFIO_VFIO_IOMMUFD_H #define HW_VFIO_VFIO_IOMMUFD_H =20 -#include "hw/vfio/vfio-container-base.h" +#include "hw/vfio/vfio-container.h" =20 typedef struct VFIODevice VFIODevice; =20 diff --git a/include/hw/vfio/vfio-container-legacy.h b/include/hw/vfio/vfio= -container-legacy.h index ab5130d26eaa0e9fe586e49efe78aef6c0450540..74a72df018b50490b95d80044a3= 1247ba7c9fc3b 100644 --- a/include/hw/vfio/vfio-container-legacy.h +++ b/include/hw/vfio/vfio-container-legacy.h @@ -9,7 +9,7 @@ #ifndef HW_VFIO_CONTAINER_LEGACY_H #define HW_VFIO_CONTAINER_LEGACY_H =20 -#include "hw/vfio/vfio-container-base.h" +#include "hw/vfio/vfio-container.h" #include "hw/vfio/vfio-cpr.h" =20 typedef struct VFIOLegacyContainer VFIOLegacyContainer; diff --git a/include/hw/vfio/vfio-container-base.h b/include/hw/vfio/vfio-c= ontainer.h similarity index 98% rename from include/hw/vfio/vfio-container-base.h rename to include/hw/vfio/vfio-container.h index b580f4a02df92276ef82c953eaf6942e1bf31413..b8fb2b8b5d72b1d2a4c00dc89b2= 14b48a371f555 100644 --- a/include/hw/vfio/vfio-container-base.h +++ b/include/hw/vfio/vfio-container.h @@ -10,8 +10,8 @@ * SPDX-License-Identifier: GPL-2.0-or-later */ =20 -#ifndef HW_VFIO_VFIO_CONTAINER_BASE_H -#define HW_VFIO_VFIO_CONTAINER_BASE_H +#ifndef HW_VFIO_VFIO_CONTAINER_H +#define HW_VFIO_VFIO_CONTAINER_H =20 #include "system/memory.h" =20 @@ -276,4 +276,4 @@ VFIORamDiscardListener *vfio_find_ram_discard_listener( void vfio_container_region_add(VFIOContainer *bcontainer, MemoryRegionSection *section, bool cpr_rema= p); =20 -#endif /* HW_VFIO_VFIO_CONTAINER_BASE_H */ +#endif /* HW_VFIO_VFIO_CONTAINER_H */ diff --git a/include/hw/vfio/vfio-device.h b/include/hw/vfio/vfio-device.h index 67b9fcdd2c011234d250bcdd23fdcdfb259aba2f..ed19e2e1e5859a0e9d3910d54d6= ba2ad61f551d9 100644 --- a/include/hw/vfio/vfio-device.h +++ b/include/hw/vfio/vfio-device.h @@ -27,7 +27,7 @@ #include #endif #include "system/system.h" -#include "hw/vfio/vfio-container-base.h" +#include "hw/vfio/vfio-container.h" #include "hw/vfio/vfio-cpr.h" #include "system/host_iommu_device.h" #include "system/iommufd.h" diff --git a/hw/vfio/container-base.c b/hw/vfio/container-base.c index 98c5198e5043b0ecb679060116bbac240ac76747..250b20f424522f4b6a4e864906e= ed2d8d13efbcd 100644 --- a/hw/vfio/container-base.c +++ b/hw/vfio/container-base.c @@ -18,7 +18,7 @@ #include "system/ram_addr.h" #include "qapi/error.h" #include "qemu/error-report.h" -#include "hw/vfio/vfio-container-base.h" +#include "hw/vfio/vfio-container.h" #include "hw/vfio/vfio-device.h" /* vfio_device_reset_handler */ #include "system/reset.h" #include "vfio-helpers.h" --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758865271; cv=none; d=zohomail.com; s=zohoarc; b=auKk7Wg89wj/9iCTRNwcaa+3zXcXR932CN65zIEqCJe3SVYCMNp5/2oVVSA8RUdNxjRjJ1E05X7Ypv/iGAVGZZSU2lLENuWfPihWsfU9nVmV4BV549f4p/uMKLN3iPnIsnbB8CzDbyiffCgTSDaTBEVaIlF3u8yJxcFTmF3aSLI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758865271; 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=0BhBGD+5UkFe7a49pnwyzRqnOw8dmvO/QReIcZ8DtlE=; b=Vg1ikkdY+Zha8k/BXSnWPKDD96nZ63QOPv+drw/E3wTYo3+kdKFVCvfJzpd2Z0TEn6fbqoVEUuqVeS1z6Cyr4SwGN/5YHVj5Zoo02cbAPtnZX1XZNy2xp7WKj1lBwks0l1jGF149SCTRKOZscy/F1sNT88kcLHVKArH26U3idOI= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758865271166513.5300460634556; Thu, 25 Sep 2025 22:41:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v216b-0008Mb-R9; Fri, 26 Sep 2025 01:34:54 -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 1v216N-0008HQ-A7 for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34: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 1v216A-0000mZ-HS for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:37 -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-82-z5EVQDGBPkqFLPz7f6kjOQ-1; Fri, 26 Sep 2025 01:34:21 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 14CEF1800577; Fri, 26 Sep 2025 05:34:20 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B0A721800452; Fri, 26 Sep 2025 05:34:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864863; 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=0BhBGD+5UkFe7a49pnwyzRqnOw8dmvO/QReIcZ8DtlE=; b=FcQce3Cz27QdNiJIQp4VDVWDGXCR4a792M7mxlhcu3jMNvZ0mHGZ8BSR1DCLzqRGdhhZUV MMK9YGNQnPF/SUWRs5iG1xk2m9H8t4k+1g9DLH59Iut2a4IScHnFb6AvofraVm0mJeDVUI LxAdRkgc6X4AXv0tU5JgRklnmshi2Fc= X-MC-Unique: z5EVQDGBPkqFLPz7f6kjOQ-1 X-Mimecast-MFC-AGG-ID: z5EVQDGBPkqFLPz7f6kjOQ_1758864860 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 06/29] hw/vfio/container.c: rename file to container-legacy.c Date: Fri, 26 Sep 2025 07:33:35 +0200 Message-ID: <20250926053358.308198-7-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=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_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, T_SPF_HELO_TEMPERROR=0.01, T_SPF_TEMPERROR=0.01 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 @redhat.com) X-ZM-MESSAGEID: 1758865273649116600 From: Mark Cave-Ayland This file is mostly concerned with the VFIOLegacyContainer implementation so rename it to reflect the previous rename of VFIOContainer to VFIOLegacyContainer. Signed-off-by: Mark Cave-Ayland Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-6-mark.cave= ayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio/{container.c =3D> container-legacy.c} | 0 hw/vfio/meson.build | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename hw/vfio/{container.c =3D> container-legacy.c} (100%) diff --git a/hw/vfio/container.c b/hw/vfio/container-legacy.c similarity index 100% rename from hw/vfio/container.c rename to hw/vfio/container-legacy.c diff --git a/hw/vfio/meson.build b/hw/vfio/meson.build index d3ed3cb7ac19931f95f60057c3d9d290bc48c07c..62b7a7eaaca3da6bd914fdc272e= 6bfe94bd77429 100644 --- a/hw/vfio/meson.build +++ b/hw/vfio/meson.build @@ -4,7 +4,7 @@ vfio_ss =3D ss.source_set() vfio_ss.add(files( 'listener.c', 'container-base.c', - 'container.c', + 'container-legacy.c', 'helpers.c', )) vfio_ss.add(when: 'CONFIG_PSERIES', if_true: files('spapr.c')) --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758865323; cv=none; d=zohomail.com; s=zohoarc; b=C7qrPSunR0Tdz2CSOB0iSPV60cEhFJPNFuV1P/HbaVZBsvx44dhxoNAF1glYK3Yi4cDVJNO0ACET3BAylpwxI543PtyoI24StHtWQI9vSSIN/R8c/kNFrpKMePv6K5Rgd4qUwg43eSu0o4ClhO5CSDTAuK/JVtrqUFncVNRnG5Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758865323; 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=4E8kTpXiav2aYv1eZjolSKz7x28UhYr4H2U284vFXNE=; b=kl2sj5I13N+3Bz8hr5Zncv0o6V155RVihHmLfx2b1Dy8jYs1G8ZYncp2Jder0UktaEsjLomY1eQTeqn6baXwZt3enKApXzIMEHFUeSMAGcEPH3QULTZ5y6Cp2lwWNC3OIvs0XiASwOahjSmvYuUSHg71tCSHmr45bKqzdFRSaHU= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758865323148142.79766861437383; Thu, 25 Sep 2025 22:42:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v216R-0008I2-Kp; Fri, 26 Sep 2025 01:34:44 -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 1v216K-0008FY-Nb for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:37 -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 1v216G-0000nW-Ej for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:35 -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-685-m1EYMu6CPtGWqZZmEQiq4A-1; Fri, 26 Sep 2025 01:34:23 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 7F86F1800366; Fri, 26 Sep 2025 05:34:22 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A28871800579; Fri, 26 Sep 2025 05:34:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864867; 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=4E8kTpXiav2aYv1eZjolSKz7x28UhYr4H2U284vFXNE=; b=bmIelimzPo0ZjGJrtjAPUW+o4SSKhvnrSOP5v3Q7gyriepPOq4VnPzhds6IsKfAm8cpqjk w73mB8BSi4BkJxuwojJW0n+e5DvEREaLzX4isF3Oq/RcMXcECdfNBEOjRK5qioXiKVmlVt KoGYDZZVwEmKzrp8O8ZEo4NmnKCzs4w= X-MC-Unique: m1EYMu6CPtGWqZZmEQiq4A-1 X-Mimecast-MFC-AGG-ID: m1EYMu6CPtGWqZZmEQiq4A_1758864862 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 07/29] hw/vfio/container-base.c: rename file to container.c Date: Fri, 26 Sep 2025 07:33:36 +0200 Message-ID: <20250926053358.308198-8-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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: 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: 1758865324174116600 From: Mark Cave-Ayland Rename the file to reflect the previous rename of VFIOContainerBase to VFIOContainer. Signed-off-by: Mark Cave-Ayland Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-7-mark.cave= ayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio/{container-base.c =3D> container.c} | 0 hw/vfio/meson.build | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename hw/vfio/{container-base.c =3D> container.c} (100%) diff --git a/hw/vfio/container-base.c b/hw/vfio/container.c similarity index 100% rename from hw/vfio/container-base.c rename to hw/vfio/container.c diff --git a/hw/vfio/meson.build b/hw/vfio/meson.build index 62b7a7eaaca3da6bd914fdc272e6bfe94bd77429..82f68698fb8483196d5ced096f7= 9d1024bf9c4bc 100644 --- a/hw/vfio/meson.build +++ b/hw/vfio/meson.build @@ -3,7 +3,7 @@ vfio_ss =3D ss.source_set() vfio_ss.add(files( 'listener.c', - 'container-base.c', + 'container.c', 'container-legacy.c', 'helpers.c', )) --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758865027; cv=none; d=zohomail.com; s=zohoarc; b=KEyM7gt+12p1KwJA9YGsxfwkfqE7fAIQn8522WJnHznGZHstkzDM/EHZ1DhI7O+BBaobpenbKYI7jSgQUuTnm32wXjFP7/CE3Nt2/h1y++BTh+JqlBQSuuNAc/IH3QXg2txRvsIB9iUu2cmHfhAvcarP8fmAfGQMV1/MApu/dDU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758865027; 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=6w3+lZTYuLZuv2+Esf51IFYRhO1FHVe3PkRojpcwlTA=; b=KbLUCNh1TzJkh4wx623/cFA3JNDS9oMAghjy5aA5iEG9ngati/uCa9OeOJBXauPc/Uxgwn6X8jsXvIEZP/SHzB5IHRZmPwEHau0i7F269RJ2WXM3oHwu8JIPgSDFMGc+IBvDOjjo5KgGYcIxLNnZXNVHQebceh1x6vhJZwD2fLE= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17588650276821007.0751178594729; Thu, 25 Sep 2025 22:37:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v216b-0008Mt-SO; Fri, 26 Sep 2025 01:34:53 -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 1v216Q-0008I3-5T for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:43 -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 1v216G-0000np-EY for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:41 -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-192-lz8FlyJ7N-ut35YwU8RicA-1; Fri, 26 Sep 2025 01:34:26 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 2E8AF1956053; Fri, 26 Sep 2025 05:34:25 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 19D4D1800452; Fri, 26 Sep 2025 05:34:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864867; 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=6w3+lZTYuLZuv2+Esf51IFYRhO1FHVe3PkRojpcwlTA=; b=HKvzJTrmhoNMLSMdgY0naQOBwlWcaUCrzZSS2H0oNK/XNFsHpx4v7MiOiX75wbspfrc57b 4BcGiKleht+8SBiy0CtVDOHX6g53Aw+wyowQi1XLuAmq+RUJ/SKSlvEclKMa/uMQeLJO2+ KEi/bWfRMzW2RwtZfalQ+n/yryqRxAs= X-MC-Unique: lz8FlyJ7N-ut35YwU8RicA-1 X-Mimecast-MFC-AGG-ID: lz8FlyJ7N-ut35YwU8RicA_1758864865 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 08/29] vfio/iommufd.c: use QOM casts where appropriate Date: Fri, 26 Sep 2025 07:33:37 +0200 Message-ID: <20250926053358.308198-9-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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: 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: 1758865028375116600 From: Mark Cave-Ayland Use QOM casts to convert between VFIOIOMMUFDContainer and VFIOContainer ins= tead of accessing bcontainer directly. Signed-off-by: Mark Cave-Ayland Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-8-mark.cave= ayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio/iommufd.c | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/hw/vfio/iommufd.c b/hw/vfio/iommufd.c index 7f2243d9d197d9aced99d8d8a9065e7e9d888e97..f0ffe2359196505468dd5ed1594= 40f4655847d42 100644 --- a/hw/vfio/iommufd.c +++ b/hw/vfio/iommufd.c @@ -38,8 +38,7 @@ static int iommufd_cdev_map(const VFIOContainer *bcontain= er, hwaddr iova, ram_addr_t size, void *vaddr, bool readonly, MemoryRegion *mr) { - const VFIOIOMMUFDContainer *container =3D - container_of(bcontainer, VFIOIOMMUFDContainer, bcontainer); + const VFIOIOMMUFDContainer *container =3D VFIO_IOMMU_IOMMUFD(bcontaine= r); =20 return iommufd_backend_map_dma(container->be, container->ioas_id, @@ -50,8 +49,7 @@ static int iommufd_cdev_map_file(const VFIOContainer *bco= ntainer, hwaddr iova, ram_addr_t size, int fd, unsigned long start, bool readonl= y) { - const VFIOIOMMUFDContainer *container =3D - container_of(bcontainer, VFIOIOMMUFDContainer, bcontainer); + const VFIOIOMMUFDContainer *container =3D VFIO_IOMMU_IOMMUFD(bcontaine= r); =20 return iommufd_backend_map_file_dma(container->be, container->ioas_id, @@ -62,8 +60,7 @@ static int iommufd_cdev_unmap(const VFIOContainer *bconta= iner, hwaddr iova, ram_addr_t size, IOMMUTLBEntry *iotlb, bool unmap_all) { - const VFIOIOMMUFDContainer *container =3D - container_of(bcontainer, VFIOIOMMUFDContainer, bcontainer); + const VFIOIOMMUFDContainer *container =3D VFIO_IOMMU_IOMMUFD(bcontaine= r); =20 /* unmap in halves */ if (unmap_all) { @@ -162,8 +159,7 @@ static bool iommufd_hwpt_dirty_tracking(VFIOIOASHwpt *h= wpt) static int iommufd_set_dirty_page_tracking(const VFIOContainer *bcontainer, bool start, Error **errp) { - const VFIOIOMMUFDContainer *container =3D - container_of(bcontainer, VFIOIOMMUFDContainer, bcontainer); + const VFIOIOMMUFDContainer *container =3D VFIO_IOMMU_IOMMUFD(bcontaine= r); VFIOIOASHwpt *hwpt; =20 QLIST_FOREACH(hwpt, &container->hwpt_list, next) { @@ -194,9 +190,7 @@ static int iommufd_query_dirty_bitmap(const VFIOContain= er *bcontainer, VFIOBitmap *vbmap, hwaddr iova, hwaddr size, Error **errp) { - VFIOIOMMUFDContainer *container =3D container_of(bcontainer, - VFIOIOMMUFDContainer, - bcontainer); + VFIOIOMMUFDContainer *container =3D VFIO_IOMMU_IOMMUFD(bcontainer); unsigned long page_size =3D qemu_real_host_page_size(); VFIOIOASHwpt *hwpt; =20 @@ -324,6 +318,7 @@ static bool iommufd_cdev_autodomains_get(VFIODevice *vb= asedev, { ERRP_GUARD(); IOMMUFDBackend *iommufd =3D vbasedev->iommufd; + VFIOContainer *bcontainer =3D VFIO_IOMMU(container); uint32_t type, flags =3D 0; uint64_t hw_caps; VFIOIOASHwpt *hwpt; @@ -408,9 +403,9 @@ skip_alloc: vbasedev->iommu_dirty_tracking =3D iommufd_hwpt_dirty_tracking(hwpt); QLIST_INSERT_HEAD(&hwpt->device_list, vbasedev, hwpt_next); QLIST_INSERT_HEAD(&container->hwpt_list, hwpt, next); - container->bcontainer.dirty_pages_supported |=3D + bcontainer->dirty_pages_supported |=3D vbasedev->iommu_dirty_tracking; - if (container->bcontainer.dirty_pages_supported && + if (bcontainer->dirty_pages_supported && !vbasedev->iommu_dirty_tracking) { warn_report("IOMMU instance for device %s doesn't support dirty tr= acking", vbasedev->name); @@ -464,7 +459,7 @@ static void iommufd_cdev_detach_container(VFIODevice *v= basedev, =20 static void iommufd_cdev_container_destroy(VFIOIOMMUFDContainer *container) { - VFIOContainer *bcontainer =3D &container->bcontainer; + VFIOContainer *bcontainer =3D VFIO_IOMMU(container); =20 if (!QLIST_EMPTY(&bcontainer->device_list)) { return; @@ -486,7 +481,7 @@ static int iommufd_cdev_ram_block_discard_disable(bool = state) static bool iommufd_cdev_get_info_iova_range(VFIOIOMMUFDContainer *contain= er, uint32_t ioas_id, Error **err= p) { - VFIOContainer *bcontainer =3D &container->bcontainer; + VFIOContainer *bcontainer =3D VFIO_IOMMU(container); g_autofree struct iommu_ioas_iova_ranges *info =3D NULL; struct iommu_iova_range *iova_ranges; int sz, fd =3D container->be->fd; @@ -559,7 +554,7 @@ static bool iommufd_cdev_attach(const char *name, VFIOD= evice *vbasedev, =20 /* try to attach to an existing container in this space */ QLIST_FOREACH(bcontainer, &space->containers, next) { - container =3D container_of(bcontainer, VFIOIOMMUFDContainer, bcont= ainer); + container =3D VFIO_IOMMU_IOMMUFD(bcontainer); if (VFIO_IOMMU_GET_CLASS(bcontainer) !=3D iommufd_vioc || vbasedev->iommufd !=3D container->be) { continue; @@ -609,7 +604,7 @@ skip_ioas_alloc: QLIST_INIT(&container->hwpt_list); vbasedev->cpr.ioas_id =3D ioas_id; =20 - bcontainer =3D &container->bcontainer; + bcontainer =3D VFIO_IOMMU(container); vfio_address_space_insert(space, bcontainer); =20 if (!iommufd_cdev_attach_container(vbasedev, container, errp)) { @@ -689,9 +684,8 @@ static void iommufd_cdev_detach(VFIODevice *vbasedev) { VFIOContainer *bcontainer =3D vbasedev->bcontainer; VFIOAddressSpace *space =3D bcontainer->space; - VFIOIOMMUFDContainer *container =3D container_of(bcontainer, - VFIOIOMMUFDContainer, - bcontainer); + VFIOIOMMUFDContainer *container =3D VFIO_IOMMU_IOMMUFD(bcontainer); + vfio_device_unprepare(vbasedev); =20 if (!vbasedev->ram_block_discard_allowed) { --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758865383; cv=none; d=zohomail.com; s=zohoarc; b=bR6oOtH7q/wJ6dIu3KKjEzE+kyX3tS6Rxn98TlCATlLJgC3r/zGkpH4BTIV466wTNgBw4pveithpC/3HVEdrLwdUUjTlTDluWQHGjTYN1MQBQx1wXvBK/VAEc7Ge1eEog7FsmLoVYgZs31YcKWBUXTU/xBrV3KQlreaycF5NCdE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758865383; 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=L/qW/lTiRSkanDXHBxWqbzS2IrRFYT4CktJabQhCIyo=; b=d3HFOuxidIyMhDkEYCmgFw+73goTk+5OU2xWUQYoOdRtGMZ7D+33RrazwPZXwCSeRMUw3Iama8j3tiftTCncAmFQoBHxGGkwyhaYu+M6xiaQHxQLLJQwZ4ZihPMFaKNKAW0p0N1MlkAxmUbzkpicN4zQTnQuKE/ubT/YmGZVjbU= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758865383153757.291933112049; Thu, 25 Sep 2025 22:43:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v216R-0008I5-Kc; Fri, 26 Sep 2025 01:34:43 -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 1v216N-0008HR-9m for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:39 -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 1v216J-0000pK-Dh for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:38 -0400 Received: from mx-prod-mc-02.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-627-k3pNaCjDOjqs9-UwWFFOuA-1; Fri, 26 Sep 2025 01:34:28 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9807E195608A; Fri, 26 Sep 2025 05:34:27 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A09741800579; Fri, 26 Sep 2025 05:34:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864872; 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=L/qW/lTiRSkanDXHBxWqbzS2IrRFYT4CktJabQhCIyo=; b=Cv83WriS4/ARgjGwFU1yiFsowlxg8O2CJagOfNJXWXpFSo+YPZNed2W1gMNJ6umbbK8ILN d59vHfJc+7TlifK/U5Rx5DppmxLL0mdTUg/Ya6rU8RRxD5ZLLdkTeCKh4+QhbxUcs//5dF b8Z6k9nDSKx4UjLqwQva2JiMBfxl148= X-MC-Unique: k3pNaCjDOjqs9-UwWFFOuA-1 X-Mimecast-MFC-AGG-ID: k3pNaCjDOjqs9-UwWFFOuA_1758864867 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 09/29] vfio/cpr-iommufd.c: use QOM casts where appropriate Date: Fri, 26 Sep 2025 07:33:38 +0200 Message-ID: <20250926053358.308198-10-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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: 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: 1758865384678116600 From: Mark Cave-Ayland Use QOM casts to convert between VFIOIOMMUFDContainer and VFIOContainer ins= tead of accessing bcontainer directly. Signed-off-by: Mark Cave-Ayland Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-9-mark.cave= ayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio/cpr-iommufd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio/cpr-iommufd.c b/hw/vfio/cpr-iommufd.c index 6aaf6f77a25a3d90387ca60599955f54dcc308de..1d70c87996d0d1d7b9e73b015be= af10bdd7e41f9 100644 --- a/hw/vfio/cpr-iommufd.c +++ b/hw/vfio/cpr-iommufd.c @@ -176,7 +176,7 @@ void vfio_iommufd_cpr_unregister_iommufd(IOMMUFDBackend= *be) bool vfio_iommufd_cpr_register_container(VFIOIOMMUFDContainer *container, Error **errp) { - VFIOContainer *bcontainer =3D &container->bcontainer; + VFIOContainer *bcontainer =3D VFIO_IOMMU(container); =20 migration_add_notifier_mode(&bcontainer->cpr_reboot_notifier, vfio_cpr_reboot_notifier, @@ -189,7 +189,7 @@ bool vfio_iommufd_cpr_register_container(VFIOIOMMUFDCon= tainer *container, =20 void vfio_iommufd_cpr_unregister_container(VFIOIOMMUFDContainer *container) { - VFIOContainer *bcontainer =3D &container->bcontainer; + VFIOContainer *bcontainer =3D VFIO_IOMMU(container); =20 migration_remove_notifier(&bcontainer->cpr_reboot_notifier); } --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758864983; cv=none; d=zohomail.com; s=zohoarc; b=lNfUfVaiprO0d2MEJDFtYlgOmkfWGjGu8d0B8InvcjiYw9dJHpFqBjvWcpt9HDj83mGJOmqmek+EJVywzdI1nD4OEVjTIdsVTQfAnc+ZsJdImLw6i7A0XU8ym8wllsOummzbmOMKEh4lUVwyknygNqM1wnhrf25PDSHUcU5YgJw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758864983; 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=vsaDhuuEpNrybPAPJhiynKUz0IB32nB2jfom8vAyNhk=; b=GQP+cxQwEe4x0lv8O16Z5rRaqiEnhRnjcqnKwyHAFSVfpeiPXY+SxbZfUJpNw4J+GZmtqNL2HyHGhfFHgzfj73J9kRnyAZ8JAinjFtYy3Tn72dY4lRihJSoypn/lCiQirpYT93AZiKFQUcfba8IdHQ3EMDrgsKZygn4W2c2YhmY= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758864983168849.0950281032719; Thu, 25 Sep 2025 22:36:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v216e-0008O6-Sa; Fri, 26 Sep 2025 01:34:56 -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 1v216X-0008L0-Pn for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:51 -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 1v216O-0000pP-By for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:49 -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-422-JwRc8r33PJ-C1k_IA_vNFA-1; Fri, 26 Sep 2025 01:34:31 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 EA8BD1800447; Fri, 26 Sep 2025 05:34:29 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2BFAD1800452; Fri, 26 Sep 2025 05:34:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864874; 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=vsaDhuuEpNrybPAPJhiynKUz0IB32nB2jfom8vAyNhk=; b=ChLZqPZMb7J+b3g8DNMOFqH4kJAPBbJeqvqKOIlXlOiDluTRgURJ/qhYqvIz3MaB8list2 2L/17H7GDU5gD9ylxeEM0r/AY13w52ArnYkJPnHMn25wCSAZ2Ohet+zBrY2UO7t76aw+/C PuzIvR+ZQdOnMSI1kGKTawd1Q/bDNig= X-MC-Unique: JwRc8r33PJ-C1k_IA_vNFA-1 X-Mimecast-MFC-AGG-ID: JwRc8r33PJ-C1k_IA_vNFA_1758864870 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 10/29] vfio/vfio-iommufd.h: rename VFIOContainer bcontainer field to parent_obj Date: Fri, 26 Sep 2025 07:33:39 +0200 Message-ID: <20250926053358.308198-11-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.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, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, T_SPF_TEMPERROR=0.01 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 @redhat.com) X-ZM-MESSAGEID: 1758864983709116600 From: Mark Cave-Ayland Now that nothing accesses the bcontainer field directly, rename bcontainer = to parent_obj as per our current coding guidelines. Signed-off-by: Mark Cave-Ayland Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-10-mark.cav= eayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio/vfio-iommufd.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/vfio/vfio-iommufd.h b/hw/vfio/vfio-iommufd.h index 13f412aad79abfea2e591ee0e3e6d7a5b2c9f68c..6b28e1ff7bbb170de0d61f50258= 8bf84ccddd112 100644 --- a/hw/vfio/vfio-iommufd.h +++ b/hw/vfio/vfio-iommufd.h @@ -22,12 +22,13 @@ typedef struct VFIOIOASHwpt { =20 typedef struct IOMMUFDBackend IOMMUFDBackend; =20 -typedef struct VFIOIOMMUFDContainer { - VFIOContainer bcontainer; +struct VFIOIOMMUFDContainer { + VFIOContainer parent_obj; + IOMMUFDBackend *be; uint32_t ioas_id; QLIST_HEAD(, VFIOIOASHwpt) hwpt_list; -} VFIOIOMMUFDContainer; +}; =20 OBJECT_DECLARE_SIMPLE_TYPE(VFIOIOMMUFDContainer, VFIO_IOMMU_IOMMUFD); =20 --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758865022; cv=none; d=zohomail.com; s=zohoarc; b=k6XPXFOV+l+RjuyzX+0P4Ia5P9nLIHyGzGbPyNW9dILcglI59ac7YO/1Aq5YMtTJiFwTvnMUwvt9fl8UNaNCrgbv73nIvicfb17/rzn0Xz1n+7Zaweh2ab2vm6szOi2QCAitJs+Tp3lTBgI89vVd34wCMAqTIaMhcjb45Tisem0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758865022; 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=jGNYZrfWhSesxz0a2yRX7ofpdrxFXUQ/L0oIa38+Lms=; b=NQJM3tL/OtCxDzUpVVWfgj6F+Rm0K4118eEnSunhNf6q+MbvekBTle69LnA+x2NarTCvg93FP2DohuWswNeLejNl/oFsKaHoWu3yEYFUqmV1V/U7OQQcfgWNW1E8xChlHrmGIX9KoIAWK8XW9VFXwIPxHkXNaPtx6ZmzejSyZ3I= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758865022734500.48578773329336; Thu, 25 Sep 2025 22:37:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v216j-0008Po-16; Fri, 26 Sep 2025 01:35:01 -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 1v216c-0008Md-Hw for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:54 -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 1v216Q-0000q6-Vb for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:53 -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-262-XtQwKdrCMgaORm8EzdhAKw-1; Fri, 26 Sep 2025 01:34:33 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 4EE2A19560B2; Fri, 26 Sep 2025 05:34:32 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7FE4D1800452; Fri, 26 Sep 2025 05:34:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864877; 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=jGNYZrfWhSesxz0a2yRX7ofpdrxFXUQ/L0oIa38+Lms=; b=jIjIJS2sUkxR4KOwBgMSTXnj2T500jdNFrSSUmK8h9GzLcCqpLj4soOZAybb68QuCHLegL mlQiB4g8S4wsTPMBg8dIT11mNhq8Nu0sIPYN7eGODEZBO2Il0t7iTMLVzxShtvXFOfSWZ5 Mx3QjBQ68DIZYz837TmuIc02pPqCAdY= X-MC-Unique: XtQwKdrCMgaORm8EzdhAKw-1 X-Mimecast-MFC-AGG-ID: XtQwKdrCMgaORm8EzdhAKw_1758864872 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 11/29] vfio/spapr.c: use QOM casts where appropriate Date: Fri, 26 Sep 2025 07:33:40 +0200 Message-ID: <20250926053358.308198-12-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, T_SPF_TEMPERROR=0.01 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 @redhat.com) X-ZM-MESSAGEID: 1758865024229116600 From: Mark Cave-Ayland Use QOM casts to convert between VFIOSpaprContainer and VFIOLegacyContainer instead of accessing bcontainer directly. Signed-off-by: Mark Cave-Ayland Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-11-mark.cav= eayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio/spapr.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/hw/vfio/spapr.c b/hw/vfio/spapr.c index acaa9c141916f127a87440d239facf285f9e34e0..c883ba6da9e984f392a8d75adfb= 0fb8c74027d08 100644 --- a/hw/vfio/spapr.c +++ b/hw/vfio/spapr.c @@ -61,7 +61,7 @@ static void vfio_prereg_listener_region_add(MemoryListene= r *listener, { VFIOSpaprContainer *scontainer =3D container_of(listener, VFIOSpaprCon= tainer, prereg_listener); - VFIOLegacyContainer *container =3D &scontainer->container; + VFIOLegacyContainer *container =3D VFIO_IOMMU_LEGACY(scontainer); VFIOContainer *bcontainer =3D VFIO_IOMMU(container); const hwaddr gpa =3D section->offset_within_address_space; hwaddr end; @@ -121,7 +121,7 @@ static void vfio_prereg_listener_region_del(MemoryListe= ner *listener, { VFIOSpaprContainer *scontainer =3D container_of(listener, VFIOSpaprCon= tainer, prereg_listener); - VFIOLegacyContainer *container =3D &scontainer->container; + VFIOLegacyContainer *container =3D VFIO_IOMMU_LEGACY(scontainer); const hwaddr gpa =3D section->offset_within_address_space; hwaddr end; int ret; @@ -245,8 +245,7 @@ static bool vfio_spapr_create_window(VFIOLegacyContaine= r *container, { int ret =3D 0; VFIOContainer *bcontainer =3D VFIO_IOMMU(container); - VFIOSpaprContainer *scontainer =3D container_of(container, VFIOSpaprCo= ntainer, - container); + VFIOSpaprContainer *scontainer =3D VFIO_IOMMU_SPAPR(bcontainer); IOMMUMemoryRegion *iommu_mr =3D IOMMU_MEMORY_REGION(section->mr); uint64_t pagesize =3D memory_region_iommu_get_min_page_size(iommu_mr),= pgmask; unsigned entries, bits_total, bits_per_level, max_levels, ddw_levels; @@ -353,8 +352,7 @@ vfio_spapr_container_add_section_window(VFIOContainer *= bcontainer, Error **errp) { VFIOLegacyContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); - VFIOSpaprContainer *scontainer =3D container_of(container, VFIOSpaprCo= ntainer, - container); + VFIOSpaprContainer *scontainer =3D VFIO_IOMMU_SPAPR(container); VFIOHostDMAWindow *hostwin; hwaddr pgsize =3D 0; int ret; @@ -443,8 +441,7 @@ vfio_spapr_container_del_section_window(VFIOContainer *= bcontainer, MemoryRegionSection *section) { VFIOLegacyContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); - VFIOSpaprContainer *scontainer =3D container_of(container, VFIOSpaprCo= ntainer, - container); + VFIOSpaprContainer *scontainer =3D VFIO_IOMMU_SPAPR(container); =20 if (container->iommu_type !=3D VFIO_SPAPR_TCE_v2_IOMMU) { return; @@ -464,8 +461,7 @@ vfio_spapr_container_del_section_window(VFIOContainer *= bcontainer, static void vfio_spapr_container_release(VFIOContainer *bcontainer) { VFIOLegacyContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); - VFIOSpaprContainer *scontainer =3D container_of(container, VFIOSpaprCo= ntainer, - container); + VFIOSpaprContainer *scontainer =3D VFIO_IOMMU_SPAPR(container); VFIOHostDMAWindow *hostwin, *next; =20 if (container->iommu_type =3D=3D VFIO_SPAPR_TCE_v2_IOMMU) { @@ -482,8 +478,7 @@ static bool vfio_spapr_container_setup(VFIOContainer *b= container, Error **errp) { VFIOLegacyContainer *container =3D VFIO_IOMMU_LEGACY(bcontainer); - VFIOSpaprContainer *scontainer =3D container_of(container, VFIOSpaprCo= ntainer, - container); + VFIOSpaprContainer *scontainer =3D VFIO_IOMMU_SPAPR(container); struct vfio_iommu_spapr_tce_info info; bool v2 =3D container->iommu_type =3D=3D VFIO_SPAPR_TCE_v2_IOMMU; int ret, fd =3D container->fd; --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758865297; cv=none; d=zohomail.com; s=zohoarc; b=QJjh6M4Gn00X97xnO/n8cxjeNWVUmp5wLGaJ1T4odMQneIZavuHVGvPm48fHSz+2vN/UjpRbzOtNcm/l8hnbDanMwrpgLcPmPfYNchXG1wF8X16wzXfoY5vmU57Z7VDFeVc36s72jBmD+vuX/UcgGmBs5wuenDLYeEXstHz9uv0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758865297; 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=RzbvkqXZcEOVOclgPdGfWjrEFoyLvJwr9KQzHfBpumU=; b=BjKDbxuiBPwTWeUrl1BUqoAUSpmFwwW7vFhOVclsmOcwFVIO3r6dintfUWyDk5xjrVHvTHlwSjtZDN4iCAmBlUsOSK3OeKEi1dlBCFXXX/fn6lWD74X9izDXC2vd/0L4fK8g+iQYM6hxPioQyUbFJJGNX/iscj2U/7/5osI/Y9w= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 175886529777491.62257481738925; Thu, 25 Sep 2025 22:41:37 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v216d-0008OF-RS; Fri, 26 Sep 2025 01:34: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 1v216W-0008KU-W5 for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:49 -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 1v216P-0000qT-OQ for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:47 -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-470-sxnZyORLOROllAU_CxN5dA-1; Fri, 26 Sep 2025 01:34:35 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 CE5B11800365; Fri, 26 Sep 2025 05:34:34 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E58BE1800452; Fri, 26 Sep 2025 05:34:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864878; 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=RzbvkqXZcEOVOclgPdGfWjrEFoyLvJwr9KQzHfBpumU=; b=DOZJ3C9bYHdBv5aahK5xNCOAiu5ZhkKS0cb5mVJxQL3N8u7+YGol5ph8VjnSOY+arFNbxf J2lx5uFx3xRTNShWhVaaZo/9SS4DhWZHep+43d6ZFdXCDXaRWQwKwh/+8olWfAZ2trTkIo skk9DC2GDrXz504K9xqlXE0an1l2nnw= X-MC-Unique: sxnZyORLOROllAU_CxN5dA-1 X-Mimecast-MFC-AGG-ID: sxnZyORLOROllAU_CxN5dA_1758864874 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 12/29] vfio/spapr.c: rename VFIOContainer bcontainer field to parent_obj Date: Fri, 26 Sep 2025 07:33:41 +0200 Message-ID: <20250926053358.308198-13-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, T_SPF_TEMPERROR=0.01 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 @redhat.com) X-ZM-MESSAGEID: 1758865299736116600 From: Mark Cave-Ayland Now that nothing accesses the bcontainer field directly, rename bcontainer = to parent_obj as per our current coding guidelines. Signed-off-by: Mark Cave-Ayland Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-12-mark.cav= eayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio/spapr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/vfio/spapr.c b/hw/vfio/spapr.c index c883ba6da9e984f392a8d75adfb0fb8c74027d08..8d9d68da4ec8ffa975f9fc45f42= ac9562f870430 100644 --- a/hw/vfio/spapr.c +++ b/hw/vfio/spapr.c @@ -30,12 +30,13 @@ typedef struct VFIOHostDMAWindow { QLIST_ENTRY(VFIOHostDMAWindow) hostwin_next; } VFIOHostDMAWindow; =20 -typedef struct VFIOSpaprContainer { - VFIOLegacyContainer container; +struct VFIOSpaprContainer { + VFIOLegacyContainer parent_obj; + MemoryListener prereg_listener; QLIST_HEAD(, VFIOHostDMAWindow) hostwin_list; unsigned int levels; -} VFIOSpaprContainer; +}; =20 OBJECT_DECLARE_SIMPLE_TYPE(VFIOSpaprContainer, VFIO_IOMMU_SPAPR); =20 --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758865151; cv=none; d=zohomail.com; s=zohoarc; b=eKuNihwuOElth0QFU8AFfEPL7asgKzsUybwdk0SETac1zfVtW3o6Z5fGUYwcOOIC3nPqWt1bfUW1TyCGNOStYfEiMM87QfP9DySWkMzsuU+E3GD01h/u5C4cjJdbaFccLeoc8d7fRf5Ma511O+NZBvkqvKvXKpTW5OBYNmlq0T8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758865151; 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=mI4jznfR5+y7gKAaT21nk45bPd73G8K91u9YTXjAvVI=; b=aNAilPsfqDPpIG+HHMWRt0gPkDSToibkjHmWQ8YXEgSjIbV57bWjURehnHQ7zgfMdGX45sanJDXR5bplTi31/+30ABJl8e9b4WcJKzyPrqbxOue4W+4sGmptB8emI6KZ2x2JgpNxBu6Dd9J9rQHX63Ms05ujT5OdTEYwomU2TF0= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758865151827460.2262633954896; Thu, 25 Sep 2025 22:39:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v216j-0008Ov-MI; Fri, 26 Sep 2025 01:35:01 -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 1v216b-0008MS-6j for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:53 -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 1v216S-0000rw-Ml for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:52 -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-669-Qkn4mSjaNQWZf8nK0H2XUw-1; Fri, 26 Sep 2025 01:34:38 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 BDE341800452; Fri, 26 Sep 2025 05:34:37 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 681081800579; Fri, 26 Sep 2025 05:34:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864882; 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=mI4jznfR5+y7gKAaT21nk45bPd73G8K91u9YTXjAvVI=; b=aADK0HJZnO3St+WHL4qfC3oIfj5RE+PRQQN+MCqWlQZo4funiDijpEC98/L1THzhEQ5bL1 lwT+tpM1+eA01UcHjq86l3Vf5NyfZm04pDEwX2Le5xxOmwieCZcCZCMMVDrUFcxjyGcygl QguXE2te5J/NRInKX5Vw4VY7xwl0rTE= X-MC-Unique: Qkn4mSjaNQWZf8nK0H2XUw-1 X-Mimecast-MFC-AGG-ID: Qkn4mSjaNQWZf8nK0H2XUw_1758864877 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 13/29] vfio/pci.c: rename vfio_instance_init() to vfio_pci_init() Date: Fri, 26 Sep 2025 07:33:42 +0200 Message-ID: <20250926053358.308198-14-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.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, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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: 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: 1758865154294116600 From: Mark Cave-Ayland This is the more typical naming convention for QOM init() functions, in particular it changes the prefix to match the name of the QOM type. Signed-off-by: Mark Cave-Ayland Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-13-mark.cav= eayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index bc0b4c4d562bf7eec5004594952bbb5be4a70149..493f9da45de520eda6be30dd795= 1ac8132b39367 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3625,7 +3625,7 @@ post_reset: vfio_pci_post_reset(vdev); } =20 -static void vfio_instance_init(Object *obj) +static void vfio_pci_init(Object *obj) { PCIDevice *pci_dev =3D PCI_DEVICE(obj); VFIOPCIDevice *vdev =3D VFIO_PCI_BASE(obj); @@ -3916,7 +3916,7 @@ static const TypeInfo vfio_pci_dev_info =3D { .name =3D TYPE_VFIO_PCI, .parent =3D TYPE_VFIO_PCI_BASE, .class_init =3D vfio_pci_dev_class_init, - .instance_init =3D vfio_instance_init, + .instance_init =3D vfio_pci_init, .instance_finalize =3D vfio_instance_finalize, }; =20 --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758865273; cv=none; d=zohomail.com; s=zohoarc; b=AS6vnamo4iGdlCab1DlzuYCm4jmx/TZNvTJOXtnCvnB8wlHbyEMN7ofLNKTQOHHiydRaT/DKhnc9L7ahns0NIEbiFAXtbsS9utEqY5JDEiYxizoQsbmyUcxqnl3aBqaEkltQvrYwjj2K21pkCVPvkyOAkqGOj/i15xcZ9fCDMnE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758865273; 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=5RwE4WmnNWc7PcE0UI9Cst5DGuNQrB0W94ur3X3lZzg=; b=aB+Wn+rjLvDCPwOqmMFteNLpxwq7AqjD5PZ7j37r+1hWtrkkBcPS0z3Ew4kLuoVZCgDXJcAMZMa3dVSRN1GYr4KubKXmeGk8xSPM9RgZ7W0ADONeI/LtvEqG98mYMg4kaT8Yxcmek2rsndxM/DNScMrMOw0sadXxGiuksaGAKGc= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758865273446670.9541161395347; Thu, 25 Sep 2025 22:41:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v216r-0008SJ-1i; Fri, 26 Sep 2025 01:35: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 1v216e-0008OL-9y for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:56 -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 1v216T-0000sW-CR for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:55 -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-393-h7RdStSiNtKfogzgtyi_Ng-1; Fri, 26 Sep 2025 01:34:41 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 2D4DB180057C; Fri, 26 Sep 2025 05:34:40 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 550921800452; Fri, 26 Sep 2025 05:34:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864883; 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=5RwE4WmnNWc7PcE0UI9Cst5DGuNQrB0W94ur3X3lZzg=; b=EEVM68GawwIKk705bZEQ/z39Kuz852z6kTwzTlU8QsczubSvnUAjeL2Oq0IhofxVmitI2b f1Ote6dlca5lALfueKzmEBqGbTqgSU1ZBEow8AkF7yF/SeZy/ToREY/BQF8zHQshGTu7/M 0rcQFAi1QxItAJqqbIBs2mLj8zCm5No= X-MC-Unique: h7RdStSiNtKfogzgtyi_Ng-1 X-Mimecast-MFC-AGG-ID: h7RdStSiNtKfogzgtyi_Ng_1758864880 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 14/29] vfio/pci.c: rename vfio_instance_finalize() to vfio_pci_finalize() Date: Fri, 26 Sep 2025 07:33:43 +0200 Message-ID: <20250926053358.308198-15-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, T_SPF_TEMPERROR=0.01 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 @redhat.com) X-ZM-MESSAGEID: 1758865275445116600 From: Mark Cave-Ayland This is the more typical naming convention for QOM finalize() functions, in particular it changes the prefix to match the name of the QOM type. Signed-off-by: Mark Cave-Ayland Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-14-mark.cav= eayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 493f9da45de520eda6be30dd7951ac8132b39367..90458bc3cc66984fe1cd10f536a= b115c81390f7f 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3550,7 +3550,7 @@ error: error_prepend(errp, VFIO_MSG_PREFIX, vbasedev->name); } =20 -static void vfio_instance_finalize(Object *obj) +static void vfio_pci_finalize(Object *obj) { VFIOPCIDevice *vdev =3D VFIO_PCI_BASE(obj); =20 @@ -3917,7 +3917,7 @@ static const TypeInfo vfio_pci_dev_info =3D { .parent =3D TYPE_VFIO_PCI_BASE, .class_init =3D vfio_pci_dev_class_init, .instance_init =3D vfio_pci_init, - .instance_finalize =3D vfio_instance_finalize, + .instance_finalize =3D vfio_pci_finalize, }; =20 static const Property vfio_pci_dev_nohotplug_properties[] =3D { --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758865034; cv=none; d=zohomail.com; s=zohoarc; b=Mgq8mSFzzsCHdfQFBRBqvsANZzLhXw8sHPbtb2zzNljIZQ6n+k4IfHiFbpB8IlXK8fzv7FMmnxg29c254azUYyGZ/Cwgv1MDElQNbaHh/f1iTffyUc8EsVQia6bwa1XLMlO11GmWg4qWuzENMV5NY3h1AxBcTZJz3tue2ZtcXyg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758865034; 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=XCw6JFiu6uKTaST0LghR0+7O9B7525bcaBZwVgRntqo=; b=Ljb7r8BA0CULr5jNPVyL/m8OyLzAYtjtwWZ+MVwjEVn/TSoOb+pRzAHSKOo8k4CiEX0EJoFBqiVBexZH91Qumny9FRJnB79u/U13CtaQNdg/hK2AdsJ1IC7EGbl7meh1s2lRoCt2QTKxMzRGsnCs4D5BM5P7yFORMFTa/rkmNBE= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17588650348211015.8495663903767; Thu, 25 Sep 2025 22:37:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v216m-0008RN-Ot; Fri, 26 Sep 2025 01:35:06 -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 1v216h-0008PN-1S for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:59 -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 1v216Z-0000tc-5D for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:58 -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-484-UncOArDZPNGooI6IoQZObw-1; Fri, 26 Sep 2025 01:34:43 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 8FC161956055; Fri, 26 Sep 2025 05:34:42 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B81F81800452; Fri, 26 Sep 2025 05:34:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864887; 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=XCw6JFiu6uKTaST0LghR0+7O9B7525bcaBZwVgRntqo=; b=X1c2YjnVGqBO0liT1Gs5JPbFVqFL5OL0Gt6nDx+9+0or6HacVcKjb40/tGueVsPMTGMOHP kvHx54zYcRplPxpRQ8VXmgOXCDPmM/p3EzmGUOEfJXopbZqA/N7bxsidqH3ZtuCae6sZaD JCuVZyEWp5fXTeM9h16+f/R3dtfFg+E= X-MC-Unique: UncOArDZPNGooI6IoQZObw-1 X-Mimecast-MFC-AGG-ID: UncOArDZPNGooI6IoQZObw_1758864882 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 15/29] vfio/pci.c: rename vfio_pci_dev_class_init() to vfio_pci_class_init() Date: Fri, 26 Sep 2025 07:33:44 +0200 Message-ID: <20250926053358.308198-16-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.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, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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: 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: 1758865036356116600 From: Mark Cave-Ayland This changes the function prefix to match the name of the QOM type. Signed-off-by: Mark Cave-Ayland Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-15-mark.cav= eayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 90458bc3cc66984fe1cd10f536ab115c81390f7f..1fd087de3c90329037c6d8188b1= 0547617bc5e41 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3763,7 +3763,7 @@ static void vfio_pci_set_fd(Object *obj, const char *= str, Error **errp) } #endif =20 -static void vfio_pci_dev_class_init(ObjectClass *klass, const void *data) +static void vfio_pci_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); PCIDeviceClass *pdc =3D PCI_DEVICE_CLASS(klass); @@ -3915,7 +3915,7 @@ static void vfio_pci_dev_class_init(ObjectClass *klas= s, const void *data) static const TypeInfo vfio_pci_dev_info =3D { .name =3D TYPE_VFIO_PCI, .parent =3D TYPE_VFIO_PCI_BASE, - .class_init =3D vfio_pci_dev_class_init, + .class_init =3D vfio_pci_class_init, .instance_init =3D vfio_pci_init, .instance_finalize =3D vfio_pci_finalize, }; --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758864970; cv=none; d=zohomail.com; s=zohoarc; b=NK3hB0L+zkDF5Vbc1J3BXDA8hX3lGL9WEwGJTnQErf0XM7IcA3u3cvnA1QrD4HUbcd93Jk8nTI5gqeUnCSN6/KhGMduSVfysLFuJyOKlyslIL0qgpem32fe4MsHmQ88ImrOFnkZInYAw9ns1zuBIy69reEky3zcBuVCprIL9M10= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758864970; 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=JvlRv+H7uhxPTWhVdBsDFV7mtJgY5M9MWvmUcXDqAME=; b=LdqVDTnOwuFCHlqQEt03MIm/Rh+XIMmdu4gZbQ+GuLKrko+LZAOu9LD3tGjtqfQAaTCFZhgkLejcx3pU3JufB0pJOCDsp/R85vPVNEWXjaXVnbAyZyVIWRd/kgGrtaLnI2L94c6E+/ROUC2LNpAHPndySia0RFhFOzMYN8826I4= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 175886497045873.64533766919669; Thu, 25 Sep 2025 22:36:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v216i-0008Pw-Kh; Fri, 26 Sep 2025 01:35:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v216g-0008PJ-Qx for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:58 -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 1v216d-0000uV-8u for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:34:58 -0400 Received: from mx-prod-mc-04.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-61-qr9oKZMtMLiQuxY-h51TpQ-1; Fri, 26 Sep 2025 01:34:46 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3F5441955F27; Fri, 26 Sep 2025 05:34:45 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 303051800452; Fri, 26 Sep 2025 05:34:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864890; 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=JvlRv+H7uhxPTWhVdBsDFV7mtJgY5M9MWvmUcXDqAME=; b=Y9VXsodP8JS5+x3aCs87c7NOUUvRZZeCuDbq/ofUTqkLl5kWXsCi5sKjJ+7hnu2OzwWXqy HPoAa3oyUUGxMaBxF42tbFGq7vbwn794HQEDRyanZP0Ca0bYvhq/gHK29fFhZmAwELbl4a hMvvXCMB2VCDgPCDhtWdT5B7TQNf1aI= X-MC-Unique: qr9oKZMtMLiQuxY-h51TpQ-1 X-Mimecast-MFC-AGG-ID: qr9oKZMtMLiQuxY-h51TpQ_1758864885 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 16/29] vfio/pci.c: rename vfio_pci_dev_info to vfio_pci_info Date: Fri, 26 Sep 2025 07:33:45 +0200 Message-ID: <20250926053358.308198-17-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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: 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: 1758864971777116600 From: Mark Cave-Ayland This changes the prefix to match the name of the QOM type. Signed-off-by: Mark Cave-Ayland Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-16-mark.cav= eayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 1fd087de3c90329037c6d8188b10547617bc5e41..479def72c5823da110cfb282bc8= 38e8ad897efad 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3912,7 +3912,7 @@ static void vfio_pci_class_init(ObjectClass *klass, c= onst void *data) "multifd channels"); } =20 -static const TypeInfo vfio_pci_dev_info =3D { +static const TypeInfo vfio_pci_info =3D { .name =3D TYPE_VFIO_PCI, .parent =3D TYPE_VFIO_PCI_BASE, .class_init =3D vfio_pci_class_init, @@ -3970,7 +3970,7 @@ static void register_vfio_pci_dev_type(void) vfio_pci_migration_multifd_transfer_prop.realized_set_allowed =3D true; =20 type_register_static(&vfio_pci_base_dev_info); - type_register_static(&vfio_pci_dev_info); + type_register_static(&vfio_pci_info); type_register_static(&vfio_pci_nohotplug_dev_info); } =20 --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758865426; cv=none; d=zohomail.com; s=zohoarc; b=YIl29AnFbnBFkNr2dk7RjiNRsnAJIGlN9dLT1zdqoC7HoVmDIVkAmR35vsZk9KulHKQKU2Ni0lRwoUqjVkJ0q99NV1sXh1TI0ZTzkuqd5d/PS4RNNXjbWmB/FNrpkKkIbuq2DOiZzQ7+gp7I27GF4/RWP8uMyo5OXDhlzZidhPg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758865426; 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=KVN0k2RrPLWXXDfFdGf1vq4Z+Id+iJdU/HgYiYWPMDw=; b=lEfJheSE9UXTKPwv2GhXA6jJcMQT6DqNZ3J8bd8MHhh6S8CQWIas04PWfaenyCunH5My3HGWC7Oo2lIS5pH8emdZShYHmEEmin1bRsgWqOs39iqz10A7wWL/v8OhjsfT/iQtU/fWVPDTZSbw37JzdcDax3S9vhLes76OrKyFUm0= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758865426962611.891392945127; Thu, 25 Sep 2025 22:43:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v216x-00009b-RP; Fri, 26 Sep 2025 01:35:15 -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 1v216k-0008Qo-En for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:35:03 -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 1v216d-0000uZ-Pi for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:35:02 -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-480-kZ1t7ufYPiaZpMad8-Mz9g-1; Fri, 26 Sep 2025 01:34:48 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 A408B1800290; Fri, 26 Sep 2025 05:34:47 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B58691800452; Fri, 26 Sep 2025 05:34:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864890; 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=KVN0k2RrPLWXXDfFdGf1vq4Z+Id+iJdU/HgYiYWPMDw=; b=dRVskXYAlXVk9HTGh2joxRCOcBu7RSZToXWRWX5b/eJOIjfae2D1LtwC9ilHWI+yvSkAbY /qqcIMhGdoKM+8HTh5NbYuebYgRBoBwzjPL3Kxqd3QBSy4R+GDBBNHmp2kJr+rAC1NURq4 3Ke7B6+YaePEDTqEyv7reOTuKEIc+Sk= X-MC-Unique: kZ1t7ufYPiaZpMad8-Mz9g-1 X-Mimecast-MFC-AGG-ID: kZ1t7ufYPiaZpMad8-Mz9g_1758864887 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 17/29] hw/vfio/types.h: rename TYPE_VFIO_PCI_BASE to TYPE_VFIO_PCI_DEVICE Date: Fri, 26 Sep 2025 07:33:46 +0200 Message-ID: <20250926053358.308198-18-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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: 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: 1758865427448116600 From: Mark Cave-Ayland This brings the QOM type name in line with the underlying VFIOPCIDevice str= ucture. Signed-off-by: Mark Cave-Ayland Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-17-mark.cav= eayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio/pci.h | 2 +- hw/vfio/types.h | 4 ++-- hw/s390x/s390-pci-vfio.c | 14 +++++++------- hw/vfio-user/pci.c | 13 +++++++------ hw/vfio/device.c | 2 +- hw/vfio/pci.c | 28 ++++++++++++++-------------- 6 files changed, 32 insertions(+), 31 deletions(-) diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h index e0aef82a8931c78a5504411a912acddda1fd6549..0f78cf9cdbf18924f8e3f9e43c4= 75a41e0ccd928 100644 --- a/hw/vfio/pci.h +++ b/hw/vfio/pci.h @@ -120,7 +120,7 @@ typedef struct VFIOMSIXInfo { MemoryRegion *pba_region; } VFIOMSIXInfo; =20 -OBJECT_DECLARE_SIMPLE_TYPE(VFIOPCIDevice, VFIO_PCI_BASE) +OBJECT_DECLARE_SIMPLE_TYPE(VFIOPCIDevice, VFIO_PCI_DEVICE) =20 struct VFIOPCIDevice { PCIDevice parent_obj; diff --git a/hw/vfio/types.h b/hw/vfio/types.h index c19334ff25ae2f5221f08ed863553ce7f8e3be98..5482d908088af7240e00c4e0cfe= 2e68e842c2520 100644 --- a/hw/vfio/types.h +++ b/hw/vfio/types.h @@ -9,11 +9,11 @@ #define HW_VFIO_VFIO_TYPES_H =20 /* - * TYPE_VFIO_PCI_BASE is an abstract type used to share code + * TYPE_VFIO_PCI_DEVICE is an abstract type used to share code * between VFIO implementations that use a kernel driver * with those that use user sockets. */ -#define TYPE_VFIO_PCI_BASE "vfio-pci-base" +#define TYPE_VFIO_PCI_DEVICE "vfio-pci-device" =20 #define TYPE_VFIO_PCI "vfio-pci" /* TYPE_VFIO_PCI shares struct VFIOPCIDevice. */ diff --git a/hw/s390x/s390-pci-vfio.c b/hw/s390x/s390-pci-vfio.c index 7760780aff7ae18034d8cbbb77c4d41ea95a6be5..9e31029d7acbe1f735a5c6b0c93= 7c923e5c00061 100644 --- a/hw/s390x/s390-pci-vfio.c +++ b/hw/s390x/s390-pci-vfio.c @@ -62,7 +62,7 @@ S390PCIDMACount *s390_pci_start_dma_count(S390pciState *s, { S390PCIDMACount *cnt; uint32_t avail; - VFIOPCIDevice *vpdev =3D VFIO_PCI_BASE(pbdev->pdev); + VFIOPCIDevice *vpdev =3D VFIO_PCI_DEVICE(pbdev->pdev); int id; =20 assert(vpdev); @@ -108,7 +108,7 @@ static void s390_pci_read_base(S390PCIBusDevice *pbdev, { struct vfio_info_cap_header *hdr; struct vfio_device_info_cap_zpci_base *cap; - VFIOPCIDevice *vpci =3D VFIO_PCI_BASE(pbdev->pdev); + VFIOPCIDevice *vpci =3D VFIO_PCI_DEVICE(pbdev->pdev); uint64_t vfio_size; =20 hdr =3D vfio_get_device_info_cap(info, VFIO_DEVICE_INFO_CAP_ZPCI_BASE); @@ -162,7 +162,7 @@ static bool get_host_fh(S390PCIBusDevice *pbdev, struct= vfio_device_info *info, { struct vfio_info_cap_header *hdr; struct vfio_device_info_cap_zpci_base *cap; - VFIOPCIDevice *vpci =3D VFIO_PCI_BASE(pbdev->pdev); + VFIOPCIDevice *vpci =3D VFIO_PCI_DEVICE(pbdev->pdev); =20 hdr =3D vfio_get_device_info_cap(info, VFIO_DEVICE_INFO_CAP_ZPCI_BASE); =20 @@ -185,7 +185,7 @@ static void s390_pci_read_group(S390PCIBusDevice *pbdev, struct vfio_device_info_cap_zpci_group *cap; S390pciState *s =3D s390_get_phb(); ClpRspQueryPciGrp *resgrp; - VFIOPCIDevice *vpci =3D VFIO_PCI_BASE(pbdev->pdev); + VFIOPCIDevice *vpci =3D VFIO_PCI_DEVICE(pbdev->pdev); uint8_t start_gid =3D pbdev->zpci_fn.pfgid; =20 hdr =3D vfio_get_device_info_cap(info, VFIO_DEVICE_INFO_CAP_ZPCI_GROUP= ); @@ -264,7 +264,7 @@ static void s390_pci_read_util(S390PCIBusDevice *pbdev, { struct vfio_info_cap_header *hdr; struct vfio_device_info_cap_zpci_util *cap; - VFIOPCIDevice *vpci =3D VFIO_PCI_BASE(pbdev->pdev); + VFIOPCIDevice *vpci =3D VFIO_PCI_DEVICE(pbdev->pdev); =20 hdr =3D vfio_get_device_info_cap(info, VFIO_DEVICE_INFO_CAP_ZPCI_UTIL); =20 @@ -291,7 +291,7 @@ static void s390_pci_read_pfip(S390PCIBusDevice *pbdev, { struct vfio_info_cap_header *hdr; struct vfio_device_info_cap_zpci_pfip *cap; - VFIOPCIDevice *vpci =3D VFIO_PCI_BASE(pbdev->pdev); + VFIOPCIDevice *vpci =3D VFIO_PCI_DEVICE(pbdev->pdev); =20 hdr =3D vfio_get_device_info_cap(info, VFIO_DEVICE_INFO_CAP_ZPCI_PFIP); =20 @@ -314,7 +314,7 @@ static void s390_pci_read_pfip(S390PCIBusDevice *pbdev, =20 static struct vfio_device_info *get_device_info(S390PCIBusDevice *pbdev) { - VFIOPCIDevice *vfio_pci =3D VFIO_PCI_BASE(pbdev->pdev); + VFIOPCIDevice *vfio_pci =3D VFIO_PCI_DEVICE(pbdev->pdev); =20 return vfio_get_device_info(vfio_pci->vbasedev.fd); } diff --git a/hw/vfio-user/pci.c b/hw/vfio-user/pci.c index e2c309784fec5feca635eb0f314f02eabb2dbf1f..efceae69dee09c6e0f695cf0851= 9c3644178f763 100644 --- a/hw/vfio-user/pci.c +++ b/hw/vfio-user/pci.c @@ -234,9 +234,10 @@ static void vfio_user_pci_realize(PCIDevice *pdev, Err= or **errp) { ERRP_GUARD(); VFIOUserPCIDevice *udev =3D VFIO_USER_PCI(pdev); - VFIOPCIDevice *vdev =3D VFIO_PCI_BASE(pdev); + VFIOPCIDevice *vdev =3D VFIO_PCI_DEVICE(pdev); VFIODevice *vbasedev =3D &vdev->vbasedev; const char *sock_name; + AddressSpace *as; SocketAddress addr; VFIOUserProxy *proxy; @@ -346,7 +347,7 @@ error: static void vfio_user_instance_init(Object *obj) { PCIDevice *pci_dev =3D PCI_DEVICE(obj); - VFIOPCIDevice *vdev =3D VFIO_PCI_BASE(obj); + VFIOPCIDevice *vdev =3D VFIO_PCI_DEVICE(obj); VFIODevice *vbasedev =3D &vdev->vbasedev; =20 device_add_bootindex_property(obj, &vdev->bootindex, @@ -371,7 +372,7 @@ static void vfio_user_instance_init(Object *obj) =20 static void vfio_user_instance_finalize(Object *obj) { - VFIOPCIDevice *vdev =3D VFIO_PCI_BASE(obj); + VFIOPCIDevice *vdev =3D VFIO_PCI_DEVICE(obj); VFIODevice *vbasedev =3D &vdev->vbasedev; =20 if (vdev->msix !=3D NULL) { @@ -387,7 +388,7 @@ static void vfio_user_instance_finalize(Object *obj) =20 static void vfio_user_pci_reset(DeviceState *dev) { - VFIOPCIDevice *vdev =3D VFIO_PCI_BASE(dev); + VFIOPCIDevice *vdev =3D VFIO_PCI_DEVICE(dev); VFIODevice *vbasedev =3D &vdev->vbasedev; =20 vfio_pci_pre_reset(vdev); @@ -421,7 +422,7 @@ static void vfio_user_pci_set_socket(Object *obj, Visit= or *v, const char *name, VFIOUserPCIDevice *udev =3D VFIO_USER_PCI(obj); bool success; =20 - if (VFIO_PCI_BASE(udev)->vbasedev.proxy) { + if (VFIO_PCI_DEVICE(udev)->vbasedev.proxy) { error_setg(errp, "Proxy is connected"); return; } @@ -464,7 +465,7 @@ static void vfio_user_pci_dev_class_init(ObjectClass *k= lass, const void *data) =20 static const TypeInfo vfio_user_pci_dev_info =3D { .name =3D TYPE_VFIO_USER_PCI, - .parent =3D TYPE_VFIO_PCI_BASE, + .parent =3D TYPE_VFIO_PCI_DEVICE, .instance_size =3D sizeof(VFIOUserPCIDevice), .class_init =3D vfio_user_pci_dev_class_init, .instance_init =3D vfio_user_instance_init, diff --git a/hw/vfio/device.c b/hw/vfio/device.c index 963cefc053d0959a173c7789801916dcacce552b..64f87503894791850b059b22576= 2fd45d85ee16c 100644 --- a/hw/vfio/device.c +++ b/hw/vfio/device.c @@ -423,7 +423,7 @@ bool vfio_device_hiod_create_and_realize(VFIODevice *vb= asedev, VFIODevice *vfio_get_vfio_device(Object *obj) { if (object_dynamic_cast(obj, TYPE_VFIO_PCI)) { - return &VFIO_PCI_BASE(obj)->vbasedev; + return &VFIO_PCI_DEVICE(obj)->vbasedev; } else { return NULL; } diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 479def72c5823da110cfb282bc838e8ad897efad..aa9d3e0354946451a526539bc29= 09a97175a633c 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -305,7 +305,7 @@ static void vfio_intx_update(VFIOPCIDevice *vdev, PCIIN= TxRoute *route) =20 static void vfio_intx_routing_notifier(PCIDevice *pdev) { - VFIOPCIDevice *vdev =3D VFIO_PCI_BASE(pdev); + VFIOPCIDevice *vdev =3D VFIO_PCI_DEVICE(pdev); PCIINTxRoute route; =20 if (vdev->interrupt !=3D VFIO_INT_INTx) { @@ -660,7 +660,7 @@ void vfio_pci_vector_init(VFIOPCIDevice *vdev, int nr) static int vfio_msix_vector_do_use(PCIDevice *pdev, unsigned int nr, MSIMessage *msg, IOHandler *handler) { - VFIOPCIDevice *vdev =3D VFIO_PCI_BASE(pdev); + VFIOPCIDevice *vdev =3D VFIO_PCI_DEVICE(pdev); VFIOMSIVector *vector; int ret; bool resizing =3D !!(vdev->nr_vectors < nr + 1); @@ -755,7 +755,7 @@ static int vfio_msix_vector_use(PCIDevice *pdev, =20 static void vfio_msix_vector_release(PCIDevice *pdev, unsigned int nr) { - VFIOPCIDevice *vdev =3D VFIO_PCI_BASE(pdev); + VFIOPCIDevice *vdev =3D VFIO_PCI_DEVICE(pdev); VFIOMSIVector *vector =3D &vdev->msi_vectors[nr]; =20 trace_vfio_msix_vector_release(vdev->vbasedev.name, nr); @@ -1346,7 +1346,7 @@ static const MemoryRegionOps vfio_vga_ops =3D { */ static void vfio_sub_page_bar_update_mapping(PCIDevice *pdev, int bar) { - VFIOPCIDevice *vdev =3D VFIO_PCI_BASE(pdev); + VFIOPCIDevice *vdev =3D VFIO_PCI_DEVICE(pdev); VFIORegion *region =3D &vdev->bars[bar].region; MemoryRegion *mmap_mr, *region_mr, *base_mr; PCIIORegion *r; @@ -1392,7 +1392,7 @@ static void vfio_sub_page_bar_update_mapping(PCIDevic= e *pdev, int bar) */ uint32_t vfio_pci_read_config(PCIDevice *pdev, uint32_t addr, int len) { - VFIOPCIDevice *vdev =3D VFIO_PCI_BASE(pdev); + VFIOPCIDevice *vdev =3D VFIO_PCI_DEVICE(pdev); VFIODevice *vbasedev =3D &vdev->vbasedev; uint32_t emu_bits =3D 0, emu_val =3D 0, phys_val =3D 0, val; =20 @@ -1426,7 +1426,7 @@ uint32_t vfio_pci_read_config(PCIDevice *pdev, uint32= _t addr, int len) void vfio_pci_write_config(PCIDevice *pdev, uint32_t addr, uint32_t val, int len) { - VFIOPCIDevice *vdev =3D VFIO_PCI_BASE(pdev); + VFIOPCIDevice *vdev =3D VFIO_PCI_DEVICE(pdev); VFIODevice *vbasedev =3D &vdev->vbasedev; uint32_t val_le =3D cpu_to_le32(val); int ret; @@ -3392,7 +3392,7 @@ bool vfio_pci_interrupt_setup(VFIOPCIDevice *vdev, Er= ror **errp) static void vfio_pci_realize(PCIDevice *pdev, Error **errp) { ERRP_GUARD(); - VFIOPCIDevice *vdev =3D VFIO_PCI_BASE(pdev); + VFIOPCIDevice *vdev =3D VFIO_PCI_DEVICE(pdev); VFIODevice *vbasedev =3D &vdev->vbasedev; int i; char uuid[UUID_STR_LEN]; @@ -3552,14 +3552,14 @@ error: =20 static void vfio_pci_finalize(Object *obj) { - VFIOPCIDevice *vdev =3D VFIO_PCI_BASE(obj); + VFIOPCIDevice *vdev =3D VFIO_PCI_DEVICE(obj); =20 vfio_pci_put_device(vdev); } =20 static void vfio_exitfn(PCIDevice *pdev) { - VFIOPCIDevice *vdev =3D VFIO_PCI_BASE(pdev); + VFIOPCIDevice *vdev =3D VFIO_PCI_DEVICE(pdev); VFIODevice *vbasedev =3D &vdev->vbasedev; =20 vfio_unregister_req_notifier(vdev); @@ -3583,7 +3583,7 @@ static void vfio_exitfn(PCIDevice *pdev) =20 static void vfio_pci_reset(DeviceState *dev) { - VFIOPCIDevice *vdev =3D VFIO_PCI_BASE(dev); + VFIOPCIDevice *vdev =3D VFIO_PCI_DEVICE(dev); =20 /* Do not reset the device during qemu_system_reset prior to cpr load = */ if (cpr_is_incoming()) { @@ -3628,7 +3628,7 @@ post_reset: static void vfio_pci_init(Object *obj) { PCIDevice *pci_dev =3D PCI_DEVICE(obj); - VFIOPCIDevice *vdev =3D VFIO_PCI_BASE(obj); + VFIOPCIDevice *vdev =3D VFIO_PCI_DEVICE(obj); VFIODevice *vbasedev =3D &vdev->vbasedev; =20 device_add_bootindex_property(obj, &vdev->bootindex, @@ -3669,7 +3669,7 @@ static void vfio_pci_base_dev_class_init(ObjectClass = *klass, const void *data) } =20 static const TypeInfo vfio_pci_base_dev_info =3D { - .name =3D TYPE_VFIO_PCI_BASE, + .name =3D TYPE_VFIO_PCI_DEVICE, .parent =3D TYPE_PCI_DEVICE, .instance_size =3D sizeof(VFIOPCIDevice), .abstract =3D true, @@ -3758,7 +3758,7 @@ static const Property vfio_pci_dev_properties[] =3D { #ifdef CONFIG_IOMMUFD static void vfio_pci_set_fd(Object *obj, const char *str, Error **errp) { - VFIOPCIDevice *vdev =3D VFIO_PCI_BASE(obj); + VFIOPCIDevice *vdev =3D VFIO_PCI_DEVICE(obj); vfio_device_set_fd(&vdev->vbasedev, str, errp); } #endif @@ -3914,7 +3914,7 @@ static void vfio_pci_class_init(ObjectClass *klass, c= onst void *data) =20 static const TypeInfo vfio_pci_info =3D { .name =3D TYPE_VFIO_PCI, - .parent =3D TYPE_VFIO_PCI_BASE, + .parent =3D TYPE_VFIO_PCI_DEVICE, .class_init =3D vfio_pci_class_init, .instance_init =3D vfio_pci_init, .instance_finalize =3D vfio_pci_finalize, --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758865422; cv=none; d=zohomail.com; s=zohoarc; b=iQL3/p6DU4RvSMZo+BgJqbut/ttwlXVXuSLoBfIv3aNs0QoZSQ566/rf6/0H90sShS7U915oOrmjwEHBy8xVKVvkWVteia/OF33FnPWCoabWd2zrAnqJARuvaqmJGQEDdw6MVCA1/lLIm7OKvidBIUtrOBia2sDcQjlB0id87qs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758865422; 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=ABmCirv5bsjfDo2HqN9coj+ZMdPYIOhlrfJLc6QMpi4=; b=Lj/dnyWjKLZCk6n7EtH9D23oaA/6/5Q1QwW60eHF16e7TJSLMmEblRxhWFTGoLVT8v7ABJ1snlYkLIjQUHuuzud6WB/K1dMvCbOUEc6LQJ/54oVkWyE71jfG/rcwGvli5XxnP1X+PMlOe6MN1KpavHIJud8IExzMvVCpg+CeglI= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758865422208861.3683206417186; Thu, 25 Sep 2025 22:43:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v216u-00006E-S0; Fri, 26 Sep 2025 01:35:13 -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 1v216k-0008Qn-Dl for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:35:03 -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 1v216f-0000vI-9U for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:35:02 -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-208-tmYTs-gyPWqTnB0H859GCA-1; Fri, 26 Sep 2025 01:34:50 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 ED373180034D; Fri, 26 Sep 2025 05:34:49 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 38FB11800452; Fri, 26 Sep 2025 05:34:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864894; 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=ABmCirv5bsjfDo2HqN9coj+ZMdPYIOhlrfJLc6QMpi4=; b=Y6hoRVvC1BVOy9hTWY1k8neMBOqO164qNTzjDXMWXK9/0rbxj2yF/oh/cuRt6nX73H6kQ9 IHxLk2I2y2jn52brjLCsj6dMD6AV1faslkLYqu10jGkcTql4d38n5Xg2NSkKk3/88JBs92 /aOtadznykd3RRO9/ME7fLbcT1Z179Q= X-MC-Unique: tmYTs-gyPWqTnB0H859GCA-1 X-Mimecast-MFC-AGG-ID: tmYTs-gyPWqTnB0H859GCA_1758864890 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 18/29] vfio/pci.c: rename vfio_pci_base_dev_class_init() to vfio_pci_device_class_init() Date: Fri, 26 Sep 2025 07:33:47 +0200 Message-ID: <20250926053358.308198-19-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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: 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: 1758865423431116600 From: Mark Cave-Ayland This changes the function prefix to match the name of the QOM type. Signed-off-by: Mark Cave-Ayland Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-18-mark.cav= eayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index aa9d3e0354946451a526539bc2909a97175a633c..9278b4671188fafadd5cf74fac7= 144173a252cb0 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3656,7 +3656,7 @@ static void vfio_pci_init(Object *obj) pci_dev->cap_present |=3D QEMU_PCI_SKIP_RESET_ON_CPR; } =20 -static void vfio_pci_base_dev_class_init(ObjectClass *klass, const void *d= ata) +static void vfio_pci_device_class_init(ObjectClass *klass, const void *dat= a) { DeviceClass *dc =3D DEVICE_CLASS(klass); PCIDeviceClass *pdc =3D PCI_DEVICE_CLASS(klass); @@ -3673,7 +3673,7 @@ static const TypeInfo vfio_pci_base_dev_info =3D { .parent =3D TYPE_PCI_DEVICE, .instance_size =3D sizeof(VFIOPCIDevice), .abstract =3D true, - .class_init =3D vfio_pci_base_dev_class_init, + .class_init =3D vfio_pci_device_class_init, .interfaces =3D (const InterfaceInfo[]) { { INTERFACE_PCIE_DEVICE }, { INTERFACE_CONVENTIONAL_PCI_DEVICE }, --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758865395; cv=none; d=zohomail.com; s=zohoarc; b=fZ691/TDHUpwfRL0jGEWdaL+9kGetM/zLpR6bRLuZ06LMSGasbivTnZvI7RkS0YZVZFc2o5xbLLDfKvk+kUeTGSCwQUK4ubgOgluzf46vwEcKN9BEhx+03O36FH/EZPZSas6O7YypvOOI7u/I2DSFJbRUGYdy0MpG6s36aLycHg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758865395; 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=skA7DWVng7loyVA646bHvWT/rFbMJa+bdJTvilowLF8=; b=aUR6UBvJ6mAuemENHAHeZ7cZAW9Xrp7jSHohwcpktd9HhnGt4UArwV2NaHjbpHYE4vzLC9sj+Zh8vTyn6JTOis3uT5gvAO1brfVTlVaeI56dBO2TgXVhZW9dgeJIaH24773Bo8Wxp7cCBy2XgasxoNCqVJD4nnNT4oW+JRdn/7A= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758865395399188.25016781260604; Thu, 25 Sep 2025 22:43:15 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v2170-0000Ak-R4; Fri, 26 Sep 2025 01:35:18 -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 1v216s-000064-Oz for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:35:10 -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 1v216i-0000vk-PC for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:35:10 -0400 Received: from mx-prod-mc-02.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-323-Dd3jDTt4PvmyBvsCcLAq4w-1; Fri, 26 Sep 2025 01:34:53 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 494991956089; Fri, 26 Sep 2025 05:34:52 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8234E1800452; Fri, 26 Sep 2025 05:34:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864896; 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=skA7DWVng7loyVA646bHvWT/rFbMJa+bdJTvilowLF8=; b=J3nEZa5M1sht1QYqlJ65OaTg16y9UkwBq4Rvcu9ZHHy/jsU4R7BSAw2PV03vgL8QbqmKOg BXr/2tdXJuZ31kHFif+d+V/6HhUVWkRf2R8grkMRLz5XrF7WFEQ/zSQFcpOYEw457tuvfl hJJ4PaLIHyD239GFlRldG0cRvWpwZRE= X-MC-Unique: Dd3jDTt4PvmyBvsCcLAq4w-1 X-Mimecast-MFC-AGG-ID: Dd3jDTt4PvmyBvsCcLAq4w_1758864892 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 19/29] vfio/pci.c: rename vfio_pci_base_dev_info to vfio_pci_device_info Date: Fri, 26 Sep 2025 07:33:48 +0200 Message-ID: <20250926053358.308198-20-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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: 1758865396857116600 From: Mark Cave-Ayland This changes the prefix to match the name of the QOM type. Signed-off-by: Mark Cave-Ayland Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-19-mark.cav= eayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 9278b4671188fafadd5cf74fac7144173a252cb0..6c4c47825bcea3146b7adb1032a= 578f8adba25a0 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3668,7 +3668,7 @@ static void vfio_pci_device_class_init(ObjectClass *k= lass, const void *data) pdc->config_write =3D vfio_pci_write_config; } =20 -static const TypeInfo vfio_pci_base_dev_info =3D { +static const TypeInfo vfio_pci_device_info =3D { .name =3D TYPE_VFIO_PCI_DEVICE, .parent =3D TYPE_PCI_DEVICE, .instance_size =3D sizeof(VFIOPCIDevice), @@ -3969,7 +3969,7 @@ static void register_vfio_pci_dev_type(void) vfio_pci_migration_multifd_transfer_prop =3D qdev_prop_on_off_auto; vfio_pci_migration_multifd_transfer_prop.realized_set_allowed =3D true; =20 - type_register_static(&vfio_pci_base_dev_info); + type_register_static(&vfio_pci_device_info); type_register_static(&vfio_pci_info); type_register_static(&vfio_pci_nohotplug_dev_info); } --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758865352; cv=none; d=zohomail.com; s=zohoarc; b=Z/6zmMigldXInQ4u7d4Pn5SsT5Qc5ZAaEAN3Vx7NbPb2Ec/pst4BtKjbtU8JXX+W+o95XiL4yHFev8q1ua8ZV2A4/fdJC4yydgorVX2+ZnX8G2MDNNP8ua0EfH999gjuDn29MaGspn6QNaHHPJldIvoOnDqdSjBzD7Houio4E/o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758865352; 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=ZxSfLnQxvYeY6ij0Pe6IkNgyhRMHvkshg7eETKEDfXA=; b=JhnU//qr91kQHRgJSnD0lgUsn6wN3Y2JHa399vskBlTbgIvazM5MAIpSvZ0YZvx/HdSY2KTl1aAxmHMUqBpbxLp05nzW4RkkVPuHY1dEx6YcnI+KNUxWHdWpWxgoWebzFAUteKLArO8o7OJSPgkP2YNzgui8iEBkpIjB4aXxkJM= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758865352427545.8724514090329; Thu, 25 Sep 2025 22:42:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v2171-0000Ab-Ee; Fri, 26 Sep 2025 01:35:19 -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 1v216v-00007i-Ob for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:35:14 -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 1v216k-0000wM-Dz for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:35:12 -0400 Received: from mx-prod-mc-02.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-357-XIik8lYaNuWxA4SzwP6hWA-1; Fri, 26 Sep 2025 01:34:55 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1BBE1195608A; Fri, 26 Sep 2025 05:34:55 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D257B1800452; Fri, 26 Sep 2025 05:34:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864898; 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=ZxSfLnQxvYeY6ij0Pe6IkNgyhRMHvkshg7eETKEDfXA=; b=DqHMyIrB+X7ZguDhyXKC/ofd5IFV9JhQzNc5uf8Y6yfFSw3APch9c2E/o3xLH6eFarbfYJ +JsJCanok5T3SNu7GGyXGJKSqCCWmANXFXOG+GgJqBjnP0m/TDJNlnCTCY5ZpWEZ1K81X1 Z8yEk5DQhhhj2OHfZe2bK/ZyqdwqHao= X-MC-Unique: XIik8lYaNuWxA4SzwP6hWA-1 X-Mimecast-MFC-AGG-ID: XIik8lYaNuWxA4SzwP6hWA_1758864895 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 20/29] vfio/pci.c: rename vfio_pci_dev_properties[] to vfio_pci_properties[] Date: Fri, 26 Sep 2025 07:33:49 +0200 Message-ID: <20250926053358.308198-21-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=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_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=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: 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: 1758865354435116600 From: Mark Cave-Ayland This changes the prefix to match the name of the QOM type. Signed-off-by: Mark Cave-Ayland Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-20-mark.cav= eayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 6c4c47825bcea3146b7adb1032a578f8adba25a0..9c3bb3725ccbb34511de02f69a6= a781619696c1d 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3683,7 +3683,7 @@ static const TypeInfo vfio_pci_device_info =3D { =20 static PropertyInfo vfio_pci_migration_multifd_transfer_prop; =20 -static const Property vfio_pci_dev_properties[] =3D { +static const Property vfio_pci_properties[] =3D { DEFINE_PROP_PCI_HOST_DEVADDR("host", VFIOPCIDevice, host), DEFINE_PROP_UUID_NODEFAULT("vf-token", VFIOPCIDevice, vf_token), DEFINE_PROP_STRING("sysfsdev", VFIOPCIDevice, vbasedev.sysfsdev), @@ -3769,7 +3769,7 @@ static void vfio_pci_class_init(ObjectClass *klass, c= onst void *data) PCIDeviceClass *pdc =3D PCI_DEVICE_CLASS(klass); =20 device_class_set_legacy_reset(dc, vfio_pci_reset); - device_class_set_props(dc, vfio_pci_dev_properties); + device_class_set_props(dc, vfio_pci_properties); #ifdef CONFIG_IOMMUFD object_class_property_add_str(klass, "fd", NULL, vfio_pci_set_fd); #endif --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758865384; cv=none; d=zohomail.com; s=zohoarc; b=SEBRoFJyxmpsFs+IqXAebCFNQpU8wMXL7HFBevcxMi7JItvlsNLURglyJzzt151lX+B8LldpSfJONPyOPkeOZ6vGz9Y0iqIuWyWmc8JCUNdqJXNWPjQB7eLJvTu8eNb3hbLbK3zNT7/7Pgq2vMw8/bjqCzdzGOfmtLX+U/BeR/c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758865384; 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=Jl395112lMx2yc8mwgCegrKeh0bk0oZNQoFxaEBXyCM=; b=XlAJMJqdIM+YbiZozfa+7PaW23W0zsFvpw9tXZkp99TZsboerLliNuESENUXEvH8OdXWYdUeNKC8mWCYGo8VIlKqz4O/EheEWB+MEgHpc7TNML1RYRtjMs3O34eUm6c9jZvmsjPj/r6ca1NzINcOWVuZTW4qEs+qsua94a51C1g= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758865384189253.69264699040173; Thu, 25 Sep 2025 22:43:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v2174-0000BV-1K; Fri, 26 Sep 2025 01:35:22 -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 1v216u-00007m-W5 for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:35:14 -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 1v216p-0000wr-1y for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:35:11 -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-568-4Ti5sesLMnea0Zw03ATTzA-1; Fri, 26 Sep 2025 01:34:58 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 76D271800447; Fri, 26 Sep 2025 05:34:57 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A813D1800579; Fri, 26 Sep 2025 05:34:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864900; 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=Jl395112lMx2yc8mwgCegrKeh0bk0oZNQoFxaEBXyCM=; b=YIPkkMGq5SJ31kS8CRNJFMlzbMIcJ7VQVWnDtDU0DtyMrEF5KVX1ejuKfaM6A36XpdMLsx 6b8AxcO7pyc4IriAmE21PiAz/EjeRBZpiC4uV25hSz0s5OyT7lFtAcvluMRMFlLRDE1tic sAGh0+W7YTBpFrTKHG5O8Qrlar5qkHw= X-MC-Unique: 4Ti5sesLMnea0Zw03ATTzA-1 X-Mimecast-MFC-AGG-ID: 4Ti5sesLMnea0Zw03ATTzA_1758864897 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 21/29] vfio/pci.c: rename vfio_pci_dev_nohotplug_properties[] to vfio_pci_nohotplug_properties[] Date: Fri, 26 Sep 2025 07:33:50 +0200 Message-ID: <20250926053358.308198-22-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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: 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: 1758865384715116600 From: Mark Cave-Ayland This changes the prefix to match the name of the QOM type. Signed-off-by: Mark Cave-Ayland Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-21-mark.cav= eayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 9c3bb3725ccbb34511de02f69a6a781619696c1d..6b3c97c56c9c27a9c65cf62e630= 0e51be1920888 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3920,7 +3920,7 @@ static const TypeInfo vfio_pci_info =3D { .instance_finalize =3D vfio_pci_finalize, }; =20 -static const Property vfio_pci_dev_nohotplug_properties[] =3D { +static const Property vfio_pci_nohotplug_properties[] =3D { DEFINE_PROP_BOOL("ramfb", VFIOPCIDevice, enable_ramfb, false), DEFINE_PROP_BOOL("use-legacy-x86-rom", VFIOPCIDevice, use_legacy_x86_rom, false), @@ -3933,7 +3933,7 @@ static void vfio_pci_nohotplug_dev_class_init(ObjectC= lass *klass, { DeviceClass *dc =3D DEVICE_CLASS(klass); =20 - device_class_set_props(dc, vfio_pci_dev_nohotplug_properties); + device_class_set_props(dc, vfio_pci_nohotplug_properties); dc->hotpluggable =3D false; =20 object_class_property_set_description(klass, /* 3.1 */ --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758864972; cv=none; d=zohomail.com; s=zohoarc; b=E7I3C0GNVpo9D6Inec3G+zx+DLBUldEXPxp4zM3hY5sr6IgdP5gvufy7ouSwyK0BwczOZCeQsFY03g+WJQcSjDgmhbbGnaSqMmBgHXLui4nCkoptis3JJe4pTg9a/mKcEA1K4IMJ8CrnTzci4Ge5si02yHUtuIQwZTwJgUIJcDo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758864972; 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=Hcmz/yC975huouV/V4td/JhqdAYi1APcci3Z3Ovsan4=; b=QW0u75OhfsiOUtGn7hMAFdfAFXp5u+lcfl98yBHaVO8Mz7kkGaMSKsHbKLoZLeYMpWvyhKc9YyxRKWA5soAUM1YMWBB7oMDi13vCLHTbnErStZKE5XtiRxJBSuAvcADx/+c93+DMaGPZgUgGmjVJZihCWKtrMUnJYCzPO/4FcyY= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758864972195929.1727002479522; Thu, 25 Sep 2025 22:36:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v2178-0000CF-3T; Fri, 26 Sep 2025 01:35:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v2175-0000Bd-Bt for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:35:23 -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 1v216p-00018x-W9 for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:35:21 -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-31-g0NjThSJNt29LbGRX-cYgA-1; Fri, 26 Sep 2025 01:35:00 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 CBE29180034A; Fri, 26 Sep 2025 05:34:59 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0F2A11800579; Fri, 26 Sep 2025 05:34:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864904; 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=Hcmz/yC975huouV/V4td/JhqdAYi1APcci3Z3Ovsan4=; b=DOyzv/cwiiwd9KfV1MEZdvvjs0lrRl0tulMyrtBtd9cMukZJc7GwKEt/+piYKxZWtzWZJ6 jdqp2N1oifZL8bAdao+G7oVcXrSC0ouBygyt7LpgaO3fI1KJBka+sHrQFvZTnRqBB/MRmQ Xm0Z9SWSKgYx7yfuGFXUL+u/Ladytqs= X-MC-Unique: g0NjThSJNt29LbGRX-cYgA-1 X-Mimecast-MFC-AGG-ID: g0NjThSJNt29LbGRX-cYgA_1758864899 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 22/29] vfio/pci.c: rename vfio_pci_nohotplug_dev_class_init() to vfio_pci_nohotplug_class_init() Date: Fri, 26 Sep 2025 07:33:51 +0200 Message-ID: <20250926053358.308198-23-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, T_SPF_TEMPERROR=0.01 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 @redhat.com) X-ZM-MESSAGEID: 1758864973659116600 From: Mark Cave-Ayland This changes the function prefix to match the name of the QOM type. Signed-off-by: Mark Cave-Ayland Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-22-mark.cav= eayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 6b3c97c56c9c27a9c65cf62e6300e51be1920888..10313edc7ed7e6f9cd94386e7a2= a8cd3329aa7ea 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3928,7 +3928,7 @@ static const Property vfio_pci_nohotplug_properties[]= =3D { ON_OFF_AUTO_AUTO), }; =20 -static void vfio_pci_nohotplug_dev_class_init(ObjectClass *klass, +static void vfio_pci_nohotplug_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); @@ -3953,7 +3953,7 @@ static const TypeInfo vfio_pci_nohotplug_dev_info =3D= { .name =3D TYPE_VFIO_PCI_NOHOTPLUG, .parent =3D TYPE_VFIO_PCI, .instance_size =3D sizeof(VFIOPCIDevice), - .class_init =3D vfio_pci_nohotplug_dev_class_init, + .class_init =3D vfio_pci_nohotplug_class_init, }; =20 static void register_vfio_pci_dev_type(void) --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758865409; cv=none; d=zohomail.com; s=zohoarc; b=JeuIToi74NoMUW5qaV4SDs3anWRbWby3/mFyPSqLFSx/kb0RDECvpMa7BLH5/je9R3CjFfglsQwbz14RDrSuU7RHliiAX5eE0i151J+cR9JWTikNYAKPdDjIOs4W4RpDi0yXnpjMZ2OOoEj6XJ8G2aGmrQTz5k3Yy1qtMUIGlpY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758865409; 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=tsnOOrswnvV0LJKEiq4ll7sdLB1IbbwEN2h/VBVRBCg=; b=Tprn/b4uOpMTY3iKscxphzriYUeyDvJLkaBQZcwHiK/swxknNuMwj9JdyR6j0+esFBtgl4hr+FJgwRX5gAoyAdKnkeirvl26+C8ESvWHu0ft/vkiSRbVwLJHHVasSGaqt/1ICT8LgijYL8kgzHxCpAWShoHTAf92yL+OoQJ9u+I= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758865409347903.5494729486795; Thu, 25 Sep 2025 22:43:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v2174-0000Bn-RP; Fri, 26 Sep 2025 01:35:22 -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 1v216z-0000A3-Qs for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:35:18 -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 1v216p-000193-WA for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:35:16 -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-255-Rrj1A8CAPCucH5b86ivFig-1; Fri, 26 Sep 2025 01:35:03 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 33880180048E; Fri, 26 Sep 2025 05:35:02 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 67CE51800579; Fri, 26 Sep 2025 05:35:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864905; 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=tsnOOrswnvV0LJKEiq4ll7sdLB1IbbwEN2h/VBVRBCg=; b=ElhmcXWaDRVxPa3POkmgFVNlcxxSBuw7CnGk/u1EwvRPh4ryY13Y+Y2rsf4ew/2eaDFz8T XOODihDMqBKpdq0Arms6JI4BJzBoO+Pnf2E5I2hrD0eIDWbbtz3JhJzGlhO9xm7nO0Vla1 o+cQJitCqZ0Sl7NUfbVvoGxMWVeaFRM= X-MC-Unique: Rrj1A8CAPCucH5b86ivFig-1 X-Mimecast-MFC-AGG-ID: Rrj1A8CAPCucH5b86ivFig_1758864902 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 23/29] vfio/pci.c: rename vfio_pci_nohotplug_dev_info to vfio_pci_nohotplug_info Date: Fri, 26 Sep 2025 07:33:52 +0200 Message-ID: <20250926053358.308198-24-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=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: 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: 1758865411020116600 From: Mark Cave-Ayland This changes the prefix to match the name of the QOM type. Signed-off-by: Mark Cave-Ayland Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-23-mark.cav= eayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 10313edc7ed7e6f9cd94386e7a2a8cd3329aa7ea..5b022da19ef866cbe27845fe1f9= fe5de64fece32 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3949,7 +3949,7 @@ static void vfio_pci_nohotplug_class_init(ObjectClass= *klass, "Controls loading of a legacy VG= A BIOS ROM"); } =20 -static const TypeInfo vfio_pci_nohotplug_dev_info =3D { +static const TypeInfo vfio_pci_nohotplug_info =3D { .name =3D TYPE_VFIO_PCI_NOHOTPLUG, .parent =3D TYPE_VFIO_PCI, .instance_size =3D sizeof(VFIOPCIDevice), @@ -3971,7 +3971,7 @@ static void register_vfio_pci_dev_type(void) =20 type_register_static(&vfio_pci_device_info); type_register_static(&vfio_pci_info); - type_register_static(&vfio_pci_nohotplug_dev_info); + type_register_static(&vfio_pci_nohotplug_info); } =20 type_init(register_vfio_pci_dev_type) --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758865283; cv=none; d=zohomail.com; s=zohoarc; b=MHrV84A3sH5ktoeuYCH52Jc49MiANFCU4Nvf+NSEdv5RoIove/WIBCSuI849rFGgyKiFAxC2uQ4F+N9/mI6/SyrO9vhnytcm5yr/v/Y5LSIsN5Vo9qra8300q1Uc/CjYK7uch2TlXqSeeBcc1uXkgOPgg5MHIKX8/mVL8A4zNMI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758865283; 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=moU8WQj81FgmaKPMmYGIKF+mpVJ5cBw4y7oMHqq6U+M=; b=En/wW/652udl/vUzF4+Uvuwi7tp1ax4YyGMbXJ5Li0M1D8A8JVhbtLIl2WN4ZD/5YTqAkOz7XL9bZPPcXknfqDVVIntjk/zclpwMa2OBKd8sdXYJfkWODBCxR+VF01U/sCymvCwWuH1IsyC0oRDlcNb80qpSfM63ccnI99bQuDQ= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758865283054603.5799017590191; Thu, 25 Sep 2025 22:41:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v217B-0000H2-6J; Fri, 26 Sep 2025 01:35:29 -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 1v2179-0000Ck-2w for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:35:27 -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 1v216u-00019q-W6 for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:35:26 -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-126-FLs9xJVyNoOWrmaW2cj_ww-1; Fri, 26 Sep 2025 01:35:05 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 91A69180048E; Fri, 26 Sep 2025 05:35:04 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id BE4461800579; Fri, 26 Sep 2025 05:35:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864909; 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=moU8WQj81FgmaKPMmYGIKF+mpVJ5cBw4y7oMHqq6U+M=; b=aZUdDz+UqkU9bg9U5CURCQ5wdZqUeBHYWvsZY2R2s/Xx6uaR9/Xbdg52/9t4OGeYhvcG6o J+AgPrqDYOwV6UD8AwsudrFJbetHYQ8opaOVAAXuEvUo5j35UGoudXlkog02ev+R85hLCF pKVoYLKA2OmgNTNlVt4MX2poTYVt4n8= X-MC-Unique: FLs9xJVyNoOWrmaW2cj_ww-1 X-Mimecast-MFC-AGG-ID: FLs9xJVyNoOWrmaW2cj_ww_1758864904 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 24/29] vfio-user/pci.c: rename vfio_user_pci_dev_class_init() to vfio_user_pci_class_init() Date: Fri, 26 Sep 2025 07:33:53 +0200 Message-ID: <20250926053358.308198-25-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, T_SPF_TEMPERROR=0.01 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 @redhat.com) X-ZM-MESSAGEID: 1758865283606116600 From: Mark Cave-Ayland This changes the function prefix to match the name of the QOM type. Signed-off-by: Mark Cave-Ayland Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-24-mark.cav= eayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio-user/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio-user/pci.c b/hw/vfio-user/pci.c index efceae69dee09c6e0f695cf08519c3644178f763..e2c5b5744c410d2bb532fb68075= a4c4ba93fde43 100644 --- a/hw/vfio-user/pci.c +++ b/hw/vfio-user/pci.c @@ -446,7 +446,7 @@ static void vfio_user_pci_set_socket(Object *obj, Visit= or *v, const char *name, } } =20 -static void vfio_user_pci_dev_class_init(ObjectClass *klass, const void *d= ata) +static void vfio_user_pci_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); PCIDeviceClass *pdc =3D PCI_DEVICE_CLASS(klass); @@ -467,7 +467,7 @@ static const TypeInfo vfio_user_pci_dev_info =3D { .name =3D TYPE_VFIO_USER_PCI, .parent =3D TYPE_VFIO_PCI_DEVICE, .instance_size =3D sizeof(VFIOUserPCIDevice), - .class_init =3D vfio_user_pci_dev_class_init, + .class_init =3D vfio_user_pci_class_init, .instance_init =3D vfio_user_instance_init, .instance_finalize =3D vfio_user_instance_finalize, }; --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758865283; cv=none; d=zohomail.com; s=zohoarc; b=I2BF+hZnTzRZ+zdJkEsta635FiG56A6k7FS98n1Ehmx5GfZ0WjY0EVMxyCorPQbFRd0fQi5nhvWa6Z4UUz8r42bW1dON0RXzBKCH5y69H5Qal769PMpeGUc6Idf5RlZqoFAb5cMqN4NrJns959k1OoYmm3CrcFRbxrJf/mwXG+Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758865283; 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=5VTd0HBOnVlMx9kQ3XHypHuH/L0Yt23pMNKs+dB7pes=; b=FoZxZD2TEz1WMOizTD6AKNXuVPWewE8Sy/M/PRpUyxSu842Gv0Jmg6x58VfAwe/vz6XnQVg+ifp0cj5ZQV+BCX0RKl4WIY+/JL5F9iiA2gDvQXwk5fS7yf+OX4zOis2+AqpuJ4X7Zco55ZpO9arsT1p7MBP8zSN//rU1sRsHTms= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758865283562790.2041407107571; Thu, 25 Sep 2025 22:41:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v217G-0000NX-6l; Fri, 26 Sep 2025 01:35:35 -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 1v217E-0000MA-4Q for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:35:32 -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 1v216y-00019w-R0 for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:35:31 -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-130-2DpHJvQiPPe_WC7PaIzbwQ-1; Fri, 26 Sep 2025 01:35:08 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 1F5611800366; Fri, 26 Sep 2025 05:35:07 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2AC4B180057C; Fri, 26 Sep 2025 05:35:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864909; 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=5VTd0HBOnVlMx9kQ3XHypHuH/L0Yt23pMNKs+dB7pes=; b=YlzSakeiEOHYMjQ+8//Qx7+7Y/+Gxv4OLsD1H7JZ1G7sXUjkJDSYJe0LQjvA60UZl1M6hf H4YZEeHdaI04zORj8XTr+acDrRtAnRsRe+tjvuPNSd6eG40EEmdfvD8amuY2O7dkdCp5LD A7N0qdi/kGO/gdjsfVJzSTdr/FHZMrA= X-MC-Unique: 2DpHJvQiPPe_WC7PaIzbwQ-1 X-Mimecast-MFC-AGG-ID: 2DpHJvQiPPe_WC7PaIzbwQ_1758864907 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 25/29] vfio-user/pci.c: rename vfio_user_pci_dev_properties[] to vfio_user_pci_properties[] Date: Fri, 26 Sep 2025 07:33:54 +0200 Message-ID: <20250926053358.308198-26-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, T_SPF_HELO_TEMPERROR=0.01, T_SPF_TEMPERROR=0.01 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 @redhat.com) X-ZM-MESSAGEID: 1758865285536116600 From: Mark Cave-Ayland This changes the prefix to match the name of the QOM type. Signed-off-by: Mark Cave-Ayland Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-25-mark.cav= eayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio-user/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio-user/pci.c b/hw/vfio-user/pci.c index e2c5b5744c410d2bb532fb68075a4c4ba93fde43..30f485fdbb12a8e45dbadff4d24= ed5e58e093d8a 100644 --- a/hw/vfio-user/pci.c +++ b/hw/vfio-user/pci.c @@ -400,7 +400,7 @@ static void vfio_user_pci_reset(DeviceState *dev) vfio_pci_post_reset(vdev); } =20 -static const Property vfio_user_pci_dev_properties[] =3D { +static const Property vfio_user_pci_properties[] =3D { DEFINE_PROP_UINT32("x-pci-vendor-id", VFIOPCIDevice, vendor_id, PCI_ANY_ID), DEFINE_PROP_UINT32("x-pci-device-id", VFIOPCIDevice, @@ -452,7 +452,7 @@ static void vfio_user_pci_class_init(ObjectClass *klass= , const void *data) PCIDeviceClass *pdc =3D PCI_DEVICE_CLASS(klass); =20 device_class_set_legacy_reset(dc, vfio_user_pci_reset); - device_class_set_props(dc, vfio_user_pci_dev_properties); + device_class_set_props(dc, vfio_user_pci_properties); =20 object_class_property_add(klass, "socket", "SocketAddress", NULL, vfio_user_pci_set_socket, NULL, NULL); --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758865334; cv=none; d=zohomail.com; s=zohoarc; b=cZvscAO93THhGnSxe/1M66HksMmuUqpF7HRdHV4v8EIqXifzSZOfpDu/ssXV4Dh1B/CjX+EAAhcA+ppp+iwC6TjnRsSrWV8lIBNt7wlKO3rRWQdxbJGpZu/K+J10eQCoHiJSNDrA9B+uIav8MYTADHEbEVvZyscQtLJ5psiMzJs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758865334; 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=3K47UzTq0BjAvETg7kOvL+BSOu9CHwWVFj3Iiukz+t4=; b=kKGpTssnuvyR2G4UJJm7CzlffQFpL0zYOlPvcHfa8SvDjq+nZiSjLhxk9QK+Oyqzs4NWT1JClDszMuu5NzUeM5+JFEC6B50vT0wm8RbqZ4w/vKGf7YWffbTxKirUZPfBqYk0ITRImY8xE+UUozv0BJak0QhsYiL1tGLfqyzjvT0= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758865334846594.2081612937925; Thu, 25 Sep 2025 22:42:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v217B-0000HY-NM; Fri, 26 Sep 2025 01:35:30 -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 1v2178-0000Ca-Fj for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:35:27 -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 1v216z-0001AY-1w for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:35:25 -0400 Received: from mx-prod-mc-02.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-604-9xwJ-FN4NsOt5fGUevjyBA-1; Fri, 26 Sep 2025 01:35:10 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 77E7D1956086; Fri, 26 Sep 2025 05:35:09 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B51801800579; Fri, 26 Sep 2025 05:35:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864912; 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=3K47UzTq0BjAvETg7kOvL+BSOu9CHwWVFj3Iiukz+t4=; b=Pc6acuDs53xM10zvfx/bDPXuxx3TbSGv0cLZrSoxznd14aFtYkW7PVkxZTrEfRudoOqDqr w2AqOq3WGttHCJxFvg4c5s+v9qwNQBkmU9CQRKVcDbETjioOjQ/agbwfklaTu0n7+PnkFT GFBUoYdZ44kAnZEk0RVbzRW2NU/ry0s= X-MC-Unique: 9xwJ-FN4NsOt5fGUevjyBA-1 X-Mimecast-MFC-AGG-ID: 9xwJ-FN4NsOt5fGUevjyBA_1758864909 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 26/29] vfio-user/pci.c: rename vfio_user_instance_init() to vfio_user_pci_init() Date: Fri, 26 Sep 2025 07:33:55 +0200 Message-ID: <20250926053358.308198-27-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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: 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: 1758865336353116600 From: Mark Cave-Ayland This is the more typical naming convention for QOM init() functions, in particular it changes the prefix to match the name of the QOM type. Signed-off-by: Mark Cave-Ayland Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-26-mark.cav= eayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio-user/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio-user/pci.c b/hw/vfio-user/pci.c index 30f485fdbb12a8e45dbadff4d24ed5e58e093d8a..52561900fdf000b6fbb5a1fece2= 560a0796a1048 100644 --- a/hw/vfio-user/pci.c +++ b/hw/vfio-user/pci.c @@ -344,7 +344,7 @@ error: vfio_pci_put_device(vdev); } =20 -static void vfio_user_instance_init(Object *obj) +static void vfio_user_pci_init(Object *obj) { PCIDevice *pci_dev =3D PCI_DEVICE(obj); VFIOPCIDevice *vdev =3D VFIO_PCI_DEVICE(obj); @@ -468,7 +468,7 @@ static const TypeInfo vfio_user_pci_dev_info =3D { .parent =3D TYPE_VFIO_PCI_DEVICE, .instance_size =3D sizeof(VFIOUserPCIDevice), .class_init =3D vfio_user_pci_class_init, - .instance_init =3D vfio_user_instance_init, + .instance_init =3D vfio_user_pci_init, .instance_finalize =3D vfio_user_instance_finalize, }; =20 --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758865423; cv=none; d=zohomail.com; s=zohoarc; b=cCX6bEoQStepzZ9+bbw8S0SAzbNRBBD55dGYNmlPk6I+oXC/reQ909zvkFNIVGaxM2hRsl0Wh53DZoXRD/WpnE8gEE+/JVSzVnLdAzALjioJ+iuR5+pxC4GsIZ5ajplBE6j9lLIlMnYF012WXKSLEvCGZECVfThJypVgk5ElYC4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758865423; 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=NaIqXj+JY3w58y2sqHqzSVycyP4B3TTcmoyZf2Ndg1Q=; b=Jczv4BLfwqAeKRFIOaiDYJ6MjGHdI2Ky8n2ztoKX3/Lu/CB1E4LGWi/Fsb8nDMUgIlGyj9WLCPQBEocMHSSY7XG9O4oI6B9DV6RliJjCU1o+NZGhWMBoJhlPQzS1dpxsZIquvIewGPExn1KGeizWtFk225Iuw6Urr8JnpahbWWM= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758865423403325.3315738670698; Thu, 25 Sep 2025 22:43:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v217R-0000Ww-Tu; Fri, 26 Sep 2025 01:35:46 -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 1v217J-0000Oj-OH for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:35:39 -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 1v2171-0001BD-ME for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:35:35 -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-213-gYOFaP0zP1Sl6CcG6UTg4A-1; Fri, 26 Sep 2025 01:35:13 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 45B801800366; Fri, 26 Sep 2025 05:35:12 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0B4EB1800452; Fri, 26 Sep 2025 05:35:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864915; 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=NaIqXj+JY3w58y2sqHqzSVycyP4B3TTcmoyZf2Ndg1Q=; b=g51NLgNxsi0lPVfZiOyD6IEIIIYnZuPssWFxxfahIrfhT389ZNZ9k+KpiTvIor5mv9/3hm XBKSPgCwcLGYGi5CG+AjrmAhll5ZUPSq2egzTcXhCn8FXDQ4e7UzaBWAd/Xth/PsB8sjJv QolFHoUIRduypL5thwEPYG13dlOColU= X-MC-Unique: gYOFaP0zP1Sl6CcG6UTg4A-1 X-Mimecast-MFC-AGG-ID: gYOFaP0zP1Sl6CcG6UTg4A_1758864912 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 27/29] vfio-user/pci.c: rename vfio_user_instance_finalize() to vfio_user_pci_finalize() Date: Fri, 26 Sep 2025 07:33:56 +0200 Message-ID: <20250926053358.308198-28-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, T_SPF_TEMPERROR=0.01 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 @redhat.com) X-ZM-MESSAGEID: 1758865425155116600 From: Mark Cave-Ayland This is the more typical naming convention for QOM finalize() functions, in particular it changes the prefix to match the name of the QOM type. Signed-off-by: Mark Cave-Ayland Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-27-mark.cav= eayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio-user/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio-user/pci.c b/hw/vfio-user/pci.c index 52561900fdf000b6fbb5a1fece2560a0796a1048..d4f5c7b9d72b42fad9ac62f022a= b4487f5d336a3 100644 --- a/hw/vfio-user/pci.c +++ b/hw/vfio-user/pci.c @@ -370,7 +370,7 @@ static void vfio_user_pci_init(Object *obj) pci_dev->cap_present |=3D QEMU_PCI_CAP_EXPRESS; } =20 -static void vfio_user_instance_finalize(Object *obj) +static void vfio_user_pci_finalize(Object *obj) { VFIOPCIDevice *vdev =3D VFIO_PCI_DEVICE(obj); VFIODevice *vbasedev =3D &vdev->vbasedev; @@ -469,7 +469,7 @@ static const TypeInfo vfio_user_pci_dev_info =3D { .instance_size =3D sizeof(VFIOUserPCIDevice), .class_init =3D vfio_user_pci_class_init, .instance_init =3D vfio_user_pci_init, - .instance_finalize =3D vfio_user_instance_finalize, + .instance_finalize =3D vfio_user_pci_finalize, }; =20 static void register_vfio_user_dev_type(void) --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758865332; cv=none; d=zohomail.com; s=zohoarc; b=mPIEHFZMtR21dj7KxuiiEb8nyBlPpgMnaE5mao4eKEmvhHIQjNuikUrcStSsaj15T4gzyPEYqCkdqW2djcVouO2DK6Cx/z7WyFOyyONvSEkXcQ/C7da/Km6S28HMkmGn8raKYRfxW0Z+HHiftvy5uEQeFd5S94mYa6HSVvazSLM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758865332; 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=yi54a2G9s5+4Yow3BmwJ/fFgJw8QzDizmEgCK2Ovusc=; b=Ih5wEO4oQR5eVdOTOpRZ02TmIrgkKdG0PsmpLaCn3vnWVU138w4WHeNvHK542Cl+cYWYhmVooYj4Dx3fMdVrLb8GYQ36tkEjPPGpKd5QGr//RqerD1T1tSGDZ4Fu+jJs7i/SIXLH9HrFwX6DSVVNx9Mmceo4RSwVRvGiOY3KSDg= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758865332518634.9904099931654; Thu, 25 Sep 2025 22:42:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v217Q-0000S0-Bu; Fri, 26 Sep 2025 01:35:44 -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 1v217I-0000Ol-Rv for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:35:36 -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 1v2176-0001Bq-OY for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:35:36 -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-652-fgiQ9E25MaCxctd2E_gCSA-1; Fri, 26 Sep 2025 01:35:15 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 93A3A195605B; Fri, 26 Sep 2025 05:35:14 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CF0F3180057C; Fri, 26 Sep 2025 05:35:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864919; 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=yi54a2G9s5+4Yow3BmwJ/fFgJw8QzDizmEgCK2Ovusc=; b=KoMz+zyo54VCZvM0OVAqEqHwG9GhGqKDGo74qvm2RG0Pgz+4QsFu45MAdvEIoulVq6QwQr 0SbFZvI/u9dcxj9+1CfrVcAI3zooXhypyerUPb6HqmEltt/i+ACWHbGJvkJThPoOcHAECb 98DDSd7fW3ta1MZyRSfxfNdc9EhMWXY= X-MC-Unique: fgiQ9E25MaCxctd2E_gCSA-1 X-Mimecast-MFC-AGG-ID: fgiQ9E25MaCxctd2E_gCSA_1758864914 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 28/29] vfio-user/pci.c: rename vfio_user_pci_dev_info to vfio_user_pci_info Date: Fri, 26 Sep 2025 07:33:57 +0200 Message-ID: <20250926053358.308198-29-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 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 @redhat.com) X-ZM-MESSAGEID: 1758865334262116600 From: Mark Cave-Ayland This changes the prefix to match the name of the QOM type. Signed-off-by: Mark Cave-Ayland Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-28-mark.cav= eayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- hw/vfio-user/pci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/vfio-user/pci.c b/hw/vfio-user/pci.c index d4f5c7b9d72b42fad9ac62f022ab4487f5d336a3..b53ed3b456f9c9bfe5fbef7b43a= 9870e871966f8 100644 --- a/hw/vfio-user/pci.c +++ b/hw/vfio-user/pci.c @@ -463,7 +463,7 @@ static void vfio_user_pci_class_init(ObjectClass *klass= , const void *data) pdc->realize =3D vfio_user_pci_realize; } =20 -static const TypeInfo vfio_user_pci_dev_info =3D { +static const TypeInfo vfio_user_pci_info =3D { .name =3D TYPE_VFIO_USER_PCI, .parent =3D TYPE_VFIO_PCI_DEVICE, .instance_size =3D sizeof(VFIOUserPCIDevice), @@ -474,7 +474,7 @@ static const TypeInfo vfio_user_pci_dev_info =3D { =20 static void register_vfio_user_dev_type(void) { - type_register_static(&vfio_user_pci_dev_info); + type_register_static(&vfio_user_pci_info); } =20 - type_init(register_vfio_user_dev_type) +type_init(register_vfio_user_dev_type) --=20 2.51.0 From nobody Sun Sep 28 15:25:42 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1758865195; cv=none; d=zohomail.com; s=zohoarc; b=Dc0xvKL9vK8qBCT1B2P7qGma30AHzbUTG/2xSMkY+ib+bZqRMBSo9X/PDRsZB+GXMY1TYxHo3OKBiPMfBZ5hBvVvvuuhptPJotGmb11kib74Wfu0uZM6Z8e1t3MMu9KDUbK9viDkD+9u5DvvuI7gw0T95qxoLgxgR/0Hp+rNBl0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758865195; 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=NGYiUFPVxCRqJNQMA8h+UdAkRuhO5hNkF1WiR8bXD1o=; b=R9JpLGNg7gdzLJ8Mbmkknr1VGkDvmct2NxXY9rPgWQbAcDIb7JzflQGHmhsT8pu+f8eZqZNvhdJkH3ZbNPA7g7cC0C83xzYnbqJ/oU0cgLRwl29AQBXDfMaerI9/TO8BJllbue2JFrDdrDAfGHxTdG6d6DZ5EEdzAtDvbTOW77k= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758865195407691.50989354777; Thu, 25 Sep 2025 22:39:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v217S-0000aP-Ur; Fri, 26 Sep 2025 01:35:46 -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 1v217J-0000P6-C3 for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:35:39 -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 1v2179-0001C9-3o for qemu-devel@nongnu.org; Fri, 26 Sep 2025 01:35:37 -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-633-L8jL5XSmNSK6oxfPgffdQw-1; Fri, 26 Sep 2025 01:35:18 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 D4531195608B; Fri, 26 Sep 2025 05:35:17 +0000 (UTC) Received: from corto.redhat.com (unknown [10.45.226.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 25B351800452; Fri, 26 Sep 2025 05:35:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758864921; 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=NGYiUFPVxCRqJNQMA8h+UdAkRuhO5hNkF1WiR8bXD1o=; b=QpZRf4hGJIfjG8IVftuY7k1i0uZ5yLnNmLE+V4Bg3mzJUa76dqCKB6WZKx0nG244AIsnn9 mAxrSbWE8RoK+wIZta4hCsrVlqXRKoYFj8bHLUs4S+uag6rieSjz06hxpKX/uAEC11VoVx h2P9tgfe1CRwKcfFXLdDqe0Oa2GfmUY= X-MC-Unique: L8jL5XSmNSK6oxfPgffdQw-1 X-Mimecast-MFC-AGG-ID: L8jL5XSmNSK6oxfPgffdQw_1758864918 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Mark Cave-Ayland , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 29/29] include/hw/vfio/vfio-device.h: fix include header guard name Date: Fri, 26 Sep 2025 07:33:58 +0200 Message-ID: <20250926053358.308198-30-clg@redhat.com> In-Reply-To: <20250926053358.308198-1-clg@redhat.com> References: <20250926053358.308198-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.4.1 on 10.30.177.111 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=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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, T_SPF_HELO_TEMPERROR=0.01, T_SPF_TEMPERROR=0.01 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 @redhat.com) X-ZM-MESSAGEID: 1758865196743116600 From: Mark Cave-Ayland The header guard was incorrectly called HW_VFIO_VFIO_COMMON_H instead of HW_VFIO_VFIO_DEVICE_H. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daud=C3=A9 Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-29-mark.cav= eayland@nutanix.com Signed-off-by: C=C3=A9dric Le Goater --- include/hw/vfio/vfio-device.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/hw/vfio/vfio-device.h b/include/hw/vfio/vfio-device.h index ed19e2e1e5859a0e9d3910d54d6ba2ad61f551d9..7e9aed6d3cd424d718919a0b236= d8acf1bc0deaf 100644 --- a/include/hw/vfio/vfio-device.h +++ b/include/hw/vfio/vfio-device.h @@ -18,8 +18,8 @@ * Copyright (C) 2008, IBM, Muli Ben-Yehuda (muli@il.ibm.com) */ =20 -#ifndef HW_VFIO_VFIO_COMMON_H -#define HW_VFIO_VFIO_COMMON_H +#ifndef HW_VFIO_VFIO_DEVICE_H +#define HW_VFIO_VFIO_DEVICE_H =20 #include "system/memory.h" #include "qemu/queue.h" @@ -288,4 +288,4 @@ void vfio_device_init(VFIODevice *vbasedev, int type, V= FIODeviceOps *ops, int vfio_device_get_aw_bits(VFIODevice *vdev); =20 void vfio_kvm_device_close(void); -#endif /* HW_VFIO_VFIO_COMMON_H */ +#endif /* HW_VFIO_VFIO_DEVICE_H */ --=20 2.51.0