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

Re: [PATCH] x86/amd: do not expose HWCR.TscFreqSel to guests


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 13 Sep 2023 08:14: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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=doQScRTSSLO5FgT9Mpf5bp5s6lb3TaNX/sW5y16v3J4=; b=W+tVlGuwxSbhqyN9HhKVq4nEbdRBGaDYWWx6ee2XSteKyonZwYduvd8i5kTTLUII41cFWxDCLnFYkk4zJpqjykx5ZmRAN+BjP6zWR+42CrOGumb8Ki9U7Q44rVzwlCmrb11tAGtfcIvkuWRYqndgfncrUoBa+oK1iSDu+ULtuUFN3Vi6JaOplIpszO0QcVSsUP9bbVDdpE3yEunq7+oRf++vYJL0L3y3qwbFA4cWMaVVe0+JXGxnHlf29HzGBiorr81pQ/MZgWcQ6nFeulNhlXbvG47XfpTfE4KtVDmVkzL02u0y1IbQFIisq+3jM/I8HJjlk4T284/XksZw1wBcog==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bQb6JrD8v39jiHDCkbvJ0qpjsmNu+LV6NURvA0u2n8EC65b/ytZ03tGVxIlCeZ+kWtPhsvMiTfYuWzzAvO8KaTxa+BfEW0z2WoktAdU2dBQxUNZhX9FXWpiZQIKL21No624lOMZOwtf+pfjMzH6gEH/jJCszzDljlqEXatUalUjrnvXGCV30aePo/aA9wWJRJqX3QKFvAeurdMG1Se1WL22Wx5M5kl38Qu8geARUKT7gAAGDRONag/xn2wFO4UexhGsvYF8svT8l35MQL5OrXDCzpl4n1PqpJW5Pb0G20MgYvxk/cSs6fyPGkT8AzlQIZjC6NZ/n6m27GzpgQs4btA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 13 Sep 2023 06:15:39 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 12.09.2023 18:23, Roger Pau Monne wrote:
> OpenBSD will attempt to unconditionally access PSTATE0 if HWCR.TscFreqSel is
> set, and will also attempt to unconditionally access HWCR if the TSC is
> reported as Invariant.
> 
> The reasoning for exposing HWCR.TscFreqSel was to avoid Linux from printing a
> (bogus) warning message, but doing so at the cost of OpenBSD not booting is 
> not
> a suitable solution.

Why is the warning bogus? The PPR doesn't even state what the bit being
clear means; it's a r/o one. On respective families it cannot possibly
be correct to expose it clear.

> In order to fix expose an empty HWCR.
> 
> Fixes: 14b95b3b8546 ('x86/AMD: expose HWCR.TscFreqSel to guests')
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> ---
> Not sure whether we want to expose something when is_cpufreq_controller() is
> true, seeing as there's a special wrmsr handler for the same MSR in that case.
> Likely should be done for PV only, but also likely quite bogus.

Well, keying to is_cpufreq_controller() is indeed questionable, but is
there any reason to not minimally expose the bit correctly when a
domain cannot migrate?

Jan



 


Rackspace

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