Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1708261

Re: [PATCH v4 1/2] x86/unwind: add ORC unwinder

From Juergen Gross <jgross@suse.com>
Newsgroups linux.kernel
Subject Re: [PATCH v4 1/2] x86/unwind: add ORC unwinder
Date 2017-08-10 09:10 +0200
Message-ID <ucPLs-2cT-9@gated-at.bofh.it> (permalink)
References (6 earlier) <ucvjI-59r-13@gated-at.bofh.it> <ucvto-5f3-3@gated-at.bofh.it> <ucvD4-5jn-19@gated-at.bofh.it> <ucvWq-5qB-3@gated-at.bofh.it> <ucFCq-3KK-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v4 1/2] x86/unwind: add ORC unwinder Josh Poimboeuf <jpoimboe@redhat.com> - 2017-08-08 21:00 +0200
  Re: [PATCH v4 1/2] x86/unwind: add ORC unwinder Linus Torvalds <torvalds@linux-foundation.org> - 2017-08-08 21:10 +0200
    Re: [PATCH v4 1/2] x86/unwind: add ORC unwinder Josh Poimboeuf <jpoimboe@redhat.com> - 2017-08-08 21:20 +0200
      Re: [PATCH v4 1/2] x86/unwind: add ORC unwinder Andy Lutomirski <luto@kernel.org> - 2017-08-08 22:10 +0200
        Re: [PATCH v4 1/2] x86/unwind: add ORC unwinder Josh Poimboeuf <jpoimboe@redhat.com> - 2017-08-09 00:10 +0200
        Re: [PATCH v4 1/2] x86/unwind: add ORC unwinder Juergen Gross <jgross@suse.com> - 2017-08-09 10:50 +0200
          Re: [PATCH v4 1/2] x86/unwind: add ORC unwinder Peter Zijlstra <peterz@infradead.org> - 2017-08-09 11:20 +0200
            Re: [PATCH v4 1/2] x86/unwind: add ORC unwinder Juergen Gross <jgross@suse.com> - 2017-08-09 11:30 +0200
              Re: [PATCH v4 1/2] x86/unwind: add ORC unwinder Peter Zijlstra <peterz@infradead.org> - 2017-08-09 11:40 +0200
                Re: [PATCH v4 1/2] x86/unwind: add ORC unwinder Juergen Gross <jgross@suse.com> - 2017-08-09 12:00 +0200
                Re: [PATCH v4 1/2] x86/unwind: add ORC unwinder Josh Poimboeuf <jpoimboe@redhat.com> - 2017-08-09 22:20 +0200
                Re: [PATCH v4 1/2] x86/unwind: add ORC unwinder Juergen Gross <jgross@suse.com> - 2017-08-10 09:10 +0200
                Re: [PATCH v4 1/2] x86/unwind: add ORC unwinder Josh Poimboeuf <jpoimboe@redhat.com> - 2017-08-10 16:10 +0200
                Re: [PATCH v4 1/2] x86/unwind: add ORC unwinder Juergen Gross <jgross@suse.com> - 2017-08-10 16:30 +0200
                Re: [PATCH v4 1/2] x86/unwind: add ORC unwinder Josh Poimboeuf <jpoimboe@redhat.com> - 2017-08-10 16:40 +0200
                Re: [PATCH v4 1/2] x86/unwind: add ORC unwinder Juergen Gross <jgross@suse.com> - 2017-08-10 17:10 +0200
                Re: [PATCH v4 1/2] x86/unwind: add ORC unwinder Josh Poimboeuf <jpoimboe@redhat.com> - 2017-08-10 17:50 +0200
                Re: [PATCH v4 1/2] x86/unwind: add ORC unwinder Josh Poimboeuf <jpoimboe@redhat.com> - 2017-08-10 16:50 +0200
          Re: [PATCH v4 1/2] x86/unwind: add ORC unwinder Andy Lutomirski <luto@kernel.org> - 2017-08-09 18:20 +0200
            Re: [PATCH v4 1/2] x86/unwind: add ORC unwinder Juergen Gross <jgross@suse.com> - 2017-08-09 20:00 +0200

csiph-web