From: Sean Christopherson <seanjc@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
x86@kernel.org
Cc: Sean Christopherson <seanjc@google.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
"H. Peter Anvin" <hpa@zytor.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
"David P . Reed" <dpreed@deepplum.com>,
Randy Dunlap <rdunlap@infradead.org>,
Uros Bizjak <ubizjak@gmail.com>
Subject: [PATCH 0/9] x86/virt: KVM: x86: Exception handling fixes/cleanups
Date: Wed, 30 Dec 2020 16:26:53 -0800 [thread overview]
Message-ID: <20201231002702.2223707-1-seanjc@google.com> (raw)
This series is a conglomeration of three previous series/patches and a bit
of new code. None of the previous series are directly related, but they
are all needed to achieve the overarching goal of nuking
__kvm_handle_fault_on_reboot(), which is a rather ugly inline asm macro
that has the unfortunate side effect of inserting in-line JMP+CALL
sequences.
Patches 1-3 are resurrected from a series by David Reed[1] to fix VMXOFF
bugs in the reboot flows.
Patch 4 is a patch from Uros Bizjak to get rid of custom inline asm in
nested VMX. This already received Paolo's "Queued, thanks." blessing,
but has not been pushed to kvm.git. It's included here as there is an
indirect dependency in patch 8.
Patches 5-6 are minor tweaks to KVM's VMX{ON/OFF} paths to use the
kernel's now-fault-tolerant VMXOFF instead of KVM's custom asm.
Patch 7 replaces SVM's __ex()/__kvm_handle_fault_on_reboot() with more
tailored asm goto macros, similar to the existing VMX asm_vmx*() macros.
This is largely an excuse to get rid of __kvm_handle_fault_on_reboot();
the actual benefits of removing JMP+CALL are likely negligible as SVM only
has a few uses of the macro (versus VMX's bajillion VMREADs/VMWRITEs).
Patch 8 removes __ex()/__kvm_handle_fault_on_reboot().
Patch 9 is a very trimmed down version of a different patch from Uros[3],
which cleaned up the __ex()/__kvm_handle_fault_on_reboot() code, as
opposed to zapping them entirely.
[1] https://lkml.kernel.org/r/20200704203809.76391-1-dpreed@deepplum.com
[2] https://lkml.kernel.org/r/20201029134145.107560-1-ubizjak@gmail.com
[3] https://lkml.kernel.org/r/20201221194800.46962-1-ubizjak@gmail.com
David P. Reed (1):
x86/virt: Mark flags and memory as clobbered by VMXOFF
Sean Christopherson (6):
x86/virt: Eat faults on VMXOFF in reboot flows
x86/reboot: Force all cpus to exit VMX root if VMX is supported
KVM: VMX: Move Intel PT shenanigans out of VMXON/VMXOFF flows
KVM: VMX: Use the kernel's version of VMXOFF
KVM: SVM: Use asm goto to handle unexpected #UD on SVM instructions
KVM: x86: Kill off __ex() and __kvm_handle_fault_on_reboot()
Uros Bizjak (2):
KVM/nVMX: Use __vmx_vcpu_run in nested_vmx_check_vmentry_hw
KVM: x86: Move declaration of kvm_spurious_fault() to x86.h
arch/x86/include/asm/kvm_host.h | 25 --------------
arch/x86/include/asm/virtext.h | 25 ++++++++++----
arch/x86/kernel/reboot.c | 30 ++++++-----------
arch/x86/kvm/svm/sev.c | 5 ++-
arch/x86/kvm/svm/svm.c | 18 +---------
arch/x86/kvm/svm/svm_ops.h | 59 +++++++++++++++++++++++++++++++++
arch/x86/kvm/vmx/nested.c | 32 ++----------------
arch/x86/kvm/vmx/vmenter.S | 2 +-
arch/x86/kvm/vmx/vmx.c | 28 ++++++----------
arch/x86/kvm/vmx/vmx.h | 1 +
arch/x86/kvm/vmx/vmx_ops.h | 4 +--
arch/x86/kvm/x86.c | 9 ++++-
arch/x86/kvm/x86.h | 2 ++
13 files changed, 117 insertions(+), 123 deletions(-)
create mode 100644 arch/x86/kvm/svm/svm_ops.h
--
2.29.2.729.g45daf8777d-goog
next reply other threads:[~2020-12-31 0:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-31 0:26 Sean Christopherson [this message]
2020-12-31 0:26 ` [PATCH 1/9] x86/virt: Eat faults on VMXOFF in reboot flows Sean Christopherson
2020-12-31 0:26 ` [PATCH 2/9] x86/reboot: Force all cpus to exit VMX root if VMX is supported Sean Christopherson
2020-12-31 0:26 ` [PATCH 3/9] x86/virt: Mark flags and memory as clobbered by VMXOFF Sean Christopherson
2020-12-31 0:26 ` [PATCH 4/9] KVM/nVMX: Use __vmx_vcpu_run in nested_vmx_check_vmentry_hw Sean Christopherson
2020-12-31 0:26 ` [PATCH 5/9] KVM: VMX: Move Intel PT shenanigans out of VMXON/VMXOFF flows Sean Christopherson
2020-12-31 0:26 ` [PATCH 6/9] KVM: VMX: Use the kernel's version of VMXOFF Sean Christopherson
2020-12-31 0:27 ` [PATCH 7/9] KVM: SVM: Use asm goto to handle unexpected #UD on SVM instructions Sean Christopherson
2020-12-31 0:27 ` [PATCH 8/9] KVM: x86: Kill off __ex() and __kvm_handle_fault_on_reboot() Sean Christopherson
2020-12-31 0:27 ` [PATCH 9/9] KVM: x86: Move declaration of kvm_spurious_fault() to x86.h Sean Christopherson
2021-01-27 17:26 ` [PATCH 0/9] x86/virt: KVM: x86: Exception handling fixes/cleanups Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201231002702.2223707-1-seanjc@google.com \
--to=seanjc@google.com \
--cc=bp@alien8.de \
--cc=dpreed@deepplum.com \
--cc=hpa@zytor.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=rdunlap@infradead.org \
--cc=tglx@linutronix.de \
--cc=ubizjak@gmail.com \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.