cpuid.txt 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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 = 0,
  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. This function queries the presence of KVM cpuid leafs.
  16. function: define KVM_CPUID_FEATURES (0x40000001)
  17. returns : ebx, ecx, edx = 0
  18. eax = and OR'ed group of (1 << flag), where each flags is:
  19. flag || value || meaning
  20. =============================================================================
  21. KVM_FEATURE_CLOCKSOURCE || 0 || kvmclock available at msrs
  22. || || 0x11 and 0x12.
  23. ------------------------------------------------------------------------------
  24. KVM_FEATURE_NOP_IO_DELAY || 1 || not necessary to perform delays
  25. || || on PIO operations.
  26. ------------------------------------------------------------------------------
  27. KVM_FEATURE_MMU_OP || 2 || deprecated.
  28. ------------------------------------------------------------------------------
  29. KVM_FEATURE_CLOCKSOURCE2 || 3 || kvmclock available at msrs
  30. || || 0x4b564d00 and 0x4b564d01
  31. ------------------------------------------------------------------------------
  32. KVM_FEATURE_ASYNC_PF || 4 || async pf can be enabled by
  33. || || writing to msr 0x4b564d02
  34. ------------------------------------------------------------------------------
  35. KVM_FEATURE_CLOCKSOURCE_STABLE_BIT || 24 || host will warn if no guest-side
  36. || || per-cpu warps are expected in
  37. || || kvmclock.
  38. ------------------------------------------------------------------------------