···8435843584368436The valid bits in cap.args[0] are:8437843784388438-=================================== ============================================84398439- KVM_X86_QUIRK_LINT0_REENABLED By default, the reset value for the LVT84408440- LINT0 register is 0x700 (APIC_MODE_EXTINT).84418441- When this quirk is disabled, the reset value84428442- is 0x10000 (APIC_LVT_MASKED).84388438+======================================== ================================================84398439+KVM_X86_QUIRK_LINT0_REENABLED By default, the reset value for the LVT84408440+ LINT0 register is 0x700 (APIC_MODE_EXTINT).84418441+ When this quirk is disabled, the reset value84428442+ is 0x10000 (APIC_LVT_MASKED).8443844384448444- KVM_X86_QUIRK_CD_NW_CLEARED By default, KVM clears CR0.CD and CR0.NW on84458445- AMD CPUs to workaround buggy guest firmware84468446- that runs in perpetuity with CR0.CD, i.e.84478447- with caches in "no fill" mode.84448444+KVM_X86_QUIRK_CD_NW_CLEARED By default, KVM clears CR0.CD and CR0.NW on84458445+ AMD CPUs to workaround buggy guest firmware84468446+ that runs in perpetuity with CR0.CD, i.e.84478447+ with caches in "no fill" mode.8448844884498449- When this quirk is disabled, KVM does not84508450- change the value of CR0.CD and CR0.NW.84498449+ When this quirk is disabled, KVM does not84508450+ change the value of CR0.CD and CR0.NW.8451845184528452- KVM_X86_QUIRK_LAPIC_MMIO_HOLE By default, the MMIO LAPIC interface is84538453- available even when configured for x2APIC84548454- mode. When this quirk is disabled, KVM84558455- disables the MMIO LAPIC interface if the84568456- LAPIC is in x2APIC mode.84528452+KVM_X86_QUIRK_LAPIC_MMIO_HOLE By default, the MMIO LAPIC interface is84538453+ available even when configured for x2APIC84548454+ mode. When this quirk is disabled, KVM84558455+ disables the MMIO LAPIC interface if the84568456+ LAPIC is in x2APIC mode.8457845784588458- KVM_X86_QUIRK_OUT_7E_INC_RIP By default, KVM pre-increments %rip before84598459- exiting to userspace for an OUT instruction84608460- to port 0x7e. When this quirk is disabled,84618461- KVM does not pre-increment %rip before84628462- exiting to userspace.84588458+KVM_X86_QUIRK_OUT_7E_INC_RIP By default, KVM pre-increments %rip before84598459+ exiting to userspace for an OUT instruction84608460+ to port 0x7e. When this quirk is disabled,84618461+ KVM does not pre-increment %rip before84628462+ exiting to userspace.8463846384648464- KVM_X86_QUIRK_MISC_ENABLE_NO_MWAIT When this quirk is disabled, KVM sets84658465- CPUID.01H:ECX[bit 3] (MONITOR/MWAIT) if84668466- IA32_MISC_ENABLE[bit 18] (MWAIT) is set.84678467- Additionally, when this quirk is disabled,84688468- KVM clears CPUID.01H:ECX[bit 3] if84698469- IA32_MISC_ENABLE[bit 18] is cleared.84648464+KVM_X86_QUIRK_MISC_ENABLE_NO_MWAIT When this quirk is disabled, KVM sets84658465+ CPUID.01H:ECX[bit 3] (MONITOR/MWAIT) if84668466+ IA32_MISC_ENABLE[bit 18] (MWAIT) is set.84678467+ Additionally, when this quirk is disabled,84688468+ KVM clears CPUID.01H:ECX[bit 3] if84698469+ IA32_MISC_ENABLE[bit 18] is cleared.8470847084718471- KVM_X86_QUIRK_FIX_HYPERCALL_INSN By default, KVM rewrites guest84728472- VMMCALL/VMCALL instructions to match the84738473- vendor's hypercall instruction for the84748474- system. When this quirk is disabled, KVM84758475- will no longer rewrite invalid guest84768476- hypercall instructions. Executing the84778477- incorrect hypercall instruction will84788478- generate a #UD within the guest.84718471+KVM_X86_QUIRK_FIX_HYPERCALL_INSN By default, KVM rewrites guest84728472+ VMMCALL/VMCALL instructions to match the84738473+ vendor's hypercall instruction for the84748474+ system. When this quirk is disabled, KVM84758475+ will no longer rewrite invalid guest84768476+ hypercall instructions. Executing the84778477+ incorrect hypercall instruction will84788478+ generate a #UD within the guest.8479847984808480-KVM_X86_QUIRK_MWAIT_NEVER_UD_FAULTS By default, KVM emulates MONITOR/MWAIT (if84818481- they are intercepted) as NOPs regardless of84828482- whether or not MONITOR/MWAIT are supported84838483- according to guest CPUID. When this quirk84848484- is disabled and KVM_X86_DISABLE_EXITS_MWAIT84858485- is not set (MONITOR/MWAIT are intercepted),84868486- KVM will inject a #UD on MONITOR/MWAIT if84878487- they're unsupported per guest CPUID. Note,84888488- KVM will modify MONITOR/MWAIT support in84898489- guest CPUID on writes to MISC_ENABLE if84908490- KVM_X86_QUIRK_MISC_ENABLE_NO_MWAIT is84918491- disabled.84808480+KVM_X86_QUIRK_MWAIT_NEVER_UD_FAULTS By default, KVM emulates MONITOR/MWAIT (if84818481+ they are intercepted) as NOPs regardless of84828482+ whether or not MONITOR/MWAIT are supported84838483+ according to guest CPUID. When this quirk84848484+ is disabled and KVM_X86_DISABLE_EXITS_MWAIT84858485+ is not set (MONITOR/MWAIT are intercepted),84868486+ KVM will inject a #UD on MONITOR/MWAIT if84878487+ they're unsupported per guest CPUID. Note,84888488+ KVM will modify MONITOR/MWAIT support in84898489+ guest CPUID on writes to MISC_ENABLE if84908490+ KVM_X86_QUIRK_MISC_ENABLE_NO_MWAIT is84918491+ disabled.8492849284938493-KVM_X86_QUIRK_SLOT_ZAP_ALL By default, for KVM_X86_DEFAULT_VM VMs, KVM84948494- invalidates all SPTEs in all memslots and84958495- address spaces when a memslot is deleted or84968496- moved. When this quirk is disabled (or the84978497- VM type isn't KVM_X86_DEFAULT_VM), KVM only84988498- ensures the backing memory of the deleted84998499- or moved memslot isn't reachable, i.e KVM85008500- _may_ invalidate only SPTEs related to the85018501- memslot.84938493+KVM_X86_QUIRK_SLOT_ZAP_ALL By default, for KVM_X86_DEFAULT_VM VMs, KVM84948494+ invalidates all SPTEs in all memslots and84958495+ address spaces when a memslot is deleted or84968496+ moved. When this quirk is disabled (or the84978497+ VM type isn't KVM_X86_DEFAULT_VM), KVM only84988498+ ensures the backing memory of the deleted84998499+ or moved memslot isn't reachable, i.e KVM85008500+ _may_ invalidate only SPTEs related to the85018501+ memslot.8502850285038503-KVM_X86_QUIRK_STUFF_FEATURE_MSRS By default, at vCPU creation, KVM sets the85048504- vCPU's MSR_IA32_PERF_CAPABILITIES (0x345),85058505- MSR_IA32_ARCH_CAPABILITIES (0x10a),85068506- MSR_PLATFORM_INFO (0xce), and all VMX MSRs85078507- (0x480..0x492) to the maximal capabilities85088508- supported by KVM. KVM also sets85098509- MSR_IA32_UCODE_REV (0x8b) to an arbitrary85108510- value (which is different for Intel vs.85118511- AMD). Lastly, when guest CPUID is set (by85128512- userspace), KVM modifies select VMX MSR85138513- fields to force consistency between guest85148514- CPUID and L2's effective ISA. When this85158515- quirk is disabled, KVM zeroes the vCPU's MSR85168516- values (with two exceptions, see below),85178517- i.e. treats the feature MSRs like CPUID85188518- leaves and gives userspace full control of85198519- the vCPU model definition. This quirk does85208520- not affect VMX MSRs CR0/CR4_FIXED1 (0x48785218521- and 0x489), as KVM does now allow them to85228522- be set by userspace (KVM sets them based on85238523- guest CPUID, for safety purposes).85038503+KVM_X86_QUIRK_STUFF_FEATURE_MSRS By default, at vCPU creation, KVM sets the85048504+ vCPU's MSR_IA32_PERF_CAPABILITIES (0x345),85058505+ MSR_IA32_ARCH_CAPABILITIES (0x10a),85068506+ MSR_PLATFORM_INFO (0xce), and all VMX MSRs85078507+ (0x480..0x492) to the maximal capabilities85088508+ supported by KVM. KVM also sets85098509+ MSR_IA32_UCODE_REV (0x8b) to an arbitrary85108510+ value (which is different for Intel vs.85118511+ AMD). Lastly, when guest CPUID is set (by85128512+ userspace), KVM modifies select VMX MSR85138513+ fields to force consistency between guest85148514+ CPUID and L2's effective ISA. When this85158515+ quirk is disabled, KVM zeroes the vCPU's MSR85168516+ values (with two exceptions, see below),85178517+ i.e. treats the feature MSRs like CPUID85188518+ leaves and gives userspace full control of85198519+ the vCPU model definition. This quirk does85208520+ not affect VMX MSRs CR0/CR4_FIXED1 (0x48785218521+ and 0x489), as KVM does now allow them to85228522+ be set by userspace (KVM sets them based on85238523+ guest CPUID, for safety purposes).8524852485258525-KVM_X86_QUIRK_IGNORE_GUEST_PAT By default, on Intel platforms, KVM ignores85268526- guest PAT and forces the effective memory85278527- type to WB in EPT. The quirk is not available85288528- on Intel platforms which are incapable of85298529- safely honoring guest PAT (i.e., without CPU85308530- self-snoop, KVM always ignores guest PAT and85318531- forces effective memory type to WB). It is85328532- also ignored on AMD platforms or, on Intel,85338533- when a VM has non-coherent DMA devices85348534- assigned; KVM always honors guest PAT in85358535- such case. The quirk is needed to avoid85368536- slowdowns on certain Intel Xeon platforms85378537- (e.g. ICX, SPR) where self-snoop feature is85388538- supported but UC is slow enough to cause85398539- issues with some older guests that use85408540- UC instead of WC to map the video RAM.85418541- Userspace can disable the quirk to honor85428542- guest PAT if it knows that there is no such85438543- guest software, for example if it does not85448544- expose a bochs graphics device (which is85458545- known to have had a buggy driver).85258525+KVM_X86_QUIRK_IGNORE_GUEST_PAT By default, on Intel platforms, KVM ignores85268526+ guest PAT and forces the effective memory85278527+ type to WB in EPT. The quirk is not available85288528+ on Intel platforms which are incapable of85298529+ safely honoring guest PAT (i.e., without CPU85308530+ self-snoop, KVM always ignores guest PAT and85318531+ forces effective memory type to WB). It is85328532+ also ignored on AMD platforms or, on Intel,85338533+ when a VM has non-coherent DMA devices85348534+ assigned; KVM always honors guest PAT in85358535+ such case. The quirk is needed to avoid85368536+ slowdowns on certain Intel Xeon platforms85378537+ (e.g. ICX, SPR) where self-snoop feature is85388538+ supported but UC is slow enough to cause85398539+ issues with some older guests that use85408540+ UC instead of WC to map the video RAM.85418541+ Userspace can disable the quirk to honor85428542+ guest PAT if it knows that there is no such85438543+ guest software, for example if it does not85448544+ expose a bochs graphics device (which is85458545+ known to have had a buggy driver).8546854685478547KVM_X86_QUIRK_VMCS12_ALLOW_FREEZE_IN_SMM By default, KVM relaxes the consistency85488548- check for GUEST_IA32_DEBUGCTL in vmcs1285498549- to allow FREEZE_IN_SMM to be set. When85508550- this quirk is disabled, KVM requires this85518551- bit to be cleared. Note that the vmcs0285528552- bit is still completely controlled by the85538553- host, regardless of the quirk setting.85548554-=================================== ============================================85488548+ check for GUEST_IA32_DEBUGCTL in vmcs1285498549+ to allow FREEZE_IN_SMM to be set. When85508550+ this quirk is disabled, KVM requires this85518551+ bit to be cleared. Note that the vmcs0285528552+ bit is still completely controlled by the85538553+ host, regardless of the quirk setting.85548554+======================================== ================================================85558555855685567.32 KVM_CAP_MAX_VCPU_ID85578557------------------------