[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 08/56] target-i386: key sfence availability on CPUI
From: |
Michael Roth |
Subject: |
[Qemu-stable] [PATCH 08/56] target-i386: key sfence availability on CPUID_SSE, not CPUID_SSE2 |
Date: |
Mon, 8 Aug 2016 16:03:39 -0500 |
From: Paolo Bonzini <address@hidden>
sfence was introduced before lfence and mfence. This fixes Linux
2.4's measurement of checksumming speeds for the pIII_sse
algorithm:
md: linear personality registered as nr 1
md: raid0 personality registered as nr 2
md: raid1 personality registered as nr 3
md: raid5 personality registered as nr 4
raid5: measuring checksumming speed
8regs : 384.400 MB/sec
32regs : 259.200 MB/sec
invalid operand: 0000
CPU: 0
EIP: 0010:[<c0240b2a>] Not tainted
EFLAGS: 00000246
eax: c15d8000 ebx: 00000000 ecx: 00000000 edx: c15d5000
esi: 8005003b edi: 00000004 ebp: 00000000 esp: c15bdf50
ds: 0018 es: 0018 ss: 0018
Process swapper (pid: 1, stackpage=c15bd000)
Stack: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000
00000000 00000206 c0241c6c 00001000 c15d4000 c15d7000 c15d4000
c15d4000
Call Trace: [<c0241c6c>] [<c0105000>] [<c0241db4>] [<c010503b>]
[<c0105000>]
[<c0107416>] [<c0105030>]
Code: 0f ae f8 0f 10 04 24 0f 10 4c 24 10 0f 10 54 24 20 0f 10 5c
<0>Kernel panic: Attempted to kill init!
Reported-by: Stefan Weil <address@hidden>
Fixes: 121f3157887f92268a3d6169e2d4601f9292020b
Cc: address@hidden
Signed-off-by: Paolo Bonzini <address@hidden>
(cherry picked from commit 14cb949a3e2efd64ea3271b919b33b452ce7b180)
Signed-off-by: Michael Roth <address@hidden>
---
target-i386/translate.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/target-i386/translate.c b/target-i386/translate.c
index 1a1214d..69760b4 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -8002,6 +8002,11 @@ static target_ulong disas_insn(CPUX86State *env,
DisasContext *s,
}
/* fallthru */
case 0xf9 ... 0xff: /* sfence */
+ if (!(s->cpuid_features & CPUID_SSE)
+ || (prefixes & PREFIX_LOCK)) {
+ goto illegal_op;
+ }
+ break;
case 0xe8 ... 0xef: /* lfence */
case 0xf0 ... 0xf7: /* mfence */
if (!(s->cpuid_features & CPUID_SSE2)
--
1.9.1
- [Qemu-stable] [PATCH 04/56] tools: kvm_stat: Powerpc related fixes, (continued)
- [Qemu-stable] [PATCH 04/56] tools: kvm_stat: Powerpc related fixes, Michael Roth, 2016/08/08
- [Qemu-stable] [PATCH 49/56] Fix some typos found by codespell, Michael Roth, 2016/08/08
- [Qemu-stable] [PATCH 52/56] nbd: Limit nbdflags to 16 bits, Michael Roth, 2016/08/08
- [Qemu-stable] [PATCH 53/56] pcie: fix link active status bit migration, Michael Roth, 2016/08/08
- [Qemu-stable] [PATCH 51/56] nbd: Don't use *_to_cpup() functions, Michael Roth, 2016/08/08
- [Qemu-stable] [PATCH 55/56] virtio: error out if guest exceeds virtqueue size, Michael Roth, 2016/08/08
- [Qemu-stable] [PATCH 54/56] target-i386: fix typo in xsetbv implementation, Michael Roth, 2016/08/08
- [Qemu-stable] [PATCH 06/56] usb:xhci: no DMA on HC reset, Michael Roth, 2016/08/08
- [Qemu-stable] [PATCH 56/56] ide: fix halted IO segfault at reset, Michael Roth, 2016/08/08
- [Qemu-stable] [PATCH 08/56] target-i386: key sfence availability on CPUID_SSE, not CPUID_SSE2,
Michael Roth <=
- [Qemu-stable] [PATCH 07/56] target-mips: fix call to memset in soft reset code, Michael Roth, 2016/08/08
- [Qemu-stable] [PATCH 05/56] exec.c: Ensure right alignment also for file backed ram, Michael Roth, 2016/08/08
- Re: [Qemu-stable] [PATCH 00/56] Patch Round-up for stable 2.6.1, freeze on 2016-08-12, Cole Robinson, 2016/08/08
- Re: [Qemu-stable] [PATCH 00/56] Patch Round-up for stable 2.6.1, freeze on 2016-08-12, Michael Roth, 2016/08/09
- Re: [Qemu-stable] [Qemu-devel] [PATCH 00/56] Patch Round-up for stable 2.6.1, freeze on 2016-08-12, Bruce Rogers, 2016/08/09