From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kip Macy Subject: Re: Is there a way to add GDT entries without having a second page? Date: Fri, 6 May 2005 08:31:19 -0700 Message-ID: References: Reply-To: Kip Macy Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel List-Id: xen-devel@lists.xenproject.org On 5/5/05, Keir Fraser wrote: >=20 > On 6 May 2005, at 01:50, Kip Macy wrote: >=20 > > I can add entries incrementally to the GDT by having a second page > > frame lying around copying from the current one to the unused one and > > then switching between them for updates, but is there a more elegant > > way? >=20 > What's the problem? You want a 'writable GDT'? This is very doable > since we have the emulator, but in Linux it was not hard to patch the > places that write to the GDT to do a hypercall instead. Each cpu in its initialization sequence adds additional entries to the GDT. The pcpu data area is referenced through %fs, much like TLS. It occurred to me after I had already asked the question that I could just have the boot processor add the entries for all the CPUs so there wouldn't be the need for any additional updates.