cpuid.txt 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. KVM CPUID bits
  2. Glauber Costa <glommer@redhat.com>, Red Hat Inc, 2010
  3. =====================================================
  4. A guest running on a kvm host, can check some of its features using
  5. cpuid. This is not always guaranteed to work, since userspace can
  6. mask-out some, or even all KVM-related cpuid features before launching
  7. a guest.
  8. KVM cpuid functions are:
  9. function: KVM_CPUID_SIGNATURE (0x40000000)
  10. returns : eax = 0x40000001,
  11. ebx = 0x4b4d564b,
  12. ecx = 0x564b4d56,
  13. edx = 0x4d.
  14. Note that this value in ebx, ecx and edx corresponds to the string "KVMKVMKVM".
  15. The value in eax corresponds to the maximum cpuid function present in this leaf,
  16. and will be updated if more functions are added in the future.
  17. Note also that old hosts set eax value to 0x0. This should
  18. be interpreted as if the value was 0x40000001.
  19. This function queries the presence of KVM cpuid leafs.
  20. function: define KVM_CPUID_FEATURES (0x40000001)
  21. returns : ebx, ecx, edx = 0
  22. eax = and OR'ed group of (1 << flag), where each flags is:
  23. flag || value || meaning
  24. =============================================================================
  25. KVM_FEATURE_CLOCKSOURCE || 0 || kvmclock available at msrs
  26. || || 0x11 and 0x12.
  27. ------------------------------------------------------------------------------
  28. KVM_FEATURE_NOP_IO_DELAY || 1 || not necessary to perform delays
  29. || || on PIO operations.
  30. ------------------------------------------------------------------------------
  31. KVM_FEATURE_MMU_OP || 2 || deprecated.
  32. ------------------------------------------------------------------------------
  33. KVM_FEATURE_CLOCKSOURCE2 || 3 || kvmclock available at msrs
  34. || || 0x4b564d00 and 0x4b564d01
  35. ------------------------------------------------------------------------------
  36. KVM_FEATURE_ASYNC_PF || 4 || async pf can be enabled by
  37. || || writing to msr 0x4b564d02
  38. ------------------------------------------------------------------------------
  39. KVM_FEATURE_STEAL_TIME || 5 || steal time can be enabled by
  40. || || writing to msr 0x4b564d03.
  41. ------------------------------------------------------------------------------
  42. KVM_FEATURE_PV_EOI || 6 || paravirtualized end of interrupt
  43. || || handler can be enabled by writing
  44. || || to msr 0x4b564d04.
  45. ------------------------------------------------------------------------------
  46. KVM_FEATURE_PV_UNHALT || 7 || guest checks this feature bit
  47. || || before enabling paravirtualized
  48. || || spinlock support.
  49. ------------------------------------------------------------------------------
  50. KVM_FEATURE_CLOCKSOURCE_STABLE_BIT || 24 || host will warn if no guest-side
  51. || || per-cpu warps are expected in
  52. || || kvmclock.
  53. ------------------------------------------------------------------------------