On 02/07/2018 02:07 PM, [email protected] wrote:

>   CC      s390x-linux-user/target/s390x/cpu.o
> /var/tmp/patchew-tester-tmp-ctncjhw8/src/target/s390x/cpu.c: In function 
> ‘s390_cpu_get_crash_info’:
> /var/tmp/patchew-tester-tmp-ctncjhw8/src/target/s390x/cpu.c:251:39: error: 
> ‘CPUS390XState {aka struct CPUS390XState}’ has no member named ‘core_id’
>      panic_info->u.s390.core = cpu->env.core_id;
>                                        ^
> make[1]: *** [/var/tmp/patchew-tester-tmp-ctncjhw8/src/rules.mak:66: 
> target/s390x/cpu.o] Error 1

Hmm, I should really re-add linux-user to my testing...


This on top fixes the issue:

diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
index 9dea65b604..603e68e284 100644
--- a/target/s390x/cpu.c
+++ b/target/s390x/cpu.c
@@ -248,7 +248,9 @@ static GuestPanicInformation 
*s390_cpu_get_crash_info(CPUState *cs)
     panic_info = g_malloc0(sizeof(GuestPanicInformation));
 
     panic_info->type = GUEST_PANIC_INFORMATION_TYPE_S390;
+#if !defined(CONFIG_USER_ONLY)
     panic_info->u.s390.core = cpu->env.core_id;
+#endif
     panic_info->u.s390.psw_mask = cpu->env.psw.mask;
     panic_info->u.s390.psw_addr = cpu->env.psw.addr;
     panic_info->u.s390.reason = cpu->env.crash_reason;


Reply via email to