From: Sean Christopherson <seanjc@google.com>
To: "K. Y. Srinivasan" <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Stephen Hemminger <sthemmin@microsoft.com>,
Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>,
Sean Christopherson <seanjc@google.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: linux-hyperv@vger.kernel.org, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 0/4] x86/hyperv: KVM: VMCB enlightenment cleanups
Date: Wed, 21 Sep 2022 20:16:03 +0000 [thread overview]
Message-ID: <20220921201607.3156750-1-seanjc@google.com> (raw)
Hyper-V folks, if the changes look ok I'd like to take this through the
KVM tree as Vitaly has an in-progress KVM series[*] that conflicts mightily
with these changes.
The main goal of this series it to clean up KVM's ugly casting of the
VMCB's software reserved field to the Hyper-V enlightenments struct,
e.g. replace a bunch of code that does:
(struct hv_enlightenments *)vmcb->control.reserved_sw;
with:
&vmcb->control.hv_enlightenments;
That cleanup is complicated slightly due the Hyper-V enlightenments
being "KVM private", versus the VMCB struct being "public", but that
itself is also a "bug". The enlightenments come directly from the TLFS,
i.e. aren't KVM internal. Moving the definition to hyperv-tlfs.h where
it belongs has the happy side effect of making the struct visible to
asm/svm.h.
Compile tested only, but the resulting kvm-amd.ko binary is identical
before and after the series.
[*] https://lore.kernel.org/all/20220921152436.3673454-1-vkuznets@redhat.com
Sean Christopherson (4):
x86/hyperv: Move VMCB enlightenment definitions to hyperv-tlfs.h
KVM: selftests: Move "struct hv_enlightenments" to x86_64/svm.h
KVM: SVM: Add a proper field for Hyper-V VMCB enlightenments
x86/hyperv: KVM: Rename "hv_enlightenments" to
"hv_vmcb_enlightenments"
arch/x86/include/asm/hyperv-tlfs.h | 22 ++++++++++++
arch/x86/include/asm/svm.h | 7 +++-
arch/x86/kvm/svm/hyperv.h | 35 -------------------
arch/x86/kvm/svm/nested.c | 9 +++--
arch/x86/kvm/svm/svm.h | 5 ++-
arch/x86/kvm/svm/svm_onhyperv.c | 4 +--
arch/x86/kvm/svm/svm_onhyperv.h | 18 +++++-----
.../selftests/kvm/include/x86_64/svm.h | 22 +++++++++++-
.../selftests/kvm/x86_64/hyperv_svm_test.c | 21 +----------
9 files changed, 69 insertions(+), 74 deletions(-)
delete mode 100644 arch/x86/kvm/svm/hyperv.h
base-commit: 372d07084593dc7a399bf9bee815711b1fb1bcf2
--
2.37.3.968.ga6b4b080e4-goog
next reply other threads:[~2022-09-21 20:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-21 20:16 Sean Christopherson [this message]
2022-09-21 20:16 ` [PATCH 1/4] x86/hyperv: Move VMCB enlightenment definitions to hyperv-tlfs.h Sean Christopherson
2022-09-22 22:18 ` Michael Kelley (LINUX)
2022-09-22 22:22 ` Sean Christopherson
2022-09-27 10:11 ` Vitaly Kuznetsov
2022-09-21 20:16 ` [PATCH 2/4] KVM: selftests: Move "struct hv_enlightenments" to x86_64/svm.h Sean Christopherson
2022-09-21 20:16 ` [PATCH 3/4] KVM: SVM: Add a proper field for Hyper-V VMCB enlightenments Sean Christopherson
2022-09-21 20:16 ` [PATCH 4/4] x86/hyperv: KVM: Rename "hv_enlightenments" to "hv_vmcb_enlightenments" Sean Christopherson
2022-09-22 22:21 ` Michael Kelley (LINUX)
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=20220921201607.3156750-1-seanjc@google.com \
--to=seanjc@google.com \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=kvm@vger.kernel.org \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=sthemmin@microsoft.com \
--cc=vkuznets@redhat.com \
--cc=wei.liu@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 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®