qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Bruce Rogers <brogers@suse.com>
To: qemu-devel@nongnu.org
Cc: rth@twiddle.net, agraf@suse.de, david@redhat.com,
	Bruce Rogers <brogers@suse.com>
Subject: [Qemu-devel] [PATCH] linux-user: Exclude more cpu model code when building s390x linux-user
Date: Thu,  2 Mar 2017 12:51:34 -0700	[thread overview]
Message-ID: <20170302195134.22171-1-brogers@suse.com> (raw)

Currently qemu-s390x segfaults. Avoid cpu model code which doesn't
apply in linux user case.

Signed-off-by: Bruce Rogers <brogers@suse.com>
---
 target/s390x/cpu_models.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
index 2a894eec65..97e4e75f68 100644
--- a/target/s390x/cpu_models.c
+++ b/target/s390x/cpu_models.c
@@ -590,7 +590,6 @@ CpuModelBaselineInfo *arch_query_cpu_model_baseline(CpuModelInfo *infoa,
     cpu_info_from_model(baseline_info->model, &model, true);
     return baseline_info;
 }
-#endif
 
 static void check_consistency(const S390CPUModel *model)
 {
@@ -660,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;
 
@@ -680,9 +678,9 @@ static S390CPUModel *get_max_cpu_model(Error **errp)
         cached = true;
         return &max_model;
     }
-#endif
     return NULL;
 }
+#endif
 
 static inline void apply_cpu_model(const S390CPUModel *model, Error **errp)
 {
@@ -718,6 +716,7 @@ static inline void apply_cpu_model(const S390CPUModel *model, Error **errp)
 
 void s390_realize_cpu_model(CPUState *cs, Error **errp)
 {
+#ifndef CONFIG_USER_ONLY
     S390CPUClass *xcc = S390_CPU_GET_CLASS(cs);
     S390CPU *cpu = S390_CPU(cs);
     const S390CPUModel *max_model;
@@ -751,6 +750,7 @@ void s390_realize_cpu_model(CPUState *cs, Error **errp)
     }
 
     apply_cpu_model(cpu->model, errp);
+#endif
 }
 
 static void get_feature(Object *obj, Visitor *v, const char *name,
-- 
2.11.1

             reply	other threads:[~2017-03-02 19:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-02 19:51 Bruce Rogers [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-03-02 19:33 [Qemu-devel] [PATCH] linux-user: Exclude more cpu model code when building s390x linux-user Bruce Rogers
2017-03-02 19:50 ` David Hildenbrand
2017-03-02 19:53   ` David Hildenbrand
2017-03-02 19:59     ` Bruce Rogers
2017-03-02 20:03       ` David Hildenbrand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170302195134.22171-1-brogers@suse.com \
    --to=brogers@suse.com \
    --cc=agraf@suse.de \
    --cc=david@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).