Commit 0f65a9d
KVM: VMX: Don't do full kick when triggering posted interrupt "fails"
Replace the full "kick" with just the "wake" in the fallback path when
triggering a virtual interrupt via a posted interrupt fails because the
guest is not IN_GUEST_MODE. If the guest transitions into guest mode
between the check and the kick, then it's guaranteed to see the pending
interrupt as KVM syncs the PIR to IRR (and onto GUEST_RVI) after setting
IN_GUEST_MODE. Kicking the guest in this case is nothing more than an
unnecessary VM-Exit (and host IRQ).
Opportunistically update comments to explain the various ordering rules
and barriers at play.
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20211208015236.1616697-17-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>1 parent 782f645 commit 0f65a9d
2 files changed
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3998 | 3998 | | |
3999 | 3999 | | |
4000 | 4000 | | |
4001 | | - | |
| 4001 | + | |
4002 | 4002 | | |
4003 | 4003 | | |
4004 | 4004 | | |
| |||
4036 | 4036 | | |
4037 | 4037 | | |
4038 | 4038 | | |
4039 | | - | |
| 4039 | + | |
4040 | 4040 | | |
4041 | 4041 | | |
4042 | 4042 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9978 | 9978 | | |
9979 | 9979 | | |
9980 | 9980 | | |
9981 | | - | |
9982 | | - | |
9983 | | - | |
9984 | | - | |
| 9981 | + | |
| 9982 | + | |
| 9983 | + | |
| 9984 | + | |
| 9985 | + | |
9985 | 9986 | | |
9986 | 9987 | | |
9987 | 9988 | | |
| |||
0 commit comments