qemu-devel
[Top][All Lists]
Advanced

[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
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]