All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/21] Descriptor table fixes / cleanup for i386
@ 2005-11-08  4:17 Zachary Amsden
  2005-11-08  7:10 ` Chris Wright
  2005-11-08  7:52 ` Ingo Molnar
  0 siblings, 2 replies; 4+ messages in thread
From: Zachary Amsden @ 2005-11-08  4:17 UTC (permalink / raw)
  To: Andrew Morton, Chris Wright, Linus Torvalds,
	Linux Kernel Mailing List, Virtualization Mailing List,
	H. Peter Anvin, Zwane Mwaikambo, Martin Bligh,
	Pratap Subrahmanyam, Christopher Li, Eric W. Biederman,
	Ingo Molnar, Zachary Amsden, Zachary Amsden

Patches to clean up descriptor access in Linux to make it friendly to
virtualization environments.  The basic problem is that the GDT must
be write protected, which causes spurious overhead when the GDT lies
on the same page as other data.  This problem exists both for VMware
and Xen; Xen actually requires page isolation, so we have implemented
the most general and compatible solution.  While VMware suffers only
from false sharing, Xen suffers from the false-validation problem,
which requires the extra space for the GDT page to be zeroed.

The GDTs for secondary processors are allocated dynamically to avoid
bloating kernel static data with GDTs for not-present processors.

Along the way, I discovered two serious but subtle problems; there
was no consistent mechanism for converting an EIP to a linear address,
which presented a serious challenge for the kprobes code, since the
LDT is protected by a semaphore which must be acquired in user
context, with interrupts enabled.  The second problem was that %fs,
and %gs could end up loaded with bad cached values after a PnP or APM
BIOS call.

Many other small enhancements to readability, compactness, correctness,
and overall goodness were discovered along the way.

The core piece of these patches is getting the GDT page aligned;
I wil rework or deprecate any other pieces of this that are not
wanted / unnecessary / (hopefully not) buggy.

Testing: 4 way SMP boot-halts, kernel compiles, stress, UML, LDT
 test suites, insane cross-modifying code for breakpoint testing.

Zachary Amsden <zach@vmware.com>

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

end of thread, other threads:[~2005-11-08 21:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-08  4:17 [PATCH 0/21] Descriptor table fixes / cleanup for i386 Zachary Amsden
2005-11-08  7:10 ` Chris Wright
2005-11-08  7:52 ` Ingo Molnar
2005-11-08 21:19   ` Zachary Amsden

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.