unicorn/qemu
Eduardo Habkost c3a0cba5b1
target-i386: Don't try to enable PT State xsave component
The code that calculates the set of supported XSAVE components on
CPUID looks at ext_save_areas to find out which components should
be enabled. However, if there are zeroed entries in the
ext_save_areas array, the
((env->features[esa->feature] & esa->bits) == esa->bits)
check will always succeed and QEMU will unconditionally try to
enable the component.

Luckily this never caused any problems because the only missing
entry in ext_save_areas is the PT State component (bit 8), and
KVM currently doesn't support it (so it was cleared on ena_mask).
But the code was still incorrect and would break if KVM starts
returning CPUID[EAX=0xD,ECX=0].EAX[bit 8] as supported on
GET_SUPPORTED_CPUID.

Fix the problem by changing the code to not enable a XSAVE
component if ExtSaveArea::bits is zero.

Backports commit 9646f4927faf68e8690588c2fd6dc9834c440b58 from qemu
2018-02-26 04:30:35 -05:00
..
crypto
default-configs
docs
fpu fpu: add mechanism to check for invalid long double formats 2018-02-26 02:27:40 -05:00
hw qdev: Fix object reference leak in case device.realize() fails 2018-02-25 21:00:26 -05:00
include tcg: Merge GETPC and GETRA 2018-02-26 02:54:44 -05:00
qapi qapi: change QmpInputVisitor to QSLIST 2018-02-25 20:02:09 -05:00
qobject
qom qapi: Add new visit_complete() function 2018-02-25 01:20:03 -05:00
scripts qapi: Implement boxed types for commands/events 2018-02-25 20:22:03 -05:00
target-arm arm: add Cortex A7 CPU parameters 2018-02-26 03:44:24 -05:00
target-i386 target-i386: Don't try to enable PT State xsave component 2018-02-26 04:30:35 -05:00
target-m68k Remove unused function declarations 2018-02-26 02:31:46 -05:00
target-mips target-mips: generate fences 2018-02-26 03:52:35 -05:00
target-sparc sparc: Use g_memdup() instead of g_new0() + memcpy() 2018-02-25 23:19:44 -05:00
tcg tcg/i386: Extend TARGET_PAGE_MASK to the proper type 2018-02-26 03:32:38 -05:00
util cutils: Remove unused vector ifdef block 2018-02-26 02:28:50 -05:00
aarch64.h Introduce TCGOpcode for memory barrier 2018-02-26 03:02:41 -05:00
aarch64eb.h Introduce TCGOpcode for memory barrier 2018-02-26 03:02:41 -05:00
accel.c
arm.h Introduce TCGOpcode for memory barrier 2018-02-26 03:02:41 -05:00
armeb.h Introduce TCGOpcode for memory barrier 2018-02-26 03:02:41 -05:00
CODING_STYLE
configure configure: Always compile with -fwrapv 2018-02-25 23:17:41 -05:00
COPYING
COPYING.LIB
cpu-exec-common.c
cpu-exec.c tcg: rename tb_find_physical() 2018-02-26 02:07:06 -05:00
cpus.c
cputlb.c tcg: Merge GETPC and GETRA 2018-02-26 02:54:44 -05:00
exec.c exec: avoid realloc in phys_map_node_reserve 2018-02-25 19:32:40 -05:00
gen_all_header.sh
glib_compat.c qapi: Fix memleak in string visitors on int lists 2018-02-25 00:20:34 -05:00
HACKING
header_gen.py Introduce TCGOpcode for memory barrier 2018-02-26 03:02:41 -05:00
ioport.c
LICENSE
m68k.h Introduce TCGOpcode for memory barrier 2018-02-26 03:02:41 -05:00
Makefile
Makefile.objs util: Move qemu-log to utils 2018-02-25 22:17:44 -05:00
Makefile.target
memory_mapping.c
memory.c memory: Don't use memcpy for ram_device regions 2018-02-25 23:06:36 -05:00
mips64.h Introduce TCGOpcode for memory barrier 2018-02-26 03:02:41 -05:00
mips64el.h Introduce TCGOpcode for memory barrier 2018-02-26 03:02:41 -05:00
mips.h Introduce TCGOpcode for memory barrier 2018-02-26 03:02:41 -05:00
mipsel.h Introduce TCGOpcode for memory barrier 2018-02-26 03:02:41 -05:00
powerpc.h Introduce TCGOpcode for memory barrier 2018-02-26 03:02:41 -05:00
qapi-schema.json
qemu-timer.c timer/cpus: fix some typos and update some comments 2018-02-25 23:21:57 -05:00
rules.mak rules.mak: Don't extract libs from .mo-libs in link command 2018-02-26 02:08:03 -05:00
softmmu_template.h tcg: Merge GETPC and GETRA 2018-02-26 02:54:44 -05:00
sparc64.h Introduce TCGOpcode for memory barrier 2018-02-26 03:02:41 -05:00
sparc.h Introduce TCGOpcode for memory barrier 2018-02-26 03:02:41 -05:00
tcg-runtime.c
translate-all.c tcg: Merge GETPC and GETRA 2018-02-26 02:54:44 -05:00
translate-all.h
translate-common.c
unicorn_common.h
VERSION
vl.c
vl.h
x86_64.h Introduce TCGOpcode for memory barrier 2018-02-26 03:02:41 -05:00