[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <edbeb41d-3c38-4778-9a7c-255edc7cd5fb@zytor.com>
Date: Thu, 17 Apr 2025 04:10:59 -0700
From: Xin Li <xin@...or.com>
To: Francesco Lavra <francescolavra.fl@...il.com>
Cc: acme@...nel.org, adrian.hunter@...el.com, ajay.kaher@...adcom.com,
alexander.shishkin@...ux.intel.com, andrew.cooper3@...rix.com,
bcm-kernel-feedback-list@...adcom.com, boris.ostrovsky@...cle.com,
bp@...en8.de, bpf@...r.kernel.org, dave.hansen@...ux.intel.com,
decui@...rosoft.com, haiyangz@...rosoft.com, hpa@...or.com,
irogers@...gle.com, jgross@...e.com, jolsa@...nel.org,
kan.liang@...ux.intel.com, kvm@...r.kernel.org, kys@...rosoft.com,
linux-edac@...r.kernel.org, linux-hyperv@...r.kernel.org,
linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-perf-users@...r.kernel.org, linux-pm@...r.kernel.org,
llvm@...ts.linux.dev, luto@...nel.org, mark.rutland@....com,
mingo@...hat.com, namhyung@...nel.org, pbonzini@...hat.com,
peterz@...radead.org, seanjc@...gle.com, tglx@...utronix.de,
tony.luck@...el.com, virtualization@...ts.linux.dev,
vkuznets@...hat.com, wei.liu@...nel.org, x86@...nel.org,
xen-devel@...ts.xenproject.org
Subject: Re: [RFC PATCH v1 13/15] x86/msr: Use the alternatives mechanism to
read MSR
On 4/14/2025 10:13 AM, Francesco Lavra wrote:
> This works only if this function has been called directly (e.g. via
> `call asm_xen_write_msr`), but doesn't work with alternative call types
> (like indirect calls). Not sure why one might want to use an indirect
> call to invoke asm_xen_write_msr, but this creates a hidden coupling
> between caller and callee.
> I don't have a suggestion on how to get rid of this coupling, other
> than setting ipdelta in _ASM_EXTABLE_FUNC_REWIND() to 0 and adjusting
> the _ASM_EXTABLE_TYPE entries at the call sites to consider the
> instruction that follows the function call (instead of the call
> instruction) as the faulting instruction (which seems pretty ugly, at
> least because what follows the function call could be an instruction
> that might itself fault). But you may want to make this caveat explicit
> in the comment.
Good idea, will state that in the comment.
Powered by blists - more mailing lists