rust-vmm / mshv

Crates for Microsoft Hypervisor ioctls and bindings
Apache License 2.0
29 stars 12 forks source link

mshv-bindings: Derive constant instead of hard-coding #142

Closed jinankjain closed 5 months ago

jinankjain commented 5 months ago

Summary of the PR

Constants like LAPIC_STATE size could be derived by calling size_of on the struct LapicState. In the similar fashion, other values can also be derived. Use a const function to intialize the various component sizes.

Requirements

Before submitting your PR, please make sure you addressed the following requirements: