From nobody Sat Apr 20 03:06:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1589551160; cv=none; d=zohomail.com; s=zohoarc; b=Bc0dtElI4Tt8fHxu3DdWMHgszTHr33tcT34eQoydkuTeVPXaTpd0r5olwTC5W1Z9Pt9XAFo+iGQvh9fxuZeQaG33gpX4yzeVs/t8UNFGYQtg1S08wDXkasCM+QR8RpMq8Yoa86EgAWeXM0N2sVdCrvls36l3Sf7GGjSTmqT5Az8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589551160; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=rcsaTZ4sHbGvjtVJFF1Y81e6AD6BWDUmMyT7zpl4cx8=; b=f4J+iBVPYvi5ShX3gl+2t1SnBnIer+RPI8ZfDhWwUM/pJ3QmFxLK6TfLM9CISyvjMd1+o4jCnGaGxPFjP5VnrpNtwh2n5VuEoACU7RgW1btpyNBZ4KiNz/7gxrpZjxTaazZNpdyRYV401bwWcx77QFLej5b79UaGWcurqBUmb5w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1589551160238436.2625438818046; Fri, 15 May 2020 06:59:20 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jZarK-0000R3-Hz; Fri, 15 May 2020 13:58:42 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jZarJ-0000Qs-Iv for xen-devel@lists.xenproject.org; Fri, 15 May 2020 13:58:41 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 2b451bd8-96b4-11ea-b9cf-bc764e2007e4; Fri, 15 May 2020 13:58:35 +0000 (UTC) X-Inumbo-ID: 2b451bd8-96b4-11ea-b9cf-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1589551115; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9gp9wrRn7KriUqfiJcrm7JJ3iaK6QWAFr6UqKaTmPqA=; b=Nyu1ydGQhnnkTs3Z37gQQESMBInF4iQ6+07kuJZPkThc/rH5H0T4sXXQ 8PlD1T8ZUIFIWrpAxRZOoCvks2o/nY97HRR6InIg5b9Pu6+UfZNpx2vdM O4DBSPgFrqyMO38xzJkgUajjsUj2NbeVvsMOltHEmdcbMYMBz0t9ZQzpZ g=; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa6.hc3370-68.iphmx.com: no sender authenticity information available from domain of roger.pau@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa6.hc3370-68.iphmx.com: domain of roger.pau@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa6.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@citrix.com; spf=Pass smtp.mailfrom=roger.pau@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com; dmarc=pass (p=none dis=none) d=citrix.com IronPort-SDR: wsU8T5RVIy4TwDZfNfGWqJH7KIhF++S5PgXkWVfYhWdlTE+WpOdLbtXF7aDDEHOnWURRrqNNfS wWXc5u/7PhSEO30wecvWa46Z13aWzgWuUbNdPdljwPlqP9vyUw6tBZVvFE9c+rchMnMuZf554P rlSy7nE6uGSA2dUigapgt4koBJKFMO5PwS3UKL6HoOuCJxlgEviR0BWBzq8NHDy7PCOLLsncG0 TXvdt6lfEurwQGrzLI9K18c9sQJINEHnmDysrgx6YYbGRL1M+ofC/fB6zItluw/2rIOeZYixNl 6J8= X-SBRS: 2.7 X-MesageID: 17988403 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.73,395,1583211600"; d="scan'208";a="17988403" From: Roger Pau Monne To: Subject: [PATCH v3 1/2] x86/idle: rework C6 EOI workaround Date: Fri, 15 May 2020 15:58:01 +0200 Message-ID: <20200515135802.63853-2-roger.pau@citrix.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200515135802.63853-1-roger.pau@citrix.com> References: <20200515135802.63853-1-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Wei Liu , Jan Beulich , Roger Pau Monne Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Change the C6 EOI workaround (errata AAJ72) to use x86_match_cpu. Also call the workaround from mwait_idle, previously it was only used by the ACPI idle driver. Finally make sure the routine is called for all states equal or greater than ACPI_STATE_C3, note that the ACPI driver doesn't currently handle them, but the errata condition shouldn't be limited by that. Signed-off-by: Roger Pau Monn=C3=A9 Reviewed-by: Jan Beulich --- Changes since v2: - New in this version. --- xen/arch/x86/acpi/cpu_idle.c | 43 +++++++++++++++++++++-------------- xen/arch/x86/cpu/mwait-idle.c | 3 +++ xen/include/asm-x86/cpuidle.h | 1 + 3 files changed, 30 insertions(+), 17 deletions(-) diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c index b83446e77d..0efdaff21b 100644 --- a/xen/arch/x86/acpi/cpu_idle.c +++ b/xen/arch/x86/acpi/cpu_idle.c @@ -548,26 +548,35 @@ void trace_exit_reason(u32 *irq_traced) } } =20 -/* - * "AAJ72. EOI Transaction May Not be Sent if Software Enters Core C6 Duri= ng=20 - * an Interrupt Service Routine" - *=20 - * There was an errata with some Core i7 processors that an EOI transactio= n=20 - * may not be sent if software enters core C6 during an interrupt service=20 - * routine. So we don't enter deep Cx state if there is an EOI pending. - */ -static bool errata_c6_eoi_workaround(void) +bool errata_c6_eoi_workaround(void) { - static int8_t fix_needed =3D -1; + static int8_t __read_mostly fix_needed =3D -1; =20 if ( unlikely(fix_needed =3D=3D -1) ) { - int model =3D boot_cpu_data.x86_model; - fix_needed =3D (cpu_has_apic && !directed_eoi_enabled && - (boot_cpu_data.x86_vendor =3D=3D X86_VENDOR_INTEL) && - (boot_cpu_data.x86 =3D=3D 6) && - ((model =3D=3D 0x1a) || (model =3D=3D 0x1e) || (mode= l =3D=3D 0x1f) || - (model =3D=3D 0x25) || (model =3D=3D 0x2c) || (mode= l =3D=3D 0x2f))); +#define INTEL_FAM6_MODEL(m) { X86_VENDOR_INTEL, 6, m, X86_FEATURE_ALWAYS } + /* + * Errata AAJ72: EOI Transaction May Not be Sent if Software Enters + * Core C6 During an Interrupt Service Routine" + * + * There was an errata with some Core i7 processors that an EOI + * transaction may not be sent if software enters core C6 during an + * interrupt service routine. So we don't enter deep Cx state if + * there is an EOI pending. + */ + const static struct x86_cpu_id eoi_errata[] =3D { + INTEL_FAM6_MODEL(0x1a), + INTEL_FAM6_MODEL(0x1e), + INTEL_FAM6_MODEL(0x1f), + INTEL_FAM6_MODEL(0x25), + INTEL_FAM6_MODEL(0x2c), + INTEL_FAM6_MODEL(0x2f), + { } + }; +#undef INTEL_FAM6_MODEL + + fix_needed =3D cpu_has_apic && !directed_eoi_enabled && + x86_match_cpu(eoi_errata); } =20 return (fix_needed && cpu_has_pending_apic_eoi()); @@ -676,7 +685,7 @@ static void acpi_processor_idle(void) return; } =20 - if ( (cx->type =3D=3D ACPI_STATE_C3) && errata_c6_eoi_workaround() ) + if ( (cx->type >=3D ACPI_STATE_C3) && errata_c6_eoi_workaround() ) cx =3D power->safe_state; =20 =20 diff --git a/xen/arch/x86/cpu/mwait-idle.c b/xen/arch/x86/cpu/mwait-idle.c index b81937966e..88a3e160c5 100644 --- a/xen/arch/x86/cpu/mwait-idle.c +++ b/xen/arch/x86/cpu/mwait-idle.c @@ -770,6 +770,9 @@ static void mwait_idle(void) return; } =20 + if ((cx->type >=3D 3) && errata_c6_eoi_workaround()) + cx =3D power->safe_state; + eax =3D cx->address; cstate =3D ((eax >> MWAIT_SUBSTATE_SIZE) & MWAIT_CSTATE_MASK) + 1; =20 diff --git a/xen/include/asm-x86/cpuidle.h b/xen/include/asm-x86/cpuidle.h index 5d7dffd228..13879f58a1 100644 --- a/xen/include/asm-x86/cpuidle.h +++ b/xen/include/asm-x86/cpuidle.h @@ -26,4 +26,5 @@ void update_idle_stats(struct acpi_processor_power *, void update_last_cx_stat(struct acpi_processor_power *, struct acpi_processor_cx *, uint64_t); =20 +bool errata_c6_eoi_workaround(void); #endif /* __X86_ASM_CPUIDLE_H__ */ --=20 2.26.2 From nobody Sat Apr 20 03:06:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1589551160; cv=none; d=zohomail.com; s=zohoarc; b=OkaE+cfoP9+FUApi9D+0Wy3fpC+GHm8ne4XjfPF84gXpsq2K7zBhwmAzbDvwwJs81HKHrNslCUBINU3x5NzBtb3d3cUT1oLBBHoZ1D24wWyBBAZah2AiT2kM/Rv1wpgoh32EJ+QLkaPaKej+lx9pleaIeT0pIe/Z/9RvQ2HPzi4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589551160; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jDZ4j4kKYn9djWX7LVVqscYjW9HQTxP+9MI4LDBrZE4=; b=dwNlvwrP6tKOsoX2DUi5ax0tPvhd5ramuuwo9Wd5iw3mIujKt8SLP9GEr+23QYGVXsQxi34jrCZKfRJCiLz9bHPPuKVaO9wPpe6DJ2bzjhbsa0EMMKmnw5AqfJtuRUaNQO2jeAOdZ5G86iQqvJGc9zpoF0XN0gPSGteKrGvei08= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1589551160704569.8735815170146; Fri, 15 May 2020 06:59:20 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jZarP-0000RQ-PY; Fri, 15 May 2020 13:58:47 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jZarO-0000RH-Ji for xen-devel@lists.xenproject.org; Fri, 15 May 2020 13:58:46 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 2ed6e5d8-96b4-11ea-ae69-bc764e2007e4; Fri, 15 May 2020 13:58:41 +0000 (UTC) X-Inumbo-ID: 2ed6e5d8-96b4-11ea-ae69-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1589551123; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hGisH2+dxVByj66jlzhR1rIynA6hX56thdi9LQ2Txn8=; b=Lrt42LXdfj0SVEbkGqqXF/iVAdQ/lzk3L2NbHwMb/JnDLQijkYEt7fxJ Gf7nD7lHryCIbG9N4sDBKXlK0u7Zy+BrFL5Gv/MBLjfA6MewemeAOQl+V ySUBsEWjUiv8xkpdekg3LQBGEIepaDwqlKyroGfiB5dayPBuNeJCWUv9D o=; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa1.hc3370-68.iphmx.com: no sender authenticity information available from domain of roger.pau@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa1.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa1.hc3370-68.iphmx.com: domain of roger.pau@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa1.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa1.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa1.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@citrix.com; spf=Pass smtp.mailfrom=roger.pau@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com; dmarc=pass (p=none dis=none) d=citrix.com IronPort-SDR: IgMUU1DY5bJBi9zQvCIIKwh/7tktGi0K/5rxWMAYlvRkp5YlNyK37r+u/129x4e8ZFUTvS1pqF U1o4jbYJhBRPm7aLS0JG8dRr8Bq4pIR+1DeawfZDZGYqTce93pvYcIKWVJcEZU9UF1EGcFiIKM yFiISZWzJ5QdFwqyzxktWzH+uVtR0SWhWLV+5y7cc89gG2GGQ5w5uARvlDw15HQhLp4cQhYAtN TbFqNYt+IyzXg3ptbLAnsLVKkH73bgMdy8gO/G8j8vA9CgvsR9xITHyZmZynnQNZTjnHfVJLdU b3I= X-SBRS: 2.7 X-MesageID: 17900393 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.73,395,1583211600"; d="scan'208";a="17900393" From: Roger Pau Monne To: Subject: [PATCH v3 2/2] x86/idle: prevent entering C6 with in service interrupts on Intel Date: Fri, 15 May 2020 15:58:02 +0200 Message-ID: <20200515135802.63853-3-roger.pau@citrix.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200515135802.63853-1-roger.pau@citrix.com> References: <20200515135802.63853-1-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Andrew Cooper , Ian Jackson , George Dunlap , Jan Beulich , Roger Pau Monne Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Apply a workaround for Intel errata BDX99, CLX30, SKX100, CFW125, BDF104, BDH85, BDM135, KWB131: "A Pending Fixed Interrupt May Be Dispatched Before an Interrupt of The Same Priority Completes". Apply the errata to all server and client models (big cores) from Broadwell to Cascade Lake. The workaround is grouped together with the existing fix for errata AAJ72, and the eoi from the function name is removed. Signed-off-by: Roger Pau Monn=C3=A9 --- Changes since v2: - Use x86_match_cpu and apply the workaround to all models from Broadwell to Cascade Lake. - Rename command line option to disable-c6-errata. Changes since v1: - Unify workaround with errata_c6_eoi_workaround. - Properly check state in both acpi and mwait drivers. --- docs/misc/xen-command-line.pandoc | 9 +++++++ xen/arch/x86/acpi/cpu_idle.c | 39 +++++++++++++++++++++++++++---- xen/arch/x86/cpu/mwait-idle.c | 2 +- xen/include/asm-x86/cpuidle.h | 2 +- 4 files changed, 46 insertions(+), 6 deletions(-) diff --git a/docs/misc/xen-command-line.pandoc b/docs/misc/xen-command-line= .pandoc index ee12b0f53f..8dd944b357 100644 --- a/docs/misc/xen-command-line.pandoc +++ b/docs/misc/xen-command-line.pandoc @@ -652,6 +652,15 @@ Specify the size of the console debug trace buffer. By= specifying `cpu:` additionally a trace buffer of the specified size is allocated per cpu. The debug trace feature is only enabled in debugging builds of Xen. =20 +### disable-c6-errata +> `=3D ` + +> Default: `true for affected Intel CPUs` + +Workaround for Intel errata AAJ72 and BDX99, CLX30, SKX100, CFW125, BDF104, +BDH85, BDM135, KWB131. Prevent entering C6 idle states when certain condit= ions +are meet in order to avoid triggering the listed erratas. + ### dma_bits > `=3D ` =20 diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c index 0efdaff21b..2fa1ccc031 100644 --- a/xen/arch/x86/acpi/cpu_idle.c +++ b/xen/arch/x86/acpi/cpu_idle.c @@ -548,9 +548,10 @@ void trace_exit_reason(u32 *irq_traced) } } =20 -bool errata_c6_eoi_workaround(void) +bool errata_c6_workaround(void) { static int8_t __read_mostly fix_needed =3D -1; + boolean_param("disable-c6-errata", fix_needed); =20 if ( unlikely(fix_needed =3D=3D -1) ) { @@ -573,10 +574,40 @@ bool errata_c6_eoi_workaround(void) INTEL_FAM6_MODEL(0x2f), { } }; + /* + * Errata BDX99, CLX30, SKX100, CFW125, BDF104, BDH85, BDM135, KWB= 131: + * A Pending Fixed Interrupt May Be Dispatched Before an Interrupt= of + * The Same Priority Completes. + * + * Resuming from C6 Sleep-State, with Fixed Interrupts of the same + * priority queued (in the corresponding bits of the IRR and ISR A= PIC + * registers), the processor may dispatch the second interrupt (fr= om + * the IRR bit) before the first interrupt has completed and writt= en to + * the EOI register, causing the first interrupt to never complete. + */ + const static struct x86_cpu_id isr_errata[] =3D { + /* Broadwell */ + INTEL_FAM6_MODEL(0x47), + INTEL_FAM6_MODEL(0x3d), + INTEL_FAM6_MODEL(0x4f), + INTEL_FAM6_MODEL(0x56), + /* Skylake (client) */ + INTEL_FAM6_MODEL(0x5e), + INTEL_FAM6_MODEL(0x4e), + /* {Sky/Cascade}lake (server) */ + INTEL_FAM6_MODEL(0x55), + /* {Kaby/Coffee/Whiskey/Amber} Lake */ + INTEL_FAM6_MODEL(0x9e), + INTEL_FAM6_MODEL(0x8e), + /* Cannon Lake */ + INTEL_FAM6_MODEL(0x66), + { } + }; #undef INTEL_FAM6_MODEL =20 - fix_needed =3D cpu_has_apic && !directed_eoi_enabled && - x86_match_cpu(eoi_errata); + fix_needed =3D cpu_has_apic && + ((!directed_eoi_enabled && x86_match_cpu(eoi_errata))= || + x86_match_cpu(isr_errata)); } =20 return (fix_needed && cpu_has_pending_apic_eoi()); @@ -685,7 +716,7 @@ static void acpi_processor_idle(void) return; } =20 - if ( (cx->type >=3D ACPI_STATE_C3) && errata_c6_eoi_workaround() ) + if ( (cx->type >=3D ACPI_STATE_C3) && errata_c6_workaround() ) cx =3D power->safe_state; =20 =20 diff --git a/xen/arch/x86/cpu/mwait-idle.c b/xen/arch/x86/cpu/mwait-idle.c index 88a3e160c5..52eab81bf8 100644 --- a/xen/arch/x86/cpu/mwait-idle.c +++ b/xen/arch/x86/cpu/mwait-idle.c @@ -770,7 +770,7 @@ static void mwait_idle(void) return; } =20 - if ((cx->type >=3D 3) && errata_c6_eoi_workaround()) + if ((cx->type >=3D 3) && errata_c6_workaround()) cx =3D power->safe_state; =20 eax =3D cx->address; diff --git a/xen/include/asm-x86/cpuidle.h b/xen/include/asm-x86/cpuidle.h index 13879f58a1..dc7298a538 100644 --- a/xen/include/asm-x86/cpuidle.h +++ b/xen/include/asm-x86/cpuidle.h @@ -26,5 +26,5 @@ void update_idle_stats(struct acpi_processor_power *, void update_last_cx_stat(struct acpi_processor_power *, struct acpi_processor_cx *, uint64_t); =20 -bool errata_c6_eoi_workaround(void); +bool errata_c6_workaround(void); #endif /* __X86_ASM_CPUIDLE_H__ */ --=20 2.26.2