All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Joerg Roedel <joerg.roedel@amd.com>
Cc: Avi Kivity <avi@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	kvm@vger.kernel.org, qemu-devel@nongnu.org
Subject: Re: [PATCH 1/3] Make kvm64 the default cpu model when kvm_enabled()
Date: Tue, 14 Sep 2010 17:58:03 +0200	[thread overview]
Message-ID: <4C8F9B8B.9060205@suse.de> (raw)
In-Reply-To: <1284479530-4748-2-git-send-email-joerg.roedel@amd.com>

Joerg Roedel wrote:
> As requested by Alex this patch makes kvm64 the default CPU
> model when qemu is started with -enable-kvm.
>
> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
> ---
>  hw/pc.c |   19 ++++++++++++++-----
>  1 files changed, 14 insertions(+), 5 deletions(-)
>
> diff --git a/hw/pc.c b/hw/pc.c
> index 69b13bf..f531d0d 100644
> --- a/hw/pc.c
> +++ b/hw/pc.c
> @@ -40,6 +40,16 @@
>  #include "sysbus.h"
>  #include "sysemu.h"
>  #include "blockdev.h"
> +#include "kvm.h"
> +
> +
> +#ifdef TARGET_X86_64
> +#define DEFAULT_KVM_CPU_MODEL "kvm64"
> +#define DEFAULT_QEMU_CPU_MODEL "qemu64"
> +#else
> +#define DEFAULT_KVM_CPU_MODEL "kvm32"
> +#define DEFAULT_QEMU_CPU_MODEL "qemu32"
> +#endif
>  
>  /* output Bochs bios info messages */
>  //#define DEBUG_BIOS
> @@ -867,11 +877,10 @@ void pc_cpus_init(const char *cpu_model)
>  
>      /* init CPUs */
>      if (cpu_model == NULL) {
> -#ifdef TARGET_X86_64
> -        cpu_model = "qemu64";
> -#else
> -        cpu_model = "qemu32";
> -#endif
> +        if (kvm_enabled())
> +            cpu_model = DEFAULT_KVM_CPU_MODEL;
> +        else
> +            cpu_model = DEFAULT_QEMU_CPU_MODEL;
>   

Braces :(.


Alex


WARNING: multiple messages have this Message-ID (diff)
From: Alexander Graf <agraf@suse.de>
To: Joerg Roedel <joerg.roedel@amd.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
	Avi Kivity <avi@redhat.com>,
	kvm@vger.kernel.org, qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 1/3] Make kvm64 the default cpu model when kvm_enabled()
Date: Tue, 14 Sep 2010 17:58:03 +0200	[thread overview]
Message-ID: <4C8F9B8B.9060205@suse.de> (raw)
In-Reply-To: <1284479530-4748-2-git-send-email-joerg.roedel@amd.com>

Joerg Roedel wrote:
> As requested by Alex this patch makes kvm64 the default CPU
> model when qemu is started with -enable-kvm.
>
> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
> ---
>  hw/pc.c |   19 ++++++++++++++-----
>  1 files changed, 14 insertions(+), 5 deletions(-)
>
> diff --git a/hw/pc.c b/hw/pc.c
> index 69b13bf..f531d0d 100644
> --- a/hw/pc.c
> +++ b/hw/pc.c
> @@ -40,6 +40,16 @@
>  #include "sysbus.h"
>  #include "sysemu.h"
>  #include "blockdev.h"
> +#include "kvm.h"
> +
> +
> +#ifdef TARGET_X86_64
> +#define DEFAULT_KVM_CPU_MODEL "kvm64"
> +#define DEFAULT_QEMU_CPU_MODEL "qemu64"
> +#else
> +#define DEFAULT_KVM_CPU_MODEL "kvm32"
> +#define DEFAULT_QEMU_CPU_MODEL "qemu32"
> +#endif
>  
>  /* output Bochs bios info messages */
>  //#define DEBUG_BIOS
> @@ -867,11 +877,10 @@ void pc_cpus_init(const char *cpu_model)
>  
>      /* init CPUs */
>      if (cpu_model == NULL) {
> -#ifdef TARGET_X86_64
> -        cpu_model = "qemu64";
> -#else
> -        cpu_model = "qemu32";
> -#endif
> +        if (kvm_enabled())
> +            cpu_model = DEFAULT_KVM_CPU_MODEL;
> +        else
> +            cpu_model = DEFAULT_QEMU_CPU_MODEL;
>   

Braces :(.


Alex

  reply	other threads:[~2010-09-14 15:58 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-14 15:52 [PATCH 0/3] SVM feature support for qemu Joerg Roedel
2010-09-14 15:52 ` [Qemu-devel] " Joerg Roedel
2010-09-14 15:52 ` [PATCH 1/3] Make kvm64 the default cpu model when kvm_enabled() Joerg Roedel
2010-09-14 15:52   ` [Qemu-devel] " Joerg Roedel
2010-09-14 15:58   ` Alexander Graf [this message]
2010-09-14 15:58     ` [Qemu-devel] " Alexander Graf
2010-09-14 16:21     ` Roedel, Joerg
2010-09-14 16:21       ` [Qemu-devel] " Roedel, Joerg
2010-09-16 14:03   ` Avi Kivity
2010-09-16 14:03     ` [Qemu-devel] " Avi Kivity
2010-09-16 14:21     ` Roedel, Joerg
2010-09-16 14:21       ` [Qemu-devel] " Roedel, Joerg
2010-09-16 14:22       ` Avi Kivity
2010-09-16 14:22         ` [Qemu-devel] " Avi Kivity
2010-09-14 15:52 ` [PATCH 2/3] Set cpuid definition to 0 before initializing it Joerg Roedel
2010-09-14 15:52   ` [Qemu-devel] " Joerg Roedel
2010-09-14 15:52 ` [PATCH 3/3] Add svm cpuid features Joerg Roedel
2010-09-14 15:52   ` [Qemu-devel] " Joerg Roedel
2010-09-16 14:06   ` Avi Kivity
2010-09-16 14:06     ` [Qemu-devel] " Avi Kivity
2010-09-16 14:12     ` Roedel, Joerg
2010-09-16 14:12       ` [Qemu-devel] " Roedel, Joerg
2010-09-16 14:17       ` Alexander Graf
2010-09-16 14:17         ` [Qemu-devel] " Alexander Graf
2010-09-16 14:26         ` Roedel, Joerg
2010-09-16 14:26           ` [Qemu-devel] " Roedel, Joerg
2010-09-16 14:28           ` Alexander Graf
2010-09-16 14:28             ` [Qemu-devel] " Alexander Graf
2010-09-16 14:35             ` Roedel, Joerg
2010-09-16 14:35               ` [Qemu-devel] " Roedel, Joerg
2010-09-14 20:27 ` [Qemu-devel] [PATCH 0/3] SVM feature support for qemu Alexander Graf
2010-09-14 20:27   ` Alexander Graf
  -- strict thread matches above, loose matches on Subject: below --
2010-09-27 13:16 [PATCH 0/3] SVM feature support for qemu v3 Joerg Roedel
2010-09-27 13:16 ` [PATCH 1/3] Make kvm64 the default cpu model when kvm_enabled() Joerg Roedel
2010-10-06 18:53   ` Marcelo Tosatti
2010-10-06 19:24     ` Anthony Liguori
2010-10-07  8:42       ` Roedel, Joerg
2010-10-07 12:48         ` Anthony Liguori
2010-10-18  8:22           ` Roedel, Joerg
2010-10-18 14:16             ` Anthony Liguori

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=4C8F9B8B.9060205@suse.de \
    --to=agraf@suse.de \
    --cc=avi@redhat.com \
    --cc=joerg.roedel@amd.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.