Skip to content

Nested SVM cleanups v2

Joerg Roedel kvm lkml 1 version Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest21 patches 1 replyApplied

Changes to the previous version from the cover letter

* added Acked-by tags
* added missing patch descriptions
* addressed review comments
* dropped dynamic debugging patch (will be replaced by change to tracing infrastructure)
* dropped patch moving nested #pf handling because it broke nested SVM with shadow paging
* added more cleanups (e.g. removed nested_svm_do and function pointer code flow)
* fixed 2 minor issues
* enabled nested svm by default

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/21kvm/svm: add helper functions for global interrupt flagarch/x86/kvm/svm.c+25 -80 replies
2/21kvm/svm: optimize nested #vmexitarch/x86/kvm/svm.c+33 -350 replies
3/21kvm/svm: optimize nested vmrunarch/x86/kvm/svm.c+21 -70 replies
4/21kvm/svm: copy only necessary parts of the control area on vmrun/vmexitarch/x86/kvm/svm.c+34 -20 replies
5/21kvm/svm: complete interrupts after handling nested exitsarch/x86/kvm/svm.c+3 -20 replies
6/21kvm/svm: move nested svm state into seperate structarch/x86/kvm/svm.c+33 -290 replies
7/21kvm/svm: cache nested interceptsarch/x86/kvm/svm.c+23 -70 replies
8/21kvm/svm: consolidate nested_svm_exit_handledarch/x86/kvm/svm.c+49 -600 replies
9/21kvm/svm: do nested vmexit in nested_svm_exit_handledarch/x86/kvm/svm.c+19 -230 replies
10/21kvm/svm: simplify nested_svm_check_exceptionarch/x86/kvm/svm.c+8 -110 replies
11/21kvm/svm: get rid of nested_svm_vmexit_realarch/x86/kvm/svm.c+40 -120 replies
12/21kvm/svm: clean up nested_svm_exit_handled_msrarch/x86/kvm/svm.c+22 -150 replies
13/21kvm/svm: clean up nestec vmload/vmsave pathsarch/x86/kvm/svm.c+17 -190 replies
14/21kvm/svm: clean up nested vmrun patharch/x86/kvm/svm.c+22 -120 replies
15/21kvm/svm: remove nested_svm_do and helper functionsarch/x86/kvm/svm.c+0 -600 replies
16/21kvm/svm: handle errors in vmrun emulation path appropriatlyarch/x86/kvm/svm.c+13 -10 replies
17/21kvm/svm: move special nested exit handling to separate functionarch/x86/kvm/svm.c+50 -300 replies
18/21kvm/svm: remove unnecessary is_nested check from svm_cpu_runarch/x86/kvm/svm.c+1 -20 replies
19/21kvm/svm: move nested_svm_intr main logic out of if-clausearch/x86/kvm/svm.c+11 -100 replies
20/21kvm/svm: check for nested VINTR flag in svm_interrupt_allowedarch/x86/kvm/svm.c+1 -10 replies
21/21kvm/svm: enable nested svm by defaultarch/x86/kvm/svm.c+1 -10 replies

Reviews trailers per patch

7 of 21 patches have a Reviewed-by or Acked-by.

PatchAlexander Graf
1/21
2/21A-b
3/21A-b
4/21A-b
5/21A-b
6/21A-b
7/21
8/21A-b
9/21A-b
10/21
11/21
12/21
13/21
14/21
15/21
16/21
17/21
18/21
19/21
20/21
21/21

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/21] Nested SVM cleanups v2

Hi,

this is the second and extended version of my patchset to clean up the code for SVM virtualization in KVM. The patchset was tested with KVM on KVM and showed no regressions. It was tested with Nested Paging and with Shadow Paging on the first-level guest.
As a major change this patchset enables the nested SVM code by default. It is still required to start qemu with -enable-nesting, though.

Changes to the previous version:

* added Acked-by tags
* added missing patch descriptions
* addressed review comments
* dropped dynamic debugging patch (will be replaced by change to tracing infrastructure)
* dropped patch moving nested #pf handling because it broke nested SVM with shadow paging
* added more cleanups (e.g. removed nested_svm_do and function pointer code flow)
* fixed 2 minor issues
* enabled nested svm by default

Thanks,

Joerg

Diffstat:

 arch/x86/kvm/svm.c |  637 +++++++++++++++++++++++++++++-----------------------
 1 files changed, 358 insertions(+), 279 deletions(-)

Shortlog:

Joerg Roedel (21):
kvm/svm: add helper functions for global interrupt flag kvm/svm: optimize nested #vmexit
kvm/svm: optimize nested vmrun
kvm/svm: copy only necessary parts of the control area on vmrun/vmexit kvm/svm: complete interrupts after handling nested exits kvm/svm: move nested svm state into seperate struct kvm/svm: cache nested intercepts
kvm/svm: consolidate nested_svm_exit_handled
kvm/svm: do nested vmexit in nested_svm_exit_handled kvm/svm: simplify nested_svm_check_exception
kvm/svm: get rid of nested_svm_vmexit_real
kvm/svm: clean up nested_svm_exit_handled_msr
kvm/svm: clean up nestec vmload/vmsave paths
kvm/svm: clean up nested vmrun path
kvm/svm: remove nested_svm_do and helper functions kvm/svm: handle errors in vmrun emulation path appropriatly kvm/svm: move special nested exit handling to separate function kvm/svm: remove unnecessary is_nested check from svm_cpu_run kvm/svm: move nested_svm_intr main logic out of if-clause kvm/svm: check for nested VINTR flag in svm_interrupt_allowed kvm/svm: enable nested svm by default