Re: [PATCH v2 20/25] x86: Fix x86_cpu_new() error API violations

2020-07-14 Thread Markus Armbruster
Igor Mammedov writes: > On Fri, 26 Jun 2020 14:54:38 +0200 > Markus Armbruster wrote: > >> Igor Mammedov writes: >> >> > On Wed, 24 Jun 2020 10:37:32 +0200 >> > Markus Armbruster wrote: >> > >> >> The Error ** argument must be NULL, &error_abort, &error_fatal, or a >> >> pointer to a variab

Re: [PATCH v2 20/25] x86: Fix x86_cpu_new() error API violations

2020-07-13 Thread Igor Mammedov
On Fri, 26 Jun 2020 14:54:38 +0200 Markus Armbruster wrote: > Igor Mammedov writes: > > > On Wed, 24 Jun 2020 10:37:32 +0200 > > Markus Armbruster wrote: > > > >> The Error ** argument must be NULL, &error_abort, &error_fatal, or a > >> pointer to a variable containing NULL. Passing an argu

Re: [PATCH v2 20/25] x86: Fix x86_cpu_new() error API violations

2020-06-26 Thread Markus Armbruster
Igor Mammedov writes: > On Wed, 24 Jun 2020 10:37:32 +0200 > Markus Armbruster wrote: > >> The Error ** argument must be NULL, &error_abort, &error_fatal, or a >> pointer to a variable containing NULL. Passing an argument of the >> latter kind twice without clearing it in between is wrong: if t

Re: [PATCH v2 20/25] x86: Fix x86_cpu_new() error API violations

2020-06-25 Thread Igor Mammedov
On Wed, 24 Jun 2020 16:20:16 +0200 Paolo Bonzini 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); > >> - > >

Re: [PATCH v2 20/25] x86: Fix x86_cpu_new() error API violations

2020-06-24 Thread Markus Armbruster
Paolo Bonzini writes: > 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

Re: [PATCH v2 20/25] x86: Fix x86_cpu_new() error API violations

2020-06-24 Thread Igor Mammedov
On Wed, 24 Jun 2020 10:37:32 +0200 Markus Armbruster wrote: > The Error ** argument must be NULL, &error_abort, &error_fatal, or a > pointer to a variable containing NULL. Passing an argument of the > latter kind twice without clearing it in between is wrong: if the > first call sets an error, i

Re: [PATCH v2 20/25] x86: Fix x86_cpu_new() error API violations

2020-06-24 Thread Paolo Bonzini
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); >> +

[PATCH v2 20/25] x86: Fix x86_cpu_new() error API violations

2020-06-24 Thread Markus Armbruster
The Error ** argument must be NULL, &error_abort, &error_fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second call. x86_cpu_new() is wron