Commit cfbe371
committed
KVM: SVM: Check vCPU ID against max x2AVIC ID if and only if x2AVIC is enabled
When allocating the AVIC backing page, only check one of the max AVIC vs.
x2AVIC ID based on whether or not x2AVIC is enabled. Doing so fixes a bug
where KVM incorrectly inhibits AVIC if x2AVIC is _disabled_ and any vCPU
with a non-zero APIC ID is created, as x2avic_max_physical_id is left '0'
when x2AVIC is disabled.
Fixes: 940fc47 ("KVM: SVM: Add AVIC support for 4k vCPUs in x2AVIC mode")
Cc: [email protected]
Cc: Naveen N Rao (AMD) <[email protected]>
Cc: Suravee Suthikulpanit <[email protected]>
Reviewed-by: Naveen N Rao (AMD) <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>1 parent 3611ca7 commit cfbe371
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| 379 | + | |
379 | 380 | | |
380 | 381 | | |
381 | 382 | | |
| |||
388 | 389 | | |
389 | 390 | | |
390 | 391 | | |
391 | | - | |
392 | | - | |
| 392 | + | |
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
| |||
0 commit comments