Page MenuHomeFreeBSD

nvme: Add sanity check for phase on startup.
ClosedPublic

Authored by imp on Sep 28 2021, 8:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 13, 11:08 PM
Unknown Object (File)
Fri, Dec 13, 10:35 PM
Unknown Object (File)
Fri, Dec 13, 10:14 PM
Unknown Object (File)
Fri, Dec 13, 9:55 PM
Unknown Object (File)
Fri, Dec 13, 9:42 PM
Unknown Object (File)
Thu, Dec 12, 2:22 AM
Unknown Object (File)
Tue, Dec 3, 11:15 AM
Unknown Object (File)
Nov 8 2024, 12:01 AM
Subscribers

Details

Summary

The proper phase for the qpiar right after reset in the first interrupt
is 1. For it, make sure that we're not still in phase 0. This is an
illegal state to be processing interrupts and indicates that we've
failed to properly protect against a race between initializing our state
and processing interrupts.

Sponsored by: Netflix

Test Plan

Added Colin to double check this assert won't fire for him.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp requested review of this revision.Sep 28 2021, 8:06 PM

I hope num_intr_handler_calls will newer wrap around.

This revision is now accepted and ready to land.Sep 28 2021, 8:16 PM
This revision now requires review to proceed.Sep 28 2021, 8:37 PM

It is a good addition, but now I am thinking whether it can "reset" to 1 something that is 0. ;)

In EC2, D32211 + D32210 boots and works fine.

D32211 *without* D32210 panics with "Phase wrong for first interrupt call".

So I think we're good for both patches.

This revision is now accepted and ready to land.Sep 28 2021, 10:37 PM
This revision was automatically updated to reflect the committed changes.