[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160311221651.GE4347@pd.tnic>
Date: Fri, 11 Mar 2016 23:16:51 +0100
From: Borislav Petkov <bp@...e.de>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>,
Paul Gortmaker <paul.gortmaker@...driver.com>,
Toshi Kani <toshi.kani@....com>,
Richard Purdie <richard.purdie@...uxfoundation.org>,
Toshi Kani <toshi.kani@...com>,
Bruce Ashfield <bruce.ashfield@...driver.com>,
"Hart, Darren" <darren.hart@...el.com>,
"saul.wold" <saul.wold@...el.com>, linux-kernel@...r.kernel.org,
kvm ML <kvm@...r.kernel.org>, x86-ml <x86@...nel.org>
Subject: Re: runtime regression with "x86/mm/pat: Emulate PAT when it is
disabled"
On Fri, Mar 11, 2016 at 08:18:23PM +0100, Paolo Bonzini wrote:
> Somebody got it wrong 10-ish years ago, and nobody has ever checked since.
>
> But, don't use qemu32 or qemu64. Use kvm32 and kvm64, or better
> something like the host you run on ("-cpu Nehalem", "-cpu SandyBridge",
> "-cpu Haswell-noTSX" etc.).
Paul, Richard, how about it?
> I really, really should fix those defaults...
Here's a start, while I have everything fresh in my head.
---
From: Borislav Petkov <bp@...e.de>
Date: Fri, 11 Mar 2016 23:11:05 +0100
Subject: [PATCH] target-i386/cpu: Correct MTRR and PAT feature bits
Pentium Pro had MTRRs but not PAT, PAT support appeared in Pentium III.
Fix all defines.
Signed-off-by: Borislav Petkov <bp@...e.de>
---
target-i386/cpu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 0f38d1eae317..fa7ea4a8c229 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -308,12 +308,12 @@ static const char *cpuid_6_feature_name[] = {
#define PENTIUM_FEATURES (I486_FEATURES | CPUID_DE | CPUID_TSC | \
CPUID_MSR | CPUID_MCE | CPUID_CX8 | CPUID_MMX | CPUID_APIC)
#define PENTIUM2_FEATURES (PENTIUM_FEATURES | CPUID_PAE | CPUID_SEP | \
- CPUID_MTRR | CPUID_PGE | CPUID_MCA | CPUID_CMOV | CPUID_PAT | \
+ CPUID_MTRR | CPUID_PGE | CPUID_MCA | CPUID_CMOV | \
CPUID_PSE36 | CPUID_FXSR)
-#define PENTIUM3_FEATURES (PENTIUM2_FEATURES | CPUID_SSE)
+#define PENTIUM3_FEATURES (PENTIUM2_FEATURES | CPUID_SSE | CPUID_PAT)
#define PPRO_FEATURES (CPUID_FP87 | CPUID_DE | CPUID_PSE | CPUID_TSC | \
CPUID_MSR | CPUID_MCE | CPUID_CX8 | CPUID_PGE | CPUID_CMOV | \
- CPUID_PAT | CPUID_FXSR | CPUID_MMX | CPUID_SSE | CPUID_SSE2 | \
+ CPUID_MTRR | CPUID_FXSR | CPUID_MMX | CPUID_SSE | CPUID_SSE2 | \
CPUID_PAE | CPUID_SEP | CPUID_APIC)
#define TCG_FEATURES (CPUID_FP87 | CPUID_PSE | CPUID_TSC | CPUID_MSR | \
--
2.3.5
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
--
Powered by blists - more mailing lists