[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v1 10/15] KVM: VMX: Use WRMSRNS or its immediate form when available
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, "Xin Li (Intel)" <xin@xxxxxxxxx>
- From: "H. Peter Anvin" <hpa@xxxxxxxxx>
- Date: Mon, 31 Mar 2025 13:55:11 -0700
- Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-perf-users@xxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx, virtualization@xxxxxxxxxxxxxxx, linux-edac@xxxxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-ide@xxxxxxxxxxxxxxx, linux-pm@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx, llvm@xxxxxxxxxxxxxxx, tglx@xxxxxxxxxxxxx, mingo@xxxxxxxxxx, bp@xxxxxxxxx, dave.hansen@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, jgross@xxxxxxxx, peterz@xxxxxxxxxxxxx, acme@xxxxxxxxxx, namhyung@xxxxxxxxxx, mark.rutland@xxxxxxx, alexander.shishkin@xxxxxxxxxxxxxxx, jolsa@xxxxxxxxxx, irogers@xxxxxxxxxx, adrian.hunter@xxxxxxxxx, kan.liang@xxxxxxxxxxxxxxx, wei.liu@xxxxxxxxxx, ajay.kaher@xxxxxxxxxxxx, alexey.amakhalov@xxxxxxxxxxxx, bcm-kernel-feedback-list@xxxxxxxxxxxx, tony.luck@xxxxxxxxx, pbonzini@xxxxxxxxxx, vkuznets@xxxxxxxxxx, seanjc@xxxxxxxxxx, luto@xxxxxxxxxx, boris.ostrovsky@xxxxxxxxxx, kys@xxxxxxxxxxxxx, haiyangz@xxxxxxxxxxxxx, decui@xxxxxxxxxxxxx
- Delivery-date: Mon, 31 Mar 2025 20:56:06 +0000
- Dkim-filter: OpenDKIM Filter v2.11.0 mail.zytor.com 52VKtBNP3418600
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 3/31/25 13:41, Andrew Cooper wrote:
That is replace the MSR write to disable speculative execution with a
non-serialized WRMSR? Doesn't that mean the WRMSRNS is speculative?
MSR_SPEC_CTRL is explicitly non-serialising, even with a plain WRMSR.
non-serialising != non-speculative.
Although WRMSRNS's precise statement on the matter of
non-speculativeness is woolly, given an intent to optimise it some more
in the future.
To be specific, "serializing" is a much harder statement than
"non-speculative."
For architecturally non-serializing MSRs, WRMSRNS and WRMSR are
equivalent (or to put it differently, WRMSR acts like WRMSRNS.)
The advantage with making them explicitly WRMSRNS is that it allows for
the substitution of the upcoming immediate forms.
-hpa
|