[haiku-bugs] Re: [Haiku] #14082: PAE paging leads to random reboots/freezing using AMD-FX 6300 6-core processor

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Sat, 23 Sep 2023 02:37:30 -0000

#14082: PAE paging leads to random reboots/freezing using AMD-FX 6300 6-core
processor
----------------------------+----------------------------------------
  Reporter:  nzimmermann    |      Owner:  nobody
      Type:  bug            |     Status:  new
  Priority:  normal         |  Milestone:  Unscheduled
 Component:  System/Kernel  |    Version:  R1/Development
Resolution:                 |   Keywords:  vm
Blocked By:                 |   Blocking:  14770, 14887, 15988, 17216
  Platform:  x86            |
----------------------------+----------------------------------------
Comment (by bipolar):

 Noticing the symptoms (hangs/freezes, or instant-reset due to triple
 faults as mmlr mentioned)...

 Could errata 670 be at play here?

 Quoting from "44739_12h_Rev_Gd.pdf" for easier reference:

Potential Effect on System

For affected instructions that have an implicit or explicit LOCK prefix,
 a system hang occurs.

For affected instructions that do not have an implicit or explicit LOCK
 prefix, the processor may
present a #PF exception after some of the instruction effects have been
 applied to the processor state.

No system effect is observed unless the operating system’s page fault
 handler has some dependency
on this interim processor state, which is not the case in any known
 operating system software. The
interim state does not impact program behavior if the operating system
 resolves the #PF and resumes
the instruction. However, this interim state may be observed by a
 debugger or if the operating system
changes the #PF to a program error (for example, a segmentation fault).

Suggested Workaround

System software should set MSRC001_1020[8] = 1b.

This workaround ensures that instructions with an implicit or explicit
 LOCK prefix do not cause a
system hang due to this erratum. However, instructions may still present
 a #PF after altering
architectural state.

 The "which is not the case in any known operating system software" made me
 wonder if they tried on Haiku :-P

 Might be worth a try adding:

 `               x86_write_msr(0xc0011020, x86_read_msr(0xc0011020) |
 ((uint64)1 << 8));`

 under https://cgit.haiku-
 os.org/haiku/tree/src/system/kernel/arch/x86/64/errata.cpp#n59 to see if
 it helps with the freezes, at least?

 (or I'm, as always, waaay out of my league here and should just STFU :-D)
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/14082#comment:55>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: