Commit 321ef62
committed
KVM: nVMX: Fold requested virtual interrupt check into has_nested_events()
Check for a Requested Virtual Interrupt, i.e. a virtual interrupt that is
pending delivery, in vmx_has_nested_events() and drop the one-off
kvm_x86_ops.guest_apic_has_interrupt() hook.
In addition to dropping a superfluous hook, this fixes a bug where KVM
would incorrectly treat virtual interrupts _for L2_ as always enabled due
to kvm_arch_interrupt_allowed(), by way of vmx_interrupt_blocked(),
treating IRQs as enabled if L2 is active and vmcs12 is configured to exit
on IRQs, i.e. KVM would treat a virtual interrupt for L2 as a valid wake
event based on L1's IRQ blocking status.
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>1 parent 27c4fa4 commit 321ef62
File tree
7 files changed
+5
-33
lines changed- arch/x86
- include/asm
- kvm
- vmx
7 files changed
+5
-33
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | 88 | | |
90 | 89 | | |
91 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1715 | 1715 | | |
1716 | 1716 | | |
1717 | 1717 | | |
1718 | | - | |
1719 | 1718 | | |
1720 | 1719 | | |
1721 | 1720 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | 100 | | |
102 | 101 | | |
103 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4060 | 4060 | | |
4061 | 4061 | | |
4062 | 4062 | | |
| 4063 | + | |
| 4064 | + | |
| 4065 | + | |
| 4066 | + | |
4063 | 4067 | | |
4064 | 4068 | | |
4065 | 4069 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4105 | 4105 | | |
4106 | 4106 | | |
4107 | 4107 | | |
4108 | | - | |
4109 | | - | |
4110 | | - | |
4111 | | - | |
4112 | | - | |
4113 | | - | |
4114 | | - | |
4115 | | - | |
4116 | | - | |
4117 | | - | |
4118 | | - | |
4119 | | - | |
4120 | | - | |
4121 | | - | |
4122 | | - | |
4123 | | - | |
4124 | | - | |
4125 | | - | |
4126 | | - | |
4127 | | - | |
4128 | 4108 | | |
4129 | 4109 | | |
4130 | 4110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13108 | 13108 | | |
13109 | 13109 | | |
13110 | 13110 | | |
13111 | | - | |
13112 | | - | |
13113 | | - | |
13114 | | - | |
13115 | | - | |
13116 | | - | |
13117 | 13111 | | |
13118 | 13112 | | |
13119 | 13113 | | |
| |||
13147 | 13141 | | |
13148 | 13142 | | |
13149 | 13143 | | |
13150 | | - | |
13151 | | - | |
13152 | | - | |
| 13144 | + | |
13153 | 13145 | | |
13154 | 13146 | | |
13155 | 13147 | | |
| |||
0 commit comments