All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: Don't honour ACPI indicating absence of CMOS RTC
@ 2014-06-17 14:58 Andrew Cooper
  2014-06-17 15:12 ` Jan Beulich
  0 siblings, 1 reply; 10+ messages in thread
From: Andrew Cooper @ 2014-06-17 14:58 UTC (permalink / raw)
  To: Xen-devel; +Cc: Andrew Cooper, Keir Fraser, Jan Beulich

This reverts f74556693 "x86: honor ACPI indicating absence of CMOS RTC"

Certain HP Gen8 BIOSes have started setting this bit despite an RTC CMOS being
present and working.

Their reasonsing is to prevent EFI-booted OSes from playing with the CMOS,
combined with the erroneous assumption that the only OSes using legacy boot
are too old to know about ACPI v5 and therefore to understand this bit.

As a result, the change being reverted prevented modern Xen from booting on
modern HP hardware, despite older Xen working perfectly fine on the same
hardware.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Keir Fraser <keir@xen.org>
CC: Jan Beulich <JBeulich@suse.com>
---
 xen/arch/x86/time.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index a4e1656..8745186 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -693,9 +693,6 @@ static unsigned long get_cmos_time(void)
             return res;
     }
 
-    if ( unlikely(acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_CMOS_RTC) )
-        panic("System without CMOS RTC must be booted from EFI");
-
     spin_lock_irqsave(&rtc_lock, flags);
 
     /* read RTC exactly on falling edge of update flag */
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] x86: Don't honour ACPI indicating absence of CMOS RTC
  2014-06-17 14:58 [PATCH] x86: Don't honour ACPI indicating absence of CMOS RTC Andrew Cooper
@ 2014-06-17 15:12 ` Jan Beulich
  2014-06-17 15:47   ` Konrad Rzeszutek Wilk
  2014-06-17 17:01   ` Andrew Cooper
  0 siblings, 2 replies; 10+ messages in thread
From: Jan Beulich @ 2014-06-17 15:12 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Keir Fraser, Xen-devel

>>> On 17.06.14 at 16:58, <andrew.cooper3@citrix.com> wrote:
> This reverts f74556693 "x86: honor ACPI indicating absence of CMOS RTC"
> 
> Certain HP Gen8 BIOSes have started setting this bit despite an RTC CMOS 
> being present and working.
> 
> Their reasonsing is to prevent EFI-booted OSes from playing with the CMOS,
> combined with the erroneous assumption that the only OSes using legacy boot
> are too old to know about ACPI v5 and therefore to understand this bit.

Which implies you can boot from EFI on those systems, which is
precisely what the panic message says you ought to do. Why do
you not boot via EFI in the first place?

> As a result, the change being reverted prevented modern Xen from booting on
> modern HP hardware, despite older Xen working perfectly fine on the same
> hardware.

Still, the flag has a purpose, and HP assigning a slightly non-standard
meaning to it doesn't mean we should outright revert that change.
Options I could live with (short of them revisiting the bogus assumption)
are
- a command line option suppressing the mandated behavior,
- a DMI quirk suppressing the mandated behavior,
- code probing for a functional CMOS RTC gating the panic()
  invocation.

Jan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] x86: Don't honour ACPI indicating absence of CMOS RTC
  2014-06-17 15:12 ` Jan Beulich
@ 2014-06-17 15:47   ` Konrad Rzeszutek Wilk
  2014-06-17 16:01     ` Jan Beulich
  2014-06-17 17:01   ` Andrew Cooper
  1 sibling, 1 reply; 10+ messages in thread
From: Konrad Rzeszutek Wilk @ 2014-06-17 15:47 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Andrew Cooper, Keir Fraser, Xen-devel

On Tue, Jun 17, 2014 at 04:12:32PM +0100, Jan Beulich wrote:
> >>> On 17.06.14 at 16:58, <andrew.cooper3@citrix.com> wrote:
> > This reverts f74556693 "x86: honor ACPI indicating absence of CMOS RTC"
> > 
> > Certain HP Gen8 BIOSes have started setting this bit despite an RTC CMOS 
> > being present and working.
> > 
> > Their reasonsing is to prevent EFI-booted OSes from playing with the CMOS,
> > combined with the erroneous assumption that the only OSes using legacy boot
> > are too old to know about ACPI v5 and therefore to understand this bit.
> 
> Which implies you can boot from EFI on those systems, which is
> precisely what the panic message says you ought to do. Why do
> you not boot via EFI in the first place?

You can swap between legacy and EFI in the BIOS. Customers can choose
either option.

> 
> > As a result, the change being reverted prevented modern Xen from booting on
> > modern HP hardware, despite older Xen working perfectly fine on the same
> > hardware.
> 
> Still, the flag has a purpose, and HP assigning a slightly non-standard
> meaning to it doesn't mean we should outright revert that change.
> Options I could live with (short of them revisiting the bogus assumption)
> are
> - a command line option suppressing the mandated behavior,
> - a DMI quirk suppressing the mandated behavior,
> - code probing for a functional CMOS RTC gating the panic()
>   invocation.

That is probably the best option. The DMI is going to get large
as it would probably include the G8 family.
> 
> Jan
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] x86: Don't honour ACPI indicating absence of CMOS RTC
  2014-06-17 15:47   ` Konrad Rzeszutek Wilk
@ 2014-06-17 16:01     ` Jan Beulich
  2014-06-17 16:31       ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Beulich @ 2014-06-17 16:01 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: Andrew Cooper, Keir Fraser, Xen-devel

>>> On 17.06.14 at 17:47, <konrad.wilk@oracle.com> wrote:
> On Tue, Jun 17, 2014 at 04:12:32PM +0100, Jan Beulich wrote:
>> >>> On 17.06.14 at 16:58, <andrew.cooper3@citrix.com> wrote:
>> > This reverts f74556693 "x86: honor ACPI indicating absence of CMOS RTC"
>> > 
>> > Certain HP Gen8 BIOSes have started setting this bit despite an RTC CMOS 
>> > being present and working.
>> > 
>> > Their reasonsing is to prevent EFI-booted OSes from playing with the CMOS,
>> > combined with the erroneous assumption that the only OSes using legacy boot
>> > are too old to know about ACPI v5 and therefore to understand this bit.
>> 
>> Which implies you can boot from EFI on those systems, which is
>> precisely what the panic message says you ought to do. Why do
>> you not boot via EFI in the first place?
> 
> You can swap between legacy and EFI in the BIOS. Customers can choose
> either option.

I know on many systems you still can, but the question is "Why would
you?" In particular when you know the firmware is assuming that the
CSM is only being used by old OSes.

Jan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] x86: Don't honour ACPI indicating absence of CMOS RTC
  2014-06-17 16:01     ` Jan Beulich
@ 2014-06-17 16:31       ` Konrad Rzeszutek Wilk
  2014-06-18 12:00         ` Jan Beulich
  0 siblings, 1 reply; 10+ messages in thread
From: Konrad Rzeszutek Wilk @ 2014-06-17 16:31 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Andrew Cooper, Keir Fraser, Xen-devel

On Tue, Jun 17, 2014 at 05:01:12PM +0100, Jan Beulich wrote:
> >>> On 17.06.14 at 17:47, <konrad.wilk@oracle.com> wrote:
> > On Tue, Jun 17, 2014 at 04:12:32PM +0100, Jan Beulich wrote:
> >> >>> On 17.06.14 at 16:58, <andrew.cooper3@citrix.com> wrote:
> >> > This reverts f74556693 "x86: honor ACPI indicating absence of CMOS RTC"
> >> > 
> >> > Certain HP Gen8 BIOSes have started setting this bit despite an RTC CMOS 
> >> > being present and working.
> >> > 
> >> > Their reasonsing is to prevent EFI-booted OSes from playing with the CMOS,
> >> > combined with the erroneous assumption that the only OSes using legacy boot
> >> > are too old to know about ACPI v5 and therefore to understand this bit.
> >> 
> >> Which implies you can boot from EFI on those systems, which is
> >> precisely what the panic message says you ought to do. Why do
> >> you not boot via EFI in the first place?
> > 
> > You can swap between legacy and EFI in the BIOS. Customers can choose
> > either option.
> 
> I know on many systems you still can, but the question is "Why would
> you?" In particular when you know the firmware is assuming that the
> CSM is only being used by old OSes.

PCIe devices that don't EFI for setting up.
> 
> Jan
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] x86: Don't honour ACPI indicating absence of CMOS RTC
  2014-06-17 15:12 ` Jan Beulich
  2014-06-17 15:47   ` Konrad Rzeszutek Wilk
@ 2014-06-17 17:01   ` Andrew Cooper
  2014-06-18 12:02     ` Jan Beulich
  1 sibling, 1 reply; 10+ messages in thread
From: Andrew Cooper @ 2014-06-17 17:01 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Keir Fraser, Xen-devel

On 17/06/14 16:12, Jan Beulich wrote:
>>>> On 17.06.14 at 16:58, <andrew.cooper3@citrix.com> wrote:
>> This reverts f74556693 "x86: honor ACPI indicating absence of CMOS RTC"
>>
>> Certain HP Gen8 BIOSes have started setting this bit despite an RTC CMOS 
>> being present and working.
>>
>> Their reasonsing is to prevent EFI-booted OSes from playing with the CMOS,
>> combined with the erroneous assumption that the only OSes using legacy boot
>> are too old to know about ACPI v5 and therefore to understand this bit.
> Which implies you can boot from EFI on those systems,

Indeed you can

>  which is
> precisely what the panic message says you ought to do. Why do
> you not boot via EFI in the first place?

Inertia mostly.  The current state of play of needing experimental
patches against grub2 and pvops is suboptimal, and XenServer management
decided that our efforts were better spent elsewhere.

Fundamentally though, that patch caused a boot regression on HP DL580
Gen 8 systems, and an unknown number of other systems.

>
>> As a result, the change being reverted prevented modern Xen from booting on
>> modern HP hardware, despite older Xen working perfectly fine on the same
>> hardware.
> Still, the flag has a purpose, and HP assigning a slightly non-standard
> meaning to it doesn't mean we should outright revert that change.
> Options I could live with (short of them revisiting the bogus assumption)
> are
> - a command line option suppressing the mandated behavior,
> - a DMI quirk suppressing the mandated behavior,

I have no indication on the extent of the issue, but it could be as much
as all HP Gen8 and 9 systems.  I suspect this option wouldn't scale.

> - code probing for a functional CMOS RTC gating the panic()
>   invocation.

If the firmware claims no RTC, is it even safe to probe?  There is
nothing I am aware of preventing the IO port space being reused by
something else if the firmware has told the OS that there genuinely
isn't an RTC there.

~Andrew

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] x86: Don't honour ACPI indicating absence of CMOS RTC
  2014-06-17 16:31       ` Konrad Rzeszutek Wilk
@ 2014-06-18 12:00         ` Jan Beulich
  2014-06-18 13:06           ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Beulich @ 2014-06-18 12:00 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: Andrew Cooper, Keir Fraser, Xen-devel

>>> On 17.06.14 at 18:31, <konrad.wilk@oracle.com> wrote:
> On Tue, Jun 17, 2014 at 05:01:12PM +0100, Jan Beulich wrote:
>> >>> On 17.06.14 at 17:47, <konrad.wilk@oracle.com> wrote:
>> > On Tue, Jun 17, 2014 at 04:12:32PM +0100, Jan Beulich wrote:
>> >> >>> On 17.06.14 at 16:58, <andrew.cooper3@citrix.com> wrote:
>> >> > This reverts f74556693 "x86: honor ACPI indicating absence of CMOS RTC"
>> >> > 
>> >> > Certain HP Gen8 BIOSes have started setting this bit despite an RTC CMOS 
>> >> > being present and working.
>> >> > 
>> >> > Their reasonsing is to prevent EFI-booted OSes from playing with the CMOS,
>> >> > combined with the erroneous assumption that the only OSes using legacy 
> boot
>> >> > are too old to know about ACPI v5 and therefore to understand this bit.
>> >> 
>> >> Which implies you can boot from EFI on those systems, which is
>> >> precisely what the panic message says you ought to do. Why do
>> >> you not boot via EFI in the first place?
>> > 
>> > You can swap between legacy and EFI in the BIOS. Customers can choose
>> > either option.
>> 
>> I know on many systems you still can, but the question is "Why would
>> you?" In particular when you know the firmware is assuming that the
>> CSM is only being used by old OSes.
> 
> PCIe devices that don't EFI for setting up.

I'm sorry, but I don't understand what you're trying to tell me.

Jan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] x86: Don't honour ACPI indicating absence of CMOS RTC
  2014-06-17 17:01   ` Andrew Cooper
@ 2014-06-18 12:02     ` Jan Beulich
  0 siblings, 0 replies; 10+ messages in thread
From: Jan Beulich @ 2014-06-18 12:02 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Keir Fraser, Xen-devel

>>> On 17.06.14 at 19:01, <andrew.cooper3@citrix.com> wrote:
> On 17/06/14 16:12, Jan Beulich wrote:
>> - code probing for a functional CMOS RTC gating the panic()
>>   invocation.
> 
> If the firmware claims no RTC, is it even safe to probe?  There is
> nothing I am aware of preventing the IO port space being reused by
> something else if the firmware has told the OS that there genuinely
> isn't an RTC there.

If you assume it is safe to use the RTC, how can you suggest it to be
unsafe to probe it? Furthermore, any such probing should of course
come with a way to suppress it.

As a side note - just now HP reported this problem of theirs against
SLE12 too.

Jan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] x86: Don't honour ACPI indicating absence of CMOS RTC
  2014-06-18 12:00         ` Jan Beulich
@ 2014-06-18 13:06           ` Konrad Rzeszutek Wilk
  2014-06-18 13:40             ` Jan Beulich
  0 siblings, 1 reply; 10+ messages in thread
From: Konrad Rzeszutek Wilk @ 2014-06-18 13:06 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Andrew Cooper, Keir Fraser, Xen-devel

On Wed, Jun 18, 2014 at 01:00:23PM +0100, Jan Beulich wrote:
> >>> On 17.06.14 at 18:31, <konrad.wilk@oracle.com> wrote:
> > On Tue, Jun 17, 2014 at 05:01:12PM +0100, Jan Beulich wrote:
> >> >>> On 17.06.14 at 17:47, <konrad.wilk@oracle.com> wrote:
> >> > On Tue, Jun 17, 2014 at 04:12:32PM +0100, Jan Beulich wrote:
> >> >> >>> On 17.06.14 at 16:58, <andrew.cooper3@citrix.com> wrote:
> >> >> > This reverts f74556693 "x86: honor ACPI indicating absence of CMOS RTC"
> >> >> > 
> >> >> > Certain HP Gen8 BIOSes have started setting this bit despite an RTC CMOS 
> >> >> > being present and working.
> >> >> > 
> >> >> > Their reasonsing is to prevent EFI-booted OSes from playing with the CMOS,
> >> >> > combined with the erroneous assumption that the only OSes using legacy 
> > boot
> >> >> > are too old to know about ACPI v5 and therefore to understand this bit.
> >> >> 
> >> >> Which implies you can boot from EFI on those systems, which is
> >> >> precisely what the panic message says you ought to do. Why do
> >> >> you not boot via EFI in the first place?
> >> > 
> >> > You can swap between legacy and EFI in the BIOS. Customers can choose
> >> > either option.
> >> 
> >> I know on many systems you still can, but the question is "Why would
> >> you?" In particular when you know the firmware is assuming that the
> >> CSM is only being used by old OSes.
> > 
> > PCIe devices that don't EFI for setting up.
> 
> I'm sorry, but I don't understand what you're trying to tell me.

Some of the PCIe devices have an GUI/text which you can invoke during
bootup. For example LSI or Adaptec allow one to hit Ctrl-C to get a menu
to setup RAID and such.

But for that to work in EFI (and when the BIOS is using the EFI framebuffer)
that firmware has to use the EFI to setup the windows and such. Some of
those cards don't have it and will not show said menus at all. Hence
users stick with Legacy so they can administer those cards as they
see fit.
> 
> Jan
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] x86: Don't honour ACPI indicating absence of CMOS RTC
  2014-06-18 13:06           ` Konrad Rzeszutek Wilk
@ 2014-06-18 13:40             ` Jan Beulich
  0 siblings, 0 replies; 10+ messages in thread
From: Jan Beulich @ 2014-06-18 13:40 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: Andrew Cooper, Keir Fraser, Xen-devel

>>> On 18.06.14 at 15:06, <konrad.wilk@oracle.com> wrote:
> On Wed, Jun 18, 2014 at 01:00:23PM +0100, Jan Beulich wrote:
>> >>> On 17.06.14 at 18:31, <konrad.wilk@oracle.com> wrote:
>> > On Tue, Jun 17, 2014 at 05:01:12PM +0100, Jan Beulich wrote:
>> >> >>> On 17.06.14 at 17:47, <konrad.wilk@oracle.com> wrote:
>> >> > On Tue, Jun 17, 2014 at 04:12:32PM +0100, Jan Beulich wrote:
>> >> >> >>> On 17.06.14 at 16:58, <andrew.cooper3@citrix.com> wrote:
>> >> >> > This reverts f74556693 "x86: honor ACPI indicating absence of CMOS RTC"
>> >> >> > 
>> >> >> > Certain HP Gen8 BIOSes have started setting this bit despite an RTC CMOS 
>> >> >> > being present and working.
>> >> >> > 
>> >> >> > Their reasonsing is to prevent EFI-booted OSes from playing with the CMOS,
>> >> >> > combined with the erroneous assumption that the only OSes using legacy 
>> > boot
>> >> >> > are too old to know about ACPI v5 and therefore to understand this bit.
>> >> >> 
>> >> >> Which implies you can boot from EFI on those systems, which is
>> >> >> precisely what the panic message says you ought to do. Why do
>> >> >> you not boot via EFI in the first place?
>> >> > 
>> >> > You can swap between legacy and EFI in the BIOS. Customers can choose
>> >> > either option.
>> >> 
>> >> I know on many systems you still can, but the question is "Why would
>> >> you?" In particular when you know the firmware is assuming that the
>> >> CSM is only being used by old OSes.
>> > 
>> > PCIe devices that don't EFI for setting up.
>> 
>> I'm sorry, but I don't understand what you're trying to tell me.
> 
> Some of the PCIe devices have an GUI/text which you can invoke during
> bootup. For example LSI or Adaptec allow one to hit Ctrl-C to get a menu
> to setup RAID and such.
> 
> But for that to work in EFI (and when the BIOS is using the EFI framebuffer)
> that firmware has to use the EFI to setup the windows and such. Some of
> those cards don't have it and will not show said menus at all. Hence
> users stick with Legacy so they can administer those cards as they
> see fit.

At least from an abstract perspective these are different things: When
CSM is still there, UEFI can very well run the legacy option ROM init code,
and then nevertheless boot the OS from UEFI. Plus the setting up of
RAID and such doesn't need to be done before every OS boot - you'd
do that once, reset the box (if necessary), and boot your OS from UEFI.

Jan

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-06-18 13:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-17 14:58 [PATCH] x86: Don't honour ACPI indicating absence of CMOS RTC Andrew Cooper
2014-06-17 15:12 ` Jan Beulich
2014-06-17 15:47   ` Konrad Rzeszutek Wilk
2014-06-17 16:01     ` Jan Beulich
2014-06-17 16:31       ` Konrad Rzeszutek Wilk
2014-06-18 12:00         ` Jan Beulich
2014-06-18 13:06           ` Konrad Rzeszutek Wilk
2014-06-18 13:40             ` Jan Beulich
2014-06-17 17:01   ` Andrew Cooper
2014-06-18 12:02     ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.