qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: agraf@suse.de
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 4/4] pseries: Under kvm use guest cpu = host cpu by default
Date: Thu, 13 Oct 2011 19:40:34 +1100	[thread overview]
Message-ID: <1318495234-24196-5-git-send-email-david@gibson.dropbear.id.au> (raw)
In-Reply-To: <1318495234-24196-1-git-send-email-david@gibson.dropbear.id.au>

Now that we've implemented -cpu host for ppc, this patch updates the
pseries machine to use the host cpu as the guest cpu by default when
running under KVM.  This is important because under KVM Book3S-HV the guest
cpu _cannot_ be of a different type to the host cpu (at the moment
KVM Book3S-HV will silently virtualize the host cpu instead of whatever was
requested, but in future it is likely to simply refuse to run the VM if
a cpu model other than the host's is requested).

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
 hw/spapr.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/spapr.c b/hw/spapr.c
index 00b9c67..fecfa4a 100644
--- a/hw/spapr.c
+++ b/hw/spapr.c
@@ -403,7 +403,7 @@ static void ppc_spapr_init(ram_addr_t ram_size,
 
     /* init CPUs */
     if (cpu_model == NULL) {
-        cpu_model = "POWER7";
+        cpu_model = kvm_enabled() ? "host" : "POWER7";
     }
     for (i = 0; i < smp_cpus; i++) {
         env = cpu_init(cpu_model);
-- 
1.7.6.3

  parent reply	other threads:[~2011-10-13  8:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-13  8:40 [Qemu-devel] [0/4] ppc: Implement -host CPU David Gibson
2011-10-13  8:40 ` [Qemu-devel] [PATCH 1/4] ppc: Remove broken partial PVR matching David Gibson
2011-10-13  8:40 ` [Qemu-devel] [PATCH 2/4] ppc: First cut implementation of -cpu host David Gibson
2011-10-13  8:40 ` [Qemu-devel] [PATCH 3/4] ppc: Add cpu defs for POWER7 revisions 2.1 and 2.3 David Gibson
2011-10-13  8:40 ` David Gibson [this message]
2011-10-13 12:01 ` [Qemu-devel] [0/4] ppc: Implement -host CPU Alexander Graf

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=1318495234-24196-5-git-send-email-david@gibson.dropbear.id.au \
    --to=david@gibson.dropbear.id.au \
    --cc=agraf@suse.de \
    --cc=qemu-devel@nongnu.org \
    /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).