unicorn/qemu/target/i386
Daniel P. Berrange abf3c71af2
i386: expose TCGTCGTCGTCG in the 0x40000000 CPUID leaf
Currently when running KVM, we expose "KVMKVMKVM\0\0\0" in
the 0x40000000 CPUID leaf. Other hypervisors (VMWare,
HyperV, Xen, BHyve) all do the same thing, which leaves
TCG as the odd one out.

The CPUID signature is used by software to detect which
virtual environment they are running in and (potentially)
change behaviour in certain ways. For example, systemd
supports a ConditionVirtualization= setting in unit files.
The virt-what command can also report the virt type it is
running on

Currently both these apps have to resort to custom hacks
like looking for 'fw-cfg' entry in the /proc/device-tree
file to identify TCG.

This change thus proposes a signature "TCGTCGTCGTCG" to be
reported when running under TCG.

To hide this, the -cpu option tcg-cpuid=off can be used.

Backports commits 4ed3d478c63dc65a02eba774c35116618ea5ff10 and  1ce36bfe6424243082d3d7c2330e1a0a4ff72a43 from qemu
2018-03-03 22:56:32 -05:00
..
arch_memory_mapping.c target/i386: enable A20 automatically in system management mode 2018-03-03 14:33:09 -05:00
bpt_helper.c Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
cc_helper_template.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
cc_helper.c Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
cpu-qom.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
cpu.c i386: expose TCGTCGTCGTCG in the 0x40000000 CPUID leaf 2018-03-03 22:56:32 -05:00
cpu.h i386: expose TCGTCGTCGTCG in the 0x40000000 CPUID leaf 2018-03-03 22:56:32 -05:00
excp_helper.c Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
fpu_helper.c target/i386: split cpu_set_mxcsr() and make cpu_set_fpuc() inline 2018-03-03 21:52:29 -05:00
helper.c target/i386: add the tcg_enabled() in target/i386/ 2018-03-03 21:56:31 -05:00
helper.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
int_helper.c Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
Makefile.objs target/i386: add the CONFIG_TCG into Makefiles 2018-03-03 21:57:22 -05:00
mem_helper.c Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
misc_helper.c Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
mpx_helper.c target/i386: move cpu_sync_bndcs_hflags() function 2018-03-03 21:41:26 -05:00
ops_sse_header.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
ops_sse.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
seg_helper.c target/i386: simplify handling of conforming code segments on interrupt 2018-03-03 21:19:48 -05:00
shift_helper_template.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
smm_helper.c Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
svm_helper.c target-i386: defer VMEXIT to do_interrupt 2018-03-02 12:49:18 -05:00
svm.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
TODO Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
topology.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
translate.c i386: fix read/write cr with icount option 2018-03-03 14:56:18 -05:00
unicorn.c target/i386: make cpu_get_fp80()/cpu_set_fp80() static 2018-03-03 21:44:09 -05:00
unicorn.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00