Skip to content

AMD Nested Virt Preparation

George Dunlap xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14x86/cpuid-policy: Add AMD SVM CPUID leaf to featuresettools/libs/light/libxl_cpuid.c tools/misc/xen-cpuid.c xen/arch/x86/cpu-policy.c +4 more+43 -140 replies
2/14x86/cpu-policy: HACK Disable PCID when nested virt is enabledxen/arch/x86/cpu-policy.c+1 -00 replies
3/14xenalyze: Basic nested virt processingtools/xentrace/xenalyze.c+45 -210 replies
4/14xenalyze: Track generic event information when not in summary modetools/xentrace/xenalyze.c+4 -90 replies
5/14xenalyze: Ignore vmexits where an HVM_HANDLER traces would be redundanttools/xentrace/xenalyze.c+8 -00 replies
6/14xen/svm: Remove redundant HVM_HANDLER trace for EXCEPTION_ACxen/arch/x86/hvm/svm/svm.c+0 -10 replies
7/14xen/hvm: Don't skip MSR_READ trace recordxen/arch/x86/hvm/hvm.c+1 -11 reply
8/14svm: Do NPF trace before calling hvm_hap_nested_page_faultxen/arch/x86/hvm/svm/svm.c+2 -20 replies
9/14x86/emulate: Don't trace cr reads during emulationxen/arch/x86/hvm/emulate.c+0 -10 replies
10/14xenalyze: Quiet warnings about VMEXIT_IOIOtools/xentrace/xenalyze.c+18 -00 replies
11/14x86/trace: Add trace to xsetbv svm/vmx handler pathxen/arch/x86/hvm/hvm.c+2 -00 replies
12/14xenalyze: Basic processing for XSETBV exits and handlerstools/xentrace/xenalyze.c+9 -10 replies
13/14x86/svm: Add a trace for VMEXIT_VMRUNtools/xentrace/xenalyze.c xen/arch/x86/hvm/svm/svm.c xen/include/public/trace.h+22 -10 replies
14/14x86/nestedsvm: Note some places for improvementxen/arch/x86/hvm/svm/nestedsvm.c+13 -00 replies

Reviews trailers per patch

1 of 14 patches has a Reviewed-by or Acked-by.

PatchJan Beulich
1/14
2/14
3/14
4/14
5/14
6/14
7/14R-b
8/14
9/14
10/14
11/14
12/14
13/14
14/14

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 WIP 00/14] AMD Nested Virt Preparation

This is my work-in-progress series for getting nested virt working again on AMD.

The first patch is an early draft to integrate the SVM bits into the CPUID framework. It will be partially superseded by a series Andrew has posted but which has not yet been checked in.

The second patch is a workaround which hides the PCID bit from the L1 when nested HVM is enabled. Long-term, nested support for PCID will be necessary for performance.

Most of the rest of the patches involve improving tracing: Either fixing what's bitrotted in xenalyze, what's bitrotted specifically on the SVM side, or what could be improved in the upstream tracing.

The last patch is a placeholder for future work, commenting a place where behavior is wrong and another where more work needs to be done to assure safety.

George Dunlap (14):
x86/cpuid-policy: Add AMD SVM CPUID leaf to featureset x86/cpu-policy: HACK Disable PCID when nested virt is enabled
xenalyze: Basic nested virt processing
xenalyze: Track generic event information when not in summary mode
xenalyze: Ignore vmexits where an HVM_HANDLER traces would be
redundant
xen/svm: Remove redundant HVM_HANDLER trace for EXCEPTION_AC xen/hvm: Don't skip MSR_READ trace record
svm: Do NPF trace before calling hvm_hap_nested_page_fault x86/emulate: Don't trace cr reads during emulation
xenalyze: Quiet warnings about VMEXIT_IOIO
x86/trace: Add trace to xsetbv svm/vmx handler path
xenalyze: Basic processing for XSETBV exits and handlers x86/svm: Add a trace for VMEXIT_VMRUN
x86/nestedsvm: Note some places for improvement

 tools/libs/light/libxl_cpuid.c              |   1 +
 tools/misc/xen-cpuid.c                      |   1 +
 tools/xentrace/xenalyze.c                   | 133 +++++++++++++++-----
 xen/arch/x86/cpu-policy.c                   |  24 ++--
 xen/arch/x86/cpu/common.c                   |   2 +
 xen/arch/x86/hvm/emulate.c                  |   1 -
 xen/arch/x86/hvm/hvm.c                      |   4 +-
 xen/arch/x86/hvm/svm/nestedsvm.c            |  13 ++
 xen/arch/x86/hvm/svm/svm.c                  |   7 +-
 xen/include/public/arch-x86/cpufeatureset.h |  16 +++
 xen/include/public/trace.h                  |   1 +
 xen/include/xen/lib/x86/cpu-policy.h        |  10 +-
 xen/lib/x86/cpuid.c                         |   4 +-
 13 files changed, 167 insertions(+), 50 deletions(-)
Signature · 1 line
2.25.1