HomeFreeBSD

bhyve: Simplify setting vCPU capabilities.

Description

bhyve: Simplify setting vCPU capabilities.

  • Enable VM_CAP_IPI_EXIT in fbsdrun_set_capabilities along with other capabilities enabled on all vCPUs.
  • Don't call fbsdrun_set_capabilities a second time on the BSP in spinup_vcpu.
  • To preserve previous behavior, don't unconditionally enable unrestricted guest mode on the BSP (this unbreaks single-vCPU guests on Nehalem systems, though supporting such setups is of dubious value). Other places that enbale UG on the BSP are careful to check the result of the operation and fail if it is not available.
  • Don't set any capabilities in spinup_ap(). These are now all redundant with earlier settings from spinup_vcpu().
  • While here, axe a stale comment from fbsdrun_addcpu(). This function is now always called from the main thread for all vCPUs.

Reviewed by: corvink, markj
Differential Revision: https://reviews.freebsd.org/D37642

Details

Provenance
jhbAuthored on Dec 21 2022, 6:31 PM
Reviewer
corvink
Differential Revision
D37642: bhyve: Simplify setting vCPU capabilities.
Parents
rGe7d5d2d1876a: bhyve: Remove unused return value from spinup_ap.
Branches
Unknown
Tags
Unknown