Patchwork Don't declare XSAVE as supported

login
register
mail settings
Submitter Andi Kleen
Date June 26, 2010, 8:54 p.m.
Message ID <20100626205421.GA10339@basil.fritz.box>
Download mbox | patch
Permalink /patch/57068/
State New
Headers show

Comments

Andi Kleen - June 26, 2010, 8:54 p.m.
Don't declare XSAVE as supported

i386 cpuid.c currently claims XSAVE is supported in the CPUID filter,
but that's not true: Only FXSAVE is supported. Remove that bit
from the filter.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Aurelien Jarno - July 1, 2010, 11:56 p.m.
On Sat, Jun 26, 2010 at 10:54:21PM +0200, Andi Kleen wrote:
> Don't declare XSAVE as supported
> 
> i386 cpuid.c currently claims XSAVE is supported in the CPUID filter,
> but that's not true: Only FXSAVE is supported. Remove that bit
> from the filter.
> 
> Signed-off-by: Andi Kleen <ak@linux.intel.com>

Thanks, applied.

> diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c
> index 6a0f7ca..4251a29 100644
> --- a/target-i386/cpuid.c
> +++ b/target-i386/cpuid.c
> @@ -241,11 +241,11 @@ typedef struct x86_def_t {
>            /* missing:
>            CPUID_VME, CPUID_DTS, CPUID_SS, CPUID_HT, CPUID_TM, CPUID_PBE */
>  #define TCG_EXT_FEATURES (CPUID_EXT_SSE3 | CPUID_EXT_MONITOR | \
> -          CPUID_EXT_CX16 | CPUID_EXT_POPCNT | CPUID_EXT_XSAVE | \
> +          CPUID_EXT_CX16 | CPUID_EXT_POPCNT | \
>            CPUID_EXT_HYPERVISOR)
>            /* missing:
>            CPUID_EXT_DTES64, CPUID_EXT_DSCPL, CPUID_EXT_VMX, CPUID_EXT_EST,
> -          CPUID_EXT_TM2, CPUID_EXT_XTPR, CPUID_EXT_PDCM */
> +          CPUID_EXT_TM2, CPUID_EXT_XTPR, CPUID_EXT_PDCM, CPUID_EXT_XSAVE */
>  #define TCG_EXT2_FEATURES ((TCG_FEATURES & EXT2_FEATURE_MASK) | \
>            CPUID_EXT2_NX | CPUID_EXT2_MMXEXT | CPUID_EXT2_RDTSCP | \
>            CPUID_EXT2_3DNOW | CPUID_EXT2_3DNOWEXT)
> 
>

Patch

diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c
index 6a0f7ca..4251a29 100644
--- a/target-i386/cpuid.c
+++ b/target-i386/cpuid.c
@@ -241,11 +241,11 @@  typedef struct x86_def_t {
           /* missing:
           CPUID_VME, CPUID_DTS, CPUID_SS, CPUID_HT, CPUID_TM, CPUID_PBE */
 #define TCG_EXT_FEATURES (CPUID_EXT_SSE3 | CPUID_EXT_MONITOR | \
-          CPUID_EXT_CX16 | CPUID_EXT_POPCNT | CPUID_EXT_XSAVE | \
+          CPUID_EXT_CX16 | CPUID_EXT_POPCNT | \
           CPUID_EXT_HYPERVISOR)
           /* missing:
           CPUID_EXT_DTES64, CPUID_EXT_DSCPL, CPUID_EXT_VMX, CPUID_EXT_EST,
-          CPUID_EXT_TM2, CPUID_EXT_XTPR, CPUID_EXT_PDCM */
+          CPUID_EXT_TM2, CPUID_EXT_XTPR, CPUID_EXT_PDCM, CPUID_EXT_XSAVE */
 #define TCG_EXT2_FEATURES ((TCG_FEATURES & EXT2_FEATURE_MASK) | \
           CPUID_EXT2_NX | CPUID_EXT2_MMXEXT | CPUID_EXT2_RDTSCP | \
           CPUID_EXT2_3DNOW | CPUID_EXT2_3DNOWEXT)