[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6] x86: detect CMOS aliasing on ports other than 0x70/0x71
- To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Wed, 19 Apr 2023 09:56:35 +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=PmCLQJlBYbn6dcif6atux0FPC8qBpDdBLSryj0Xailc=; b=ZOKyZ/CxCHJcU9sxX7Z6BhEo5ol38+6t0ZqA359gTCqZBSUT3yyp1haDTyhTm42LlHN4yyLlpglHv5+HCx0R6nIsO0cCpXjN4kkDuGHYLze6qhxc1o3dUrmLtBt4qu71/2h0FC3pu9t+wuQrvVaok28x/NMftvW+hadL8x1+ehnP7a9Z2bAtUWawW3NH9ttmEui4Q/ROfuQrK+V27+4uE1FMC8cy/TVVvs5yePckIrgSfdjvAAn3HiPjw0P7d9nDN2yz6sX8sYtfkhcahRPOdz9gKLxZAQC8G0DDSr93k9r5zaz1kGiUGFJJXeBUS6xp4Soj2XarDjjPsSlaBF68mw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lQ/XD3n50rBijmZ2H/ZHNbUpgTe4lrp0THLTa8DZCZQfWpUf0L0lS20wtArxF0GqVP4UyHNUI+GunovvHQawTIJhB0d7YdAM8nUBVoljMMVKrQr9KKywDBqmiziloIqYkbgOlICKeRoP2TmaKTPHty/1ZDOVCM1jzdb8nmrfL1Voq271TptWNhkveJ2ujxMK+zJ4rJfr2BYED8WSqiPfyJ2IbfFT9PS/Gp/S/paSMTsqb9GLrXFOfSJloJYbN83bv8mL1sOkn5avXCfeECfFEjWXnCiOTemu6NGER+Ajt9Nxk4AP7hoPNGuBfzC1tH61rRItS6dE3gZnB4A9NMY1Dw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Wed, 19 Apr 2023 07:57:15 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 18.04.2023 13:35, Roger Pau Monné wrote:
> On Tue, Apr 18, 2023 at 11:24:19AM +0200, Jan Beulich wrote:
>> ... in order to also intercept Dom0 accesses through the alias ports.
>>
>> Also stop intercepting accesses to the CMOS ports if we won't ourselves
>> use the CMOS RTC, because of there being none.
>>
>> Note that rtc_init() deliberately uses 16 as the upper loop bound,
>> despite probe_cmos_alias() using 8: The higher bound is benign now, but
>> would save us touching the code (or, worse, missing to touch it) in case
>> the lower one was doubled.
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>
> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Thanks.
>> --- a/xen/arch/x86/pv/emul-priv-op.c
>> +++ b/xen/arch/x86/pv/emul-priv-op.c
>> @@ -208,7 +208,7 @@ static bool admin_io_okay(unsigned int p
>> return false;
>>
>> /* We also never permit direct access to the RTC/CMOS registers. */
>
> Hm, it's unclear to me whether the comment above would need updating:
> we don't allow direct access to the RTC/CMOS registers, but we allow
> direct access to the RTC/CMOS ports if there's no device behind.
Right, but those ports then don't allow access to said registers. So
I think the comment is fine as is.
Jan
|