Re: [Qemu-devel] [PATCH 2/7] pnv: Add missing error check during cpu realize()

2018-06-13 Thread David Gibson
On Wed, Jun 13, 2018 at 07:53:29PM +1000, David Gibson wrote: > On Wed, Jun 13, 2018 at 11:42:07AM +0200, Greg Kurz wrote: > > On Wed, 13 Jun 2018 11:14:57 +0200 > > Cédric Le Goater wrote: > > > > > >> index 13ad7d9e04..efb68226bb 100644 > > > >> --- a/hw/ppc/pnv_core.c > > > >> +++ b/hw/ppc/pnv

Re: [Qemu-devel] [PATCH 2/7] pnv: Add missing error check during cpu realize()

2018-06-13 Thread David Gibson
On Wed, Jun 13, 2018 at 11:42:07AM +0200, Greg Kurz wrote: > On Wed, 13 Jun 2018 11:14:57 +0200 > Cédric Le Goater wrote: > > > >> index 13ad7d9e04..efb68226bb 100644 > > >> --- a/hw/ppc/pnv_core.c > > >> +++ b/hw/ppc/pnv_core.c > > >> @@ -173,6 +173,9 @@ static void pnv_core_realize(DeviceState

Re: [Qemu-devel] [PATCH 2/7] pnv: Add missing error check during cpu realize()

2018-06-13 Thread David Gibson
On Wed, Jun 13, 2018 at 11:14:57AM +0200, Cédric Le Goater wrote: > >> index 13ad7d9e04..efb68226bb 100644 > >> --- a/hw/ppc/pnv_core.c > >> +++ b/hw/ppc/pnv_core.c > >> @@ -173,6 +173,9 @@ static void pnv_core_realize(DeviceState *dev, Error > >> **errp) > >> > >> snprintf(name, sizeof

Re: [Qemu-devel] [PATCH 2/7] pnv: Add missing error check during cpu realize()

2018-06-13 Thread Greg Kurz
On Wed, 13 Jun 2018 11:14:57 +0200 Cédric Le Goater wrote: > >> index 13ad7d9e04..efb68226bb 100644 > >> --- a/hw/ppc/pnv_core.c > >> +++ b/hw/ppc/pnv_core.c > >> @@ -173,6 +173,9 @@ static void pnv_core_realize(DeviceState *dev, Error > >> **errp) > >> > >> snprintf(name, sizeof(name

Re: [Qemu-devel] [PATCH 2/7] pnv: Add missing error check during cpu realize()

2018-06-13 Thread David Gibson
On Wed, Jun 13, 2018 at 10:15:09AM +0200, Cédric Le Goater wrote: > On 06/13/2018 08:57 AM, David Gibson wrote: > > In pnv_core_realize() we call two functions with an Error * parameter in > > succession, which means if they both cause errors we'll lose the first one. > > Add an extra test/escape t

Re: [Qemu-devel] [PATCH 2/7] pnv: Add missing error check during cpu realize()

2018-06-13 Thread Cédric Le Goater
>> index 13ad7d9e04..efb68226bb 100644 >> --- a/hw/ppc/pnv_core.c >> +++ b/hw/ppc/pnv_core.c >> @@ -173,6 +173,9 @@ static void pnv_core_realize(DeviceState *dev, Error >> **errp) >> >> snprintf(name, sizeof(name), "thread[%d]", i); >> object_property_add_child(OBJECT(pc), name

Re: [Qemu-devel] [PATCH 2/7] pnv: Add missing error check during cpu realize()

2018-06-13 Thread Greg Kurz
On Wed, 13 Jun 2018 16:57:02 +1000 David Gibson wrote: > In pnv_core_realize() we call two functions with an Error * parameter in > succession, which means if they both cause errors we'll lose the first one. Not exactly. The error code doesn't allow that and QEMU will abort. static void error_s

Re: [Qemu-devel] [PATCH 2/7] pnv: Add missing error check during cpu realize()

2018-06-13 Thread Cédric Le Goater
On 06/13/2018 08:57 AM, David Gibson wrote: > In pnv_core_realize() we call two functions with an Error * parameter in > succession, which means if they both cause errors we'll lose the first one. > Add an extra test/escape to fix this. I tend now to pass just NULL or &error_abort to object_proper

[Qemu-devel] [PATCH 2/7] pnv: Add missing error check during cpu realize()

2018-06-12 Thread David Gibson
In pnv_core_realize() we call two functions with an Error * parameter in succession, which means if they both cause errors we'll lose the first one. Add an extra test/escape to fix this. Signed-off-by: David Gibson --- hw/ppc/pnv_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/p