]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/s390x: Fix broken user mode
authorStefan Weil <sw@weilnetz.de>
Mon, 30 Jan 2017 13:15:17 +0000 (14:15 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 30 Mar 2017 17:47:49 +0000 (12:47 -0500)
Returning NULL from get_max_cpu_model results in a SIGSEGV runtime error.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20170130131517.8092-1-sw@weilnetz.de>
Cc: qemu-stable@nongnu.org
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
(cherry picked from commit a352aa62a75fcb1db35a0c71a10af3b2c1f8b89f)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
target-s390x/cpu_models.c

index c1e729df5ed09bc22a0799e6b9316017006ce265..1a0702c8020c0593cc07f9c1054fa5e0791a8ace 100644 (file)
@@ -659,7 +659,6 @@ static void check_compatibility(const S390CPUModel *max_model,
 
 static S390CPUModel *get_max_cpu_model(Error **errp)
 {
-#ifndef CONFIG_USER_ONLY
     static S390CPUModel max_model;
     static bool cached;
 
@@ -679,7 +678,6 @@ static S390CPUModel *get_max_cpu_model(Error **errp)
         cached = true;
         return &max_model;
     }
-#endif
     return NULL;
 }