summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua M. Clulow <josh@sysmgr.org>2020-09-12 16:52:31 -0700
committerJoshua M. Clulow <josh@sysmgr.org>2020-09-12 16:52:31 -0700
commit92f7b1e23c49ac9522feadd9b58cb103a05a509b (patch)
treeb3ab05839ee6d0b687bf2a217034b725836122b1
parentfdcca78f421670bb8f04d68bc3f2762a4b5342be (diff)
downloadillumos-joyent-92f7b1e23c49ac9522feadd9b58cb103a05a509b.tar.gz
13039 HPET on AWS EC2 may be Hazard-Prone Error Trigger
Reviewed by: Dan McDonald <danmcd@joyent.com> Reviewed by: Garrett D'Amore <garrett@damore.org> Approved by: Robert Mustacchi <rm@fingolfin.org>
-rw-r--r--usr/src/uts/i86pc/io/hpet_acpi.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/usr/src/uts/i86pc/io/hpet_acpi.c b/usr/src/uts/i86pc/io/hpet_acpi.c
index 3ba6e132d6..9ac5858fc6 100644
--- a/usr/src/uts/i86pc/io/hpet_acpi.c
+++ b/usr/src/uts/i86pc/io/hpet_acpi.c
@@ -143,6 +143,19 @@ hpet_acpi_init(int *hpet_vect, iflag_t *hpet_flags)
(void) memset(&hpet_info, 0, sizeof (hpet_info));
hpet.supported = HPET_NO_SUPPORT;
+ if ((get_hwenv() & HW_XEN_HVM) != 0) {
+ /*
+ * In some AWS EC2 guests, though the HPET is advertised via
+ * ACPI, programming the interrupt on the non-legacy timer can
+ * result in an immediate reset of the instance. It is not
+ * currently possible to tell whether this is an instance with
+ * broken HPET emulation or not, so we simply disable it across
+ * the board.
+ */
+ PRM_POINT("will not program HPET in Xen HVM");
+ return (DDI_FAILURE);
+ }
+
if (idle_cpu_no_deep_c ||
!cpuid_deep_cstates_supported()) {
/*