Lines Matching defs:leaf
541 /* Mask kvm_cpu_caps for @leaf with the raw CPUID capabilities of this CPU. */
542 static __always_inline void __kvm_cpu_cap_mask(unsigned int leaf)
544 const struct cpuid_reg cpuid = x86_feature_cpuid(leaf * 32);
547 reverse_cpuid_check(leaf);
552 kvm_cpu_caps[leaf] &= *__cpuid_entry_get_reg(&entry, cpuid.reg);
556 void kvm_cpu_cap_init_kvm_defined(enum kvm_only_cpuid_leafs leaf, u32 mask)
559 BUILD_BUG_ON(leaf < NCAPINTS);
561 kvm_cpu_caps[leaf] = mask;
563 __kvm_cpu_cap_mask(leaf);
566 static __always_inline void kvm_cpu_cap_mask(enum cpuid_leafs leaf, u32 mask)
569 BUILD_BUG_ON(leaf >= NCAPINTS);
571 kvm_cpu_caps[leaf] &= mask;
573 __kvm_cpu_cap_mask(leaf);
776 * CPUs that support SSE2. On CPUs that don't support AMD's leaf,
779 * leaf can make it easier for userspace to detect the feature.
918 /* Limited to the highest leaf implemented in KVM. */
1179 * userspace by providing the CPUID leaf ourselves.
1181 * However, only do it if the host has CPUID leaf 0x8000001d.
1183 * CPUID leaf if KVM reports that it supports 0x8000001d or
1185 * highest Intel leaf which QEMU tries to use as the guest's
1187 * loop if said highest leaf has no subleaves indexed by ECX.
1453 * Intel CPUID semantics treats any query for an out-of-range leaf as if the
1454 * highest basic leaf (i.e. CPUID.0H:EAX) were requested. AMD CPUID semantics
1455 * returns all zeroes for any undefined leaf, whether or not the leaf is in
1458 * A leaf is considered out-of-range if its function is higher than the maximum
1459 * supported leaf of its associated class or if its associated class does not
1464 * class exists if a guest CPUID entry for its <base> leaf exists. For a given
1465 * class, CPUID.<base>.EAX contains the max supported leaf for the class.
1506 * max basic entry, e.g. if the max basic leaf is 0xb but there is no
1514 * the effective CPUID entry is the max basic leaf. Note, the index of
1515 * the original requested leaf is observed!
1552 * When leaf 0BH or 1FH is defined, CL is pass-through
1554 * subleaves. Index 1 will exist iff the leaf is
1555 * implemented, so we pass through CL iff leaf 1