brintos

brintos / linux-shallow public Read only

0
0
Text · 2.6 KiB · 4116045 Raw
68 lines · plain
1.. SPDX-License-Identifier: GPL-2.02 3=======================================4Known limitations of CPU virtualization5=======================================6 7Whenever perfect emulation of a CPU feature is impossible or too hard, KVM8has to choose between not implementing the feature at all or introducing9behavioral differences between virtual machines and bare metal systems.10 11This file documents some of the known limitations that KVM has in12virtualizing CPU features.13 14x8615===16 17``KVM_GET_SUPPORTED_CPUID`` issues18----------------------------------19 20x87 features21~~~~~~~~~~~~22 23Unlike most other CPUID feature bits, CPUID[EAX=7,ECX=0]:EBX[6]24(FDP_EXCPTN_ONLY) and CPUID[EAX=7,ECX=0]:EBX]13] (ZERO_FCS_FDS) are25clear if the features are present and set if the features are not present.26 27Clearing these bits in CPUID has no effect on the operation of the guest;28if these bits are set on hardware, the features will not be present on29any virtual machine that runs on that hardware.30 31**Workaround:** It is recommended to always set these bits in guest CPUID.32Note however that any software (e.g ``WIN87EM.DLL``) expecting these features33to be present likely predates these CPUID feature bits, and therefore34doesn't know to check for them anyway.35 36Nested virtualization features37------------------------------38 39TBD40 41x2APIC42------43When KVM_X2APIC_API_USE_32BIT_IDS is enabled, KVM activates a hack/quirk that44allows sending events to a single vCPU using its x2APIC ID even if the target45vCPU has legacy xAPIC enabled, e.g. to bring up hotplugged vCPUs via INIT-SIPI46on VMs with > 255 vCPUs.  A side effect of the quirk is that, if multiple vCPUs47have the same physical APIC ID, KVM will deliver events targeting that APIC ID48only to the vCPU with the lowest vCPU ID.  If KVM_X2APIC_API_USE_32BIT_IDS is49not enabled, KVM follows x86 architecture when processing interrupts (all vCPUs50matching the target APIC ID receive the interrupt).51 52MTRRs53-----54KVM does not virtualize guest MTRR memory types.  KVM emulates accesses to MTRR55MSRs, i.e. {RD,WR}MSR in the guest will behave as expected, but KVM does not56honor guest MTRRs when determining the effective memory type, and instead57treats all of guest memory as having Writeback (WB) MTRRs.58 59CR0.CD60------61KVM does not virtualize CR0.CD on Intel CPUs.  Similar to MTRR MSRs, KVM62emulates CR0.CD accesses so that loads and stores from/to CR0 behave as63expected, but setting CR0.CD=1 has no impact on the cachaeability of guest64memory.65 66Note, this erratum does not affect AMD CPUs, which fully virtualize CR0.CD in67hardware, i.e. put the CPU caches into "no fill" mode when CR0.CD=1, even when68running in the guest.