Commit 6c3d4b9
committed
KVM: x86: Add a fastpath handler for INVD
Add a fastpath handler for INVD so that the common fastpath logic can be
trivially tested on both Intel and AMD. Under KVM, INVD is always:
(a) intercepted, (b) available to the guest, and (c) emulated as a nop,
with no side effects. Combined with INVD not having any inputs or outputs,
i.e. no register constraints, INVD is the perfect instruction for
exercising KVM's fastpath as it can be inserted into practically any
guest-side code stream.
Link: https://lore.kernel.org/r/20250805190526.1453366-19-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>1 parent 8bb8b60 commit 6c3d4b9
4 files changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4200 | 4200 | | |
4201 | 4201 | | |
4202 | 4202 | | |
| 4203 | + | |
| 4204 | + | |
4203 | 4205 | | |
4204 | 4206 | | |
4205 | 4207 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7175 | 7175 | | |
7176 | 7176 | | |
7177 | 7177 | | |
| 7178 | + | |
| 7179 | + | |
7178 | 7180 | | |
7179 | 7181 | | |
7180 | 7182 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2087 | 2087 | | |
2088 | 2088 | | |
2089 | 2089 | | |
| 2090 | + | |
| 2091 | + | |
| 2092 | + | |
| 2093 | + | |
| 2094 | + | |
| 2095 | + | |
| 2096 | + | |
| 2097 | + | |
| 2098 | + | |
2090 | 2099 | | |
2091 | 2100 | | |
2092 | 2101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
439 | 439 | | |
440 | 440 | | |
441 | 441 | | |
| 442 | + | |
442 | 443 | | |
443 | 444 | | |
444 | 445 | | |
| |||
0 commit comments