mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [RFC PATCH 06/33] Add Xen interface header files
@ 2006-07-18 18:39 Chuck Ebbert
  0 siblings, 0 replies; 2+ messages in thread
From: Chuck Ebbert @ 2006-07-18 18:39 UTC (permalink / raw)
  To: linux-kernel
  Cc: Christian Limpach, Chris Wright, virtualization, Xen-devel,
	Jeremy Fitzhardinge, Andi Kleen, Andrew Morton, Rusty Russell,
	Zachary Amsden, Ian Pratt

In-Reply-To: <20060718091950.075712000@sous-sol.org>

On Tue, 18 Jul 2006 00:00:06 -0700, Chris Wright wrote:
>
> Add Xen interface header files.

> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
> +++ b/include/xen/interface/arch-x86_32.h     Thu Jun 08 19:24:13 2006 -0400

> +#define FIRST_RESERVED_GDT_PAGE  14
> +#define FIRST_RESERVED_GDT_BYTE  (FIRST_RESERVED_GDT_PAGE * 4096)
> +#define FIRST_RESERVED_GDT_ENTRY (FIRST_RESERVED_GDT_BYTE / 8)

== 7168

> +
> +/*
> + * These flat segments are in the Xen-private section of every GDT. Since these
> + * are also present in the initial GDT, many OSes will be able to avoid
> + * installing their own GDT.
> + */
> +#define FLAT_RING1_CS 0xe019    /* GDT index 259 */
> +#define FLAT_RING1_DS 0xe021    /* GDT index 260 */
> +#define FLAT_RING1_SS 0xe021    /* GDT index 260 */
> +#define FLAT_RING3_CS 0xe02b    /* GDT index 261 */
> +#define FLAT_RING3_DS 0xe033    /* GDT index 262 */
> +#define FLAT_RING3_SS 0xe033    /* GDT index 262 */

Umm, these definitions are magic hardcoded constants that really refer
to indexes 7171 through 7174.

How about this instead?

+#define FLAT_RING1_CS (((FIRST_RESERVED_GDT_ENTRY + 3) << 3) | 1)
+#define FLAT_RING1_DS (((FIRST_RESERVED_GDT_ENTRY + 4) << 3) | 1)
+#define FLAT_RING1_SS FLAT_RING1_DS
+#define FLAT_RING3_CS (((FIRST_RESERVED_GDT_ENTRY + 5) << 3) | 3)
+#define FLAT_RING3_DS (((FIRST_RESERVED_GDT_ENTRY + 6) << 3) | 3)
+#define FLAT_RING3_SS FLAT_RING3_DS

-- 
Chuck
And did we tell you the name of the game, boy, we call it Riding the Gravy Train.

^ permalink raw reply	[flat|nested] 2+ messages in thread
* [RFC PATCH 00/33] Xen i386 paravirtualization support
@ 2006-07-18  9:18 Chris Wright
  2006-07-18  7:00 ` [RFC PATCH 06/33] Add Xen interface header files Chris Wright
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Wright @ 2006-07-18  9:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: virtualization, xen-devel, Jeremy Fitzhardinge, Andi Kleen,
	Andrew Morton, Rusty Russell, Zachary Amsden

Unlike full virtualization in which the virtual machine provides 
the same platform interface as running natively on the hardware,
paravirtualization requires modification to the guest operating system
to work with the platform interface provided by the hypervisor.

Xen was designed with performance in mind.  Calls to the hypervisor
are minimized, batched if necessary, and non-critical codepaths are left
unmodified in the case where the privileged instruction can be trapped and
emulated by the hypervisor.  The Xen API is designed to be OS agnostic and
has had Linux, NetBSD, FreeBSD, Solaris, Plan9 and Netware ported to it.
Xen also provides support for running directly on native hardware.

The following patch series provides the minimal support required to
launch Xen paravirtual guests on standard x86 hardware running the Xen
hypervisor.  These patches effectively port the Linux kernel to run on the
platform interface provided by Xen.  This port is done as an i386 subarch.

With these patches you will be able to launch an unprivileged guest
running the modified Linux kernel and unmodified userspace.  This guest
is x86, UP only, runs in shadow translated mode, and has no direct access
to hardware.  This simplifies the patchset to the minimum functionality
needed to support a paravirtualized guest.  It's worth noting that
a fair amount of this patchset deals with paravirtualizing I/O, not
just CPU-only.  The additional missing functionality is primarily about
full SMP support, optimizations such as direct writable page tables,
and the management interface.

At a high-level, the patches provide the following:

- Kconfig and Makefile changes required to support Xen
- subarch changes to allow more platform functionality to be
  implemented by an i386 subarch
- Xen subarch implementation
- start of day code for running in the hypervisor provided environment (paging
  enabled)
- basic Xen drivers to provide a fully functional guest

The Xen platform API encapsulates the following types of requirements:

- idt, gdt, ldt (descriptor table handling)
- cr2, fpu_taskswitch, debug registers (privileged register handling)
- mmu (page table, tlb, and cache handling)
- memory reservations
- time and timer
- vcpu (init, up/down vcpu)
- schedule (processor yield, shutdown, etc)
- event channel (generalized virtual interrupt handling)
- grant table (shared memory interface for high speed interdomain communication)
- block device I/O
- network device I/O
- console device I/O
- Xen feature map
- Xen version info

Thanks to all have reviewed earlier versions of these patches.
-chris
--

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

end of thread, other threads:[~2006-07-18 18:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-18 18:39 [RFC PATCH 06/33] Add Xen interface header files Chuck Ebbert
  -- strict thread matches above, loose matches on Subject: below --
2006-07-18  9:18 [RFC PATCH 00/33] Xen i386 paravirtualization support Chris Wright
2006-07-18  7:00 ` [RFC PATCH 06/33] Add Xen interface header files Chris Wright

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®