Page MenuHomeFreeBSD

Add hypervisor trap handling, using HSRR0/HSRR1
ClosedPublic

Authored by jhibbits on May 19 2018, 3:34 AM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 23 2024, 12:49 PM
Unknown Object (File)
Dec 20 2023, 2:57 AM
Unknown Object (File)
Nov 26 2023, 8:59 AM
Unknown Object (File)
Nov 22 2023, 8:55 PM
Unknown Object (File)
Nov 22 2023, 4:36 PM
Unknown Object (File)
Nov 7 2023, 9:41 AM
Unknown Object (File)
Oct 6 2023, 8:36 AM
Unknown Object (File)
Oct 1 2023, 1:08 AM
Subscribers

Details

Summary

Some hypervisor exceptions on POWER architecture only save state to HSRR0/HSRR1.
Until we have bhyve on POWER, use a lightweight exception frontend which copies
HSRR0/HSRR1 into SRR0/SRR1, and run the normal trap handler.

The first user of this is the Hypervisor Virtualization Interrupt, which targets
the XIVE interrupt controller on POWER9.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Approved if you also install it to EXC_HEA.

sys/powerpc/aim/aim_machdep.c
366 ↗(On Diff #42722)

Is this still appropriate if !PSL_HV? I guess the traps should never be called, but you will get a double-fault if they do.

This should also install hypertrap to EXC_HEA, which is a hypervisor exception we do not correctly handle at present.

sys/powerpc/aim/trap_subr64.S
775 ↗(On Diff #42722)

You could use the hsprgs here if you wanted to be really fancy...

This revision is now accepted and ready to land.May 19 2018, 4:05 AM
sys/powerpc/aim/aim_machdep.c
366 ↗(On Diff #42722)

I don't think it matters to install them in !PSL_HV, since if they do get called the CPU is probably in a really insane state and should be rebooted anyways. I would be surprised if hardware doesn't prevent it.

This revision was automatically updated to reflect the committed changes.