Commit fbd1e0f
committed
KVM: nVMX: Allow the caller to provide instruction length on nested VM-Exit
Rework the nested VM-Exit helper to take the instruction length as a
parameter, and convert nested_vmx_vmexit() into a "default" wrapper that
grabs the length from vmcs02 as appropriate. This will allow KVM to set
the correct instruction length when synthesizing a nested VM-Exit when
emulating an instruction that L1 wants to intercept.
No functional change intended, as the path to prepare_vmcs12()'s reading
of vmcs02.VM_EXIT_INSTRUCTION_LEN is gated on the same set of conditions
as the VMREAD in the new nested_vmx_vmexit().
Link: https://lore.kernel.org/r/20250201015518.689704-10-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>1 parent d4aea23 commit fbd1e0f
2 files changed
Lines changed: 27 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4618 | 4618 | | |
4619 | 4619 | | |
4620 | 4620 | | |
4621 | | - | |
| 4621 | + | |
4622 | 4622 | | |
4623 | 4623 | | |
4624 | 4624 | | |
| |||
4646 | 4646 | | |
4647 | 4647 | | |
4648 | 4648 | | |
4649 | | - | |
| 4649 | + | |
4650 | 4650 | | |
4651 | 4651 | | |
4652 | 4652 | | |
| |||
4930 | 4930 | | |
4931 | 4931 | | |
4932 | 4932 | | |
4933 | | - | |
4934 | | - | |
| 4933 | + | |
| 4934 | + | |
| 4935 | + | |
4935 | 4936 | | |
4936 | 4937 | | |
4937 | 4938 | | |
| |||
4981 | 4982 | | |
4982 | 4983 | | |
4983 | 4984 | | |
4984 | | - | |
| 4985 | + | |
| 4986 | + | |
4985 | 4987 | | |
4986 | 4988 | | |
4987 | 4989 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
31 | 49 | | |
32 | 50 | | |
33 | 51 | | |
| |||
0 commit comments