[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 20/25] x86: Fix x86_cpu_new() error API violations
From: |
Igor Mammedov |
Subject: |
Re: [PATCH v2 20/25] x86: Fix x86_cpu_new() error API violations |
Date: |
Thu, 25 Jun 2020 21:29:20 +0200 |
On Wed, 24 Jun 2020 16:20:16 +0200
Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 24/06/20 16:17, Igor Mammedov wrote:
> >> - cpu = object_new(MACHINE(x86ms)->cpu_type);
> >> -
> >> - object_property_set_uint(cpu, apic_id, "apic-id", &local_err);
> >> - qdev_realize(DEVICE(cpu), NULL, &local_err);
> >> -
> >> - object_unref(cpu);
> >> - error_propagate(errp, local_err);
> >> + object_property_set_uint(cpu, apic_id, "apic-id", &error_abort);
> > it may fail here if user specified wrong cpu flags, but there is nothing we
> > can do to fix it.
> > perhaps error_fatal would suit this case better?
>
> No, we need to add the error_propagate dance instead.
yep, it cam be used by legacy cpu-add, so just dying isn't an option.
we need deprecate cpu-add since device-add is supported buy all interested
boards for quite a bit and once it's gone, we can use error_fatal here.
>
> Paolo
>
- Re: [PATCH v2 03/25] Clean up some calls to ignore Error objects the right way, (continued)
- [PATCH v2 04/25] tests: Use &error_abort where appropriate, Markus Armbruster, 2020/06/24
- [PATCH v2 13/25] qdev: Drop qbus_set_bus_hotplug_handler() parameter @errp, Markus Armbruster, 2020/06/24
- [PATCH v2 12/25] aspeed: Clean up roundabout error propagation, Markus Armbruster, 2020/06/24
- [PATCH v2 09/25] sd/milkymist-memcard: Plug minor memory leak in realize, Markus Armbruster, 2020/06/24
- [PATCH v2 08/25] qga: Plug unlikely memory leak in guest-set-memory-blocks, Markus Armbruster, 2020/06/24
- [PATCH v2 20/25] x86: Fix x86_cpu_new() error API violations, Markus Armbruster, 2020/06/24
- [PATCH v2 06/25] usb/dev-mtp: Fix Error double free after inotify failure, Markus Armbruster, 2020/06/24
- [PATCH v2 17/25] riscv/sifive_u: Fix sifive_u_soc_realize() error API violations, Markus Armbruster, 2020/06/24
- [PATCH v2 19/25] mips/cps: Fix mips_cps_realize() error API violations, Markus Armbruster, 2020/06/24
- [PATCH v2 02/25] pci: Delete useless error_propagate(), Markus Armbruster, 2020/06/24
- [PATCH v2 01/25] net/virtio: Fix failover_replug_primary() return value regression, Markus Armbruster, 2020/06/24
- [PATCH v2 18/25] riscv_hart: Fix riscv_harts_realize() error API violations, Markus Armbruster, 2020/06/24
- [PATCH v2 11/25] vnc: Plug minor memory leak in vnc_display_open(), Markus Armbruster, 2020/06/24
- [PATCH v2 23/25] aspeed: Fix realize error API violation, Markus Armbruster, 2020/06/24
- [PATCH v2 25/25] arm/{bcm2835, fsl-imx25, fsl-imx6}: Fix realize error API violations, Markus Armbruster, 2020/06/24