Page MenuHomeFreeBSD

vmx: use C99 bool, not boolean_t
ClosedPublic

Authored by emaste on Jul 23 2019, 1:48 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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

emaste created this revision.Jul 23 2019, 1:48 PM
emaste updated this revision to Diff 60043.Jul 23 2019, 1:50 PM

upload correct diff

markj accepted this revision as: markj.Jul 23 2019, 1:55 PM
This revision is now accepted and ready to land.Jul 23 2019, 1:55 PM
kib added inline comments.Jul 23 2019, 2:10 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.

emaste updated this revision to Diff 60044.Jul 23 2019, 2:27 PM

Simplify some boolean conditionals per kib

This revision now requires review to proceed.Jul 23 2019, 2:27 PM
markj accepted this revision as: markj.Jul 23 2019, 2:29 PM
This revision is now accepted and ready to land.Jul 23 2019, 2:29 PM
kib added inline comments.Jul 23 2019, 2:51 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 ||.

emaste updated this revision to Diff 60047.Jul 23 2019, 3:08 PM

further updates from kib

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
kib accepted this revision.Jul 23 2019, 3:15 PM
jhb accepted this revision.Jul 31 2019, 10:53 PM
This revision was automatically updated to reflect the committed changes.