diff options
Diffstat (limited to 'usr/src/uts/i86pc/os/microcode.c')
-rw-r--r-- | usr/src/uts/i86pc/os/microcode.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/usr/src/uts/i86pc/os/microcode.c b/usr/src/uts/i86pc/os/microcode.c index 8cf5d99d24..c69c8c0500 100644 --- a/usr/src/uts/i86pc/os/microcode.c +++ b/usr/src/uts/i86pc/os/microcode.c @@ -203,32 +203,22 @@ ucode_free(processorid_t id, void* buf, size_t size) static int ucode_capable_amd(cpu_t *cp) { -#ifndef __xpv - extern int xpv_is_hvm; - if (xpv_is_hvm) { - return (0); - } -#else - if (!DOMAIN_IS_INITDOMAIN(xen_info)) { + int hwenv = get_hwenv(); + + if (hwenv == HW_XEN_HVM || (hwenv == HW_XEN_PV && !is_controldom())) { return (0); } -#endif return (cpuid_getfamily(cp) >= 0x10); } static int ucode_capable_intel(cpu_t *cp) { -#ifndef __xpv - extern int xpv_is_hvm; - if (xpv_is_hvm) { - return (0); - } -#else - if (!DOMAIN_IS_INITDOMAIN(xen_info)) { + int hwenv = get_hwenv(); + + if (hwenv == HW_XEN_HVM || (hwenv == HW_XEN_PV && !is_controldom())) { return (0); } -#endif return (cpuid_getfamily(cp) >= 6); } |