emulator cleanup
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest30 patches 8 repliesIn review
- v230 patches 22 repliesSuperseded
- v1 RFC24 patches 28 repliesSuperseded
Changes in v3 from the cover letter
- use correct operand length for pio instruction with REX prefix
- check for string instruction before decrementing ecx
- change guest re-entry condition for string instruction
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/30 | KVM: x86 emulator: Fix DstAcc decoding.arch/ | +5 | 0 replies | |
| 2/30 | KVM: x86 emulator: fix RCX access during rep emulationarch/ | +2 | 0 replies | |
| 3/30 | KVM: x86 emulator: check return value against correct definearch/ | +1 | 0 replies | |
| 4/30 | KVM: Remove pointer to rflags from realmode_set_cr parameters.arch/ arch/ arch/ | +3 | 0 replies | |
| 5/30 | KVM: Provide callback to get/set control registers in emulator ops.arch/ arch/ arch/ +1 more | +63 | 0 replies | |
| 6/30 | KVM: remove realmode_lmsw function.arch/ arch/ arch/ | +2 | 0 replies | |
| 7/30 | KVM: Provide x86_emulate_ctxt callback to get current cplarch/ arch/ arch/ | +15 | 0 replies | |
| 8/30 | KVM: Provide current eip as part of emulator context.arch/ arch/ arch/ | +9 | 0 replies | |
| 9/30 | KVM: x86 emulator: fix mov r/m, sreg emulation.arch/ | +3 | 0 replies | |
| 10/30 | KVM: x86 emulator: fix 0f 01 /5 emulationarch/ | +3 | 0 replies | |
| 11/30 | KVM: x86 emulator: 0f (20|21|22|23) ignore mod bits.arch/ | +0 | 0 replies | |
| 12/30 | KVM: x86 emulator: inject #UD on access to non-existing CRarch/ | +7 | 0 replies | |
| 13/30 | KVM: x86 emulator: fix mov dr to inject #UD when needed.arch/ | +12 | 0 replies | |
| 14/30 | KVM: x86 emulator: fix return values of syscall/sysenter/sysexit emulationsarch/ | +11 | 0 replies | |
| 15/30 | KVM: x86 emulator: do not call writeback if msr access fails.arch/ | +2 | 0 replies | |
| 16/30 | KVM: x86 emulator: If LOCK prefix is used dest arg should be memory.arch/ | +1 | 5 replies | |
| 17/30 | KVM: x86 emulator: cleanup grp3 return valuearch/ | +4 | 0 replies | |
| 18/30 | KVM: x86 emulator: Provide more callbacks for x86 emulator.arch/ arch/ | +131 | 0 replies | |
| 19/30 | KVM: x86 emulator: Emulate task switch in emulator.carch/ arch/ | +568 | 0 replies | |
| 20/30 | KVM: x86 emulator: Use load_segment_descriptor() instead of kvm_load_segment_descriptor()arch/ | +5 | 0 replies | |
| 21/30 | KVM: Use task switch from emulator.carch/ | +17 | 0 replies | |
| 22/30 | KVM: x86 emulator: populate OP_MEM operand during decoding.arch/ | +29 | 0 replies | |
| 23/30 | KVM: x86 emulator: add decoding of X,Y parameters from Intel SDMarch/ | +44 | 0 replies | |
| 24/30 | KVM: x86 emulator: during rep emulation decrement ECX only if emulation succeededarch/ | +8 | 0 replies | |
| 25/30 | KVM: x86 emulator: fix in/out emulation.arch/ arch/ arch/ +3 more | +177 | 0 replies | |
| 26/30 | KVM: x86 emulator: Move string pio emulation into emulator.carch/ arch/ arch/ | +31 | 0 replies | |
| 27/30 | KVM: x86 emulator: remove saved_eiparch/ | +1 | 0 replies | |
| 28/30 | KVM: x86 emulator: restart string instruction without going back to a guest.arch/ arch/ arch/ | +42 | 0 replies | |
| 29/30 | KVM: x86 emulator: introduce pio in string read ahead.arch/ arch/ | +45 | 0 replies | |
| 30/30 | KVM: small kvm_arch_vcpu_ioctl_run() cleanup.arch/ | +6 | 0 replies |
Reviews trailers per patch
None of the 30 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Avi Kivity | Andre Przywara |
|---|---|---|
| Series | R-b | R-b |
| 1/30 | ||
| 2/30 | ||
| 3/30 | ||
| 4/30 | ||
| 5/30 | ||
| 6/30 | ||
| 7/30 | ||
| 8/30 | ||
| 9/30 | ||
| 10/30 | ||
| 11/30 | ||
| 12/30 | ||
| 13/30 | ||
| 14/30 | ||
| 15/30 | ||
| 16/30 | ||
| 17/30 | ||
| 18/30 | ||
| 19/30 | ||
| 20/30 | ||
| 21/30 | ||
| 22/30 | ||
| 23/30 | ||
| 24/30 | ||
| 25/30 | ||
| 26/30 | ||
| 27/30 | ||
| 28/30 | ||
| 29/30 | ||
| 30/30 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 00/30] emulator cleanup
This is the first series of patches that tries to cleanup emulator code. This is mix of bug fixes and moving code that does emulation from x86.c to emulator.c while making it KVM independent. The status of the patches:
works for me. realtime.flat test now also pass where it failed before.
ChangeLog:
v1->v2:
- A couple of new bug fixed
- cpl is now x86_emulator_ops callback
- during string instruction re-enter guest on each page boundary
- retain fast path for pio out (do not go through emulator)v2->v3:
- use correct operand length for pio instruction with REX prefix
- check for string instruction before decrementing ecx
- change guest re-entry condition for string instruction
Gleb Natapov (30):
KVM: x86 emulator: Fix DstAcc decoding.
KVM: x86 emulator: fix RCX access during rep emulation
KVM: x86 emulator: check return value against correct define
KVM: Remove pointer to rflags from realmode_set_cr parameters.
KVM: Provide callback to get/set control registers in emulator ops.
KVM: remove realmode_lmsw function.
KVM: Provide x86_emulate_ctxt callback to get current cpl
KVM: Provide current eip as part of emulator context.
KVM: x86 emulator: fix mov r/m, sreg emulation.
KVM: x86 emulator: fix 0f 01 /5 emulation
KVM: x86 emulator: 0f (20|21|22|23) ignore mod bits.
KVM: x86 emulator: inject #UD on access to non-existing CR
KVM: x86 emulator: fix mov dr to inject #UD when needed.
KVM: x86 emulator: fix return values of syscall/sysenter/sysexit
emulations
KVM: x86 emulator: do not call writeback if msr access fails.
KVM: x86 emulator: If LOCK prefix is used dest arg should be memory.
KVM: x86 emulator: cleanup grp3 return value
KVM: x86 emulator: Provide more callbacks for x86 emulator.
KVM: x86 emulator: Emulate task switch in emulator.c
KVM: x86 emulator: Use load_segment_descriptor() instead of
kvm_load_segment_descriptor()
KVM: Use task switch from emulator.c
KVM: x86 emulator: populate OP_MEM operand during decoding.
KVM: x86 emulator: add decoding of X,Y parameters from Intel SDM
KVM: x86 emulator: during rep emulation decrement ECX only if
emulation succeeded
KVM: x86 emulator: fix in/out emulation.
KVM: x86 emulator: Move string pio emulation into emulator.c
KVM: x86 emulator: remove saved_eip
KVM: x86 emulator: restart string instruction without going back to a
guest.
KVM: x86 emulator: introduce pio in string read ahead.
KVM: small kvm_arch_vcpu_ioctl_run() cleanup.
arch/x86/include/asm/kvm_emulate.h | 41 ++- arch/x86/include/asm/kvm_host.h | 16 +- arch/x86/kvm/emulate.c | 1062 ++++++++++++++++++++++++++--------- arch/x86/kvm/svm.c | 20 +- arch/x86/kvm/vmx.c | 18 +- arch/x86/kvm/x86.c | 1121 +++++++++--------------------------- 6 files changed, 1146 insertions(+), 1132 deletions(-)