view docs/misc/cpuid-config-for-guest.txt @ 20682:e73d666b4d30

docs: add a document about guest cpuid configuration

Signed-off-by: Dexuan Cui <>
author Keir Fraser <>
date Mon Dec 14 07:59:40 2009 +0000 (2009-12-14)
line source
1 CPUID emulation for guest
2 -------------------------
4 When HVM guest tries to execute CPUID, or PV guest tries to execute XEN_CPUID,
5 the xen hypervior traps and emultes them.
7 For HVM guest and PV DomU guest, xen's CPUID emulation can be adjusted using
8 the guest configation file if necessary (e.g., to supply better support for
9 guest live migration). The CPUID syntax in guest configration file is
10 described in detail in the examples like /etc/xen/xmexample.hvm,
11 /etc/xen/xmexample.hvm-stubdom.
13 However, a user (or an administrator) must be aware that the CPUID in guest
14 configuration file can NOT be configured casually. The default CPUID
15 configuration should be safe, but illegal configuration can cause unexpected
16 behaviors of guest -- even can crash guest.
18 For example, we should not expose the MONITOR CPUID feature flag (ECX bit 3;
19 CPUID executed EAX = 1) to HVM guest, otherwise, on guest's attempt of
20 executing MWAIT, the VMExit handler in Xen would inject #UD (Invalid Opcode
21 Exception) into the HVM guest, and guest kernel would panic.
23 /* We can add more unsafe CPUID configuration here in future. */