* [Qemu-devel] [PATCH] Use kvm32/kvm64 as default CPUs when running under KVM.
@ 2010-07-28 10:05 Jes.Sorensen
2010-07-28 10:51 ` Avi Kivity
0 siblings, 1 reply; 3+ messages in thread
From: Jes.Sorensen @ 2010-07-28 10:05 UTC (permalink / raw)
To: qemu-devel; +Cc: kvm
From: Jes Sorensen <Jes.Sorensen@redhat.com>
KVM has a minimum CPU requirement in order to run, so there is no
reason to default to the very basic family 6, model 2 (or model 3 for
qemu32) CPU since the additional features are going to be available on
the host CPU.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
hw/pc.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/hw/pc.c b/hw/pc.c
index 58dea57..b17a199 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -39,6 +39,7 @@
#include "msix.h"
#include "sysbus.h"
#include "sysemu.h"
+#include "kvm.h"
/* output Bochs bios info messages */
//#define DEBUG_BIOS
@@ -866,11 +867,19 @@ void pc_cpus_init(const char *cpu_model)
/* init CPUs */
if (cpu_model == NULL) {
+ if (kvm_enabled()) {
#ifdef TARGET_X86_64
- cpu_model = "qemu64";
+ cpu_model = "kvm64";
#else
- cpu_model = "qemu32";
+ cpu_model = "kvm32";
#endif
+ } else {
+#ifdef TARGET_X86_64
+ cpu_model = "qemu64";
+#else
+ cpu_model = "qemu32";
+#endif
+ }
}
for(i = 0; i < smp_cpus; i++) {
--
1.7.1.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] Use kvm32/kvm64 as default CPUs when running under KVM.
2010-07-28 10:05 [Qemu-devel] [PATCH] Use kvm32/kvm64 as default CPUs when running under KVM Jes.Sorensen
@ 2010-07-28 10:51 ` Avi Kivity
2010-07-28 10:57 ` Jes Sorensen
0 siblings, 1 reply; 3+ messages in thread
From: Avi Kivity @ 2010-07-28 10:51 UTC (permalink / raw)
To: Jes.Sorensen; +Cc: qemu-devel, kvm
On 07/28/2010 01:05 PM, Jes.Sorensen@redhat.com wrote:
> From: Jes Sorensen<Jes.Sorensen@redhat.com>
>
> KVM has a minimum CPU requirement in order to run, so there is no
> reason to default to the very basic family 6, model 2 (or model 3 for
> qemu32) CPU since the additional features are going to be available on
> the host CPU.
>
>
> @@ -866,11 +867,19 @@ void pc_cpus_init(const char *cpu_model)
>
> /* init CPUs */
> if (cpu_model == NULL) {
> + if (kvm_enabled()) {
> #ifdef TARGET_X86_64
> - cpu_model = "qemu64";
> + cpu_model = "kvm64";
> #else
> - cpu_model = "qemu32";
> + cpu_model = "kvm32";
> #endif
> + } else {
> +#ifdef TARGET_X86_64
> + cpu_model = "qemu64";
> +#else
> + cpu_model = "qemu32";
> +#endif
> + }
> }
What about -M 0.12? It needs to retain the old values.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] Use kvm32/kvm64 as default CPUs when running under KVM.
2010-07-28 10:51 ` Avi Kivity
@ 2010-07-28 10:57 ` Jes Sorensen
0 siblings, 0 replies; 3+ messages in thread
From: Jes Sorensen @ 2010-07-28 10:57 UTC (permalink / raw)
To: Avi Kivity; +Cc: qemu-devel, kvm
On 07/28/10 12:51, Avi Kivity wrote:
> On 07/28/2010 01:05 PM, Jes.Sorensen@redhat.com wrote:
>> From: Jes Sorensen<Jes.Sorensen@redhat.com>
>>
>> KVM has a minimum CPU requirement in order to run, so there is no
>> reason to default to the very basic family 6, model 2 (or model 3 for
>> qemu32) CPU since the additional features are going to be available on
>> the host CPU.
>>
>>
>> @@ -866,11 +867,19 @@ void pc_cpus_init(const char *cpu_model)
>>
>> /* init CPUs */
>> if (cpu_model == NULL) {
>> + if (kvm_enabled()) {
>> #ifdef TARGET_X86_64
>> - cpu_model = "qemu64";
>> + cpu_model = "kvm64";
>> #else
>> - cpu_model = "qemu32";
>> + cpu_model = "kvm32";
>> #endif
>> + } else {
>> +#ifdef TARGET_X86_64
>> + cpu_model = "qemu64";
>> +#else
>> + cpu_model = "qemu32";
>> +#endif
>> + }
>> }
>
> What about -M 0.12? It needs to retain the old values.
>
Urgh, good point. I'll come up with a fix for that. So much for a simple
patch :)
Jes
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-07-28 10:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-28 10:05 [Qemu-devel] [PATCH] Use kvm32/kvm64 as default CPUs when running under KVM Jes.Sorensen
2010-07-28 10:51 ` Avi Kivity
2010-07-28 10:57 ` Jes Sorensen
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).