Kip Macy
2005-May-06 00:50 UTC
[Xen-devel] Is there a way to add GDT entries without having a second page?
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? Thanks. -Kip _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2005-May-06 06:10 UTC
Re: [Xen-devel] Is there a way to add GDT entries without having a second page?
On 6 May 2005, at 01:50, Kip Macy wrote:> 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?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. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Kip Macy
2005-May-06 15:31 UTC
Re: [Xen-devel] Is there a way to add GDT entries without having a second page?
On 5/5/05, Keir Fraser <Keir.Fraser@cl.cam.ac.uk> wrote:> > On 6 May 2005, at 01:50, Kip Macy wrote: > > > 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? > > 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. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel