aboutsummaryrefslogtreecommitdiff
path: root/include/hw
AgeCommit message (Collapse)AuthorFilesLines
2025-04-25vfio: Introduce new files for CPR definitions and declarationsCédric Le Goater1-3/+0
Gather all CPR related declarations into "vfio-cpr.h" to reduce exposure of VFIO internals in "hw/vfio/vfio-common.h". These were introduced in commit d9fa4223b30a ("vfio: register container for cpr"). Order file list in meson.build while at it. Cc: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-22-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-04-25vfio: Move vfio_get_device_info() to helpers.cCédric Le Goater1-1/+0
vfio_get_device_info() is a low level routine. Move it with the other helpers. Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Reviewed-by: John Levon <john.levon@nutanix.com> Link: https://lore.kernel.org/qemu-devel/20250318095415.670319-19-clg@redhat.com Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-20-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-04-25vfio: Move vfio_kvm_device_add/del_fd() to helpers.cCédric Le Goater1-3/+0
vfio_kvm_device_add/del_fd() are low level routines. Move them with the other helpers. Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Reviewed-by: John Levon <john.levon@nutanix.com> Link: https://lore.kernel.org/qemu-devel/20250318095415.670319-18-clg@redhat.com Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-19-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-04-25vfio: Move vfio_get_info_dma_avail() into helpers.cCédric Le Goater1-2/+0
vfio_get_info_dma_avail() is a low level routine similar to the other routines extracting capabilities from 'struct vfio_iommu_type1_info'. It belongs to file "helpers.c". Reviewed-by: John Levon <john.levon@nutanix.com> Link: https://lore.kernel.org/qemu-devel/20250318095415.670319-17-clg@redhat.com Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-18-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-04-25vfio: Introduce a new header file for helper servicesCédric Le Goater1-7/+0
Gather all helper routine declarations into "vfio-helpers.h" to reduce exposure of VFIO internals in "hw/vfio/vfio-common.h". Reviewed-by: John Levon <john.levon@nutanix.com> Link: https://lore.kernel.org/qemu-devel/20250318095415.670319-16-clg@redhat.com Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-17-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-04-25vfio: Move Host IOMMU type declarations into their respective filesCédric Le Goater1-5/+0
These definitions don't have any use outside of their respective submodules. There is no need to expose them externally. Keep them private. Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Reviewed-by: John Levon <john.levon@nutanix.com> Link: https://lore.kernel.org/qemu-devel/20250318095415.670319-15-clg@redhat.com Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-16-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-04-25vfio: Move VFIOAddressSpace helpers into container-base.cCédric Le Goater2-5/+6
VFIOAddressSpace is a common object used by VFIOContainerBase which is declared in "hw/vfio/vfio-container-base.h". Move the VFIOAddressSpace related services into "container-base.c". While at it, rename : vfio_get_address_space -> vfio_address_space_get vfio_put_address_space -> vfio_address_space_put to better reflect the namespace these routines belong to. Reviewed-by: John Levon <john.levon@nutanix.com> Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-15-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-04-25vfio: Make vfio_group_list staticCédric Le Goater1-2/+0
vfio_group_list is only used in file "container.c". Reviewed-by: John Levon <john.levon@nutanix.com> Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Link: https://lore.kernel.org/qemu-devel/20250318095415.670319-13-clg@redhat.com Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-14-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-04-25vfio: Introduce a new header file for VFIOcontainer declarationsCédric Le Goater2-19/+36
Gather all VFIOcontainer related declarations into "hw/vfio/vfio-container.h" to reduce exposure of VFIO internals in "hw/vfio/vfio-common.h". These declarations were initially introduced in commit 65501a745dba ("vfio: vfio-pci device assignment driver"). They are made available externally for PPC and s390x. Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Reviewed-by: John Levon <john.levon@nutanix.com> Link: https://lore.kernel.org/qemu-devel/20250318095415.670319-12-clg@redhat.com Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-13-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-04-25vfio: Introduce new files for VFIORegion definitions and declarationsCédric Le Goater3-31/+50
Gather all VFIORegion related declarations and definitions into their own files to reduce exposure of VFIO internals in "hw/vfio/vfio-common.h". They were introduced for 'vfio-platform' support in commits db0da029a185 ("vfio: Generalize region support") and a664477db8da ("hw/vfio/pci: Introduce VFIORegion"). To be noted that the 'vfio-platform' devices have been deprecated and will be removed in QEMU 10.2. Until then, make the declarations available externally for 'sysbus-fdt.c'. Cc: Eric Auger <eric.auger@redhat.com> Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-12-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-04-25vfio: Introduce a new header file for VFIOIOMMUFD declarationsCédric Le Goater1-18/+3
Gather all VFIOIOMMUFD related declarations introduced by commits 5ee3dc7af785 ("vfio/iommufd: Implement the iommufd backend") and 5b1e96e65403 ("vfio/iommufd: Introduce auto domain creation") into "vfio-iommufd.h". This to reduce exposure of VFIO internals in "hw/vfio/vfio-common.h". Cc: Joao Martins <joao.m.martins@oracle.com> Cc: Yi Liu <yi.l.liu@intel.com> Reviewed-by: John Levon <john.levon@nutanix.com> Link: https://lore.kernel.org/qemu-devel/20250318095415.670319-10-clg@redhat.com Reviewed-by: Joao Martins <joao.m.martins@oracle.com> Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-11-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-04-25vfio: Move VFIOHostDMAWindow definition into spapr.cCédric Le Goater1-7/+0
VFIOHostDMAWindow is only used in file "spapr.c". Move it there. Reviewed-by: John Levon <john.levon@nutanix.com> Link: https://lore.kernel.org/qemu-devel/20250318095415.670319-9-clg@redhat.com Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-10-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-04-25vfio: Introduce a new header file for VFIOdisplay declarationsCédric Le Goater1-28/+0
Gather all VFIOdisplay related declarations into "vfio-display.h" to reduce exposure of VFIO internals in "hw/vfio/vfio-common.h". Reviewed-by: John Levon <john.levon@nutanix.com> Link: https://lore.kernel.org/qemu-devel/20250318095415.670319-8-clg@redhat.com Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-9-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-04-25vfio: Move vfio_device_state_is_running/precopy() into migration.cCédric Le Goater1-3/+0
These routines are migration related. Move their declaration and implementation under the migration files. Reviewed-by: Prasad Pandit <pjp@fedoraproject.org> Reviewed-by: John Levon <john.levon@nutanix.com> Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-8-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-04-25vfio: Introduce a new header file for internal migration servicesCédric Le Goater1-51/+1
Gather all VFIO migration related declarations into "vfio-migration-internal.h" to reduce exposure of VFIO internals in "hw/vfio/vfio-common.h". Cc: Kirti Wankhede <kwankhede@nvidia.com> Cc: Avihai Horon <avihaih@nvidia.com> Reviewed-by: Prasad Pandit <pjp@fedoraproject.org> Reviewed-by: John Levon <john.levon@nutanix.com> Reviewed-by: Avihai Horon <avihaih@nvidia.com> Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-7-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-04-25vfio: Make vfio_viommu_preset() staticCédric Le Goater1-1/+0
This routine is only used in file "migration.c". Move it there. Reviewed-by: John Levon <john.levon@nutanix.com> Reviewed-by: Joao Martins <joao.m.martins@oracle.com> Link: https://lore.kernel.org/qemu-devel/20250318095415.670319-6-clg@redhat.com Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-6-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-04-25vfio: Make vfio_un/block_multiple_devices_migration() staticCédric Le Goater1-2/+0
Both of these routines are only used in file "migration.c". Move them there. Reviewed-by: Joao Martins <joao.m.martins@oracle.com> Link: https://lore.kernel.org/qemu-devel/20250318095415.670319-5-clg@redhat.com Reviewed-by: John Levon <john.levon@nutanix.com> Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-5-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-04-25vfio: Introduce a new header file for external migration servicesCédric Le Goater2-4/+17
The migration core subsystem makes use of the VFIO migration API to collect statistics on the number of bytes transferred. These services are declared in "hw/vfio/vfio-common.h" which also contains VFIO internal declarations. Move the migration declarations into a new header file "hw/vfio/vfio-migration.h" to reduce the exposure of VFIO internals. While at it, use a 'vfio_migration_' prefix for these services. To be noted, vfio_migration_add_bytes_transferred() is a VFIO migration internal service which we will be moved in the subsequent patches. Cc: Kirti Wankhede <kwankhede@nvidia.com> Cc: Avihai Horon <avihaih@nvidia.com> Reviewed-by: Prasad Pandit <pjp@fedoraproject.org> Reviewed-by: John Levon <john.levon@nutanix.com> Reviewed-by: Avihai Horon <avihaih@nvidia.com> Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-4-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-04-25vfio: Rename vfio_reset_bytes_transferred()Cédric Le Goater1-1/+1
Enforce a 'vfio_mig_' prefix for the VFIO migration API to better reflect the namespace these routines belong to. Reviewed-by: Avihai Horon <avihaih@nvidia.com> Reviewed-by: John Levon <john.levon@nutanix.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Link: https://lore.kernel.org/qemu-devel/20250318095415.670319-3-clg@redhat.com Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-3-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-04-23tcg: Move qemu_tcg_mttcg_enabled() to 'system/tcg.h'Philippe Mathieu-Daudé1-9/+0
qemu_tcg_mttcg_enabled() is specific to 1/ TCG and 2/ system emulation. Move the prototype declaration to "system/tcg.h", reducing 'mttcg_enabled' variable scope. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20250403220420.78937-17-philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2025-04-23exec/cpu-all: remove this headerPierrick Bouvier1-1/+1
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20250325045915.994760-16-pierrick.bouvier@linaro.org>
2025-04-23hw/core/cpu: Remove CPUClass::mmu_index()Philippe Mathieu-Daudé1-2/+0
All targets have been converted to TCGCPUOps::mmu_index(), remove the now unused CPUClass::mmu_index(). Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20250401080938.32278-24-philmd@linaro.org>
2025-04-23hw/core/cpu: Update CPUClass::mmu_index docstringPhilippe Mathieu-Daudé1-2/+1
Since commits 32a8ea12fab..90b7022e698 (target: "Split out TARGET_env_mmu_index"), target's memory_rw_debug() callbacks use the target's TARGET_env_mmu_index(), not the generic CPUClass::mmu_index() callback. Update the documentation. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20250401080938.32278-2-philmd@linaro.org>
2025-04-23meson: Only allow CONFIG_USER_ONLY from certain source setsRichard Henderson1-4/+0
Poison CONFIG_USER_ONLY and CONFIG_SOFTMMU unless the compilation unit is in specific_ss, libuser_ss, or libsystem_ss. This is intended to prevent files being incorrectly added to common_ss. Remove #ifndef CONFIG_USER_ONLY / #error / #endif blocks. All they do is trigger the poison error. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2025-04-23include/hw/s390x: Remove ifndef CONFIG_USER_ONLY in css.hRichard Henderson1-2/+0
We were hiding a number of declarations from user-only, although it hurts nothing to allow them. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2025-04-23include/hw/intc: Remove ifndef CONFIG_USER_ONLY from armv7m_nvic.hRichard Henderson1-14/+0
We were hiding a number of declarations from user-only, although it hurts nothing to allow them. The inlines for user-only are unused. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2025-04-23include/hw/core: Drop ifndef CONFIG_USER_ONLY from cpu.hRichard Henderson1-10/+0
We were hiding a number of declarations from user-only, although it hurts nothing to allow them. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2025-04-23include/exec: Split out watchpoint.hRichard Henderson1-30/+0
Relatively few objects in qemu care about watchpoints, so split out to a new header. Removes an instance of CONFIG_USER_ONLY from hw/core/cpu.h. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2025-04-23include/system: Move exec/ioport.h to system/ioport.hRichard Henderson4-4/+4
Convert the existing includes with sed. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2025-04-23include/system: Move exec/address-spaces.h to system/address-spaces.hRichard Henderson4-4/+4
Convert the existing includes with sed. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2025-04-23include/system: Move exec/memory.h to system/memory.hRichard Henderson72-72/+72
Convert the existing includes with sed -i ,exec/memory.h,system/memory.h,g Move the include within cpu-all.h into a !CONFIG_USER_ONLY block. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2025-04-23Merge tag 'pull-request-2025-04-23' of https://gitlab.com/thuth/qemu into ↵Stefan Hajnoczi6-8/+22
staging * Remove the obsolete s390-ccw-virtio-2.9 machine type * Prepare the dump-skeys QMP command for the universal binary project * Add compat machine types for 10.1 * Convert the remaining Avocado tests to the functional framework * Some more small fixes for the functional tests # -----BEGIN PGP SIGNATURE----- # # iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmgIghARHHRodXRoQHJl # ZGhhdC5jb20ACgkQLtnXdP5wLbXFeA//ayM/KF9so5DbatHQ+TD4wReNd5zlcYxz # hjx5FAQPl+QmMNcBhkfBWJ6DqypzzrDOrRevwKe1xcJYyUthDJ6Bl//phmfTKzbo # lAW5XmQhFGi+yolhRMdd6N+5Ky/c0jPzZjuJvi21RmSWi+ZqBiwUmaH1wutiI6A5 # peytvpt1R+DPJsZtFViEW9AwRtSkQh4I5+not33bvKdFWTGHE+iSYnVTXDiEbY5p # TNIXaN9t9ZnojknswwHvyF+QbXn/pVLSA+XLDZuops2IEiPCsCTXUdjSwlfPReKM # G0tl5DOXJFUMwmU1wRtqn0TdkP2AL1KfMr6ZVsE1zD1/XMj9uDF6BxxjB2si2UrC # DTXCn+K535IyEa3qf25mhv9ueDr2ItiaDk4CBpb+Z/lg3p73jVW8G1mAU0mG9XlH # KhJgOqTelnSuwlF6PdhtOxiH/rmgozMcrlppAMBbNgKBvzrT7Iwcq3OS9r+ZAWXO # 7ouY/zYlbe1fnRgkgaapWx5AXhbkyxqgMkmZk0JE5XcsOHwMUd4O/Sk2kE6zVObe # 7ReNqJdxj4c+lfqof5UwMUeqb465NTEAJXBGpiGDcP5qCzGBwnaIv5D71o1A+KoB # 8g3E6woUN2i3ZPq8W4L8PbMR+zHNGUIVdnmH3EtNd6X3cBN9w4UYVN1MdzKSzQsi # aCG/VdfcZsw= # =yO4v # -----END PGP SIGNATURE----- # gpg: Signature made Wed 23 Apr 2025 02:00:48 EDT # gpg: using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5 # gpg: issuer "thuth@redhat.com" # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full] # gpg: aka "Thomas Huth <thuth@redhat.com>" [full] # gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full] # gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown] # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * tag 'pull-request-2025-04-23' of https://gitlab.com/thuth/qemu: (29 commits) MAINTAINERS: Add functional tests that are not covered yet tests/functional: Remove unnecessary import statements tests/functional: Remove semicolons at the end of lines Remove the remainders of the Avocado tests docs/devel/testing: Dissolve the ci-definitions.rst.inc file gitlab-ci: Update QEMU_JOB_AVOCADO and QEMU_CI_AVOCADO_TESTING tests/functional: Convert the SMMU test to the functional framework tests/functional: Use the tuxrun kernel for the aarch64 replay test tests/functional: Use the tuxrun kernel for the x86 replay test tests/avocado: Remove the boot_linux.py tests tests/functional: Convert the 64-bit big endian Wheezy mips test tests/functional: Convert the 64-bit little endian Wheezy mips test tests/functional: Convert the 32-bit little endian Wheezy mips test tests/functional: Convert the 32-bit big endian Wheezy mips test tests/avocado: Remove the LinuxKernelTest class tests/functional: Convert the i386 replay avocado test tests/functional: Convert reverse_debugging tests to the functional framework tests/functional: Move the check for the parameters from avocado to functional gitlab-ci: Remove the avocado tests from the CI pipelines tests/functional/test_vnc: skip test if no crypto backend available ... Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2025-04-23hw: add compat machines for 10.1Cornelia Huck2-0/+6
Add 10.1 machine types for arm/i440fx/m68k/q35/s390x/spapr. Signed-off-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20250414094543.221241-1-cohuck@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2025-04-23hw/s390x/ccw: Have CCW machine implement a qmp_dump_skeys() callbackPhilippe Mathieu-Daudé1-0/+1
In preparation to make @dump-skeys command generic, extract s390_qmp_dump_skeys() out of qmp_dump_skeys(). Register it as CCW qmp_dump_skeys() callback. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Eric Farman <farman@linux.ibm.com> Message-ID: <20250310151414.11550-4-philmd@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
2025-04-23hw/s390x/skeys: Introduce TYPE_DUMP_SKEYS_INTERFACEPhilippe Mathieu-Daudé1-0/+15
The storage keys are part of the machine memory. Introduce the TYPE_DUMP_SKEYS_INTERFACE type, allowing machine using storage keys to dump them when a DumpSKeysInterface::qmp_dump_skeys() callback is provided. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Eric Farman <farman@linux.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-ID: <20250310151414.11550-3-philmd@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
2025-04-23hw/intc/s390_flic: Remove the obsolete migration_enabled flagThomas Huth1-1/+0
Now that the machine types that set the migration_enabled flag to false are gone, we can remove it and the related code. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20250115073819.15452-5-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2025-04-23hw/s390x/s390-stattrib: Remove the old migration_enabled flagThomas Huth1-1/+0
Now that the machine types that set the migration_enabled flag to false are gone, we can remove it and the related code. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20250115073819.15452-4-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2025-04-23hw/s390x/css: Remove the obsolete "css_migration_enabled" variableThomas Huth1-6/+0
Now that the s390-ccw-virtio-2.9 machine type has been removed, we don't need the "css_migration_enabled" variable anymore and can remove the related code. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20250115073819.15452-3-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2025-04-11ipmi/bmc-sim: Add 'Get Channel Info' commandNicholas Piggin1-0/+10
Linux issues this command when booting a powernv machine. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Message-ID: <20250401140153.685523-4-npiggin@gmail.com> Signed-off-by: Corey Minyard <corey@minyard.net>
2025-04-11ipmi: add fwinfo to pci ipmi devicesNicholas Piggin1-0/+5
This requires some adjustments to callers to avoid possible behaviour changes for PCI devices. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Message-ID: <20250401140153.685523-3-npiggin@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> [Rename pci_ipmi_bt_get_fwinfo to pci_ipmi_kcs_get_fwinfo in the pci_ipmi_kcs.c file.] Signed-off-by: Corey Minyard <corey@minyard.net>
2025-03-31hw/core/cpu: Use size_t for memory_rw_debug len argumentRichard Henderson1-1/+1
Match the prototype of cpu_memory_rw_debug(). Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20250325224403.4011975-4-richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2025-03-31hw/arm/fsl-imx8mp: Remove unused defineBernhard Beschow1-1/+0
The SoC has three SPI controllers, not four. Remove the extra define of an SPI IRQ. Fixes: 06908a84f036 "hw/arm/fsl-imx8mp: Add SPI controllers" Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Bernhard Beschow <shentey@gmail.com> Message-ID: <20250318205709.28862-4-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2025-03-31hw/arm/fsl-imx8mp: Derive struct FslImx8mpState from TYPE_SYS_BUS_DEVICEBernhard Beschow1-1/+2
Deriving from TYPE_SYS_BUS_DEVICE fixes the SoC object to be reset upon machine reset. It also makes the SoC implementation not user-creatable which can trigger the following crash: $ ./qemu-system-aarch64 -M virt -device fsl-imx8mp ** ERROR:../../devel/qemu/tcg/tcg.c:1006:tcg_register_thread: assertion failed: (n < tcg_max_ctxs) Bail out! ERROR:../../devel/qemu/tcg/tcg.c:1006:tcg_register_thread: assertion failed: (n < tcg_max_ctxs) Aborted (core dumped) Fixes: a4eefc69b237 "hw/arm: Add i.MX 8M Plus EVK board" Reported-by: Thomas Huth <thuth@redhat.com> Suggested-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Bernhard Beschow <shentey@gmail.com> Message-ID: <20250318205709.28862-3-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2025-03-24Merge tag 'pull-aspeed-20250323' of https://github.com/legoater/qemu into ↵Stefan Hajnoczi1-1/+1
staging aspeed queue: * Fix AST2700 SoC model # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmfgSG0ACgkQUaNDx8/7 # 7KFIaQ//TDinoK375i/tsRxpHPVHU40mQbn2pCx8g+mDoMZubfExSWncxcOpgzbM # KM+NSOK0PBnCUHt0aWVb/USyMM7hftJHRkC6IY43HFnRIJlKxPeaS/IC73fPMMKu # sDuBYz1ALseLFM1vArCiAijA8aCQOAiOBq/GSgscuHcgmTTMJ+c0LbwEaV5/aJwO # BSIn6bRMLByl6w31NCetu7XwybCI9xCdgcGTuv7gNXtjk8poy540gB1CK02smDjc # 0uRY9QXjh2epDWXz7UqMlJsEkEUc9BZP/95a70OKFsgDKz1K6kuCxgA3QbKLRgY1 # CDlinhERQuyFta6ulsoQ6E6T6nzc9MzTRjLztSdmMWkCd/qm1j4bWVuGnWD++9WT # 1Q2IX4D5kurKNizux2+HaV02s3RafpeSjGOYMjaTpr74yqPpwa7gM2WnJhxZF1Md # MF+ee30be5dJaVcZ0doYd+m3c6M0W5S1H5tR99YTA3auwikY0zgEKHrgXoDnv+sb # 803AQroIBGZxbnxSH1OVJD4MB7Xos5CBxi0FYvpCy8E7Piaz2EGAe7QQUyHhPZjs # Eg5rKCXODToYIpTHg+JYakHEt3ooewX3/pSVa//PJzde0eR25VNc6ybl4Xklqxib # SjQ7HFqPkWrbVNK7o6j1LHLVa+sxtIT8FQtHKh5XjD7wnQwYV5U= # =AwrM # -----END PGP SIGNATURE----- # gpg: Signature made Sun 23 Mar 2025 13:44:13 EDT # gpg: using RSA key A0F66548F04895EBFE6B0B6051A343C7CFFBECA1 # gpg: Good signature from "Cédric Le Goater <clg@redhat.com>" [full] # gpg: aka "Cédric Le Goater <clg@kaod.org>" [full] # Primary key fingerprint: A0F6 6548 F048 95EB FE6B 0B60 51A3 43C7 CFFB ECA1 * tag 'pull-aspeed-20250323' of https://github.com/legoater/qemu: hw/misc/aspeed_hace: Fix buffer overflow in has_padding function hw/intc/aspeed: Fix IRQ handler mask check aspeed: Fix maximum number of spi controller Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2025-03-23aspeed: Fix maximum number of spi controllerTroy Lee1-1/+1
Commit 6de4aa8dc544 ("hw/arm/aspeed_ast27x0: Add SoC Support for AST2700 A1") extends ast2700a1 spis_num to 3, but ASPEED_SPIS_NUM defines the maximum number of spi controller to 2, result in ehci[0] is being overwritten in runtime. Signed-off-by: Troy Lee <troy_lee@aspeedtech.com> Fixes: 6de4aa8dc544 ("hw/arm/aspeed_ast27x0: Add SoC Support for AST2700 A1") Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250317065938.1902272-1-troy_lee@aspeedtech.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-03-23Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into stagingStefan Hajnoczi3-1/+7
* exec/cpu-all: remove BSWAP_NEEDED * pl011: pad C PL011State struct to same size as Rust struct * rust: hpet: fix type of "timers" property * rust: hpet: fix functional tests (and really everything that uses it) * rust: Kconfig: Factor out whether devices are Rust or C * rust: vmstate: Fixes and tests # -----BEGIN PGP SIGNATURE----- # # iQFIBAABCgAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmfdsUsUHHBib256aW5p # QHJlZGhhdC5jb20ACgkQv/vSX3jHroOGpwf/Qk4bAcLX7A1/nOmYT+DtWzZ9V/VS # hSOe6BruzW8rzwMyn/d7oR+aUpk3sL+v2iPBWqoZ/wh0w8kcABcUfWsqqGI8ln/K # pnTdiC+hra5z0AFH1tmjjtOI50WDOeSjh5SFvoPJtGzhEbo89QvsUWgy98HiHOMm # YFPDuhg3Pfd1XDcdoaa85sOHO1vDsj45fCEJhx6Ktib4vOlEm2I4Z9YR/JxNMT33 # vy/y09HG4cpc6bWKLPL3nqR9RchUSI+YRDZ8rlaXUowiZzH2K/wi0qJOsvG6oJF5 # awni0YWuwyFi16jmUub8NFnWk6NKjbACqw74AwoVPbNbDoCrrogXzIF2Lw== # =NzCN # -----END PGP SIGNATURE----- # gpg: Signature made Fri 21 Mar 2025 14:34:51 EDT # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * tag 'for-upstream' of https://gitlab.com/bonzini/qemu: (24 commits) rust: hpet: fix decoding of timer registers rust/vmstate: Include complete crate path of VMStateFlags in vmstate_clock rust/vmstate: Add unit test for vmstate_validate rust/vmstate: Add unit test for pointer case rust/vmstate: Add unit test for vmstate_{of|struct} macro rust/vmstate: Add unit test for vmstate_of macro rust/vmstate: Support vmstate_validate rust/vmstate: Re-implement VMState trait for timer binding rust/vmstate: Relax array check when build varray in vmstate_struct rust/vmstate: Fix unnecessary VMState bound of with_varray_flag() rust/vmstate: Fix "cannot infer type" error in vmstate_struct rust/vmstate: Fix type check for varray in vmstate_struct rust/vmstate: Fix size field of VMStateField with VMS_ARRAY_OF_POINTER flag rust/vmstate: Fix num field when varray flags are set rust/vmstate: Fix num_offset in vmstate macros rust/vmstate: Remove unnecessary unsafe exec/cpu-all: remove BSWAP_NEEDED load_aout: replace bswap_needed with big_endian rust: pl011: Check size of state struct at compile time hw/char/pl011: Pad PL011State struct to same size as Rust impl ... Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2025-03-21load_aout: replace bswap_needed with big_endianPaolo Bonzini1-1/+1
Targets know whether they are big-endian more than they know if the endianness is different from the host: the former is mostly a constant, at least in machine creation code, while the latter has to be computed with TARGET_BIG_ENDIAN != HOST_BIG_ENDIAN or something like that. load_aout, however, takes a "bswap_needed" argument. Replace it with a "big_endian" argument; even though all users are big-endian, it is cheap enough to keep the optional swapping functionality even for little-endian boards. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-03-21hw/char/pl011: Pad PL011State struct to same size as Rust implPeter Maydell1-0/+5
We have some users of the PL011 struct which embed it directly into their own state structs. This means that the Rust version of the device must have a state struct that is the same size or smaller than the C struct. In commit 9b642097d6b7 ("rust: pl011: switch to safe chardev operation") the Rust PL011 state struct changed from having a bindings::CharBackend to a chardev::CharBackend, which made it grow larger than the C version. This results in an assertion at startup when QEMU was built with Rust enabled: $ qemu-system-arm -M raspi2b -display none ERROR:../../qom/object.c:562:object_initialize_with_type: assertion failed: (size >= type->instance_size) The long-term better approach to this problem would be to move our C device code patterns away from "embed a struct" and (back) to "have a pointer to the device", so we can make the C PL011State struct a private implementation detail rather than exposed to its users. For the short term, add a padding field at the end of the C struct so it's big enough that the Rust state struct can fit. Fixes: 9b642097d6b7 ("rust: pl011: switch to safe chardev operation") Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Link: https://lore.kernel.org/r/20250321112523.1774131-3-peter.maydell@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-03-20qdev, rust/hpet: fix type of HPET "timers" propertyPaolo Bonzini1-0/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-03-20ppc/pnv: Move the PNOR LPC address into struct PnvPnorNicholas Piggin1-0/+1
Rather than use the hardcoded define throughout the tree for the PNOR LPC address, keep it within the PnvPnor object. This should solve a dead code issue in the BMC HIOMAP checks where Coverity (correctly) reported that the sanity checks are dead code. We would like to keep the sanity checks without turning them into a compile time assert in case we would like to make them configurable in future. Fixes: 4c84a0a4a6e5 ("ppc/pnv: Add a PNOR address and size sanity checks") Resolves: Coverity CID 1593723 Reviewed-by: Cédric Le Goater <clg@redhat.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>