[PATCH] Documentation: KVM: Describe guest CPUID.15H settings for in-kernel APIC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



KVM_GET_SUPPORTED_CPUID must not populate guest CPUID.15H, because KVM
has no way of knowing the base frequency of the local APIC emulated in
userspace.

However, in reality, the in-kernel APIC emulation is in prevalent
use. Document how KVM_GET_SUPPORTED_CPUID would populate CPUID.15H if
the in-kernel APIC were the default.

Signed-off-by: Jim Mattson <jmattson@xxxxxxxxxx>
---
 Documentation/virt/kvm/api.rst | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
index abd7c32126ce..1e09ac9d48e9 100644
--- a/Documentation/virt/kvm/api.rst
+++ b/Documentation/virt/kvm/api.rst
@@ -1786,6 +1786,16 @@ support.  Instead it is reported via::
 if that returns true and you use KVM_CREATE_IRQCHIP, or if you emulate the
 feature in userspace, then you can enable the feature for KVM_SET_CPUID2.
 
+Similarly, CPUID leaf 0x15 always returns zeroes, because the core
+crystal clock frequency must match the local APIC base frequency, and
+the default configuration leaves the local APIC emulation to
+userspace.
+
+If KVM_CREATE_IRQCHIP is used to enable the in-kernel local APIC
+emulation, CPUID.15H:ECX can be set to 1000000000 (0x3b9aca00). For
+the default guest TSC frequency, CPUID.15H:EBX can be set to tsc_khz
+and CPUID.15H:ECX can be set to 1000000 (0xf4240).  The fraction can
+be simplified if desired.
 
 4.47 KVM_PPC_GET_PVINFO
 -----------------------
-- 
2.37.3.968.ga6b4b080e4-goog




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux