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)
Nov 24 2024, 11:17 PM
Unknown Object (File)
Nov 18 2024, 10:08 PM
Unknown Object (File)
Nov 10 2024, 3:50 AM
Unknown Object (File)
Nov 7 2024, 12:22 AM
Unknown Object (File)
Oct 6 2024, 8:58 PM
Unknown Object (File)
Oct 6 2024, 2:48 PM
Unknown Object (File)
Oct 5 2024, 8:45 PM
Unknown Object (File)
Oct 5 2024, 6:08 AM

Details

Summary

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

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

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

I would use the opportunity and write

return ((msr_var & (1UL << (bitpos + 32)) != 0);
66

Same.

101

Same.

sys/amd64/vmm/vmm_lapic.c
143

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

164

Same.

sys/amd64/vmm/vmm_util.c
49

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

58

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

bool found

sys/amd64/vmm/vmm_lapic.c
163

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.