It would be nice to have a per-register function that returns the corresponding field name given a bit offset. This will be useful for generating debugging/error messages.
For example, for each VMCS control field there is a [1] corresponding MSR that contains the constraint (i.e, features supported by the processor) on the value that can be set in said control. In our hypervisor we perform the checks on the values ourselves, and Bit 28 (Load CET state) of "VM-exit controls" must be 0 would look much nicer than Bit 28 of "VM-exit controls" must be 0.
This requires a bit more changes to the code generation infrastructure, so I'm opening an issue first for some feedback on how this should be done.
[1] Sometimes two
It would be nice to have a per-register function that returns the corresponding field name given a bit offset. This will be useful for generating debugging/error messages.
For example, for each VMCS control field there is a [1] corresponding MSR that contains the constraint (i.e, features supported by the processor) on the value that can be set in said control. In our hypervisor we perform the checks on the values ourselves, and
Bit 28 (Load CET state) of "VM-exit controls" must be 0would look much nicer thanBit 28 of "VM-exit controls" must be 0.This requires a bit more changes to the code generation infrastructure, so I'm opening an issue first for some feedback on how this should be done.
[1] Sometimes two