Repository navigation
Commit accb99b
KVM: arm/arm64: Simplify bg_timer programming
Instead of calling into kvm_timer_[un]schedule from the main kvm
blocking path, test if the VCPU is on the wait queue from the load/put
path and perform the background timer setup/cancel in this path.
This has the distinct advantage that we no longer race between load/put
and schedule/unschedule and programming and canceling of the bg_timer
always happens when the timer state is not loaded.
Note that we must now remove the checks in kvm_timer_blocking that do
not schedule a background timer if one of the timers can fire, because
we no longer have a guarantee that kvm_vcpu_check_block() will be called
before kvm_timer_blocking.
Reported-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>1 parent e329fb7 commit accb99b
3 files changed
Lines changed: 14 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | 79 | | |
83 | 80 | | |
84 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
352 | | - | |
| 352 | + | |
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | 358 | | |
369 | 359 | | |
370 | 360 | | |
| |||
373 | 363 | | |
374 | 364 | | |
375 | 365 | | |
376 | | - | |
| 366 | + | |
377 | 367 | | |
378 | 368 | | |
379 | 369 | | |
380 | 370 | | |
381 | 371 | | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
382 | 379 | | |
383 | 380 | | |
384 | 381 | | |
| |||
401 | 398 | | |
402 | 399 | | |
403 | 400 | | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | 401 | | |
414 | 402 | | |
415 | 403 | | |
| |||
485 | 473 | | |
486 | 474 | | |
487 | 475 | | |
| 476 | + | |
| 477 | + | |
488 | 478 | | |
489 | 479 | | |
490 | 480 | | |
| |||
527 | 517 | | |
528 | 518 | | |
529 | 519 | | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
530 | 523 | | |
531 | 524 | | |
532 | 525 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
338 | | - | |
339 | 338 | | |
340 | 339 | | |
341 | 340 | | |
342 | 341 | | |
343 | 342 | | |
344 | | - | |
345 | 343 | | |
346 | 344 | | |
347 | 345 | | |
| |||
0 commit comments