summary refs log tree commit diff stats
path: root/scripts/qapi-introspect.py
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2016-09-22 18:58:39 -0300
committerEduardo Habkost <ehabkost@redhat.com>2016-09-27 16:17:17 -0300
commit9646f4927faf68e8690588c2fd6dc9834c440b58 (patch)
tree1be672905be21c3646e2f38ef7aaa3598a06c995 /scripts/qapi-introspect.py
parent2d5312da566e4424a807d078da05f92ee7be3eec (diff)
downloadfocaccia-qemu-9646f4927faf68e8690588c2fd6dc9834c440b58.tar.gz
focaccia-qemu-9646f4927faf68e8690588c2fd6dc9834c440b58.zip
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.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'scripts/qapi-introspect.py')
0 files changed, 0 insertions, 0 deletions