From: Sean Christopherson <seanjc@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
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>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
Reiji Watanabe <reijiw@google.com>
Subject: [PATCH 0/3] KVM: x86: Clean up RESET "emulation"
Date: Tue, 14 Sep 2021 16:08:37 -0700 [thread overview]
Message-ID: <20210914230840.3030620-1-seanjc@google.com> (raw)
Add dedicated helpers to emulate RESET instead of having the relevant code
scattered through vcpu_create() and vcpu_reset(). Paolo, I think this is
what you meant by "have init_vmcb/svm_vcpu_reset look more like the VMX
code"[*].
Patch 01 is a bit odd; it's essentially an explicit acknowledgement that
KVM's emulation is far from complete. It caught my eye when auditing the
"create" flows to ensure they didn't touch guest state, which should be
handled by "reset". I waffled between deleting it outright and moving it
to the new __vmx_vcpu_reset(), and opted to delete outright to discourage
ad hoc clearing of MSRs during RESET, which isn't a maintainable approach.
[*] https://lore.kernel.org/all/c3563870-62c3-897d-3148-e48bb755310c@redhat.com/
Sean Christopherson (3):
KVM: VMX: Drop explicit zeroing of MSR guest values at vCPU creation
KVM: VMX: Move RESET emulation to vmx_vcpu_reset()
KVM: SVM: Move RESET emulation to svm_vcpu_reset()
arch/x86/kvm/svm/sev.c | 6 ++--
arch/x86/kvm/svm/svm.c | 29 ++++++++++--------
arch/x86/kvm/svm/svm.h | 2 +-
arch/x86/kvm/vmx/vmx.c | 67 ++++++++++++++++++++----------------------
4 files changed, 53 insertions(+), 51 deletions(-)
--
2.33.0.309.g3052b89438-goog
next reply other threads:[~2021-09-14 23:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-14 23:08 Sean Christopherson [this message]
2021-09-14 23:08 ` [PATCH 1/3] KVM: VMX: Drop explicit zeroing of MSR guest values at vCPU creation Sean Christopherson
2021-09-14 23:08 ` [PATCH 2/3] KVM: VMX: Move RESET emulation to vmx_vcpu_reset() Sean Christopherson
2021-09-15 10:30 ` Vitaly Kuznetsov
2021-09-15 17:34 ` Sean Christopherson
2021-09-16 7:19 ` Vitaly Kuznetsov
2021-09-16 19:01 ` Sean Christopherson
2021-09-14 23:08 ` [PATCH 3/3] KVM: SVM: Move RESET emulation to svm_vcpu_reset() Sean Christopherson
2021-09-17 16:15 ` [PATCH 0/3] KVM: x86: Clean up RESET "emulation" Paolo Bonzini
2021-09-17 17:34 ` Sean Christopherson
2021-09-17 17:37 ` 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=20210914230840.3030620-1-seanjc@google.com \
--to=seanjc@google.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=reijiw@google.com \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®