Commit 4c4a6f7
KVM: nVMX: track NMI blocking state separately for each VMCS
vmx_recover_nmi_blocking is using a cached value of the guest
interruptibility info, which is stored in vmx->nmi_known_unmasked.
vmx_recover_nmi_blocking is run for both normal and nested guests,
so the cached value must be per-VMCS.
This fixes eventinj.flat in a nested non-EPT environment. With EPT it
works, because the EPT violation handler doesn't have the
vmx->nmi_known_unmasked optimization (it is unnecessary because, unlike
vmx_recover_nmi_blocking, it can just look at the exit qualification).
Thanks to Wanpeng Li for debugging the testcase and providing an initial
patch.
Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Radim Krčmář <[email protected]>1 parent f85c758 commit 4c4a6f7
1 file changed
+14
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
| 202 | + | |
202 | 203 | | |
203 | 204 | | |
204 | 205 | | |
| |||
5510 | 5511 | | |
5511 | 5512 | | |
5512 | 5513 | | |
5513 | | - | |
5514 | | - | |
5515 | | - | |
5516 | | - | |
| 5514 | + | |
| 5515 | + | |
5517 | 5516 | | |
5518 | 5517 | | |
5519 | 5518 | | |
| |||
5527 | 5526 | | |
5528 | 5527 | | |
5529 | 5528 | | |
5530 | | - | |
| 5529 | + | |
| 5530 | + | |
| 5531 | + | |
| 5532 | + | |
5531 | 5533 | | |
5532 | | - | |
| 5534 | + | |
| 5535 | + | |
| 5536 | + | |
5533 | 5537 | | |
5534 | 5538 | | |
5535 | 5539 | | |
5536 | 5540 | | |
5537 | 5541 | | |
5538 | 5542 | | |
5539 | | - | |
| 5543 | + | |
5540 | 5544 | | |
5541 | 5545 | | |
5542 | 5546 | | |
| |||
8736 | 8740 | | |
8737 | 8741 | | |
8738 | 8742 | | |
8739 | | - | |
| 8743 | + | |
8740 | 8744 | | |
8741 | 8745 | | |
8742 | 8746 | | |
| |||
8760 | 8764 | | |
8761 | 8765 | | |
8762 | 8766 | | |
8763 | | - | |
| 8767 | + | |
8764 | 8768 | | |
8765 | 8769 | | |
8766 | 8770 | | |
| |||
0 commit comments