Page MenuHomeFreeBSD

riscv: bhyve: simplify SBI IPI and RFNC hart mask handling
Needs ReviewPublic

Authored by doonbsd_gmail.com on Sat, Oct 17, 5:05 AM.
Tags
None
Referenced Files
F176552197: D60796.diff
Mon, Oct 19, 7:02 PM
Unknown Object (File)
Sun, Oct 18, 7:35 PM
Unknown Object (File)
Sat, Oct 17, 8:09 PM
Unknown Object (File)
Sat, Oct 17, 5:52 PM
Unknown Object (File)
Sat, Oct 17, 2:17 PM
Unknown Object (File)
Sat, Oct 17, 2:09 PM
Unknown Object (File)
Sat, Oct 17, 1:16 PM
Subscribers
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

In SBI RFNC and IPI handlers:

  • As per SBI spec, when hart_mask_base is -1ULL, hart_mask should be disregarded and all CPUs must be considered. So, when hart_mask_base is -1ULL, directly assign active_cpus to cpus instead of looping over maxcpus.
  • Remove redundant vcpu == NULL checks since valid harts in active_cpus are guaranteed to have an initialized vCPU object, and targeting an invalid hart correctly returns SBI_ERR_INVALID_PARAM per the SBI specification.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 78286
Build 75169: arc lint + arc unit