[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: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Wed, 19 Apr 2023 12:45:55 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=9y/7nfPu7Jt5V7w1e68TRs5UVJfBzH6kPoJ14h7ZpPU=; b=j4jWTPRAAKNVOgz9A86lv71wm1uNTXXVTb8HpzjkxjbMqmTTI+EqrvQN5wH9DyMGcpn0O9gazolWI25oLD7PNThVB1vohVwtFBcjLg0ngM089vC1pBjCESESZgdAoo12EU4X0HgFi4BI8QHaSZWYlz65bepK8NS7ZeD40Ol+u/LMqCSmFvM2Lny0UH/IBCUl4l4qsN5CLsrl45JzhyRbu7oL+SBjm202zsWGj8Om6jMrVAluvB7qmwSDayF/zj6gc341TgGwXg/J/sC6PxkMtPWmZEXl7SCyN+KjHex5yfzYdVDTJRxAurwzKk8onQ03hPy/0ojomAC9Ws6+l1Lnlw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cWk1ENDP/xHohS7ijWIOU3uU6yaXCYCG1rSCvWZj3+Ee6XV7MpuDpBES50RufscUUn5Yf30A/YvmICkSKvDuNDR5YLeBfGAFij3BoWH0MtxW7QnxTMBdgFQR73E00NNZmPCIzOxQkxyCpswqyXTsBsoHaLFRlH8GcwKnIbBYFvnNJCUqpu0N0daOCHAT1XIZxCnua9dVpywvvpwRM8XfrscA9gxKH3dm30EuBjFeHGzQYWBGQC4wzITh5f/qqaPlCYEVlB5sr5DS1uKOi6IOjmTJn0LMYU2DHVz9K1XSTaruRZwm23wcV3CZ8A/+Ivm3VaIcEw15IJSptTqhqJkmKg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.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 10:46:12 +0000
  • Ironport-data: A9a23:oAHBEqNana7V16XvrR2RlsFynXyQoLVcMsEvi/4bfWQNrUok1GMEz GBJUDuGPPqNazH2ft52Pd+28EhQ6JXdzdVnHAto+SlhQUwRpJueD7x1DKtS0wC6dZSfER09v 63yTvGacajYm1eF/k/F3oDJ9CU6jufQAOKnUoYoAwgpLSd8UiAtlBl/rOAwh49skLCRDhiE/ Nj/uKUzAnf8s9JPGj9SuvPrRC9H5qyo42tE5wxmPpingXeF/5UrJMNHTU2OByOQrrl8RoaSW +vFxbelyWLVlz9F5gSNy+uTnuUiG9Y+DCDW4pZkc/HKbitq/0Te5p0TJvsEAXq7vh3S9zxHJ HehgrTrIeshFvWkdO3wyHC0GQkmVUFN0OevzXRSLaV/ZqAJGpfh66wGMa04AWEX0uFeAH5/r fxAERxOQhqx2e+57ryQceY506zPLOGzVG8ekldJ6GiDSNwAEdXESaiM4sJE1jAtgMwIBezZe 8cSdTtoalLHfgFLPVAUTpk5mY9EhFGmK2Ee9A3T+PdxujeOpOBy+OGF3N79YNuFSN8Thk+Fj mnH4374ElcRM9n3JT+tqyrw1rKfzHKqMG4UPLuF6OBJ3Xm0+jAWFzpGfAu6j+mVoFHrDrqzL GRRoELCt5Ma9kamU938VB2Qu2Ofs1gXXN84O/037kSBx7TZ5y6dB3MYVXhRZdo+rsg0SDc2k FiTkLvBHTVytJWFRHTb8a2bxRutPQAFIGlEYjULJTbp+PHmqYA3yxjJHtBqFffvisWvQG6th TeXsCI5mrMfy9YR0Lm29kzGhDTqoYXVSgky5UPcWWfNAh5FWbNJrreAsTDzhcus5q7AJrVdl BDoQ/Sj0d0=
  • Ironport-hdrordr: A9a23:jXsePKAPxzJUPw7lHem/55DYdb4zR+YMi2TDtnoBKiC9Hfbzqy nDppkmPHzP6Ar5OktPpTnoAsDpKk80k6QY3WB7B9aftWfd11dB6OpZnO7fK/qKIVydytJg
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, Apr 19, 2023 at 09:56:35AM +0200, Jan Beulich wrote:
> 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.

Yes, that's why I wasn't really sure whether to comment.  The comment
is formally correct, but it might lead to confusion if one doesn't
carefully read 'RTC/CMOS registers' (vs RTC/CMOS IO ports).

Anyway, sorry for the noise.

Thanks, Roger.



 


Rackspace

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