From: "Jan Beulich" Subject: Re: Re: system freeze when processor.ko is loaded during boot Date: Mon, 04 Apr 2011 10:22:26 +0100 Message-ID: <4D99A9F20200007800039CFB@vpn.id2.novell.com> References: <4CAF794F.6070308@arcor.de> <4CBEAEE2020000780001E237@vpn.id2.novell.com> <4D910C24.5090908@arcor.de> <4D987A22.5050303@arcor.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <4D987A22.5050303@arcor.de> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Martin Wilck , Haitao Shan Cc: Jinsong Liu , "xen-devel@lists.xensource.com" , Yunhong Jiang , Donald D Dugger , Xin Li , Gang Wei List-Id: xen-devel@lists.xenproject.org >>> On 03.04.11 at 15:46, Martin Wilck wrote: > processor : 0 > vendor_id : GenuineIntel > cpu family : 6 > model : 13 Quoting SDM Vol 3a Section 16.11: "When WRMSR is used to write the time-stamp counter on processors before family [0FH], models [03H, 04H]: only the low-order 32-bits of the time-stamp counter can be written (the high-order 32 bits are cleared to 0). For family [0FH], models [03H, 04H, 06H]; for family [06H]], model [0EH, 0FH]; for family [06H]], DisplayModel [17H, 1AH, 1CH, 1DH]: all 64 bits are writable." Quite obviously nothing good can result if we write the TSC on a CPU that zeroes the upper 32 bits. Hopefully, none of the affected CPUs has X86_FEATURE_CONSTANT_TSC, since otherwise time_calibration_tsc_rendezvous() could get used, which also uses write_tsc(). Haitao, while it is quite clear that with the current implementation we just can't use C states above C1 on CPUs that may halt the TSC in C2 or C3 *and* that don't allow writing the full TSC, this family/model based determination clearly isn't nice (and since it is a white list, it can't possibly be complete). An alternative would seem to be to probe for how TSC writes behave (thus at once covering eventual other vendors' CPUs that may have similar shortcomings). That of course would need to be done early, so that resetting the upper bits to zero wouldn't have any adverse effect. What do you think? Jan