From: Babu Moger <babu.moger@amd.com>
To: seanjc@google.com
Cc: babu.moger@amd.com, bp@alien8.de, fenghua.yu@intel.com,
hpa@zytor.com, jmattson@google.com, joro@8bytes.org,
kim.phillips@amd.com, krish.sadhukhan@oracle.com,
kvm@vger.kernel.org, kyung.min.park@intel.com,
linux-kernel@vger.kernel.org, mgross@linux.intel.com,
mingo@redhat.com, pbonzini@redhat.com, peterz@infradead.org,
tglx@linutronix.de, thomas.lendacky@amd.com, tony.luck@intel.com,
vkuznets@redhat.com, wanpengli@tencent.com, wei.huang2@amd.com,
x86@kernel.org
Subject: Re: [PATCH 2/2] KVM: SVM: Add support for Virtual SPEC_CTRL
Date: Thu, 10 Dec 2020 15:31:48 -0600 [thread overview]
Message-ID: <20201210213148.18996-1-babu.moger@amd.com> (raw)
In-Reply-To: <X863C6ikshtMHemk@google.com>
Sean, Your response did not land in my mailbox for some reason.
Replying using In-reply-to option.
>Hrm, is MSR_AMD64_VIRT_SPEC_CTRL only for SSBD? Should that MSR be renamed to
>avoid confusion with the new form of VIRT_SPEC_CTRL?
We can rename it to MSR_AMD64_VIRT_SSBD_SPEC_CTRL if that is any better.
>Well, it's still required if the hypervisor wanted to allow the guest to turn
>off mitigations that are enabled in the host. I'd omit this entirely and focus
>on what hardware does and how Linux/KVM utilize the new feature.
Ok. Sure.
>This line needs to be higher in the changelog, it's easily the most relevant
>info for understanding the mechanics. Please also explicitly state the context
>switching mechanics, e.g. is it tracked in the VMCB, loaded on VMRUN, saved on
>VM-Exit, etc...
Will add more details.
>This will break migration, or maybe just cause wierdness, as userspace will
>always see '0' when reading SPEC_CTRL and its writes will be ignored. Is there
>a VMCB field that holds the guest's value? If so, this read can be skipped, and
>instead the MSR set/get flows probably need to poke into the VMCB.
Yes. The guest SEPC_CTRL value is saved in VMCB save area(i.e. 0x400 + 0x2E0).
Yes, will look into setting VMCB with the desired values in msr set/get if
that helps.
Thanks
Babu
prev parent reply other threads:[~2020-12-10 21:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-07 22:37 [PATCH 0/2] x86: Add the feature Virtual SPEC_CTRL Babu Moger
2020-12-07 22:37 ` [PATCH 1/2] x86/cpufeatures: Add the Virtual SPEC_CTRL feature Babu Moger
2020-12-07 23:22 ` Jim Mattson
2020-12-09 22:39 ` Babu Moger
2020-12-09 23:11 ` Jim Mattson
2020-12-22 16:14 ` Babu Moger
2020-12-22 17:41 ` Sean Christopherson
2020-12-22 18:07 ` Babu Moger
2020-12-07 22:37 ` [PATCH 2/2] KVM: SVM: Add support for Virtual SPEC_CTRL Babu Moger
2020-12-07 23:06 ` Jim Mattson
2020-12-10 21:26 ` Babu Moger
2020-12-10 21:36 ` Jim Mattson
2020-12-10 22:57 ` Babu Moger
2020-12-22 16:14 ` Babu Moger
2020-12-07 23:13 ` Sean Christopherson
2020-12-10 21:31 ` Babu Moger [this message]
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=20201210213148.18996-1-babu.moger@amd.com \
--to=babu.moger@amd.com \
--cc=bp@alien8.de \
--cc=fenghua.yu@intel.com \
--cc=hpa@zytor.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kim.phillips@amd.com \
--cc=krish.sadhukhan@oracle.com \
--cc=kvm@vger.kernel.org \
--cc=kyung.min.park@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgross@linux.intel.com \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.com \
--cc=tony.luck@intel.com \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--cc=wei.huang2@amd.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).