* [Qemu-devel] [PULL 0/2] X86 fixes, 2015-11-17
@ 2015-11-17 19:11 Eduardo Habkost
2015-11-17 19:11 ` [Qemu-devel] [PULL 1/2] target-i386: Fix mulx for identical target regs Eduardo Habkost
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Eduardo Habkost @ 2015-11-17 19:11 UTC (permalink / raw)
To: Peter Maydell
Cc: Paolo Bonzini, Richard Henderson, qemu-devel, Andreas Färber
The following changes since commit 9be060f5278dc0d732ebfcf2bf0a293f88b833eb:
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2015-11-17 11:33:38 +0000)
are available in the git repository at:
git://github.com/ehabkost/qemu.git tags/x86-pull-request
for you to fetch changes up to 33b5e8c03ae7a62d320d3c5c1104fe297d5c300d:
target-i386: Disable rdtscp on Opteron_G* CPU models (2015-11-17 17:05:59 -0200)
----------------------------------------------------------------
X86 fixes, 2015-11-17
Two X86 fixes, hopefully in time for -rc1.
----------------------------------------------------------------
Eduardo Habkost (1):
target-i386: Disable rdtscp on Opteron_G* CPU models
Richard Henderson (1):
target-i386: Fix mulx for identical target regs
include/hw/i386/pc.h | 17 +++++++++++++++++
target-i386/cpu.c | 12 ++++++++----
target-i386/translate.c | 4 +++-
3 files changed, 28 insertions(+), 5 deletions(-)
--
2.1.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PULL 1/2] target-i386: Fix mulx for identical target regs
2015-11-17 19:11 [Qemu-devel] [PULL 0/2] X86 fixes, 2015-11-17 Eduardo Habkost
@ 2015-11-17 19:11 ` Eduardo Habkost
2015-11-17 19:11 ` [Qemu-devel] [PULL 2/2] target-i386: Disable rdtscp on Opteron_G* CPU models Eduardo Habkost
2015-11-18 12:15 ` [Qemu-devel] [PULL 0/2] X86 fixes, 2015-11-17 Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Eduardo Habkost @ 2015-11-17 19:11 UTC (permalink / raw)
To: Peter Maydell
Cc: Paolo Bonzini, Richard Henderson, qemu-devel, Andreas Färber
From: Richard Henderson <rth@twiddle.net>
The Intel specification clearly indicates that the low part
of the result is written first and the high part of the result
is written second; thus if ModRM:reg and VEX.vvvv are identical,
the final result should be the high part of the result.
At present, TCG may either produce incorrect results or crash
with --enable-checking.
Reported-by: Toni Nedialkov <farmdve@gmail.com>
Reported-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
target-i386/translate.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/target-i386/translate.c b/target-i386/translate.c
index fbe4f80..a3dd167 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -3848,8 +3848,10 @@ static void gen_sse(CPUX86State *env, DisasContext *s, int b,
break;
#ifdef TARGET_X86_64
case MO_64:
- tcg_gen_mulu2_i64(cpu_regs[s->vex_v], cpu_regs[reg],
+ tcg_gen_mulu2_i64(cpu_T[0], cpu_T[1],
cpu_T[0], cpu_regs[R_EDX]);
+ tcg_gen_mov_i64(cpu_regs[s->vex_v], cpu_T[0]);
+ tcg_gen_mov_i64(cpu_regs[reg], cpu_T[1]);
break;
#endif
}
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PULL 2/2] target-i386: Disable rdtscp on Opteron_G* CPU models
2015-11-17 19:11 [Qemu-devel] [PULL 0/2] X86 fixes, 2015-11-17 Eduardo Habkost
2015-11-17 19:11 ` [Qemu-devel] [PULL 1/2] target-i386: Fix mulx for identical target regs Eduardo Habkost
@ 2015-11-17 19:11 ` Eduardo Habkost
2015-11-18 12:15 ` [Qemu-devel] [PULL 0/2] X86 fixes, 2015-11-17 Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Eduardo Habkost @ 2015-11-17 19:11 UTC (permalink / raw)
To: Peter Maydell
Cc: Paolo Bonzini, Richard Henderson, qemu-devel, Andreas Färber
KVM can't virtualize rdtscp on AMD CPUs yet, so there's no point
in enabling it by default on AMD CPU models, as all we are
getting are confused users because of the "host doesn't support
requested feature" warnings.
Disable rdtscp on Opteron_G* models, but keep compatibility on
pc-*-2.4 and older (just in case there are people are doing funny
stuff using AMD CPU models on Intel hosts).
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
include/hw/i386/pc.h | 17 +++++++++++++++++
target-i386/cpu.c | 12 ++++++++----
2 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 4bbc0ff..854c330 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -347,8 +347,25 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
.driver = "qemu32" "-" TYPE_X86_CPU,\
.property = "popcnt",\
.value = "on",\
+ },{\
+ .driver = "Opteron_G2" "-" TYPE_X86_CPU,\
+ .property = "rdtscp",\
+ .value = "on",\
+ },{\
+ .driver = "Opteron_G3" "-" TYPE_X86_CPU,\
+ .property = "rdtscp",\
+ .value = "on",\
+ },{\
+ .driver = "Opteron_G4" "-" TYPE_X86_CPU,\
+ .property = "rdtscp",\
+ .value = "on",\
+ },{\
+ .driver = "Opteron_G5" "-" TYPE_X86_CPU,\
+ .property = "rdtscp",\
+ .value = "on",\
},
+
#define PC_COMPAT_2_3 \
PC_COMPAT_2_4 \
HW_COMPAT_2_3 \
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index e5f1c5b..11e5e39 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1244,8 +1244,9 @@ static X86CPUDefinition builtin_x86_defs[] = {
CPUID_DE | CPUID_FP87,
.features[FEAT_1_ECX] =
CPUID_EXT_CX16 | CPUID_EXT_SSE3,
+ /* Missing: CPUID_EXT2_RDTSCP */
.features[FEAT_8000_0001_EDX] =
- CPUID_EXT2_LM | CPUID_EXT2_RDTSCP | CPUID_EXT2_FXSR |
+ CPUID_EXT2_LM | CPUID_EXT2_FXSR |
CPUID_EXT2_MMX | CPUID_EXT2_NX | CPUID_EXT2_PSE36 |
CPUID_EXT2_PAT | CPUID_EXT2_CMOV | CPUID_EXT2_MCA |
CPUID_EXT2_PGE | CPUID_EXT2_MTRR | CPUID_EXT2_SYSCALL |
@@ -1273,8 +1274,9 @@ static X86CPUDefinition builtin_x86_defs[] = {
.features[FEAT_1_ECX] =
CPUID_EXT_POPCNT | CPUID_EXT_CX16 | CPUID_EXT_MONITOR |
CPUID_EXT_SSE3,
+ /* Missing: CPUID_EXT2_RDTSCP */
.features[FEAT_8000_0001_EDX] =
- CPUID_EXT2_LM | CPUID_EXT2_RDTSCP | CPUID_EXT2_FXSR |
+ CPUID_EXT2_LM | CPUID_EXT2_FXSR |
CPUID_EXT2_MMX | CPUID_EXT2_NX | CPUID_EXT2_PSE36 |
CPUID_EXT2_PAT | CPUID_EXT2_CMOV | CPUID_EXT2_MCA |
CPUID_EXT2_PGE | CPUID_EXT2_MTRR | CPUID_EXT2_SYSCALL |
@@ -1305,8 +1307,9 @@ static X86CPUDefinition builtin_x86_defs[] = {
CPUID_EXT_POPCNT | CPUID_EXT_SSE42 | CPUID_EXT_SSE41 |
CPUID_EXT_CX16 | CPUID_EXT_SSSE3 | CPUID_EXT_PCLMULQDQ |
CPUID_EXT_SSE3,
+ /* Missing: CPUID_EXT2_RDTSCP */
.features[FEAT_8000_0001_EDX] =
- CPUID_EXT2_LM | CPUID_EXT2_RDTSCP |
+ CPUID_EXT2_LM |
CPUID_EXT2_PDPE1GB | CPUID_EXT2_FXSR | CPUID_EXT2_MMX |
CPUID_EXT2_NX | CPUID_EXT2_PSE36 | CPUID_EXT2_PAT |
CPUID_EXT2_CMOV | CPUID_EXT2_MCA | CPUID_EXT2_PGE |
@@ -1340,8 +1343,9 @@ static X86CPUDefinition builtin_x86_defs[] = {
CPUID_EXT_AES | CPUID_EXT_POPCNT | CPUID_EXT_SSE42 |
CPUID_EXT_SSE41 | CPUID_EXT_CX16 | CPUID_EXT_FMA |
CPUID_EXT_SSSE3 | CPUID_EXT_PCLMULQDQ | CPUID_EXT_SSE3,
+ /* Missing: CPUID_EXT2_RDTSCP */
.features[FEAT_8000_0001_EDX] =
- CPUID_EXT2_LM | CPUID_EXT2_RDTSCP |
+ CPUID_EXT2_LM |
CPUID_EXT2_PDPE1GB | CPUID_EXT2_FXSR | CPUID_EXT2_MMX |
CPUID_EXT2_NX | CPUID_EXT2_PSE36 | CPUID_EXT2_PAT |
CPUID_EXT2_CMOV | CPUID_EXT2_MCA | CPUID_EXT2_PGE |
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PULL 0/2] X86 fixes, 2015-11-17
2015-11-17 19:11 [Qemu-devel] [PULL 0/2] X86 fixes, 2015-11-17 Eduardo Habkost
2015-11-17 19:11 ` [Qemu-devel] [PULL 1/2] target-i386: Fix mulx for identical target regs Eduardo Habkost
2015-11-17 19:11 ` [Qemu-devel] [PULL 2/2] target-i386: Disable rdtscp on Opteron_G* CPU models Eduardo Habkost
@ 2015-11-18 12:15 ` Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2015-11-18 12:15 UTC (permalink / raw)
To: Eduardo Habkost
Cc: Paolo Bonzini, Richard Henderson, QEMU Developers,
Andreas Färber
On 17 November 2015 at 19:11, Eduardo Habkost <ehabkost@redhat.com> wrote:
> The following changes since commit 9be060f5278dc0d732ebfcf2bf0a293f88b833eb:
>
> Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2015-11-17 11:33:38 +0000)
>
> are available in the git repository at:
>
> git://github.com/ehabkost/qemu.git tags/x86-pull-request
>
> for you to fetch changes up to 33b5e8c03ae7a62d320d3c5c1104fe297d5c300d:
>
> target-i386: Disable rdtscp on Opteron_G* CPU models (2015-11-17 17:05:59 -0200)
>
> ----------------------------------------------------------------
> X86 fixes, 2015-11-17
>
> Two X86 fixes, hopefully in time for -rc1.
>
> ----------------------------------------------------------------
>
> Eduardo Habkost (1):
> target-i386: Disable rdtscp on Opteron_G* CPU models
>
> Richard Henderson (1):
> target-i386: Fix mulx for identical target regs
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-11-18 12:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-17 19:11 [Qemu-devel] [PULL 0/2] X86 fixes, 2015-11-17 Eduardo Habkost
2015-11-17 19:11 ` [Qemu-devel] [PULL 1/2] target-i386: Fix mulx for identical target regs Eduardo Habkost
2015-11-17 19:11 ` [Qemu-devel] [PULL 2/2] target-i386: Disable rdtscp on Opteron_G* CPU models Eduardo Habkost
2015-11-18 12:15 ` [Qemu-devel] [PULL 0/2] X86 fixes, 2015-11-17 Peter Maydell
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).