On Wed, 24 Jun 2020 16:20:16 +0200 Paolo Bonzini <pbonz...@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 >