The current config file syntax does not allow appending a value to
an existing config node, but that would be a really useful feature
for the CPUID configuration.
In conjunction with the new include directive, this allows multiple
configuration files to extend a single config node for a particular
CPUID function.
Consider the following config file fragments for x86-64 architecture
levels (limited here to leaf 0x00000001):
- clear-features.cfg clears all features:
cpuid.0x00000001+=edx&=~0x07808101 cpuid.0x00000001+=ecx&=~0x00982201 cpuid.0x00000001+=ecx&=~0x38401000
- x86-64-v1 enables only the features supported in v1:
include clear_features.cfg cpuid.0x00000001+=edx|=0x07808101
- x86-64-v2 enables only the features supported in v1 and v2:
include x86-64-v1.cfg cpuid.0x00000001+=ecx|=0x00982201
- x86-64-v3 enables only the features supported in v1, v2, and v3:
include x86-64-v2.cfg cpuid.0x00000001+=ecx|=0x38401000
Suppose a user passes -k x86-64-v2.cfg to bhyve. This will result in the
following config nodes:
cpuid.0x00000001+=edx&=~0x07808101,edx|=0x07808101
cpuid.0x00000001+=ecx&=~0x00982201,ecx&=~0x38401000,ecx|=0x00982201