Skip to content

Nested TSC handling

Nadav Har'El kvm 1 version Applied

Status from this message: Thanks, applied.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 14 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3L1 TSC handlingarch/x86/include/asm/kvm_host.h arch/x86/kvm/svm.c arch/x86/kvm/vmx.c +1 more+32 -41 reply
2/3Fix nested VMX TSC emulationarch/x86/kvm/vmx.c+21 -102 replies
3/3Fix TSC MSR read in nested SVMarch/x86/kvm/svm.c+1 -38 replies

Reviews trailers per patch

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

PatchJoerg Roedel
1/3
2/3
3/3T-b A-b

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/3] Nested TSC handling

The following are patches I propose for fixing the bug discovered by Bandan Das and discussed in the "Nested VMX - L1 hangs on running L2" thread.

The first patch should fix the originally-reported bug, as explained in the aforementioned thread: A new x86_op read_l1_tsc() is called L1's TSC is needed, instead of assuming that calling kvm_read_msr() will do that (because this has to return L2's TSC when a nested guest is running).

The second and third patches fix relatively-unimportant corner cases in nested VMX and nested SVM TSC handling.

I'd appreciate it if the people who noticed this bug can verify that these patches indeed solve it for them.

Patch statistics:
-----------------

 arch/x86/include/asm/kvm_host.h |    2 +
 arch/x86/kvm/svm.c              |   13 ++++++--
 arch/x86/kvm/vmx.c              |   48 +++++++++++++++++++++++-------
 arch/x86/kvm/x86.c              |    8 ++---
 4 files changed, 54 insertions(+), 17 deletions(-)

--
Nadav Har'El
IBM Haifa Research Lab