aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
8 daysinclude/hw/qdev-properties: Remove DEFINE_PROP_END_OF_LISTRichard Henderson556-624/+7
Now that all of the Property arrays are counted, we can remove the terminator object from each array. Update the assertions in device_class_set_props to match. With struct Property being 88 bytes, this was a rather large form of terminator. Saves 30k from qemu-system-aarch64. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Link: https://lore.kernel.org/r/20241218134251.4724-21-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 daystarget/riscv: Do not abuse DEFINE_PROP_END_OF_LISTRichard Henderson1-6/+6
These are not arrays of Property and had no business using DEFINE_PROP_END_OF_LIST. Use plain { } instead. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Link: https://lore.kernel.org/r/20241218134251.4724-20-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 dayshw/core: Remove device_class_set_props functionRichard Henderson2-26/+6
All uses of device_class_set_props() are now using arrays. Validate this compile-time in the device_class_set_props macro and call device_class_set_props_n using the known size of the array. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Link: https://lore.kernel.org/r/20241218134251.4724-19-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 daysrust/qemu-api: Use device_class_set_props_nRichard Henderson1-5/+6
This means we can update declare_properties to drop the zero terminator at the end of the array as well. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Link: https://lore.kernel.org/r/20241218134251.4724-18-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 dayshw/arm/armsse: Use device_class_set_props_nRichard Henderson1-4/+5
We must remove DEFINE_PROP_END_OF_LIST so the count is correct. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Link: https://lore.kernel.org/r/20241218134251.4724-17-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 dayshw/scsi/megasas: Use device_class_set_props_nRichard Henderson1-3/+4
We must remove DEFINE_PROP_END_OF_LIST so the count is correct. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Link: https://lore.kernel.org/r/20241218134251.4724-16-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 daysmigration: Use device_class_set_props_nRichard Henderson3-2/+4
Export the migration_properties array size from options.c; use that to feed device_class_set_props_n. We must remove DEFINE_PROP_END_OF_LIST so the count is correct. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Link: https://lore.kernel.org/r/20241218134251.4724-15-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 dayshw/core: Introduce device_class_set_props_nRichard Henderson4-18/+55
Record the size of the array in DeviceClass.props_count_. Iterate with known count in qdev_prop_walk. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Link: https://lore.kernel.org/r/20241218134251.4724-14-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 daysinclude/hw/qdev-core: Detect most empty Property lists at compile timeRichard Henderson3-2/+19
Add a macro expansion of device_class_set_props which can check on the type and size of PROPS before calling the function. Avoid the macro in migration.c because migration_properties is defined externally with indeterminate size. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Link: https://lore.kernel.org/r/20241218134251.4724-13-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 dayshw/virtio: Remove empty Property listsRichard Henderson2-10/+0
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Link: https://lore.kernel.org/r/20241218134251.4724-12-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 dayshw/sparc: Remove empty Property listsRichard Henderson2-10/+0
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Link: https://lore.kernel.org/r/20241218134251.4724-11-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 dayshw/xen: Remove empty Property listsRichard Henderson1-17/+0
There is no point in registering no properties. Remove xen_sysdev_class_init entirely, as it did nothing else. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Link: https://lore.kernel.org/r/20241218134251.4724-10-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 dayshw/s390x: Remove empty Property listsRichard Henderson1-5/+0
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Link: https://lore.kernel.org/r/20241218134251.4724-9-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 dayshw/tricore: Remove empty Property listsRichard Henderson2-10/+0
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Link: https://lore.kernel.org/r/20241218134251.4724-8-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 dayshw/ppc: Only register spapr_nvdimm_properties if CONFIG_LIBPMEMRichard Henderson1-4/+5
Do not register an empty set of properties. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Link: https://lore.kernel.org/r/20241218134251.4724-7-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 dayshw/pci-host/astro: Remove empty Property listRichard Henderson1-5/+0
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Link: https://lore.kernel.org/r/20241218134251.4724-6-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 daystarget/s390x: Use s390x_cpu_properties for system mode onlyRichard Henderson1-3/+3
Avoid the empty property list for user-only mode. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Link: https://lore.kernel.org/r/20241218134251.4724-5-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 daystarget/ppc: Remove empty property listRichard Henderson1-6/+0
Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Link: https://lore.kernel.org/r/20241218134251.4724-4-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 dayshw/ide: Constify sysbus_ahci_propertiesRichard Henderson1-1/+1
Reviewed-by: Bernhard Beschow <shentey@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Link: https://lore.kernel.org/r/20241218134251.4724-3-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 daysmigration: Constify migration_propertiesRichard Henderson2-2/+2
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Link: https://lore.kernel.org/r/20241218134251.4724-2-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 daysMerge tag 'firmware-20241216-pull-request' of https://gitlab.com/kraxel/qemu ↵Stefan Hajnoczi9-7/+102
into staging x86/loader: fix efi binary loading x86/loader: support secure boot with direct kernel load firmware: json descriptor updates roms: re-add edk2-basetools target # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCgAdFiEEoDKM/7k6F6eZAf59TLbY7tPocTgFAmdgBfwACgkQTLbY7tPo # cTj7MQ/+MJkVWTYN59Yy1o+XgfIBMoPKuF8Rm9jyosR751Nb5slw7ivd/nr9vKOd # QNmCUNSHqNhkt10fGZmiL/OBNPH2I226iJ/QPB6CPgn+klWu9/n/qCYHKqkUl+4V # uAe2CtsljiMmBouJUshmUvtUeB62aykwYYUBb2WfpElBaAvDqs8O+WBCp/83ugfP # pd0G/bG+7lI6co9KLa3u7hMgcmxu2t/uKd55BaD/H2+Py353geQtnwXThom33jhy # RMDzSZKWXxcXpwYtGJmUgy2XQqRwCe2uCqCldJ+Yn+VqWIJhszGrfxa1W3AQWoT0 # BHcnH9uriEwMEL5gO6i83m1No9tPJQaw9qhOa/zKtAxoVjdB9FBab1+MYCyYiS4N # BBz6pIwR+74iDjn1SCOn4vJPmblEL6qtV+IB7MauG1o9GN6IluWDDHotpcmI5B6k # oXh7mld70cqUFWjFZvoPYEp6HBAvhXLyUf3A4fQoemEX6mSVM9eYol4GM4gTj0gs # IsBfd9wvHmaurpXMgB0cJOpr7UbbijtssseB/WzkMWlKskuMlJxsif/IEJO+GrbZ # RdEcdVOr45Ty1Hmqv6b9M9kUojphUchLe6nl+CQihm3K7dF27yqhcJYqNTe7mKpt # 4+i6RZaTKKtbY8FL80ycDRZIkDZg9cwMQHMxrDABQVN5WpVfRgU= # =4fZc # -----END PGP SIGNATURE----- # gpg: Signature made Mon 16 Dec 2024 05:50:36 EST # gpg: using RSA key A0328CFFB93A17A79901FE7D4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full] # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full] # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full] # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * tag 'firmware-20241216-pull-request' of https://gitlab.com/kraxel/qemu: roms: re-add edk2-basetools target pc-bios: add missing riscv64 descriptor pc-bios: Add amd-sev-es to edk2 json x86/loader: add -shim option x86/loader: expose unpatched kernel x86/loader: read complete kernel x86/loader: only patch linux kernels Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 daysMerge tag 'pull-prop-20241215' of https://gitlab.com/rth7680/qemu into stagingStefan Hajnoczi558-633/+633
Constify almost all struct Property # -----BEGIN PGP SIGNATURE----- # # iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmdfJ5wdHHJpY2hhcmQu # aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV9KYAf+Lu4rFaJ99LVVDPXJ # A3e9eIciGS1qS8RYACiaMZvpteYJeSPJriPSw7d5LY0H6rr7Az3dRVX5x3xI5C3u # tz7VvNu8agxkCqab6k5xWH1FyNaFi+3u8Yqnbtm5fcAEkf6QdbEPONEZbKeGQuDH # bxQ3EJvj+fmc5/Fdcp/SoFnDNcM65PVgi5PUKiAFEE1dxvtUfYQx5DjokyehyhsS # 4O6UEcLWOW+50CYy7X256ifSPaDz6HXBIIJVgCk9+347mKOLsZ3HbNalxXLdj+N0 # a148b+7ans8A88NZ6m5bezhlj0x9lEuK+6AocZmntYuFqOYcJVuzC40dEd9mj93J # 8W8E7A== # =EA7k # -----END PGP SIGNATURE----- # gpg: Signature made Sun 15 Dec 2024 14:01:48 EST # gpg: using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F # gpg: issuer "richard.henderson@linaro.org" # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full] # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F * tag 'pull-prop-20241215' of https://gitlab.com/rth7680/qemu: (67 commits) docs: Constify all Property in examples tests/unit: Constify all Property hw/xen: Constify all Property hw/watchdog: Constify all Property hw/virtio: Constify all Property hw/vfio: Constify all Property hw/usb: Constify all Property hw/ufs: Constify all Property hw/tpm: Constify all Property hw/timer: Constify all Property hw/ssi: Constify all Property hw/sparc64: Constify all Property hw/sparc: Constify all Property hw/sd: Constify all Property hw/scsi: Constify all Property hw/s390x: Constify all Property hw/rx: Constify all Property hw/rtc: Constify all Property hw/riscv: Constify all Property hw/remote: Constify all Property ... Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 daysroms: re-add edk2-basetools targetGerd Hoffmann1-0/+5
Needed to build ipxe nic roms. Reported-by: Liu Jaloo <liu.jaloo@gmail.com> Fixes: 22e11539e167 ("edk2: replace build scripts") Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-ID: <20241212084408.1390728-1-kraxel@redhat.com>
11 dayspc-bios: add missing riscv64 descriptorHeinrich Schuchardt2-1/+33
Without descriptor libvirt cannot discover the EDK II binaries via the qemu:///system connection. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Message-ID: <20241212090059.94167-1-heinrich.schuchardt@canonical.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 dayspc-bios: Add amd-sev-es to edk2 jsonPratik R. Sampat1-0/+1
With the default BIOS being compatible with amd-sev-es add the feature to the json to indicate it's support Signed-off-by: Pratik R. Sampat <pratikrajesh.sampat@amd.com> Message-ID: <20241118161405.208437-1-pratikrajesh.sampat@amd.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
11 daysx86/loader: add -shim optionGerd Hoffmann5-0/+53
Add new -shim command line option, wire up for the x86 loader. When specified load shim into the new "etc/boot/shim" fw_cfg file. Needs OVMF changes too to be actually useful. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-ID: <20240905141211.1253307-6-kraxel@redhat.com>
11 daysx86/loader: expose unpatched kernelGerd Hoffmann1-0/+3
Add a new "etc/boot/kernel" fw_cfg file, containing the kernel without the setup header patches. Intended use is booting in UEFI with secure boot enabled, where the setup header patching breaks secure boot verification. Needs OVMF changes too to be actually useful. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-ID: <20240905141211.1253307-5-kraxel@redhat.com>
11 daysx86/loader: read complete kernelGerd Hoffmann1-5/+6
Load the complete kernel (including setup) into memory. Excluding the setup is handled later when adding the FW_CFG_KERNEL_SIZE and FW_CFG_KERNEL_DATA entries. This is a preparation for the next patch which adds a new fw_cfg file containing the complete, unpatched kernel. No functional change. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-ID: <20240905141211.1253307-4-kraxel@redhat.com>
11 daysx86/loader: only patch linux kernelsGerd Hoffmann1-1/+1
If the binary loaded via -kernel is *not* a linux kernel (in which case protocol == 0), do not patch the linux kernel header fields. It's (a) pointless and (b) might break binaries by random patching and (c) changes the binary hash which in turn breaks secure boot verification. Background: OVMF happily loads and runs not only linux kernels but any efi binary via direct kernel boot. Note: Breaking the secure boot verification is a problem for linux kernels too, but fixed that is left for another day ... Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-ID: <20240905141211.1253307-3-kraxel@redhat.com>
12 daysdocs: Constify all Property in examplesRichard Henderson2-3/+3
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
12 daystests/unit: Constify all PropertyRichard Henderson1-1/+1
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
12 dayshw/xen: Constify all PropertyRichard Henderson2-2/+2
Reviewed-by: Jason Andryuk <jason.andryuk@amd.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
12 dayshw/watchdog: Constify all PropertyRichard Henderson3-3/+3
Reviewed-by: Cédric Le Goater <clg@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
12 dayshw/virtio: Constify all PropertyRichard Henderson38-39/+39
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
12 dayshw/vfio: Constify all PropertyRichard Henderson4-5/+5
Reviewed-by: Cédric Le Goater <clg@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
12 dayshw/usb: Constify all PropertyRichard Henderson27-32/+32
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
12 dayshw/ufs: Constify all PropertyRichard Henderson2-2/+2
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
12 dayshw/tpm: Constify all PropertyRichard Henderson5-5/+5
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
12 dayshw/timer: Constify all PropertyRichard Henderson20-20/+20
Reviewed-by: Cédric Le Goater <clg@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
12 dayshw/ssi: Constify all PropertyRichard Henderson9-11/+11
Reviewed-by: Cédric Le Goater <clg@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
12 dayshw/sparc64: Constify all PropertyRichard Henderson1-2/+2
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
12 dayshw/sparc: Constify all PropertyRichard Henderson1-1/+1
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
12 dayshw/sd: Constify all PropertyRichard Henderson5-7/+7
Reviewed-by: Cédric Le Goater <clg@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
12 dayshw/scsi: Constify all PropertyRichard Henderson10-14/+14
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
12 dayshw/s390x: Constify all PropertyRichard Henderson19-19/+19
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
12 dayshw/rx: Constify all PropertyRichard Henderson1-1/+1
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
12 dayshw/rtc: Constify all PropertyRichard Henderson6-6/+6
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
12 dayshw/riscv: Constify all PropertyRichard Henderson5-5/+5
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
12 dayshw/remote: Constify all PropertyRichard Henderson1-1/+1
Reviewed-by: Jagannathan Raman <jag.raman@oracle.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
12 dayshw/ppc: Constify all PropertyRichard Henderson20-23/+23
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>