From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 65460 invoked by alias); 18 Oct 2015 23:20:57 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 65363 invoked by uid 89); 18 Oct 2015 23:20:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sun, 18 Oct 2015 23:20:55 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 237658CF62; Sun, 18 Oct 2015 23:20:54 +0000 (UTC) Received: from bigtime.twiddle.net (ovpn-113-20.phx2.redhat.com [10.3.113.20]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9INKqYn011864; Sun, 18 Oct 2015 19:20:53 -0400 Subject: Re: [PATCH 5/9] i386: Add address spaces for fs/gs segments To: Paolo Bonzini , gcc-patches@gcc.gnu.org, Avi Kivity References: <1444280375-20866-1-git-send-email-rth@redhat.com> <1444280375-20866-6-git-send-email-rth@redhat.com> <5621179F.5070303@gnu.org> From: Richard Henderson Message-ID: <56242953.2080105@redhat.com> Date: Sun, 18 Oct 2015 23:47:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <5621179F.5070303@gnu.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg01692.txt.bz2 On 10/16/2015 05:28 AM, Paolo Bonzini wrote: > > > On 08/10/2015 06:59, Richard Henderson wrote: >> +/* Address space support. >> + >> + This is not "far pointers" in the 16-bit sense, but an easy way >> + to use %fs and %gs segment prefixes. Therefore: >> + >> + (a) All address spaces have the same modes, >> + (b) All address spaces have the same addresss forms, >> + (c) While %fs and %gs are technically subsets of the generic >> + address space, they are probably not subsets of each other. >> + (d) Since we have no access to the segment base register values >> + without resorting to a system call, we cannot convert a >> + non-default address space to a default address space. >> + Therefore we do not claim %fs or %gs are subsets of generic. > > rdfsbase and rdgsbase are potentially accessible to userspace too, so I > think %fs or %gs should be considered subsets of generic. Potentially, yes. Though in practice not enabled for any current operating system that I can find. Thus at present we still require some sort of syscall. I suppose we could add a libgcc interface for it, but it certainly wouldn't be quick. r~