From: Juergen Gross <jgross@suse.com>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Andy Lutomirski <luto@kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
"Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com>,
"x86@kernel.org" <x86@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"live-patching@vger.kernel.org" <live-patching@vger.kernel.org>,
Jiri Slaby <jslaby@suse.cz>, Ingo Molnar <mingo@kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>, Mike Galbraith <efault@gmx.de>
Subject: Re: [PATCH v4 1/2] x86/unwind: add ORC unwinder
Date: Thu, 10 Aug 2017 09:05:19 +0200 [thread overview]
Message-ID: <213d818c-0e15-3379-57c0-66035af28a71@suse.com> (raw)
In-Reply-To: <20170809201506.izoiy3almhtnrljg@treble>
On 09/08/17 22:15, Josh Poimboeuf wrote:
> On Wed, Aug 09, 2017 at 11:55:35AM +0200, Juergen Gross wrote:
>> On 09/08/17 11:35, Peter Zijlstra wrote:
>>> On Wed, Aug 09, 2017 at 11:24:07AM +0200, Juergen Gross wrote:
>>>> On 09/08/17 11:16, Peter Zijlstra wrote:
>>>>> On Wed, Aug 09, 2017 at 10:49:43AM +0200, Juergen Gross wrote:
>>>>>>> ALTERNATIVE "pushfq; popq %rax", "callq *pv_irq_ops.save_fl",
>>>>>>> X86_FEATURE_GODDAMN_PV_IRQ_OPS
>>>>>>
>>>>>> You are aware that at least some of the Xen irq pvops functionality is
>>>>>> patched inline? Your modification would slow down pv guests quite a
>>>>>> bit, I guess.
>>>>>
>>>>> Where does that live? I know of the inline patching for native, but
>>>>> didn't know the guests did any of that too.
>>>>
>>>> See arch/x86/xen/enlighten_pv.c xen_patch().
>>>
>>> 'obvious' name that :-) I see that the actual code that's patched in
>>> lives in xen-asm.S which unlike the native case doesn't appear to have
>>> its own section. So that might make things even more difficult.
>>
>> I don't see why this couldn't be changed.
>
> I'm wondering why xen_patch() even exists. The main difference between
> xen_patch() and native_patch() seems to be that xen_patch() does some
> relocs when doing an inline patch after calling paravirt_patch_insns().
>
> But I can't see how that code path would ever run, because the
> replacement functions are all larger than the size of the call
> instruction to be replaced (7 bytes). So they would never fit, and
> instead the paravirt_patch_default() case would always run. Or am I
> missing something?
Hmm, interesting. Just checked it and it seems you are right.
> If we could get rid of the hypervisor-specific patching functions
> (pv_init_ops) -- including possibly removing the lguest and vsmp code,
> if nobody cares about them anymore -- that might make it easier to
> consolidate all the patching things into a single place.
I'll send some patches to:
- remove xen_patch()
- remove lguest
- remove vsmp
In case nobody objects to apply those patches we can possibly simplify
some more code.
I'd love that. :-)
Juergen
next prev parent reply other threads:[~2017-08-10 7:05 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-24 23:36 [PATCH v4 0/2] ORC unwinder Josh Poimboeuf
2017-07-24 23:36 ` [PATCH v4 1/2] x86/unwind: add " Josh Poimboeuf
2017-07-26 12:10 ` [tip:x86/asm] x86/unwind: Add the " tip-bot for Josh Poimboeuf
2017-07-28 16:48 ` [PATCH v4 1/2] x86/unwind: add " Levin, Alexander (Sasha Levin)
2017-07-28 17:52 ` Josh Poimboeuf
2017-07-28 18:29 ` Levin, Alexander (Sasha Levin)
2017-07-28 18:57 ` Josh Poimboeuf
2017-07-28 19:59 ` Levin, Alexander (Sasha Levin)
2017-07-29 3:54 ` Josh Poimboeuf
2017-08-08 18:58 ` Josh Poimboeuf
2017-08-08 19:03 ` Linus Torvalds
2017-08-08 19:13 ` Josh Poimboeuf
2017-08-08 20:09 ` Andy Lutomirski
2017-08-08 22:00 ` Josh Poimboeuf
2017-08-09 8:49 ` Juergen Gross
2017-08-09 9:16 ` Peter Zijlstra
2017-08-09 9:24 ` Juergen Gross
2017-08-09 9:35 ` Peter Zijlstra
2017-08-09 9:55 ` Juergen Gross
2017-08-09 20:15 ` Josh Poimboeuf
2017-08-10 7:05 ` Juergen Gross [this message]
2017-08-10 14:09 ` Josh Poimboeuf
2017-08-10 14:24 ` Juergen Gross
2017-08-10 14:39 ` Josh Poimboeuf
2017-08-10 14:59 ` Juergen Gross
2017-08-10 15:49 ` Josh Poimboeuf
2017-08-10 14:42 ` Josh Poimboeuf
2017-08-09 16:11 ` Andy Lutomirski
2017-08-09 17:52 ` Juergen Gross
2017-09-27 21:08 ` Josh Poimboeuf
2017-09-28 6:03 ` Juergen Gross
2017-09-28 13:55 ` Josh Poimboeuf
2017-09-28 13:58 ` Juergen Gross
2017-07-24 23:36 ` [PATCH v4 2/2] x86/kconfig: make it easier to switch to the new " Josh Poimboeuf
2017-07-25 9:10 ` Ingo Molnar
2017-07-25 13:54 ` Josh Poimboeuf
2017-07-26 12:11 ` [tip:x86/asm] x86/kconfig: Consolidate unwinders into multiple choice selection tip-bot for Josh Poimboeuf
2017-07-26 12:10 ` [tip:x86/asm] x86/kconfig: Make it easier to switch to the new ORC unwinder tip-bot for Josh Poimboeuf
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=213d818c-0e15-3379-57c0-66035af28a71@suse.com \
--to=jgross@suse.com \
--cc=alexander.levin@verizon.com \
--cc=efault@gmx.de \
--cc=hpa@zytor.com \
--cc=jpoimboe@redhat.com \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=torvalds@linux-foundation.org \
--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).