Skip to content

igvm: move VMSA & other arch-only definitions outside of crate #116

@chris-oo

Description

@chris-oo

Architectural definitions should not live in this crate unless they're necessary, to avoid needing to update them as new hardware/capabilities arrive. For the most part, only the raw binary data is needed. This applies to VMSA and potentially other things inside this crate.

Jon and I discussed this offline that I think it might make more sense to move away from defining some of these architectural definitions in the igvm and igvm_defs crate themselves, and defer to just being an opaque type outside of bits we need within IGVM itself. For example, we think that we might need sev_features for some CoRIM validation in the future, but we'd mark the rest of the fields as reserved, and leave it as convertible to a 4K u8 slice via IntoBytes/FromBytes.

I think this would apply to quite a few things in this crate so I need to sit down and find some time to refactor this, but would mean every time hardware changes/adds a new feature, we're not required to add all these definitions because IGVM shouldn't be the authoritative definition for specific hardware.

This does mean consumers of this crate will need to carry their own definition of hardware specific fields, but I think that's fine. I wonder if we should have a snp_defs crate in this case that consumers can use?

Thoughts?

See #109 for initial discussion.

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