Repository navigation
Commit d25a0ba
committed
virt_kvm: refuse to save a VP while KVM holds a queued PIC interrupt
While the VP runs a nested guest, a PIC interrupt is queued with
KVM_INTERRUPT. KVM reports a queued interrupt in neither the VP state nor
the nested state, and it can keep holding it after a nested exit, until the
L1 hypervisor enables interrupts. A save taken in that window lost the
interrupt, which the PIC had already acknowledged.
Track the queued interrupt in the VP runner until KVM reports the VP ready
for another interrupt, which it does only once nothing is queued, and fail
the save while it may still be queued.1 parent be28393 commit d25a0ba
4 files changed
Lines changed: 44 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1906 | 1906 | | |
1907 | 1907 | | |
1908 | 1908 | | |
| 1909 | + | |
1909 | 1910 | | |
1910 | 1911 | | |
1911 | 1912 | | |
| |||
1914 | 1915 | | |
1915 | 1916 | | |
1916 | 1917 | | |
| 1918 | + | |
| 1919 | + | |
1917 | 1920 | | |
1918 | 1921 | | |
1919 | 1922 | | |
| |||
1983 | 1986 | | |
1984 | 1987 | | |
1985 | 1988 | | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
1986 | 1994 | | |
1987 | 1995 | | |
1988 | 1996 | | |
| |||
2221 | 2229 | | |
2222 | 2230 | | |
2223 | 2231 | | |
| 2232 | + | |
2224 | 2233 | | |
2225 | 2234 | | |
2226 | 2235 | | |
2227 | 2236 | | |
2228 | 2237 | | |
| 2238 | + | |
| 2239 | + | |
| 2240 | + | |
| 2241 | + | |
| 2242 | + | |
| 2243 | + | |
| 2244 | + | |
2229 | 2245 | | |
2230 | 2246 | | |
2231 | 2247 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
| 14 | + | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
| 288 | + | |
288 | 289 | | |
289 | 290 | | |
290 | 291 | | |
| |||
377 | 378 | | |
378 | 379 | | |
379 | 380 | | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
380 | 398 | | |
381 | 399 | | |
382 | 400 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
693 | 693 | | |
694 | 694 | | |
695 | 695 | | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
696 | 701 | | |
697 | 702 | | |
698 | 703 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
91 | 94 | | |
92 | 95 | | |
93 | 96 | | |
| |||
0 commit comments