[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v2 21/34] x86/msr: Utilize the alternatives mechanism to write MSR
- To: Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Jürgen Groß <jgross@xxxxxxxx>
- From: "H. Peter Anvin" <hpa@xxxxxxxxx>
- Date: Fri, 25 Apr 2025 08:29:10 -0700
- Cc: Xin Li <xin@xxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, linux-perf-users@xxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx, virtualization@xxxxxxxxxxxxxxx, linux-pm@xxxxxxxxxxxxxxx, linux-edac@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-acpi@xxxxxxxxxxxxxxx, linux-hwmon@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, platform-driver-x86@xxxxxxxxxxxxxxx, tglx@xxxxxxxxxxxxx, mingo@xxxxxxxxxx, bp@xxxxxxxxx, dave.hansen@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, acme@xxxxxxxxxx, andrew.cooper3@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, 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: Fri, 25 Apr 2025 15:29:43 +0000
- Dkim-filter: OpenDKIM Filter v2.11.0 mail.zytor.com 53PFTBaV2880069
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On April 25, 2025 5:33:17 AM PDT, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>On Wed, Apr 23, 2025 at 06:05:19PM +0200, Jürgen Groß wrote:
>
>> > It's not a major change, but when it is patched to use the immediate
>> > form MSR write instruction, it's straightforwardly streamlined.
>>
>> It should be rather easy to switch the current wrmsr/rdmsr paravirt patching
>> locations to use the rdmsr/wrmsr instructions instead of doing a call to
>> native_*msr().
>
>Right, just make the Xen functions asm stubs that expect the instruction
>registers instead of C-abi and ALT_NOT_XEN the thing.
>
>Shouldn't be hard at all.
And that's what we will be doing. We already have code for that.
|