Skip to content

Support reverse lookup of bit offset #98

@zhaofengli

Description

@zhaofengli

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions