summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorDan Kimmel <dan.kimmel@delphix.com>2017-04-07 13:33:55 -0700
committerMatthew Ahrens <mahrens@delphix.com>2017-04-13 21:23:56 -0700
commitc2710388e7f692e90d6699bdef7a3987379dba9d (patch)
tree5199a3c2ba4bad60a67cf8dc6d936fca8f97dba9 /usr/src
parent20ee95858720e9df048b9d31b30aeb303e0685c9 (diff)
downloadillumos-gate-c2710388e7f692e90d6699bdef7a3987379dba9d.tar.gz
7574 boot slowness followed by panic while booting on KVM when no cpu tag is specified in virsh XML
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com> Reviewed by: Prachetaa Raghavan <prachetaa.raghavan@delphix.com> Reviewed by: Sebastien Roy <sebastien.roy@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com> Approved by: Dan McDonald <danmcd@omniti.com>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/i86pc/os/cpuid.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/usr/src/uts/i86pc/os/cpuid.c b/usr/src/uts/i86pc/os/cpuid.c
index cd7d52b0da..c6cf704d64 100644
--- a/usr/src/uts/i86pc/os/cpuid.c
+++ b/usr/src/uts/i86pc/os/cpuid.c
@@ -20,7 +20,7 @@
*/
/*
* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2011 by Delphix. All rights reserved.
+ * Copyright (c) 2011, 2016 by Delphix. All rights reserved.
* Copyright 2013 Nexenta Systems, Inc. All rights reserved.
* Copyright 2014 Josef "Jeff" Sipek <jeffpc@josefsipek.net>
*/
@@ -423,9 +423,8 @@ static struct cpuid_info cpuid_info0;
* (loosely defined as "pre-Pentium-4"):
* P6, PII, Mobile PII, PII Xeon, PIII, Mobile PIII, PIII Xeon
*/
-
#define IS_LEGACY_P6(cpi) ( \
- cpi->cpi_family == 6 && \
+ cpi->cpi_family == 6 && \
(cpi->cpi_model == 1 || \
cpi->cpi_model == 3 || \
cpi->cpi_model == 5 || \
@@ -1465,7 +1464,13 @@ cpuid_pass1(cpu_t *cpu, uchar_t *featureset)
xcpuid = 0;
switch (cpi->cpi_vendor) {
case X86_VENDOR_Intel:
- if (IS_NEW_F6(cpi) || cpi->cpi_family >= 0xf)
+ /*
+ * On KVM we know we will have proper support for extended
+ * cpuid.
+ */
+ if (IS_NEW_F6(cpi) || cpi->cpi_family >= 0xf ||
+ (get_hwenv() == HW_KVM && cpi->cpi_family == 6 &&
+ (cpi->cpi_model == 6 || cpi->cpi_model == 2)))
xcpuid++;
break;
case X86_VENDOR_AMD: