File tree 1 file changed +10
-8
lines changed
1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -1260,16 +1260,18 @@ pub mod migrate {
1260
1260
. for_vcpu ( vcpu. id )
1261
1261
. read :: < bhyve_api:: vdi_lapic_v1 > ( ) ?;
1262
1262
1263
- if vcpu. hdl . api_version ( ) ? <= ApiVersion :: V16 {
1264
- // Fix up invalid LAPIC timer data from illumos#16183
1265
- if vdi. vl_timer_target != 0 && vdi. vl_lapic . vlp_icr_timer == 0 {
1263
+ // A timer target without a value in ICR is nonsensical
1264
+ if vdi. vl_timer_target != 0 && vdi. vl_lapic . vlp_icr_timer == 0 {
1265
+ if vcpu. hdl . api_version ( ) ? <= ApiVersion :: V16 {
1266
+ // Fix up invalid LAPIC timer data on kernels predating the
1267
+ // fix from illumos#16183
1266
1268
vdi. vl_timer_target = 0 ;
1269
+ } else {
1270
+ return Err ( io:: Error :: new (
1271
+ io:: ErrorKind :: InvalidData ,
1272
+ "post-illumos#16183 kernel emitting bad ICR timer data" ,
1273
+ ) ) ;
1267
1274
}
1268
- } else {
1269
- return Err ( io:: Error :: new (
1270
- io:: ErrorKind :: InvalidData ,
1271
- "post-illumos#16183 kernel emitting bad ICR timer data" ,
1272
- ) ) ;
1273
1275
}
1274
1276
1275
1277
Ok ( vdi. into ( ) )
You can’t perform that action at this time.
0 commit comments