Commit e953e11
iommu/vt-d: Don't clobber posted vCPU IRTE when host IRQ affinity changes
commit 688124c upstream.
Don't overwrite an IRTE that is posting IRQs to a vCPU with a posted MSI
entry if the host IRQ affinity happens to change. If/when the IRTE is
reverted back to "host mode", it will be reconfigured as a posted MSI or
remapped entry as appropriate.
Drop the "mode" field, which doesn't differentiate between posted MSIs and
posted vCPUs, in favor of a dedicated posted_vcpu flag. Note! The two
posted_{msi,vcpu} flags are intentionally not mutually exclusive; an IRTE
can transition between posted MSI and posted vCPU.
Fixes: ed1e48e ("iommu/vt-d: Enable posted mode for device MSIs")
Cc: stable@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/r/20250315025135.2365846-3-seanjc@google.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent c95a438 commit e953e11
1 file changed
+15
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | 29 | | |
35 | 30 | | |
36 | 31 | | |
| |||
50 | 45 | | |
51 | 46 | | |
52 | 47 | | |
53 | | - | |
54 | 48 | | |
| 49 | + | |
55 | 50 | | |
56 | 51 | | |
57 | 52 | | |
| |||
139 | 134 | | |
140 | 135 | | |
141 | 136 | | |
142 | | - | |
143 | 137 | | |
144 | 138 | | |
145 | 139 | | |
| |||
194 | 188 | | |
195 | 189 | | |
196 | 190 | | |
197 | | - | |
198 | | - | |
199 | 191 | | |
200 | 192 | | |
201 | 193 | | |
| |||
1177 | 1169 | | |
1178 | 1170 | | |
1179 | 1171 | | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
1180 | 1181 | | |
1181 | 1182 | | |
1182 | | - | |
| 1183 | + | |
1183 | 1184 | | |
1184 | 1185 | | |
1185 | 1186 | | |
| |||
1274 | 1275 | | |
1275 | 1276 | | |
1276 | 1277 | | |
| 1278 | + | |
1277 | 1279 | | |
1278 | 1280 | | |
1279 | 1281 | | |
| |||
1501 | 1503 | | |
1502 | 1504 | | |
1503 | 1505 | | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
1504 | 1509 | | |
1505 | 1510 | | |
1506 | 1511 | | |
| |||
0 commit comments