qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

qom: Drop object_property_set_description() parameter @errp

object_property_set_description() and
object_class_property_set_description() fail only when property @name
is not found.

There are 85 calls of object_property_set_description() and
object_class_property_set_description(). None of them can fail:

* 84 immediately follow the creation of the property.

* The one in spapr_rng_instance_init() refers to a property created in
spapr_rng_class_init(), from spapr_rng_properties[].

Every one of them still gets to decide what to pass for @errp.

51 calls pass &error_abort, 32 calls pass NULL, one receives the error
and propagates it to &error_abort, and one propagates it to
&error_fatal. I'm actually surprised none of them violates the Error
API.

What are we gaining by letting callers handle the "property not found"
error? Use when the property is not known to exist is simpler: you
don't have to guard the call with a check. We haven't found such a
use in 5+ years. Until we do, let's make life a bit simpler and drop
the @errp parameter.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200505152926.18877-8-armbru@redhat.com>
[One semantic rebase conflict resolved]

+92 -145
+2 -2
accel/kvm/kvm-all.c
··· 3113 3113 NULL, kvm_set_kernel_irqchip, 3114 3114 NULL, NULL, &error_abort); 3115 3115 object_class_property_set_description(oc, "kernel-irqchip", 3116 - "Configure KVM in-kernel irqchip", &error_abort); 3116 + "Configure KVM in-kernel irqchip"); 3117 3117 3118 3118 object_class_property_add(oc, "kvm-shadow-mem", "int", 3119 3119 kvm_get_kvm_shadow_mem, kvm_set_kvm_shadow_mem, 3120 3120 NULL, NULL, &error_abort); 3121 3121 object_class_property_set_description(oc, "kvm-shadow-mem", 3122 - "KVM shadow MMU size", &error_abort); 3122 + "KVM shadow MMU size"); 3123 3123 } 3124 3124 3125 3125 static const TypeInfo kvm_accel_type = {
+1 -1
accel/tcg/tcg-all.c
··· 210 210 tcg_get_tb_size, tcg_set_tb_size, 211 211 NULL, NULL, &error_abort); 212 212 object_class_property_set_description(oc, "tb-size", 213 - "TCG translation block cache size", &error_abort); 213 + "TCG translation block cache size"); 214 214 215 215 } 216 216
+3 -6
backends/hostmem-memfd.c
··· 144 144 memfd_backend_set_hugetlb, 145 145 &error_abort); 146 146 object_class_property_set_description(oc, "hugetlb", 147 - "Use huge pages", 148 - &error_abort); 147 + "Use huge pages"); 149 148 object_class_property_add(oc, "hugetlbsize", "int", 150 149 memfd_backend_get_hugetlbsize, 151 150 memfd_backend_set_hugetlbsize, 152 151 NULL, NULL, &error_abort); 153 152 object_class_property_set_description(oc, "hugetlbsize", 154 - "Huge pages size (ex: 2M, 1G)", 155 - &error_abort); 153 + "Huge pages size (ex: 2M, 1G)"); 156 154 } 157 155 object_class_property_add_bool(oc, "seal", 158 156 memfd_backend_get_seal, 159 157 memfd_backend_set_seal, 160 158 &error_abort); 161 159 object_class_property_set_description(oc, "seal", 162 - "Seal growing & shrinking", 163 - &error_abort); 160 + "Seal growing & shrinking"); 164 161 } 165 162 166 163 static const TypeInfo memfd_backend_info = {
+8 -8
backends/hostmem.c
··· 465 465 host_memory_backend_get_merge, 466 466 host_memory_backend_set_merge, &error_abort); 467 467 object_class_property_set_description(oc, "merge", 468 - "Mark memory as mergeable", &error_abort); 468 + "Mark memory as mergeable"); 469 469 object_class_property_add_bool(oc, "dump", 470 470 host_memory_backend_get_dump, 471 471 host_memory_backend_set_dump, &error_abort); 472 472 object_class_property_set_description(oc, "dump", 473 - "Set to 'off' to exclude from core dump", &error_abort); 473 + "Set to 'off' to exclude from core dump"); 474 474 object_class_property_add_bool(oc, "prealloc", 475 475 host_memory_backend_get_prealloc, 476 476 host_memory_backend_set_prealloc, &error_abort); 477 477 object_class_property_set_description(oc, "prealloc", 478 - "Preallocate memory", &error_abort); 478 + "Preallocate memory"); 479 479 object_class_property_add(oc, "prealloc-threads", "int", 480 480 host_memory_backend_get_prealloc_threads, 481 481 host_memory_backend_set_prealloc_threads, 482 482 NULL, NULL, &error_abort); 483 483 object_class_property_set_description(oc, "prealloc-threads", 484 - "Number of CPU threads to use for prealloc", &error_abort); 484 + "Number of CPU threads to use for prealloc"); 485 485 object_class_property_add(oc, "size", "int", 486 486 host_memory_backend_get_size, 487 487 host_memory_backend_set_size, 488 488 NULL, NULL, &error_abort); 489 489 object_class_property_set_description(oc, "size", 490 - "Size of the memory region (ex: 500M)", &error_abort); 490 + "Size of the memory region (ex: 500M)"); 491 491 object_class_property_add(oc, "host-nodes", "int", 492 492 host_memory_backend_get_host_nodes, 493 493 host_memory_backend_set_host_nodes, 494 494 NULL, NULL, &error_abort); 495 495 object_class_property_set_description(oc, "host-nodes", 496 - "Binds memory to the list of NUMA host nodes", &error_abort); 496 + "Binds memory to the list of NUMA host nodes"); 497 497 object_class_property_add_enum(oc, "policy", "HostMemPolicy", 498 498 &HostMemPolicy_lookup, 499 499 host_memory_backend_get_policy, 500 500 host_memory_backend_set_policy, &error_abort); 501 501 object_class_property_set_description(oc, "policy", 502 - "Set the NUMA policy", &error_abort); 502 + "Set the NUMA policy"); 503 503 object_class_property_add_bool(oc, "share", 504 504 host_memory_backend_get_share, host_memory_backend_set_share, 505 505 &error_abort); 506 506 object_class_property_set_description(oc, "share", 507 - "Mark the memory as private to QEMU or shared", &error_abort); 507 + "Mark the memory as private to QEMU or shared"); 508 508 object_class_property_add_bool(oc, "x-use-canonical-path-for-ramblock-id", 509 509 host_memory_backend_get_use_canonical_path, 510 510 host_memory_backend_set_use_canonical_path, &error_abort);
+1 -1
hw/arm/aspeed.c
··· 546 546 aspeed_get_mmio_exec, 547 547 aspeed_set_mmio_exec, &error_abort); 548 548 object_class_property_set_description(oc, "execute-in-place", 549 - "boot directly from CE0 flash device", &error_abort); 549 + "boot directly from CE0 flash device"); 550 550 } 551 551 552 552 static void aspeed_machine_class_init(ObjectClass *oc, void *data)
+2 -4
hw/arm/vexpress.c
··· 752 752 vexpress_set_secure, NULL); 753 753 object_property_set_description(obj, "secure", 754 754 "Set on/off to enable/disable the ARM " 755 - "Security Extensions (TrustZone)", 756 - NULL); 755 + "Security Extensions (TrustZone)"); 757 756 } 758 757 759 758 static void vexpress_a15_instance_init(Object *obj) ··· 770 769 object_property_set_description(obj, "virtualization", 771 770 "Set on/off to enable/disable the ARM " 772 771 "Virtualization Extensions " 773 - "(defaults to same as 'secure')", 774 - NULL); 772 + "(defaults to same as 'secure')"); 775 773 } 776 774 777 775 static void vexpress_a9_instance_init(Object *obj)
+8 -15
hw/arm/virt.c
··· 2272 2272 virt_get_acpi, virt_set_acpi, 2273 2273 NULL, NULL, &error_abort); 2274 2274 object_class_property_set_description(oc, "acpi", 2275 - "Enable ACPI", &error_abort); 2275 + "Enable ACPI"); 2276 2276 } 2277 2277 2278 2278 static void virt_instance_init(Object *obj) ··· 2289 2289 virt_set_secure, NULL); 2290 2290 object_property_set_description(obj, "secure", 2291 2291 "Set on/off to enable/disable the ARM " 2292 - "Security Extensions (TrustZone)", 2293 - NULL); 2292 + "Security Extensions (TrustZone)"); 2294 2293 2295 2294 /* EL2 is also disabled by default, for similar reasons */ 2296 2295 vms->virt = false; ··· 2299 2298 object_property_set_description(obj, "virtualization", 2300 2299 "Set on/off to enable/disable emulating a " 2301 2300 "guest CPU which implements the ARM " 2302 - "Virtualization Extensions", 2303 - NULL); 2301 + "Virtualization Extensions"); 2304 2302 2305 2303 /* High memory is enabled by default */ 2306 2304 vms->highmem = true; ··· 2308 2306 virt_set_highmem, NULL); 2309 2307 object_property_set_description(obj, "highmem", 2310 2308 "Set on/off to enable/disable using " 2311 - "physical address space above 32 bits", 2312 - NULL); 2309 + "physical address space above 32 bits"); 2313 2310 vms->gic_version = VIRT_GIC_VERSION_NOSEL; 2314 2311 object_property_add_str(obj, "gic-version", virt_get_gic_version, 2315 2312 virt_set_gic_version, NULL); 2316 2313 object_property_set_description(obj, "gic-version", 2317 2314 "Set GIC version. " 2318 - "Valid values are 2, 3, host and max", 2319 - NULL); 2315 + "Valid values are 2, 3, host and max"); 2320 2316 2321 2317 vms->highmem_ecam = !vmc->no_highmem_ecam; 2322 2318 ··· 2329 2325 virt_set_its, NULL); 2330 2326 object_property_set_description(obj, "its", 2331 2327 "Set on/off to enable/disable " 2332 - "ITS instantiation", 2333 - NULL); 2328 + "ITS instantiation"); 2334 2329 } 2335 2330 2336 2331 /* Default disallows iommu instantiation */ ··· 2338 2333 object_property_add_str(obj, "iommu", virt_get_iommu, virt_set_iommu, NULL); 2339 2334 object_property_set_description(obj, "iommu", 2340 2335 "Set the IOMMU type. " 2341 - "Valid values are none and smmuv3", 2342 - NULL); 2336 + "Valid values are none and smmuv3"); 2343 2337 2344 2338 /* Default disallows RAS instantiation */ 2345 2339 vms->ras = false; ··· 2347 2341 virt_set_ras, NULL); 2348 2342 object_property_set_description(obj, "ras", 2349 2343 "Set on/off to enable/disable reporting host memory errors " 2350 - "to a KVM guest using ACPI and guest external abort exceptions", 2351 - NULL); 2344 + "to a KVM guest using ACPI and guest external abort exceptions"); 2352 2345 2353 2346 vms->irqmap = a15irqmap; 2354 2347
+2 -4
hw/arm/xlnx-zcu102.c
··· 212 212 zcu102_set_secure, NULL); 213 213 object_property_set_description(obj, "secure", 214 214 "Set on/off to enable/disable the ARM " 215 - "Security Extensions (TrustZone)", 216 - NULL); 215 + "Security Extensions (TrustZone)"); 217 216 218 217 /* Default to virt (EL2) being disabled */ 219 218 s->virt = false; ··· 222 221 object_property_set_description(obj, "virtualization", 223 222 "Set on/off to enable/disable emulating a " 224 223 "guest CPU which implements the ARM " 225 - "Virtualization Extensions", 226 - NULL); 224 + "Virtualization Extensions"); 227 225 } 228 226 229 227 static void xlnx_zcu102_machine_class_init(ObjectClass *oc, void *data)
+19 -22
hw/core/machine.c
··· 789 789 object_class_property_add_str(oc, "kernel", 790 790 machine_get_kernel, machine_set_kernel, &error_abort); 791 791 object_class_property_set_description(oc, "kernel", 792 - "Linux kernel image file", &error_abort); 792 + "Linux kernel image file"); 793 793 794 794 object_class_property_add_str(oc, "initrd", 795 795 machine_get_initrd, machine_set_initrd, &error_abort); 796 796 object_class_property_set_description(oc, "initrd", 797 - "Linux initial ramdisk file", &error_abort); 797 + "Linux initial ramdisk file"); 798 798 799 799 object_class_property_add_str(oc, "append", 800 800 machine_get_append, machine_set_append, &error_abort); 801 801 object_class_property_set_description(oc, "append", 802 - "Linux kernel command line", &error_abort); 802 + "Linux kernel command line"); 803 803 804 804 object_class_property_add_str(oc, "dtb", 805 805 machine_get_dtb, machine_set_dtb, &error_abort); 806 806 object_class_property_set_description(oc, "dtb", 807 - "Linux kernel device tree file", &error_abort); 807 + "Linux kernel device tree file"); 808 808 809 809 object_class_property_add_str(oc, "dumpdtb", 810 810 machine_get_dumpdtb, machine_set_dumpdtb, &error_abort); 811 811 object_class_property_set_description(oc, "dumpdtb", 812 - "Dump current dtb to a file and quit", &error_abort); 812 + "Dump current dtb to a file and quit"); 813 813 814 814 object_class_property_add(oc, "phandle-start", "int", 815 815 machine_get_phandle_start, machine_set_phandle_start, 816 816 NULL, NULL, &error_abort); 817 817 object_class_property_set_description(oc, "phandle-start", 818 - "The first phandle ID we may generate dynamically", &error_abort); 818 + "The first phandle ID we may generate dynamically"); 819 819 820 820 object_class_property_add_str(oc, "dt-compatible", 821 821 machine_get_dt_compatible, machine_set_dt_compatible, &error_abort); 822 822 object_class_property_set_description(oc, "dt-compatible", 823 - "Overrides the \"compatible\" property of the dt root node", 824 - &error_abort); 823 + "Overrides the \"compatible\" property of the dt root node"); 825 824 826 825 object_class_property_add_bool(oc, "dump-guest-core", 827 826 machine_get_dump_guest_core, machine_set_dump_guest_core, &error_abort); 828 827 object_class_property_set_description(oc, "dump-guest-core", 829 - "Include guest memory in a core dump", &error_abort); 828 + "Include guest memory in a core dump"); 830 829 831 830 object_class_property_add_bool(oc, "mem-merge", 832 831 machine_get_mem_merge, machine_set_mem_merge, &error_abort); 833 832 object_class_property_set_description(oc, "mem-merge", 834 - "Enable/disable memory merge support", &error_abort); 833 + "Enable/disable memory merge support"); 835 834 836 835 object_class_property_add_bool(oc, "usb", 837 836 machine_get_usb, machine_set_usb, &error_abort); 838 837 object_class_property_set_description(oc, "usb", 839 - "Set on/off to enable/disable usb", &error_abort); 838 + "Set on/off to enable/disable usb"); 840 839 841 840 object_class_property_add_bool(oc, "graphics", 842 841 machine_get_graphics, machine_set_graphics, &error_abort); 843 842 object_class_property_set_description(oc, "graphics", 844 - "Set on/off to enable/disable graphics emulation", &error_abort); 843 + "Set on/off to enable/disable graphics emulation"); 845 844 846 845 object_class_property_add_str(oc, "firmware", 847 846 machine_get_firmware, machine_set_firmware, 848 847 &error_abort); 849 848 object_class_property_set_description(oc, "firmware", 850 - "Firmware image", &error_abort); 849 + "Firmware image"); 851 850 852 851 object_class_property_add_bool(oc, "suppress-vmdesc", 853 852 machine_get_suppress_vmdesc, machine_set_suppress_vmdesc, 854 853 &error_abort); 855 854 object_class_property_set_description(oc, "suppress-vmdesc", 856 - "Set on to disable self-describing migration", &error_abort); 855 + "Set on to disable self-describing migration"); 857 856 858 857 object_class_property_add_bool(oc, "enforce-config-section", 859 858 machine_get_enforce_config_section, machine_set_enforce_config_section, 860 859 &error_abort); 861 860 object_class_property_set_description(oc, "enforce-config-section", 862 - "Set on to enforce configuration section migration", &error_abort); 861 + "Set on to enforce configuration section migration"); 863 862 864 863 object_class_property_add_str(oc, "memory-encryption", 865 864 machine_get_memory_encryption, machine_set_memory_encryption, 866 865 &error_abort); 867 866 object_class_property_set_description(oc, "memory-encryption", 868 - "Set memory encryption object to use", &error_abort); 867 + "Set memory encryption object to use"); 869 868 } 870 869 871 870 static void machine_class_base_init(ObjectClass *oc, void *data) ··· 898 897 &error_abort); 899 898 object_property_set_description(obj, "nvdimm", 900 899 "Set on/off to enable/disable " 901 - "NVDIMM instantiation", NULL); 900 + "NVDIMM instantiation"); 902 901 903 902 object_property_add_str(obj, "nvdimm-persistence", 904 903 machine_get_nvdimm_persistence, ··· 906 905 &error_abort); 907 906 object_property_set_description(obj, "nvdimm-persistence", 908 907 "Set NVDIMM persistence" 909 - "Valid values are cpu, mem-ctrl", 910 - NULL); 908 + "Valid values are cpu, mem-ctrl"); 911 909 } 912 910 913 911 if (mc->cpu_index_to_instance_props && mc->get_default_cpu_node_id) { ··· 918 916 object_property_set_description(obj, "hmat", 919 917 "Set on/off to enable/disable " 920 918 "ACPI Heterogeneous Memory Attribute " 921 - "Table (HMAT)", NULL); 919 + "Table (HMAT)"); 922 920 } 923 921 924 922 object_property_add_str(obj, "memory-backend", ··· 926 924 &error_abort); 927 925 object_property_set_description(obj, "memory-backend", 928 926 "Set RAM backend" 929 - "Valid value is ID of hostmem based backend", 930 - &error_abort); 927 + "Valid value is ID of hostmem based backend"); 931 928 932 929 /* Register notifier when init is done for sysbus sanity checks */ 933 930 ms->sysbus_notifier.notify = machine_init_notify;
+2 -4
hw/core/qdev.c
··· 775 775 prop, &error_abort); 776 776 777 777 object_property_set_description(obj, prop->name, 778 - prop->info->description, 779 - &error_abort); 778 + prop->info->description); 780 779 781 780 if (prop->set_default) { 782 781 prop->info->set_default_value(op, prop); ··· 805 804 } 806 805 } 807 806 object_class_property_set_description(oc, prop->name, 808 - prop->info->description, 809 - &error_abort); 807 + prop->info->description); 810 808 } 811 809 812 810 /* @qdev_alias_all_properties - Add alias properties to the source object for
+6 -8
hw/i386/microvm.c
··· 512 512 microvm_machine_set_pic, 513 513 NULL, NULL, &error_abort); 514 514 object_class_property_set_description(oc, MICROVM_MACHINE_PIC, 515 - "Enable i8259 PIC", &error_abort); 515 + "Enable i8259 PIC"); 516 516 517 517 object_class_property_add(oc, MICROVM_MACHINE_PIT, "OnOffAuto", 518 518 microvm_machine_get_pit, 519 519 microvm_machine_set_pit, 520 520 NULL, NULL, &error_abort); 521 521 object_class_property_set_description(oc, MICROVM_MACHINE_PIT, 522 - "Enable i8254 PIT", &error_abort); 522 + "Enable i8254 PIT"); 523 523 524 524 object_class_property_add(oc, MICROVM_MACHINE_RTC, "OnOffAuto", 525 525 microvm_machine_get_rtc, 526 526 microvm_machine_set_rtc, 527 527 NULL, NULL, &error_abort); 528 528 object_class_property_set_description(oc, MICROVM_MACHINE_RTC, 529 - "Enable MC146818 RTC", &error_abort); 529 + "Enable MC146818 RTC"); 530 530 531 531 object_class_property_add_bool(oc, MICROVM_MACHINE_ISA_SERIAL, 532 532 microvm_machine_get_isa_serial, 533 533 microvm_machine_set_isa_serial, 534 534 &error_abort); 535 535 object_class_property_set_description(oc, MICROVM_MACHINE_ISA_SERIAL, 536 - "Set off to disable the instantiation an ISA serial port", 537 - &error_abort); 536 + "Set off to disable the instantiation an ISA serial port"); 538 537 539 538 object_class_property_add_bool(oc, MICROVM_MACHINE_OPTION_ROMS, 540 539 microvm_machine_get_option_roms, 541 540 microvm_machine_set_option_roms, 542 541 &error_abort); 543 542 object_class_property_set_description(oc, MICROVM_MACHINE_OPTION_ROMS, 544 - "Set off to disable loading option ROMs", &error_abort); 543 + "Set off to disable loading option ROMs"); 545 544 546 545 object_class_property_add_bool(oc, MICROVM_MACHINE_AUTO_KERNEL_CMDLINE, 547 546 microvm_machine_get_auto_kernel_cmdline, ··· 549 548 &error_abort); 550 549 object_class_property_set_description(oc, 551 550 MICROVM_MACHINE_AUTO_KERNEL_CMDLINE, 552 - "Set off to disable adding virtio-mmio devices to the kernel cmdline", 553 - &error_abort); 551 + "Set off to disable adding virtio-mmio devices to the kernel cmdline"); 554 552 } 555 553 556 554 static const TypeInfo microvm_machine_info = {
+1 -1
hw/i386/pc.c
··· 1971 1971 pc_machine_get_vmport, pc_machine_set_vmport, 1972 1972 NULL, NULL, &error_abort); 1973 1973 object_class_property_set_description(oc, PC_MACHINE_VMPORT, 1974 - "Enable vmport (pc & q35)", &error_abort); 1974 + "Enable vmport (pc & q35)"); 1975 1975 1976 1976 object_class_property_add_bool(oc, PC_MACHINE_SMBUS, 1977 1977 pc_machine_get_smbus, pc_machine_set_smbus, &error_abort);
+3 -3
hw/i386/x86.c
··· 984 984 x86_machine_get_max_ram_below_4g, x86_machine_set_max_ram_below_4g, 985 985 NULL, NULL, &error_abort); 986 986 object_class_property_set_description(oc, X86_MACHINE_MAX_RAM_BELOW_4G, 987 - "Maximum ram below the 4G boundary (32bit boundary)", &error_abort); 987 + "Maximum ram below the 4G boundary (32bit boundary)"); 988 988 989 989 object_class_property_add(oc, X86_MACHINE_SMM, "OnOffAuto", 990 990 x86_machine_get_smm, x86_machine_set_smm, 991 991 NULL, NULL, &error_abort); 992 992 object_class_property_set_description(oc, X86_MACHINE_SMM, 993 - "Enable SMM", &error_abort); 993 + "Enable SMM"); 994 994 995 995 object_class_property_add(oc, X86_MACHINE_ACPI, "OnOffAuto", 996 996 x86_machine_get_acpi, x86_machine_set_acpi, 997 997 NULL, NULL, &error_abort); 998 998 object_class_property_set_description(oc, X86_MACHINE_ACPI, 999 - "Enable ACPI", &error_abort); 999 + "Enable ACPI"); 1000 1000 } 1001 1001 1002 1002 static const TypeInfo x86_machine_info = {
+1 -2
hw/ppc/mac_newworld.c
··· 631 631 core99_set_via_config, NULL); 632 632 object_property_set_description(obj, "via", 633 633 "Set VIA configuration. " 634 - "Valid values are cuda, pmu and pmu-adb", 635 - NULL); 634 + "Valid values are cuda, pmu and pmu-adb"); 636 635 637 636 return; 638 637 }
+1 -2
hw/ppc/pnv.c
··· 2030 2030 pnv_machine_get_hb, pnv_machine_set_hb, 2031 2031 &error_abort); 2032 2032 object_class_property_set_description(oc, "hb-mode", 2033 - "Use a hostboot like boot loader", 2034 - NULL); 2033 + "Use a hostboot like boot loader"); 2035 2034 } 2036 2035 2037 2036 #define DEFINE_PNV8_CHIP_TYPE(type, class_initfn) \
+8 -13
hw/ppc/spapr.c
··· 3307 3307 object_property_add_str(obj, "kvm-type", 3308 3308 spapr_get_kvm_type, spapr_set_kvm_type, NULL); 3309 3309 object_property_set_description(obj, "kvm-type", 3310 - "Specifies the KVM virtualization mode (HV, PR)", 3311 - NULL); 3310 + "Specifies the KVM virtualization mode (HV, PR)"); 3312 3311 object_property_add_bool(obj, "modern-hotplug-events", 3313 3312 spapr_get_modern_hotplug_events, 3314 3313 spapr_set_modern_hotplug_events, ··· 3316 3315 object_property_set_description(obj, "modern-hotplug-events", 3317 3316 "Use dedicated hotplug event mechanism in" 3318 3317 " place of standard EPOW events when possible" 3319 - " (required for memory hot-unplug support)", 3320 - NULL); 3318 + " (required for memory hot-unplug support)"); 3321 3319 ppc_compat_add_property(obj, "max-cpu-compat", &spapr->max_compat_pvr, 3322 3320 "Maximum permitted CPU compatibility mode", 3323 3321 &error_fatal); ··· 3325 3323 object_property_add_str(obj, "resize-hpt", 3326 3324 spapr_get_resize_hpt, spapr_set_resize_hpt, NULL); 3327 3325 object_property_set_description(obj, "resize-hpt", 3328 - "Resizing of the Hash Page Table (enabled, disabled, required)", 3329 - NULL); 3326 + "Resizing of the Hash Page Table (enabled, disabled, required)"); 3330 3327 object_property_add_uint32_ptr(obj, "vsmt", 3331 3328 &spapr->vsmt, OBJ_PROP_FLAG_READWRITE, 3332 3329 &error_abort); 3333 3330 object_property_set_description(obj, "vsmt", 3334 3331 "Virtual SMT: KVM behaves as if this were" 3335 - " the host's SMT mode", &error_abort); 3332 + " the host's SMT mode"); 3336 3333 3337 3334 object_property_add_bool(obj, "vfio-no-msix-emulation", 3338 3335 spapr_get_msix_emulation, NULL, NULL); ··· 3342 3339 &error_abort); 3343 3340 object_property_set_description(obj, "kernel-addr", 3344 3341 stringify(KERNEL_LOAD_ADDR) 3345 - " for -kernel is the default", 3346 - NULL); 3342 + " for -kernel is the default"); 3347 3343 spapr->kernel_addr = KERNEL_LOAD_ADDR; 3348 3344 /* The machine class defines the default interrupt controller mode */ 3349 3345 spapr->irq = smc->irq; 3350 3346 object_property_add_str(obj, "ic-mode", spapr_get_ic_mode, 3351 3347 spapr_set_ic_mode, NULL); 3352 3348 object_property_set_description(obj, "ic-mode", 3353 - "Specifies the interrupt controller mode (xics, xive, dual)", 3354 - NULL); 3349 + "Specifies the interrupt controller mode (xics, xive, dual)"); 3355 3350 3356 3351 object_property_add_str(obj, "host-model", 3357 3352 spapr_get_host_model, spapr_set_host_model, 3358 3353 &error_abort); 3359 3354 object_property_set_description(obj, "host-model", 3360 - "Host model to advertise in guest device tree", &error_abort); 3355 + "Host model to advertise in guest device tree"); 3361 3356 object_property_add_str(obj, "host-serial", 3362 3357 spapr_get_host_serial, spapr_set_host_serial, 3363 3358 &error_abort); 3364 3359 object_property_set_description(obj, "host-serial", 3365 - "Host serial number to advertise in guest device tree", &error_abort); 3360 + "Host serial number to advertise in guest device tree"); 3366 3361 } 3367 3362 3368 3363 static void spapr_machine_finalizefn(Object *obj)
+1 -5
hw/ppc/spapr_caps.c
··· 845 845 } 846 846 847 847 desc = g_strdup_printf("%s", cap->description); 848 - object_class_property_set_description(klass, name, desc, &local_err); 848 + object_class_property_set_description(klass, name, desc); 849 849 g_free(name); 850 850 g_free(desc); 851 - if (local_err) { 852 - error_propagate(errp, local_err); 853 - return; 854 - } 855 851 } 856 852 }
+1 -2
hw/ppc/spapr_rng.c
··· 103 103 } 104 104 105 105 object_property_set_description(obj, "rng", 106 - "ID of the random number generator backend", 107 - NULL); 106 + "ID of the random number generator backend"); 108 107 } 109 108 110 109 static void spapr_rng_realize(DeviceState *dev, Error **errp)
+2 -3
hw/riscv/sifive_u.c
··· 445 445 sifive_u_machine_set_start_in_flash, NULL); 446 446 object_property_set_description(obj, "start-in-flash", 447 447 "Set on to tell QEMU's ROM to jump to " 448 - "flash. Otherwise QEMU will jump to DRAM", 449 - NULL); 448 + "flash. Otherwise QEMU will jump to DRAM"); 450 449 451 450 s->serial = OTP_SERIAL; 452 451 object_property_add(obj, "serial", "uint32", sifive_u_machine_get_serial, 453 452 sifive_u_machine_set_serial, NULL, &s->serial, NULL); 454 - object_property_set_description(obj, "serial", "Board serial number", NULL); 453 + object_property_set_description(obj, "serial", "Board serial number"); 455 454 } 456 455 457 456 static void sifive_u_machine_class_init(ObjectClass *oc, void *data)
+1 -2
hw/s390x/css-bridge.c
··· 144 144 prop_get_true, NULL, NULL); 145 145 object_class_property_set_description(klass, "cssid-unrestricted", 146 146 "A css device can use any cssid, regardless whether virtual" 147 - " or not (read only, always true)", 148 - NULL); 147 + " or not (read only, always true)"); 149 148 } 150 149 151 150 static const TypeInfo virtual_css_bridge_info = {
+3 -6
hw/s390x/s390-virtio-ccw.c
··· 731 731 machine_get_aes_key_wrap, 732 732 machine_set_aes_key_wrap, NULL); 733 733 object_property_set_description(obj, "aes-key-wrap", 734 - "enable/disable AES key wrapping using the CPACF wrapping key", 735 - NULL); 734 + "enable/disable AES key wrapping using the CPACF wrapping key"); 736 735 object_property_set_bool(obj, true, "aes-key-wrap", NULL); 737 736 738 737 object_property_add_bool(obj, "dea-key-wrap", 739 738 machine_get_dea_key_wrap, 740 739 machine_set_dea_key_wrap, NULL); 741 740 object_property_set_description(obj, "dea-key-wrap", 742 - "enable/disable DEA key wrapping using the CPACF wrapping key", 743 - NULL); 741 + "enable/disable DEA key wrapping using the CPACF wrapping key"); 744 742 object_property_set_bool(obj, true, "dea-key-wrap", NULL); 745 743 object_property_add_str(obj, "loadparm", 746 744 machine_get_loadparm, machine_set_loadparm, NULL); 747 745 object_property_set_description(obj, "loadparm", 748 746 "Up to 8 chars in set of [A-Za-z0-9. ] (lower case chars converted" 749 747 " to upper case) to pass to machine loader, boot manager," 750 - " and guest kernel", 751 - NULL); 748 + " and guest kernel"); 752 749 } 753 750 754 751 static const TypeInfo ccw_machine_info = {
+1 -2
hw/sparc/sun4m.c
··· 797 797 object_property_allow_set_link, 798 798 OBJ_PROP_LINK_STRONG, &error_abort); 799 799 object_property_set_description(obj, "memdev", "Set RAM backend" 800 - "Valid value is ID of a hostmem backend", 801 - &error_abort); 800 + "Valid value is ID of a hostmem backend"); 802 801 } 803 802 804 803 static void ram_class_init(ObjectClass *klass, void *data)
+1 -1
hw/xen/xen-common.c
··· 201 201 xen_get_igd_gfx_passthru, xen_set_igd_gfx_passthru, 202 202 &error_abort); 203 203 object_class_property_set_description(oc, "igd-passthru", 204 - "Set on/off to enable/disable igd passthrou", &error_abort); 204 + "Set on/off to enable/disable igd passthrou"); 205 205 } 206 206 207 207 #define TYPE_XEN_ACCEL ACCEL_CLASS_NAME("xen")
+2 -4
include/qom/object.h
··· 1813 1813 * @obj: the object owning the property 1814 1814 * @name: the name of the property 1815 1815 * @description: the description of the property on the object 1816 - * @errp: if an error occurs, a pointer to an area to store the error 1817 1816 * 1818 1817 * Set an object property's description. 1819 1818 * 1820 1819 */ 1821 1820 void object_property_set_description(Object *obj, const char *name, 1822 - const char *description, Error **errp); 1821 + const char *description); 1823 1822 void object_class_property_set_description(ObjectClass *klass, const char *name, 1824 - const char *description, 1825 - Error **errp); 1823 + const char *description); 1826 1824 1827 1825 /** 1828 1826 * object_child_foreach:
+4 -15
qom/object.c
··· 2802 2802 } 2803 2803 2804 2804 object_property_set_description(obj, op->name, 2805 - target_prop->description, 2806 - &error_abort); 2805 + target_prop->description); 2807 2806 return op; 2808 2807 } 2809 2808 2810 2809 void object_property_set_description(Object *obj, const char *name, 2811 - const char *description, Error **errp) 2810 + const char *description) 2812 2811 { 2813 2812 ObjectProperty *op; 2814 2813 2815 - op = object_property_find(obj, name, errp); 2816 - if (!op) { 2817 - return; 2818 - } 2819 - 2814 + op = object_property_find(obj, name, &error_abort); 2820 2815 g_free(op->description); 2821 2816 op->description = g_strdup(description); 2822 2817 } 2823 2818 2824 2819 void object_class_property_set_description(ObjectClass *klass, 2825 2820 const char *name, 2826 - const char *description, 2827 - Error **errp) 2821 + const char *description) 2828 2822 { 2829 2823 ObjectProperty *op; 2830 2824 2831 2825 op = g_hash_table_lookup(klass->properties, name); 2832 - if (!op) { 2833 - error_setg(errp, "Property '.%s' not found", name); 2834 - return; 2835 - } 2836 - 2837 2826 g_free(op->description); 2838 2827 op->description = g_strdup(description); 2839 2828 }
+1 -2
target/arm/cpu64.c
··· 770 770 aarch64_cpu_set_aarch64, NULL); 771 771 object_property_set_description(obj, "aarch64", 772 772 "Set on/off to enable/disable aarch64 " 773 - "execution state ", 774 - NULL); 773 + "execution state "); 775 774 } 776 775 777 776 static void aarch64_cpu_finalizefn(Object *obj)
+1 -1
target/arm/kvm.c
··· 204 204 object_property_set_description(obj, "kvm-no-adjvtime", 205 205 "Set on to disable the adjustment of " 206 206 "the virtual counter. VM stopped time " 207 - "will be counted.", &error_abort); 207 + "will be counted."); 208 208 } 209 209 210 210 bool kvm_arm_pmu_supported(CPUState *cpu)
+3 -3
target/i386/sev.c
··· 251 251 qsev_guest_set_sev_device, 252 252 NULL); 253 253 object_class_property_set_description(oc, "sev-device", 254 - "SEV device to use", NULL); 254 + "SEV device to use"); 255 255 object_class_property_add_str(oc, "dh-cert-file", 256 256 qsev_guest_get_dh_cert_file, 257 257 qsev_guest_set_dh_cert_file, 258 258 NULL); 259 259 object_class_property_set_description(oc, "dh-cert-file", 260 - "guest owners DH certificate (encoded with base64)", NULL); 260 + "guest owners DH certificate (encoded with base64)"); 261 261 object_class_property_add_str(oc, "session-file", 262 262 qsev_guest_get_session_file, 263 263 qsev_guest_set_session_file, 264 264 NULL); 265 265 object_class_property_set_description(oc, "session-file", 266 - "guest owners session parameters (encoded with base64)", NULL); 266 + "guest owners session parameters (encoded with base64)"); 267 267 } 268 268 269 269 static void
+1 -1
target/ppc/compat.c
··· 324 324 325 325 names = g_strjoinv(", ", namesv); 326 326 desc = g_strdup_printf("%s. Valid values are %s.", basedesc, names); 327 - object_property_set_description(obj, name, desc, &local_err); 327 + object_property_set_description(obj, name, desc); 328 328 329 329 g_free(names); 330 330 g_free(desc);
+2 -2
target/s390x/cpu_models.c
··· 1107 1107 const S390FeatDef *def = s390_feat_def(feat); 1108 1108 object_property_add(obj, def->name, "bool", get_feature, 1109 1109 set_feature, NULL, (void *) feat, NULL); 1110 - object_property_set_description(obj, def->name, def->desc , NULL); 1110 + object_property_set_description(obj, def->name, def->desc); 1111 1111 } 1112 1112 for (group = 0; group < S390_FEAT_GROUP_MAX; group++) { 1113 1113 const S390FeatGroupDef *def = s390_feat_group_def(group); 1114 1114 object_property_add(obj, def->name, "bool", get_feature_group, 1115 1115 set_feature_group, NULL, (void *) group, NULL); 1116 - object_property_set_description(obj, def->name, def->desc , NULL); 1116 + object_property_set_description(obj, def->name, def->desc); 1117 1117 } 1118 1118 } 1119 1119