All of lore.kernel.org
 help / color / mirror / Atom feed
* Is there a way to add GDT entries without having a second page?
@ 2005-05-06  0:50 Kip Macy
  2005-05-06  6:10 ` Keir Fraser
  0 siblings, 1 reply; 3+ messages in thread
From: Kip Macy @ 2005-05-06  0:50 UTC (permalink / raw)
  To: xen-devel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Is there a way to add GDT entries without having a second page?
  2005-05-06  0:50 Is there a way to add GDT entries without having a second page? Kip Macy
@ 2005-05-06  6:10 ` Keir Fraser
  2005-05-06 15:31   ` Kip Macy
  0 siblings, 1 reply; 3+ messages in thread
From: Keir Fraser @ 2005-05-06  6:10 UTC (permalink / raw)
  To: Kip Macy; +Cc: xen-devel


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Is there a way to add GDT entries without having a second page?
  2005-05-06  6:10 ` Keir Fraser
@ 2005-05-06 15:31   ` Kip Macy
  0 siblings, 0 replies; 3+ messages in thread
From: Kip Macy @ 2005-05-06 15:31 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-05-06 15:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-06  0:50 Is there a way to add GDT entries without having a second page? Kip Macy
2005-05-06  6:10 ` Keir Fraser
2005-05-06 15:31   ` Kip Macy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.