Skip to contentSkip to conversation

Assertion triggers with power8e_v2.1-powernv-cpu-core

DISCUSSION Thomas Huth 2 participants 3 messages Jan 29, 2020

lore
Share & tools
lore
#0 lore raw

FYI, scripts/device-crash-test reported an assertion, triggerable like this:

$ qemu-system-ppc64 -machine ppce500 -device power8e_v2.1-powernv-cpu-core
qemu-system-ppc64: hw/ppc/pnv_core.c:221: pnv_core_realize: Assertion
`pc->chip' failed.
Aborted (core dumped)

Of course using that CPU is not possible on ppce500, but there should be a proper error message instead of that assertion.

Does anybody have an idea what's the best place to fix this issue?

Thomas

#1 lore raw
Quoted 11 lines · Thomas Huth

FYI, scripts/device-crash-test reported an assertion, triggerable like this:

$ qemu-system-ppc64 -machine ppce500 -device power8e_v2.1-powernv-cpu-core
qemu-system-ppc64: hw/ppc/pnv_core.c:221: pnv_core_realize: Assertion
`pc->chip' failed.
Aborted (core dumped)

Of course using that CPU is not possible on ppce500, but there should be a proper error message instead of that assertion.

Does anybody have an idea what's the best place to fix this issue?

The cores should be instantiated by a PowerNV chip. So may be we should fix this issue with :

@@ -325,6 +325,7 @@ static void pnv_core_class_init(ObjectCl

     dc->realize = pnv_core_realize;
     dc->unrealize = pnv_core_unrealize;
     device_class_set_props(dc, pnv_core_properties);

+ dc->user_creatable = false;
}

#define DEFINE_PNV_CORE_TYPE(family, cpu_model) \

I think that most of the PowerNV devices are not user creatable.

C.

#2 lore raw
Quoted 26 lines · Cédric Le Goater
Quoted 11 lines · Thomas Huth

FYI, scripts/device-crash-test reported an assertion, triggerable like this:

$ qemu-system-ppc64 -machine ppce500 -device power8e_v2.1-powernv-cpu-core
qemu-system-ppc64: hw/ppc/pnv_core.c:221: pnv_core_realize: Assertion
`pc->chip' failed.
Aborted (core dumped)

Of course using that CPU is not possible on ppce500, but there should be a proper error message instead of that assertion.

Does anybody have an idea what's the best place to fix this issue?

The cores should be instantiated by a PowerNV chip. So may be we should fix this issue with :

(quoted diff) +1 -0
@@ -325,6 +325,7 @@ static void pnv_core_class_init(ObjectCl
     dc->realize = pnv_core_realize;
     dc->unrealize = pnv_core_unrealize;
     device_class_set_props(dc, pnv_core_properties);
+    dc->user_creatable = false;
 }
 
 #define DEFINE_PNV_CORE_TYPE(family, cpu_model) \
Quoted 1 line

I think that most of the PowerNV devices are not user creatable.

Right, there are also aborts with: pnv-lpc, pnv-homer, pnv-occ, ...

Do you have some spare time for a patch?

Thomas