linux-s390.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Heiko Carstens <heiko.carstens@de.ibm.com>,
	David Hildenbrand <david@redhat.com>
Cc: Janosch Frank <frankja@linux.vnet.ibm.com>,
	KVM <kvm@vger.kernel.org>, Cornelia Huck <cohuck@redhat.com>,
	linux-s390 <linux-s390@vger.kernel.org>
Subject: Re: [PATCH 0/2] KVM: s390: avoid jump tables
Date: Thu, 8 Feb 2018 10:07:40 +0100	[thread overview]
Message-ID: <1cce9ec4-d32e-a12b-7151-f719cd68f72e@de.ibm.com> (raw)
In-Reply-To: <20180208085819.GC3937@osiris>



On 02/08/2018 09:58 AM, Heiko Carstens wrote:
> On Tue, Feb 06, 2018 at 01:30:28PM +0100, David Hildenbrand wrote:
>> On 06.02.2018 12:21, Christian Borntraeger wrote:
>>> Some old patches refreshed.
>>>
>>
>> Certainly the right thing to do. Especially also interesting due to
>> retpotline (if we get something like that on s390x). If I remember
>> correctly, x86 highly benefits by replacing magic function pointer by
>> switch statements.
> 
> If you look at the generated code for the first patch: gcc now generates
> its own jump table which then jumps (indirectly) to a brasl... So it's two
> instead of one branch.
> I'm not saying that this patch is not good, but there seem be a wrong
> assumptions about the benefit here.

Seems to depend on the compiler. The gcc 7.2 from my Fedora 27 seems to do 
the right thing for intercept.o and priv.o.
In the end this will also help the new -mindirect-branch thing as the gcc
support also avoids jump tables if we use thunks.

  reply	other threads:[~2018-02-08  9:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-06 11:21 [PATCH 0/2] KVM: s390: avoid jump tables Christian Borntraeger
2018-02-06 11:21 ` [PATCH 1/2] KVM: s390: use switch vs jump table in priv.c Christian Borntraeger
2018-02-06 12:02   ` Cornelia Huck
2018-02-06 12:32   ` David Hildenbrand
2018-02-08  8:01   ` Heiko Carstens
2018-02-08  9:16   ` Janosch Frank
2018-02-06 11:21 ` [PATCH 2/2] KVM: s390: use switch vs jump table in intercept.c Christian Borntraeger
2018-02-06 12:04   ` Cornelia Huck
2018-02-06 12:05     ` Christian Borntraeger
2018-02-06 12:34   ` David Hildenbrand
2018-02-06 12:47   ` [PATCH v2 " Christian Borntraeger
2018-02-06 12:51     ` Cornelia Huck
2018-02-08  8:30     ` Janosch Frank
2018-02-06 12:30 ` [PATCH 0/2] KVM: s390: avoid jump tables David Hildenbrand
2018-02-06 12:36   ` Christian Borntraeger
2018-02-06 12:42     ` David Hildenbrand
2018-02-08  8:58   ` Heiko Carstens
2018-02-08  9:07     ` Christian Borntraeger [this message]
2018-02-08  9:18       ` Christian Borntraeger
2018-02-08 10:09     ` Christian Borntraeger
2018-02-08 10:18       ` Cornelia Huck

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=1cce9ec4-d32e-a12b-7151-f719cd68f72e@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.vnet.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.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).