[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/5] x86/mwait-idle: mention assumption that WBINVD is not needed


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 6 Sep 2021 14:59:46 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=lYxRIiU55Up939f84d4QmJrnjJ7T0dm9h+/746Rq8MI=; b=PF+1ThupuWkV23rBEb/AVG9YKXiiGvWzWk8N0RVdNnbRiY8A9Y1xfd0Ys2B6n9B8bIi5+yrhKDP5LlyHid8BZcSECQY5ToTb05h/ieblw7n0uV7xrluquc6TLnGeefGIMyWcvJLD4YPtwWKMfERKsEhykRZ0NCb1HRs3UY+d0sH4dsrTgiBMt7bSutsb4uqPk4cbmG9rhfWQ7CvulLnIJqeo1EOA1JeVxKl+J+t8wUXxcf0yL4fJPYZV6zu2vnAfKaEYcXMbeglndhz4/v5FSKxibFcor1TaHlfRrY1cAtnjJQHwHkvQUhi+InvBm1GMzwe/wH+JNRYImUUulv2h9A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZLjHtcBlvctdvTt75iYoXLbCptmC1uoUlrqNiQmQOWmN5NMRBe+ubNquiHZn7Wq5b/C/z67M+RdwyNcjKJKh02ATQmXYOrLkVubin4yYYHIRfRSzSvkoVYatGqs0as1BQP0L+Y97lHeLfoZHK94JsMRT8IrlWfP3wQ2jgihURSI0tk14jvyx/GZ9p78FXtC4g63uV4MhEyoDHahdiEqGvXATD+T+FhreW3qXYUw3+ZaajRM/IfMyzUTDycSGZXgW88Gb2CFkJbNWnzUs08XmUmhZVZitKoQ55psDDzosUvTaLRNcIc80BeFRWQroEalriCgOHyeLqx2fVWiCJZc//Q==
  • Authentication-results: citrix.com; dkim=none (message not signed) header.d=none;citrix.com; dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 06 Sep 2021 12:59:54 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

From: Alexander Monakov <amonakov@xxxxxxxxx>

Intel SDM does not explicitly say that entering a C-state via MWAIT will
implicitly flush CPU caches as appropriate for that C-state. However,
documentation for individual Intel CPU generations does mention this
behavior.

Since intel_idle binds to any Intel CPU with MWAIT, list this assumption
of MWAIT behavior.

In passing, reword opening comment to make it clear that the driver can
load on any old and future Intel CPU with MWAIT.

Signed-off-by: Alexander Monakov <amonakov@xxxxxxxxx>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
[Linux commit: 8bb2e2a887afdf8a39e68fa0dccf82a168aae655]

Dropped "reword opending comment" part - this doesn't apply to our code:
First thing mwait_idle_probe() does is call x86_match_cpu(); we do not
have a 2nd such call looking for just MWAIT (in order to the use _CST
data directly, which we can't get our hands at _CST at this point yet).

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/arch/x86/cpu/mwait-idle.c
+++ b/xen/arch/x86/cpu/mwait-idle.c
@@ -31,6 +31,10 @@
  *
  * Chipset BM_STS (bus master status) bit is a NOP
  *     for preventing entry into deep C-states
+ *
+ * CPU will flush caches as needed when entering a C-state via MWAIT
+ *     (in contrast to entering ACPI C3, in which case the WBINVD
+ *     instruction needs to be executed to flush the caches)
  */
 
 /*




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.