MCPcopy Create free account
hub / github.com/F-Stack/f-stack / xen_hvm_cpuid_base

Function xen_hvm_cpuid_base

freebsd/x86/xen/hvm.c:115–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113static uint32_t cpuid_base;
114
115static uint32_t
116xen_hvm_cpuid_base(void)
117{
118 uint32_t base, regs[4];
119
120 for (base = 0x40000000; base < 0x40010000; base += 0x100) {
121 do_cpuid(base, regs);
122 if (!memcmp("XenVMMXenVMM", &regs[1], 12)
123 && (regs[0] - base) >= 2)
124 return (base);
125 }
126 return (0);
127}
128
129static void
130hypervisor_quirks(unsigned int major, unsigned int minor)

Callers 1

Calls 1

do_cpuidFunction · 0.50

Tested by

no test coverage detected