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

Re: [RFC PATCH 02/22] x86/msr: implement MSR_SMI_COUNT for Dom0 on Intel


  • To: Edwin Torok <edwin.torok@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 31 Oct 2023 10:57:28 +0100
  • 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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=f1D38uPzaFMzd7NCJLM/b4hMJZyhzPA94GGVN+5qZiU=; b=SMOSaSfObNFQa33smpo6IQinIp9E3BJYxT0dvFCUXbmvcLWGrl0E6wfHy99nhS5M5SIgnzsMbUpSy9+k2CkYjQDpBVOdRejfozxb4XpXMFQ+XHbpU/1RnyYG1FR8RZuIsd/sLTC558AQpREy8/XuzrVmhbrzXa5AWu1rzR9JDFUJwB6dhN2BE2N39RlXKuRZ1TY1DrllKi1IUXcynljOOpSHKWUDwwdhk2qDC3BeyikADXdkoOcFTzYCHMbKt9L6zZVwInmk0UGpsBvSk+xDIjBUHB852hXOCKsXuH8yd1LU1UUlfaC21ADHZTMbCIBjWM52bgdjk5X9ljGdBCGkLw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I2JzINe+Hw14y1n1AUv8Z51910JBarNB8qnYstDKPpSU5i048ZzpA1GLbKIfPxP0sXKjBWmwMk906vgPQDxtACjdLPIHJe4k/4ThwcJflCmnAhnj016UBZI3ieQpkLQSUVh1jWPh0N3HBpAt6PHfwBFW/8IEvVE4N4qMM6K+FD7H/H0pULpE8ikvjP0XuaW4adbwfAmGXX+RDfpc/nTyMbHQ+9KZsrdvNt1r/jtMhEF+pWNp2qzdO2LDTIxdQ2fLdc70tpuOeqiGl5rYDfCqpchvivUP0DROOlH9lkJAXQBTAKb9JJeLnVvNvufkjKYRIO2fvBmbP9KOTm+I5HRLlA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Edwin Török <edvin.torok@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 31 Oct 2023 09:58:13 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 31.10.2023 10:42, Edwin Torok wrote:
>> On 30 Oct 2023, at 16:20, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>> On 25.10.2023 21:29, Edwin Török wrote:
>>> Dom0 should always be able to read this MSR: it is useful when
>>> investigating performance issues in production.
>>
>> While I'm not outright opposed, I'm also not convinced. At the very least
>> ...
>>
>>> Although the count is Thread scoped, in practice all cores were observed
>>> to return the same count (perhaps due to implementation details of SMM),
>>> so do not require the cpu to be pinned in order to read it.
>>
>> ... this, even if matching your observations, is going to be properly
>> misleading in case counts end up diverging.
>>
>>> This MSR exists on Intel since Nehalem.
>>>
>>> Backport: 4.15+
>>
>> If this was a backporting candidate, I think a Fixes: tag would need
>> to indicate what's being fixed here.
> 
> 
> I used the Backport tag to indicate what is the oldest release that it is 
> backportable to.
> IIRC the choices were:
> * 4.0+ for issues that were present for a long time (didn't look further back 
> than that in history), so there isn't any particular commit that introduces 
> the problem, it was like that from the very beginning, i.e. not a regression.
> 
> * 4.13+ for issues affecting only new CPU support (I think that is the 
> release that added Icelake support). I can attempt to find the commit that 
> added Icelake support and mark them as Fixes: that commit (although there 
> might be several of them)
> 
> * 4.15+ for bugs introduced by the default read-write msr changes
> 
> 
>> Otherwise this is merely a new
>> feature.
>>
> 
> Prior to the default rdwrmsr changes it was possible to read any MSR, so I 
> consider it a bug that after the default rdwrmsr changes you can no longer do 
> that, it takes away a valuable debugging tool.

As said elsewhere, making MSRs generally inaccessible was a deliberate change.
I don't think any of us x86 maintainers has so far considered that as 
introducing
a bug. MSRs being accessible as a debugging tool may be worthwhile to have as an
optional feature (see my suggestion elsewhere as to a possible way to approach
this), but I don't think this can be taken as an indication that we should 
revert
back to "blind" exposure.

Jan



 


Rackspace

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