Page MenuHomeFreeBSD

powerpc: Add Hypervisor Maintenance Interrupt handler
ClosedPublic

Authored by jhibbits on Mar 19 2019, 3:10 AM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 1 2024, 12:50 PM
Unknown Object (File)
Sep 28 2024, 10:07 AM
Unknown Object (File)
Sep 27 2024, 4:24 AM
Unknown Object (File)
Sep 26 2024, 8:44 AM
Unknown Object (File)
Sep 26 2024, 2:55 AM
Unknown Object (File)
Sep 25 2024, 7:27 AM
Unknown Object (File)
Sep 25 2024, 12:59 AM
Unknown Object (File)
Sep 24 2024, 7:24 PM
Subscribers

Details

Summary

Attempting to build www/firefox on POWER9 resulted in a HMI exception
being thrown, a fatal trap currently. This is typically caused by timer
facility errors, but examination of the Hypervisor Maintenance Exception
Register (HMER) yielded only that an exception had recovered, with no
information of the actual exception cause.

When an HMI occurs, OPAL_HANDLE_HMI or OPAL_HANDLE_HMI2 must be called
to handle the exception at the firmware level. If the exception is
handled, we can continue.

This adds only the preliminary handler, enough to prevent package
building from panicking. An enhancement in the future is to use the
flags returned by OPAL_HANDLE_HMI2 to print more useful error messages.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 23173
Build 22220: arc lint + arc unit

Event Timeline

The code looks good to me.
But I'm not sure if it is better to handle this in interrupt.c or trap.c. Why do you think it fits better in interrupt.c?

Also, let me first see how this patch behaves on POWER8 systems.

I'm on the fence between interrupt.c and trap.c. I put it in interrupt.c for the following reasons:

a) Avoid duplicating code between the user and kernel checks
b) Avoid enabling the EE bit when handling the HMI

Neither are critical, I think, so if there are strong feelings one way or another I can yield to it.

I'm on the fence between interrupt.c and trap.c. I put it in interrupt.c for the following reasons:

a) Avoid duplicating code between the user and kernel checks
b) Avoid enabling the EE bit when handling the HMI

Neither are critical, I think, so if there are strong feelings one way or another I can yield to it.

Ok, I don't have a strong opinion in favor or against it being on interrupt.c or trap.c. Given the 2 reasons above, for me it's fine to leave the handling on interrupt.c.

I've also checked that the issue happens on POWER8 and that this change fixes it.
Good job!

This revision is now accepted and ready to land.Mar 20 2019, 7:16 PM
This revision was automatically updated to reflect the committed changes.