File tree 1 file changed +27
-1
lines changed
1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -3139,11 +3139,37 @@ pub struct HvRegisterVsmPartitionStatus {
3139
3139
pub reserved : u64 ,
3140
3140
}
3141
3141
3142
+ open_enum ! {
3143
+ #[ derive( IntoBytes , Immutable , KnownLayout , FromBytes ) ]
3144
+ pub enum HvSnpInterruptInjection : u8 {
3145
+ #![ allow( non_upper_case_globals) ]
3146
+ HvSnpRestricted = 0x0 ,
3147
+ HvSnpNormal = 0x1 ,
3148
+ HvSnpAlternate = 0x2 ,
3149
+ HvSnpSecureAvic = 0x3 ,
3150
+ }
3151
+ }
3152
+
3153
+ // Support for bitfield structures.
3154
+ impl HvSnpInterruptInjection {
3155
+ const fn from_bits ( val : u8 ) -> Self {
3156
+ HvSnpInterruptInjection ( val)
3157
+ }
3158
+
3159
+ const fn into_bits ( self ) -> u8 {
3160
+ self . 0
3161
+ }
3162
+ }
3163
+
3142
3164
#[ bitfield( u64 ) ]
3143
3165
pub struct HvRegisterGuestVsmPartitionConfig {
3144
3166
#[ bits( 4 ) ]
3145
3167
pub maximum_vtl : u8 ,
3146
- #[ bits( 60 ) ]
3168
+ #[ bits( 2 ) ]
3169
+ pub vtl0_interrupt_injection : HvSnpInterruptInjection ,
3170
+ #[ bits( 2 ) ]
3171
+ pub vtl1_interrupt_injection : HvSnpInterruptInjection ,
3172
+ #[ bits( 56 ) ]
3147
3173
pub reserved : u64 ,
3148
3174
}
3149
3175
You can’t perform that action at this time.
0 commit comments