qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] target-i386: upgrade family number of qemu64 CPU model to 15
@ 2013-04-18 10:45 Ren, Yongjie
  2013-04-18 11:07 ` Gleb Natapov
  0 siblings, 1 reply; 4+ messages in thread
From: Ren, Yongjie @ 2013-04-18 10:45 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: kvm@vger.kernel.org, Gleb Natapov, qemu-devel@nongnu.org

qemu64 is the default CPU model for QEMU/KVM on x86-64, but its family number 
definition is not accurate. The vendor of 'qemu64' is defined as 'AMD'. For AMD 
processors, AMD K8 (i.e. Family 15) firstly introduced SSE3 instruction set. 
'qemu64' already has 'CPUID_EXT_SSE3' in its ext_features, but its family 
number is only 6 which is not equal to or greater than 15.
So, upgrade the CPU family number of qemu64 model to 15.
After this upgrade, 32bit Windows 8 can boot up with qemu64 CPU model.
This upgrade can be also a fix to the below bug about 32bit Windows 8 booting.
https://bugs.launchpad.net/qemu/+bug/1007269

Signed-off-by: Yongjie Ren <yongjie.ren@intel.com>
---
 target-i386/cpu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index e2302d8..3f8e6c3 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -420,7 +420,7 @@ static x86_def_t builtin_x86_defs[] = {
         .name = "qemu64",
         .level = 4,
         .vendor = CPUID_VENDOR_AMD,
-        .family = 6,
+        .family = 15,
         .model = 2,
         .stepping = 3,
         .features = PPRO_FEATURES |
--
1.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] target-i386: upgrade family number of qemu64 CPU model to 15
  2013-04-18 10:45 [Qemu-devel] [PATCH] target-i386: upgrade family number of qemu64 CPU model to 15 Ren, Yongjie
@ 2013-04-18 11:07 ` Gleb Natapov
  2013-04-18 14:47   ` Ren, Yongjie
  0 siblings, 1 reply; 4+ messages in thread
From: Gleb Natapov @ 2013-04-18 11:07 UTC (permalink / raw)
  To: Ren, Yongjie
  Cc: Marcelo Tosatti, qemu-devel@nongnu.org, kvm@vger.kernel.org,
	ehabkost

On Thu, Apr 18, 2013 at 10:45:38AM +0000, Ren, Yongjie wrote:
> qemu64 is the default CPU model for QEMU/KVM on x86-64, but its family number 
> definition is not accurate. The vendor of 'qemu64' is defined as 'AMD'. For AMD 
> processors, AMD K8 (i.e. Family 15) firstly introduced SSE3 instruction set. 
> 'qemu64' already has 'CPUID_EXT_SSE3' in its ext_features, but its family 
> number is only 6 which is not equal to or greater than 15.
> So, upgrade the CPU family number of qemu64 model to 15.
> After this upgrade, 32bit Windows 8 can boot up with qemu64 CPU model.
> This upgrade can be also a fix to the below bug about 32bit Windows 8 booting.
> https://bugs.launchpad.net/qemu/+bug/1007269

Changing cpuid info is not that simple since this is guest visible
information and can impact migration. Old machine models should still
expose the old family.

> 
> Signed-off-by: Yongjie Ren <yongjie.ren@intel.com>
> ---
>  target-i386/cpu.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> index e2302d8..3f8e6c3 100644
> --- a/target-i386/cpu.c
> +++ b/target-i386/cpu.c
> @@ -420,7 +420,7 @@ static x86_def_t builtin_x86_defs[] = {
>          .name = "qemu64",
>          .level = 4,
>          .vendor = CPUID_VENDOR_AMD,
> -        .family = 6,
> +        .family = 15,
>          .model = 2,
>          .stepping = 3,
>          .features = PPRO_FEATURES |
> --
> 1.7.1

--
			Gleb.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] target-i386: upgrade family number of qemu64 CPU model to 15
  2013-04-18 11:07 ` Gleb Natapov
@ 2013-04-18 14:47   ` Ren, Yongjie
  2013-04-18 14:56     ` Eduardo Habkost
  0 siblings, 1 reply; 4+ messages in thread
From: Ren, Yongjie @ 2013-04-18 14:47 UTC (permalink / raw)
  To: Gleb Natapov
  Cc: Marcelo Tosatti, qemu-devel@nongnu.org, kvm@vger.kernel.org,
	ehabkost@redhat.com

> -----Original Message-----
> From: Gleb Natapov [mailto:gleb@redhat.com]
> Sent: Thursday, April 18, 2013 7:08 PM
> To: Ren, Yongjie
> Cc: Marcelo Tosatti; kvm@vger.kernel.org; qemu-devel@nongnu.org;
> ehabkost@redhat.com
> Subject: Re: [PATCH] target-i386: upgrade family number of qemu64 CPU
> model to 15
> 
> On Thu, Apr 18, 2013 at 10:45:38AM +0000, Ren, Yongjie wrote:
> > qemu64 is the default CPU model for QEMU/KVM on x86-64, but its
> family number
> > definition is not accurate. The vendor of 'qemu64' is defined as 'AMD'.
> For AMD
> > processors, AMD K8 (i.e. Family 15) firstly introduced SSE3 instruction
> set.
> > 'qemu64' already has 'CPUID_EXT_SSE3' in its ext_features, but its family
> > number is only 6 which is not equal to or greater than 15.
> > So, upgrade the CPU family number of qemu64 model to 15.
> > After this upgrade, 32bit Windows 8 can boot up with qemu64 CPU
> model.
> > This upgrade can be also a fix to the below bug about 32bit Windows 8
> booting.
> > https://bugs.launchpad.net/qemu/+bug/1007269
> 
> Changing cpuid info is not that simple since this is guest visible
> information and can impact migration. Old machine models should still
> expose the old family.
> 
Sorry, I didn't consider migration issue. I just think the cupid info for qemu64
is not compatible with real-world CPU. Family 6 AMD CPU should not have
SSE3 but it has SSE3 in qemu64 model.
If it's not so simple to modify cupid info, just ignore my patch.  :-)

> >
> > Signed-off-by: Yongjie Ren <yongjie.ren@intel.com>
> > ---
> >  target-i386/cpu.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> > index e2302d8..3f8e6c3 100644
> > --- a/target-i386/cpu.c
> > +++ b/target-i386/cpu.c
> > @@ -420,7 +420,7 @@ static x86_def_t builtin_x86_defs[] = {
> >          .name = "qemu64",
> >          .level = 4,
> >          .vendor = CPUID_VENDOR_AMD,
> > -        .family = 6,
> > +        .family = 15,
> >          .model = 2,
> >          .stepping = 3,
> >          .features = PPRO_FEATURES |
> > --
> > 1.7.1
> 
> --
> 			Gleb.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] target-i386: upgrade family number of qemu64 CPU model to 15
  2013-04-18 14:47   ` Ren, Yongjie
@ 2013-04-18 14:56     ` Eduardo Habkost
  0 siblings, 0 replies; 4+ messages in thread
From: Eduardo Habkost @ 2013-04-18 14:56 UTC (permalink / raw)
  To: Ren, Yongjie
  Cc: Igor Mammedov, Marcelo Tosatti, kvm@vger.kernel.org, Gleb Natapov,
	qemu-devel@nongnu.org

On Thu, Apr 18, 2013 at 02:47:21PM +0000, Ren, Yongjie wrote:
> > -----Original Message-----
> > From: Gleb Natapov [mailto:gleb@redhat.com]
> > Sent: Thursday, April 18, 2013 7:08 PM
> > To: Ren, Yongjie
> > Cc: Marcelo Tosatti; kvm@vger.kernel.org; qemu-devel@nongnu.org;
> > ehabkost@redhat.com
> > Subject: Re: [PATCH] target-i386: upgrade family number of qemu64 CPU
> > model to 15
> > 
> > On Thu, Apr 18, 2013 at 10:45:38AM +0000, Ren, Yongjie wrote:
> > > qemu64 is the default CPU model for QEMU/KVM on x86-64, but its
> > family number
> > > definition is not accurate. The vendor of 'qemu64' is defined as 'AMD'.
> > For AMD
> > > processors, AMD K8 (i.e. Family 15) firstly introduced SSE3 instruction
> > set.
> > > 'qemu64' already has 'CPUID_EXT_SSE3' in its ext_features, but its family
> > > number is only 6 which is not equal to or greater than 15.
> > > So, upgrade the CPU family number of qemu64 model to 15.
> > > After this upgrade, 32bit Windows 8 can boot up with qemu64 CPU
> > model.
> > > This upgrade can be also a fix to the below bug about 32bit Windows 8
> > booting.
> > > https://bugs.launchpad.net/qemu/+bug/1007269
> > 
> > Changing cpuid info is not that simple since this is guest visible
> > information and can impact migration. Old machine models should still
> > expose the old family.
> > 
> Sorry, I didn't consider migration issue. I just think the cupid info for qemu64
> is not compatible with real-world CPU. Family 6 AMD CPU should not have
> SSE3 but it has SSE3 in qemu64 model.
> If it's not so simple to modify cupid info, just ignore my patch.  :-)

We have other fixes for CPUID information sent by other people that will
require special handling to allow migration compatibility as well.

The ongoing static-properties and X86CPU subclasses work would help us
on this, but they probably won't be in 1.5. So I am planning to gather
those CPUID fixes and make them use a simple (and temporary)
compatibility mechanism and submit them next week.

-- 
Eduardo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-04-18 14:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-18 10:45 [Qemu-devel] [PATCH] target-i386: upgrade family number of qemu64 CPU model to 15 Ren, Yongjie
2013-04-18 11:07 ` Gleb Natapov
2013-04-18 14:47   ` Ren, Yongjie
2013-04-18 14:56     ` Eduardo Habkost

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).