From: Julien Grall <julien.grall@arm.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Stefano Stabellini <sstabellini@kernel.org>,
xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 00/16] x86: indirect call overhead reduction
Date: Fri, 13 Jul 2018 18:15:46 +0100 [thread overview]
Message-ID: <b7fc275e-8b96-bd19-d4ce-bb7ea34255fb@arm.com> (raw)
In-Reply-To: <5B48B6BD02000078001D3D4F@prv1-mh.provo.novell.com>
Hi Jan,
On 13/07/18 15:27, Jan Beulich wrote:
>>>> On 13.07.18 at 15:39, <julien.grall@arm.com> wrote:
>> On 13/07/18 14:27, Jan Beulich wrote:
>>>>>> On 13.07.18 at 15:00, <julien.grall@arm.com> wrote:
>>>> What would be the generic interface here? I saw it was based on
>>>> alternative for the plumbing.
>>>
>>> Yes, I'd prefer to use the same mechanism as presented in the series.
>>> As per above for the IOMMU case we'd then need another abstraction
>>> layer put in the middle (to produce a patch site on x86, but a normal
>>> [indirect] call on ARM).
>>
>> I will have a look. Could you point to the patch adding the abstraction?
>
> Patch 9 is where the x86 side infrastructure gets added. Typical uses
> would then be (taken from patch 10)
>
> hvm_guest_x86_mode(struct vcpu *v)
> {
> ASSERT(v == current);
> - return hvm_funcs.guest_x86_mode(v);
> + return alternative_call1(hvm_funcs.guest_x86_mode, v);
OOI, is there any reason for you to define alternative_callN and not
providing a generic version (similar to arm_smccc_1_1_smc in
include/asm-arm/smccc.h)?
> }
>
> static inline void
> hvm_update_host_cr3(struct vcpu *v)
> {
> if ( hvm_funcs.update_host_cr3 )
> - hvm_funcs.update_host_cr3(v);
> + alternative_vcall1(hvm_funcs.update_host_cr3, v);
> }
>
> And actually there was one more question I meant to ask: Are all
> locations within Xen reachable by direct calls on ARM? I.e. can an
> indirect call, when we know its target, always be replaced, no
> matter at what address (within Xen) it lives?
For direct branch, the range supported is +/- 32MB for 32-bit Arm, +/-
128MB for 64-bit Arm. With the current layout all Xen text (including
livepatch payload) will always be below 12MB.
So we should be able to reach all Xen by direct calls.
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-07-13 17:15 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-11 13:15 [PATCH 00/16] x86: indirect call overhead reduction Jan Beulich
2018-07-11 13:23 ` [PATCH 01/16] VMX: reduce number of posted-interrupt hooks Jan Beulich
2018-07-13 12:17 ` Andrew Cooper
2018-07-19 1:51 ` Tian, Kevin
2018-07-19 6:13 ` Jan Beulich
2018-07-11 13:23 ` [PATCH 02/16] VMX: don't unconditionally set the tsc_scaling.setup hook Jan Beulich
2018-07-13 12:17 ` Andrew Cooper
2018-07-19 1:52 ` Tian, Kevin
2018-07-11 13:24 ` [PATCH 03/16] x86/HVM: switch virtual_intr_delivery_enabled() hook to simple boolean Jan Beulich
2018-07-13 12:18 ` Andrew Cooper
2018-07-19 1:56 ` Tian, Kevin
2018-07-19 6:15 ` Jan Beulich
2018-07-19 6:18 ` Tian, Kevin
2018-07-11 13:25 ` [PATCH 04/16] x86/HVM: drop vmfunc_intercept Jan Beulich
2018-07-13 12:18 ` Andrew Cooper
2018-07-19 1:56 ` Tian, Kevin
2018-07-11 13:26 ` [PATCH 05/16] x86/HVM: add wrapper for hvm_funcs.set_tsc_offset() Jan Beulich
2018-07-13 12:19 ` Andrew Cooper
2018-07-13 13:20 ` Jan Beulich
2018-07-11 13:27 ` [PATCH 06/16] x86: allow producing .i or .s for multiply compiled files Jan Beulich
2018-07-13 12:20 ` Andrew Cooper
2018-07-11 13:29 ` [PATCH 07/16] x86/shadow: fetch CPL just once in sh_page_fault() Jan Beulich
2018-07-11 13:41 ` Andrew Cooper
2018-07-11 13:46 ` Tim Deegan
2018-07-11 13:50 ` Jan Beulich
2018-07-11 13:39 ` [PATCH 08/16] x86/alternatives: allow using assembler macros in favor of C ones Jan Beulich
2018-07-11 13:40 ` [PATCH 09/16] x86: infrastructure to allow converting certain indirect calls to direct ones Jan Beulich
2018-07-11 13:42 ` [PATCH 10/16] x86/HVM: patch indirect calls through hvm_funcs " Jan Beulich
2018-07-11 13:47 ` Jan Beulich
2018-07-13 10:06 ` Paul Durrant
2018-07-13 13:18 ` Jan Beulich
2018-07-11 13:43 ` [PATCH 11/16] x86/HVM: patch vINTR " Jan Beulich
2018-07-19 2:00 ` Tian, Kevin
2018-07-11 13:44 ` [PATCH 12/16] x86: patch ctxt_switch_masking() indirect call to direct one Jan Beulich
2018-07-11 13:44 ` [PATCH 13/16] x86/genapic: drop .target_cpus() hook Jan Beulich
2018-07-11 13:45 ` [PATCH 14/16] x86/genapic: remove indirection from genapic hook accesses Jan Beulich
2018-07-11 13:46 ` [PATCH 15/16] x86/genapic: patch indirect calls to direct ones Jan Beulich
2018-07-11 13:46 ` [PATCH 16/16] x86/cpuidle: patch some " Jan Beulich
2018-07-13 8:10 ` [PATCH 00/16] x86: indirect call overhead reduction Jan Beulich
2018-07-13 13:00 ` Julien Grall
2018-07-13 13:27 ` Jan Beulich
2018-07-13 13:39 ` Julien Grall
2018-07-13 14:27 ` Jan Beulich
2018-07-13 17:15 ` Julien Grall [this message]
2018-07-16 6:15 ` Jan Beulich
2018-08-01 10:01 ` Jan Beulich
2018-08-29 13:55 ` [PATCH v2 00/12] " Jan Beulich
2018-08-29 13:59 ` [PATCH v2 01/12] VMX: reduce number of posted-interrupt hooks Jan Beulich
2018-08-29 14:56 ` Andrew Cooper
2018-08-30 1:41 ` Tian, Kevin
2018-08-29 14:00 ` [PATCH v2 02/12] x86/alternatives: allow using assembler macros in favor of C ones Jan Beulich
2018-08-29 14:52 ` Andrew Cooper
2018-08-29 14:02 ` [PATCH v2 03/12] x86: infrastructure to allow converting certain indirect calls to direct ones Jan Beulich
2018-08-29 14:37 ` Julien Grall
2018-08-29 14:50 ` Jan Beulich
2018-08-29 16:01 ` Andrew Cooper
2018-08-30 7:19 ` Jan Beulich
2018-08-29 14:04 ` [PATCH v2 04/12] x86/HVM: patch indirect calls through hvm_funcs " Jan Beulich
2018-08-29 14:04 ` [PATCH v2 05/12] x86/HVM: patch vINTR " Jan Beulich
2018-08-29 14:05 ` [PATCH v2 06/12] x86: patch ctxt_switch_masking() indirect call to direct one Jan Beulich
2018-08-29 14:06 ` [PATCH v2 07/12] x86/genapic: drop .target_cpus() hook Jan Beulich
2018-08-29 15:45 ` Andrew Cooper
2018-08-29 14:06 ` [PATCH v2 08/12] x86/genapic: remove indirection from genapic hook accesses Jan Beulich
2018-08-29 14:07 ` [PATCH v2 09/12] x86/genapic: patch indirect calls to direct ones Jan Beulich
2018-08-29 14:07 ` [PATCH v2 10/12] x86/cpuidle: patch some " Jan Beulich
2018-08-29 14:08 ` [PATCH v2 11/12] cpufreq: convert to a single post-init driver (hooks) instance Jan Beulich
2018-08-29 14:09 ` [PATCH v2 12/12] cpufreq: patch target() indirect call to direct one Jan Beulich
2018-08-29 15:12 ` [PATCH v2 00/12] x86: indirect call overhead reduction Jan Beulich
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=b7fc275e-8b96-bd19-d4ce-bb7ea34255fb@arm.com \
--to=julien.grall@arm.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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).