Skip to content

Commit 4501672

Browse files
committed
Documentation: KVM: add virtual CPU errata documentation
Add a file to document all the different ways in which the virtual CPU emulation is imperfect. Include an example to show how to document such errata. Signed-off-by: Paolo Bonzini <[email protected]> Reviewed-by: Jim Mattson <[email protected]> Reviewed-by: Oliver Upton <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent daec8d4 commit 4501672

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
=======================================
3+
Known limitations of CPU virtualization
4+
=======================================
5+
6+
Whenever perfect emulation of a CPU feature is impossible or too hard, KVM
7+
has to choose between not implementing the feature at all or introducing
8+
behavioral differences between virtual machines and bare metal systems.
9+
10+
This file documents some of the known limitations that KVM has in
11+
virtualizing CPU features.
12+
13+
x86
14+
===
15+
16+
``KVM_GET_SUPPORTED_CPUID`` issues
17+
----------------------------------
18+
19+
x87 features
20+
~~~~~~~~~~~~
21+
22+
Unlike most other CPUID feature bits, CPUID[EAX=7,ECX=0]:EBX[6]
23+
(FDP_EXCPTN_ONLY) and CPUID[EAX=7,ECX=0]:EBX]13] (ZERO_FCS_FDS) are
24+
clear if the features are present and set if the features are not present.
25+
26+
Clearing these bits in CPUID has no effect on the operation of the guest;
27+
if these bits are set on hardware, the features will not be present on
28+
any virtual machine that runs on that hardware.
29+
30+
**Workaround:** It is recommended to always set these bits in guest CPUID.
31+
Note however that any software (e.g ``WIN87EM.DLL``) expecting these features
32+
to be present likely predates these CPUID feature bits, and therefore
33+
doesn't know to check for them anyway.
34+
35+
Nested virtualization features
36+
------------------------------
37+
38+
TBD
39+

Documentation/virt/kvm/x86/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ KVM for x86 systems
99

1010
amd-memory-encryption
1111
cpuid
12+
errata
1213
halt-polling
1314
hypercalls
1415
mmu

0 commit comments

Comments
 (0)