Skip to content

Big big real mode improvements

Avi Kivity kvm 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest26 patches 2 repliesIn review
  2. v226 patches 1 replySuperseded
  3. v15 patches 0 repliesSuperseded

Changes in v3 from the cover letter

- none, resend since a previous patchset accidentally got mixed in

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/26KVM: VMX: Return correct CPL during transition to protected modearch/x86/kvm/vmx.c+13 -20 replies
2/26KVM: Split cpuid register access from computationarch/x86/kvm/cpuid.c arch/x86/kvm/cpuid.h+25 -142 replies
2/26KVM: Split cpuid register access from computatioarch/x86/kvm/cpuid.c arch/x86/kvm/cpuid.h+23 -180 replies
3/26KVM: x86 emulator: change ->get_cpuid() accessor to use the x86 semanticsarch/x86/include/asm/kvm_emulate.h arch/x86/kvm/emulate.c arch/x86/kvm/x86.c+30 -470 replies
4/26KVM: x86 emulator: emulate cpuidarch/x86/kvm/emulate.c+15 -10 replies
5/26KVM: x86 emulator: allow loading null SS in long modearch/x86/kvm/emulate.c+8 -40 replies
6/26KVM: x86 emulator: fix LIDT/LGDT in long modearch/x86/kvm/emulate.c+4 -00 replies
7/26KVM: VMX: Relax check on unusable segmentarch/x86/kvm/vmx.c+1 -30 replies
8/26KVM: VMX: Limit iterations with emulator_invalid_guest_statearch/x86/kvm/vmx.c+2 -10 replies
9/26KVM: x86 emulator: emulate LEAVEarch/x86/kvm/emulate.c+24 -10 replies
10/26KVM: x86 emulator: initialize memoparch/x86/include/asm/kvm_emulate.h+1 -10 replies
11/26KVM: Fix SS default ESP/EBP based addressingarch/x86/kvm/emulate.c+14 -30 replies
12/26KVM: x86 emulator: emulate SGDT/SIDTarch/x86/kvm/emulate.c+31 -20 replies
13/26KVM: VMX: Fix interrupt exit condition during emulationarch/x86/kvm/vmx.c+1 -20 replies
14/26KVM: VMX: Continue emulating after batch exhaustedarch/x86/kvm/vmx.c+1 -10 replies
15/26KVM: x86 emulator: emulate LAHFarch/x86/kvm/emulate.c+8 -10 replies
16/26KVM: x86 emulator: fix byte-sized MOVZX/MOVSXarch/x86/kvm/emulate.c+2 -20 replies
17/26KVM: x86 emulator: split push logic from push opcode emulationarch/x86/kvm/emulate.c+8 -30 replies
18/26KVM: x86 emulator: implement ENTERarch/x86/kvm/emulate.c+27 -10 replies
19/26KVM: VMX: Stop invalid guest state emulation on pending eventarch/x86/kvm/vmx.c+3 -00 replies
20/26KVM: VMX: Improve error reporting during invalid guest state emulationarch/x86/kvm/vmx.c+5 -10 replies
21/26KVM: x86 emulator: emulate BSWAParch/x86/kvm/emulate.c+18 -20 replies
22/26KVM: x86 emulator: emulate LLDTarch/x86/kvm/emulate.c+10 -10 replies
23/26KVM: x86 emulator: make read_segment_descriptor() return the addressarch/x86/kvm/emulate.c+8 -50 replies
24/26KVM: x86 emulator: make loading TR set the busy bitarch/x86/kvm/emulate.c+7 -10 replies
25/26KVM: x86 emulator: implement LTRarch/x86/kvm/emulate.c+10 -10 replies
26/26KVM: VMX: Emulate invalid guest state by defaultarch/x86/kvm/vmx.c+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 00/26] Big big real mode improvements

This patchset fixes several bugs in the emulator and in vmx invalid guest state emulation. They are sufficient to boot several Linux and Windows guests, so the last patch turns vmx invalid guest state emulation on by default.

The first patch is a little hacky; we should try to emulate svm here by making cpl a state, not a cache.

Changes from v2:
- none, resend since a previous patchset accidentally got mixed in

Changes from v1:
- folded addendum patchset (BSWAP..LTR) into this one
- fix stack_size() miscalculation for 64-bit, ENTER patch
- generate #GP when loading NULL to SS, if CPL!=RPL (noted by Kevin)
- fix SS base for ESP/EBP addressing without SIB
- more testing

Avi Kivity (26):
KVM: VMX: Return correct CPL during transition to protected mode
KVM: Split cpuid register access from computation
KVM: x86 emulator: change ->get_cpuid() accessor to use the x86
semantics
KVM: x86 emulator: emulate cpuid
KVM: x86 emulator: allow loading null SS in long mode
KVM: x86 emulator: fix LIDT/LGDT in long mode
KVM: VMX: Relax check on unusable segment
KVM: VMX: Limit iterations with emulator_invalid_guest_state
KVM: x86 emulator: emulate LEAVE
KVM: x86 emulator: initialize memop
KVM: Fix SS default ESP/EBP based addressing
KVM: x86 emulator: emulate SGDT/SIDT
KVM: VMX: Fix interrupt exit condition during emulation
KVM: VMX: Continue emulating after batch exhausted
KVM: x86 emulator: emulate LAHF
KVM: x86 emulator: fix byte-sized MOVZX/MOVSX
KVM: x86 emulator: split push logic from push opcode emulation
KVM: x86 emulator: implement ENTER
KVM: VMX: Stop invalid guest state emulation on pending event
KVM: VMX: Improve error reporting during invalid guest state
emulation
KVM: x86 emulator: emulate BSWAP
KVM: x86 emulator: emulate LLDT
KVM: x86 emulator: make read_segment_descriptor() return the address
KVM: x86 emulator: make loading TR set the busy bit
KVM: x86 emulator: implement LTR
KVM: VMX: Emulate invalid guest state by default

 arch/x86/include/asm/kvm_emulate.h |   6 +-
 arch/x86/kvm/cpuid.c               |  38 ++++--
 arch/x86/kvm/cpuid.h               |   1 +
 arch/x86/kvm/emulate.c             | 273 +++++++++++++++++++++++++++++--------
 arch/x86/kvm/vmx.c                 |  38 ++++--
 arch/x86/kvm/x86.c                 |  20 +--
 6 files changed, 276 insertions(+), 100 deletions(-)
Signature · 1 line
1.7.11