Skip to content

Decouple the x86 emulator from the rest of kvm

Avi Kivity kvm 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest16 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16KVM: x86 emulator: drop vcpu argument from memory read/write callbacksarch/x86/include/asm/kvm_emulate.h arch/x86/kvm/emulate.c arch/x86/kvm/x86.c+75 -670 replies
2/16KVM: x86 emulator: drop vcpu argument from pio callbacksarch/x86/include/asm/kvm_emulate.h arch/x86/kvm/emulate.c arch/x86/kvm/x86.c+21 -130 replies
3/16KVM: x86 emulator: drop vcpu argument from segment/gdt/idt callbacksarch/x86/include/asm/kvm_emulate.h arch/x86/kvm/emulate.c arch/x86/kvm/x86.c+90 -830 replies
4/16KVM: x86 emulator: drop vcpu argument from cr/dr/cpl/msr callbacksarch/x86/include/asm/kvm_emulate.h arch/x86/kvm/emulate.c arch/x86/kvm/x86.c+73 -590 replies
5/16KVM: x86 emulator: drop vcpu argument from intercept callbackarch/x86/include/asm/kvm_emulate.h arch/x86/kvm/emulate.c arch/x86/kvm/x86.c+4 -40 replies
6/16KVM: x86 emulator: avoid using ctxt->vcpu in check_perm() callbacksarch/x86/kvm/emulate.c+2 -20 replies
7/16KVM: x86 emulator: add and use new callbacks set_idt(), set_gdt()arch/x86/include/asm/kvm_emulate.h arch/x86/include/asm/kvm_host.h arch/x86/kvm/emulate.c +1 more+21 -240 replies
8/16KVM: x86 emulator: drop use of is_long_mode()arch/x86/kvm/emulate.c+12 -70 replies
9/16KVM: x86 emulator: Replace calls to is_pae() and is_paging with ->get_cr()arch/x86/kvm/emulate.c+2 -20 replies
10/16KVM: x86 emulator: emulate CLTS internallyarch/x86/include/asm/kvm_host.h arch/x86/kvm/emulate.c arch/x86/kvm/x86.c+11 -90 replies
11/16KVM: x86 emulator: make emulate_invlpg() an emulator callbackarch/x86/include/asm/kvm_emulate.h arch/x86/include/asm/kvm_host.h arch/x86/kvm/emulate.c +1 more+5 -50 replies
12/16KVM: x86 emulator: add new ->halt() callbackarch/x86/include/asm/kvm_emulate.h arch/x86/kvm/emulate.c arch/x86/kvm/x86.c+8 -10 replies
13/16KVM: x86 emulator: add ->fix_hypercall() callbackarch/x86/include/asm/kvm_emulate.h arch/x86/include/asm/kvm_host.h arch/x86/kvm/emulate.c +1 more+8 -50 replies
14/16KVM: x86 emulator: add new ->wbinvd() callbackarch/x86/include/asm/kvm_emulate.h arch/x86/kvm/emulate.c arch/x86/kvm/x86.c+8 -10 replies
15/16KVM: Avoid using x86_emulate_ctxt.vcpuarch/x86/kvm/x86.c+1 -10 replies
16/16KVM: x86 emulator: drop x86_emulate_ctxt::vcpuarch/x86/include/asm/kvm_emulate.h arch/x86/kvm/x86.c+0 -30 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 00/16] Decouple the x86 emulator from the rest of kvm

This (longer than expected) patchset decouples the x86 emulator from the rest of kvm. All communication is not done via x86_emulate_ctxt fields and callbacks; there is no access to ctxt->vcpu (which is eliminated by the last patch).

Avi Kivity (16):
KVM: x86 emulator: drop vcpu argument from memory read/write
callbacks
KVM: x86 emulator: drop vcpu argument from pio callbacks
KVM: x86 emulator: drop vcpu argument from segment/gdt/idt callbacks
KVM: x86 emulator: drop vcpu argument from cr/dr/cpl/msr callbacks
KVM: x86 emulator: drop vcpu argument from intercept callback
KVM: x86 emulator: avoid using ctxt->vcpu in check_perm() callbacks
KVM: x86 emulator: add and use new callbacks set_idt(), set_gdt()
KVM: x86 emulator: drop use of is_long_mode()
KVM: x86 emulator: Replace calls to is_pae() and is_paging with

    ->get_cr()

KVM: x86 emulator: emulate CLTS internally
KVM: x86 emulator: make emulate_invlpg() an emulator callback
KVM: x86 emulator: add new ->halt() callback
KVM: x86 emulator: add ->fix_hypercall() callback
KVM: x86 emulator: add new ->wbinvd() callback
KVM: Avoid using x86_emulate_ctxt.vcpu
KVM: x86 emulator: drop x86_emulate_ctxt::vcpu

 arch/x86/include/asm/kvm_emulate.h |   90 ++++++-----
 arch/x86/include/asm/kvm_host.h    |    7 -
 arch/x86/kvm/emulate.c             |  321 +++++++++++++++++++-----------------
 arch/x86/kvm/x86.c                 |  203 ++++++++++++++---------
 4 files changed, 338 insertions(+), 283 deletions(-)