Page MenuHomeFreeBSD

bhyve: Config files should be able to append to existing config nodes
Needs ReviewPublic

Authored by rosenfeld_grumpf.hope-2000.org on Tue, Sep 29, 1:07 PM.
Tags
None
Referenced Files
F174555087: D60125.diff
Sun, Oct 4, 3:27 AM
F174549744: D60125.id187998.diff
Sun, Oct 4, 2:34 AM
F174515182: D60125.diff
Sat, Oct 3, 8:44 PM
Unknown Object (File)
Thu, Oct 1, 4:28 AM
Unknown Object (File)
Wed, Sep 30, 4:37 PM
Unknown Object (File)
Wed, Sep 30, 4:37 PM
Unknown Object (File)
Wed, Sep 30, 12:00 PM
Unknown Object (File)
Wed, Sep 30, 11:57 AM
Subscribers

Details

Reviewers
markj
chuck
emaste
Group Reviewers
bhyve
Summary

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

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 77451
Build 74334: arc lint + arc unit