unicorn/qemu/target
Luwei Kang 30d878a0ef
i386: Disable Intel PT if packets IP payloads have LIP values
Intel processor trace should be disabled when
CPUID.(EAX=14H,ECX=0H).ECX.[bit31] is set.
Generated packets which contain IP payloads will have LIP
values when this bit is set, or IP payloads will have RIP
values.
Currently, The information of CPUID 14H is constant to make
live migration safty and this bit is always 0 in guest even
if host support LIP values.
Guest sees the bit is 0 will expect IP payloads with RIP
values, but the host CPU will generate IP payloads with
LIP values if this bit is set in HW.
To make sure the value of IP payloads correctly, Intel PT
should be disabled when bit[31] is set.

Backports relevant parts of commit c078ca968c6c7cb62781c1843d840cb0f5c72781 from qemu
2018-03-20 14:25:40 -04:00
..
arm cpu: get rid of unused cpu_init() defines 2018-03-20 14:21:45 -04:00
i386 i386: Disable Intel PT if packets IP payloads have LIP values 2018-03-20 14:25:40 -04:00
m68k cpu: get rid of unused cpu_init() defines 2018-03-20 14:21:45 -04:00
mips cpu: get rid of unused cpu_init() defines 2018-03-20 14:21:45 -04:00
sparc cpu: get rid of unused cpu_init() defines 2018-03-20 14:21:45 -04:00