Re: [Xen-devel] [PATCH] x86: detect CMOS aliasing on ports other then 0x70/0x71

2015-09-29 Thread Jan Beulich
>>> On 29.09.15 at 15:25, wrote: > On 25/09/15 12:00, Jan Beulich wrote: > On 25.09.15 at 11:55, wrote: >>> It is safe for the SMM handler to use CMOS if it returns the index >>> register back to how it found it. Furthermore, I am willing to bet that >>> there real SMM handlers out there w

Re: [Xen-devel] [PATCH] x86: detect CMOS aliasing on ports other then 0x70/0x71

2015-09-29 Thread Andrew Cooper
On 25/09/15 12:00, Jan Beulich wrote: On 25.09.15 at 11:55, wrote: >> It is safe for the SMM handler to use CMOS if it returns the index >> register back to how it found it. Furthermore, I am willing to bet that >> there real SMM handlers out there which do do this. > So what options do yo

Re: [Xen-devel] [PATCH] x86: detect CMOS aliasing on ports other then 0x70/0x71

2015-09-25 Thread Jan Beulich
>>> On 25.09.15 at 11:55, wrote: > It is safe for the SMM handler to use CMOS if it returns the index > register back to how it found it. Furthermore, I am willing to bet that > there real SMM handlers out there which do do this. So what options do you see then here? Don't do anything (drop th

Re: [Xen-devel] [PATCH] x86: detect CMOS aliasing on ports other then 0x70/0x71

2015-09-25 Thread Andrew Cooper
On 24/09/15 09:11, Jan Beulich wrote: On 23.09.15 at 20:34, wrote: On 22/09/15 14:10, Jan Beulich wrote: +for ( offs = 2; offs < 8; offs <<= 1 ) +{ +bool_t read = 1; + +for ( i = RTC_REG_D + 1; i < 0x80; ++i ) +{ +uint8_t normal, alt; +un

Re: [Xen-devel] [PATCH] x86: detect CMOS aliasing on ports other then 0x70/0x71

2015-09-24 Thread Jan Beulich
>>> On 23.09.15 at 20:34, wrote: > On 22/09/15 14:10, Jan Beulich wrote: >> +for ( offs = 2; offs < 8; offs <<= 1 ) >> +{ >> +bool_t read = 1; >> + >> +for ( i = RTC_REG_D + 1; i < 0x80; ++i ) >> +{ >> +uint8_t normal, alt; >> +unsigned long

Re: [Xen-devel] [PATCH] x86: detect CMOS aliasing on ports other then 0x70/0x71

2015-09-23 Thread Andrew Cooper
On 22/09/15 14:10, Jan Beulich wrote: > +for ( offs = 2; offs < 8; offs <<= 1 ) > +{ > +bool_t read = 1; > + > +for ( i = RTC_REG_D + 1; i < 0x80; ++i ) > +{ > +uint8_t normal, alt; > +unsigned long flags; > + > +if ( i == acpi_gbl

[Xen-devel] [PATCH] x86: detect CMOS aliasing on ports other then 0x70/0x71

2015-09-22 Thread Jan Beulich
... in order to also intercept accesses through the alias ports. Also stop intercepting accesses to the CMOS ports if we won't ourselves use the CMOS RTC. Signed-off-by: Jan Beulich --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -1544,42 +1544,6 @@ int __hwdom_init xen_in_range(unsign