Commit 07ce121
xen/events: Return -EEXIST for bound VIRQs
Change find_virq() to return -EEXIST when a VIRQ is bound to a
different CPU than the one passed in. With that, remove the BUG_ON()
from bind_virq_to_irq() to propogate the error upwards.
Some VIRQs are per-cpu, but others are per-domain or global. Those must
be bound to CPU0 and can then migrate elsewhere. The lookup for
per-domain and global will probably fail when migrated off CPU 0,
especially when the current CPU is tracked. This now returns -EEXIST
instead of BUG_ON().
A second call to bind a per-domain or global VIRQ is not expected, but
make it non-fatal to avoid trying to look up the irq, since we don't
know which per_cpu(virq_to_irq) it will be in.
Cc: stable@vger.kernel.org
Signed-off-by: Jason Andryuk <jason.andryuk@amd.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Message-ID: <20250828003604.8949-3-jason.andryuk@amd.com>1 parent 08df2d7 commit 07ce121
1 file changed
Lines changed: 14 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1314 | 1314 | | |
1315 | 1315 | | |
1316 | 1316 | | |
1317 | | - | |
| 1317 | + | |
| 1318 | + | |
1318 | 1319 | | |
1319 | 1320 | | |
1320 | 1321 | | |
| 1322 | + | |
1321 | 1323 | | |
1322 | 1324 | | |
1323 | 1325 | | |
| |||
1330 | 1332 | | |
1331 | 1333 | | |
1332 | 1334 | | |
1333 | | - | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
1334 | 1338 | | |
1335 | 1339 | | |
| 1340 | + | |
| 1341 | + | |
1336 | 1342 | | |
1337 | 1343 | | |
1338 | | - | |
| 1344 | + | |
1339 | 1345 | | |
1340 | 1346 | | |
1341 | 1347 | | |
| |||
1382 | 1388 | | |
1383 | 1389 | | |
1384 | 1390 | | |
1385 | | - | |
1386 | | - | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
1387 | 1396 | | |
1388 | 1397 | | |
1389 | 1398 | | |
| |||
0 commit comments