Page MenuHomeFreeBSD

vmx: use C99 bool, not boolean_t
ClosedPublic

Authored by emaste on Jul 23 2019, 1:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 5, 10:28 PM
Unknown Object (File)
Thu, May 2, 11:39 AM
Unknown Object (File)
Sun, Apr 28, 4:39 PM
Unknown Object (File)
Fri, Apr 26, 9:16 PM
Unknown Object (File)
Thu, Apr 25, 9:34 PM
Unknown Object (File)
Thu, Apr 25, 7:44 PM
Unknown Object (File)
Thu, Apr 25, 7:44 PM
Unknown Object (File)
Thu, Apr 25, 1:51 PM

Details

Summary

Bhyve's vmm is a self-contained modern component and thus a good candidate for use of C99 types.

Diff Detail

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

Event Timeline

This revision is now accepted and ready to land.Jul 23 2019, 1:55 PM
sys/amd64/vmm/intel/vmx_msr.c
56 ↗(On Diff #60043)

I would use the opportunity and write

return ((msr_var & (1UL << (bitpos + 32)) != 0);
66 ↗(On Diff #60043)

Same.

101 ↗(On Diff #60043)

Same.

sys/amd64/vmm/vmm_lapic.c
143 ↗(On Diff #60043)

return (msr >= 0x800 && msr <= 0xBFF);

164 ↗(On Diff #60043)

Same.

sys/amd64/vmm/vmm_util.c
49 ↗(On Diff #60043)

return (strcmp(...) == 0);

58 ↗(On Diff #60043)

Same.

Simplify some boolean conditionals per kib

This revision now requires review to proceed.Jul 23 2019, 2:27 PM
This revision is now accepted and ready to land.Jul 23 2019, 2:29 PM
sys/amd64/vmm/vmm.c
2239 ↗(On Diff #60044)

bool found

sys/amd64/vmm/vmm_lapic.c
157 ↗(On Diff #60044)

Extra () on the right side of ||.

This revision now requires review to proceed.Jul 23 2019, 3:08 PM

Looks good, with all of @kib's comments addressed.

This revision is now accepted and ready to land.Jul 23 2019, 3:12 PM
This revision was automatically updated to reflect the committed changes.