From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5ED0EC433DF for ; Wed, 27 May 2020 13:45:02 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 10BEC207CB for ; Wed, 27 May 2020 13:45:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 10BEC207CB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jdwMR-0006Ua-Kt; Wed, 27 May 2020 13:44:47 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jdwMQ-0006UV-7D for xen-devel@lists.xenproject.org; Wed, 27 May 2020 13:44:46 +0000 X-Inumbo-ID: 383e66f9-a020-11ea-a74b-12813bfff9fa Received: from hera.aquilenet.fr (unknown [185.233.100.1]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 383e66f9-a020-11ea-a74b-12813bfff9fa; Wed, 27 May 2020 13:44:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id E64B6D737; Wed, 27 May 2020 15:44:43 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Pgx7Mf1c6z9U; Wed, 27 May 2020 15:44:42 +0200 (CEST) Received: from function.home (unknown [IPv6:2a01:cb19:956:1b00:9eb6:d0ff:fe88:c3c7]) by hera.aquilenet.fr (Postfix) with ESMTPSA id C1D68D242; Wed, 27 May 2020 15:44:42 +0200 (CEST) Received: from samy by function.home with local (Exim 4.93) (envelope-from ) id 1jdwML-001IBK-JO; Wed, 27 May 2020 15:44:41 +0200 Date: Wed, 27 May 2020 15:44:41 +0200 From: Samuel Thibault To: Andrew Cooper Subject: Re: -mno-tls-direct-seg-refs support in glibc for i386 PV Xen Message-ID: <20200527134441.y5dta4n2dm3ftlmw@function> Mail-Followup-To: Samuel Thibault , Andrew Cooper , Florian Weimer , xen-devel@lists.xenproject.org, libc-alpha@sourceware.org References: <87mu5til8a.fsf@oldenburg2.str.redhat.com> <551ceac2-9cf6-00fd-95a6-a5b9fea6a383@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <551ceac2-9cf6-00fd-95a6-a5b9fea6a383@citrix.com> Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Florian Weimer , xen-devel@lists.xenproject.org, libc-alpha@sourceware.org Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Hello, Andrew Cooper via Libc-alpha, le mer. 27 mai 2020 14:39:00 +0100, a ecrit: > Why does the MSB make any difference?  %gs still needs to remain intact > so the thread pointer can be pulled out, so there is nothing that Xen or > Linux can do in the way of lazy loading. > > Beyond that, its straight up segment base semantics in x86.  There will > be a 1-cycle AGU delay from a non-zero base, but that nothing to do with > Xen and applies to all segment based TLS accesses on x86, and you'll win > that back easily through reduced register pressure. > > Are there any further details on the perf problem claim?  I find it > suspicious. The concern is not about the indirection. The concern is that to keep safe from the guest, the hypervisor has to restrict the size of the segment, and thus negative offsets, used in the i386 TLS model, are rejected by the processor, and the hypervisor has to emulate these access, thus a high cost. Samuel