Commit Graph
71 Commits
Author SHA1 Message Date
kfraser@localhost.localdomain 8f529b5deb [LINUX] x86/64: Sync pagetable management with i386 Xen code.
PUDs,PMDs,PTEs are all marked as ForeignPage so that they can be
grabbed from tlb_remove_page() at the appropriate time and freed in a
special way.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-01-12 10:22:36 +00:00
Ian Campbell 69f0c953b4 [LINUX] Kexec: Reapply kexec patches to sparse tree.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-12-08 11:47:09 +00:00
Ian Campbell 24a9aad534 [LINUX] Kexec: add kexec files to sparse tree.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-12-08 11:47:09 +00:00
kfraser@localhost.localdomain 90f0b6ab3a [LINUX] Missing xenoprof.h header file for x86/64.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-11-30 17:27:00 +00:00
kfraser@localhost.localdomain 99bbc67f93 linux/x86-64: missing agp.h
This causes data corruption and/or crashes when AGP is actually used.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-11-30 17:21:52 +00:00
Ian Campbell 6fc8621b96 [XEN] Kexec / Kdump: x86_64 specific code
This patch contains the x86_64 implementation of Kexec / Kdump for Xen.

Signed-Off-By: Magnus Damm <magnus@valinux.co.jp>
Signed-Off-By: Simon Horman <horms@verge.net.au>
2006-11-30 12:38:51 +00:00
kfraser@localhost.localdomain e9542d25de [HVM] Fix building PV-on-HVM drivers on i386.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-27 10:02:24 +00:00
kfraser@localhost.localdomain 217b97f42d [LINUX] Make xen /dev/mem aware of IA64 to use X.
The original /dev/mem (linux/drivers/char/mem.c) is aware of IA64
specific issues. On the other hand paravirtualized /dev/mem
(linux-2.6-xen-sparse/drivers/xen/char/mem.c) is simplifed not to be
aware of IA64. This patch makes it IA64-aware to use X on domain0/IA64.
With this patch and ia64-specific patches, X server can boot on domain0/IA64.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-11-22 10:23:14 +00:00
kfraser@localhost.localdomain 7186363e84 [LINUX] x86/64: Fix backward compatibility to Xen 3.0.2.
This requires us to explicitly specify _PAGE_USER for kernel mappings.
Original patch by Jan Beulich <jbeulich@novell.com> and Gerd Hoffmann.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-14 17:00:05 +00:00
kfraser@localhost.localdomain 1a9e089e65 [LINUX] Preserve flags when converting PTEs from machine to phys.
Signed-off-by: John Byrne <john.l.byrne@hp.com>
2006-11-14 11:57:53 +00:00
kfraser@localhost.localdomain 66d409985f [LINUX] Clean up header includes (gnttab.h from fixmap.h).
include/asm-{i386,x86_64}/mach-xen/asm/fixmap.h was needlessly
including include/xen/gnttab.h. Removing this made necessary explicit
inclusion of that header in tpm_xen.c, the build of which should not
have succeeded on non-x86 architectures before.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-11-03 12:10:02 +00:00
kfraser@localhost.localdomain 11b39cba56 [LINUX] Fix build breakage from previous patch.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-30 14:28:29 +00:00
kfraser@localhost.localdomain 3d91901864 [LINUX] Use CONFIG_XEN_COMPAT_030002 where possible.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-10-30 14:14:46 +00:00
kfraser@localhost.localdomain fa088340b4 [LINUX] Declare structs as 'static __initdata' where possible.
Probably still not catching all possible cases, but using static
(where not already the case) makes the code size smaller, and using __initdata
has the usual advantages.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-10-30 14:09:13 +00:00
kfraser@localhost.localdomain b3ea76b1e0 [HVM] Clean ups for PV-on-HVM drivers. In particular, platform-pci
driver can now handle multi-page hypercall stub areas.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-22 17:16:58 +01:00
kfraser@localhost.localdomain 314ded7410 [x86_64] Guests no longer set _PAGE_USER on kernel mappings.
This may allow guest kernels to be run outside ring 3 in future, and
also provides scope for optimisations today (e.g., using global bit on
user mappings).

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-22 15:26:40 +01:00
kfraser@localhost.localdomain 30b586b9fb [LINUX] Split useful bits of page.h into new header maddr.h.
Split the bits of page.h which are needed by PV-on-HVM drivers out
into a separate header file, so that it's a bit easier to get the xenolinux
machine address functions when compiled against a native kernel.

Signed-off-by: Steven Smith <ssmith@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-14 13:54:10 +01:00
kfraser@localhost.localdomain 13fbff7760 [HVM] Add stubs to Linux for the new hvm_op hypercall.
Signed-off-by: Steven Smith <ssmith@xensource.com>
2006-08-14 11:33:50 +01:00
kfraser@localhost.localdomain 177155de98 [LINUX] Do not early-unpin pagetables that contain foreign mappings.
This fixes a bug whereby foreign pages were freed by the unpin, which
then become owned by the local domain before it destroys its ptes.
It therefore (erroneously) detects the mappings as local and so
updates reference counts, leading to crashes.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-01 15:48:48 +01:00
kfraser@dhcp93.uk.xensource.com 19c8828f4b Add new XENMEM_machphys_mapping to get info about location and
sizeof of the mach2phys table default mapping. Use this in Linux to
dynamically adapt the mfn_to_pfn() routine to undelrying hypervisor.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-20 14:45:46 +01:00
kfraser@dhcp93.uk.xensource.com 5363eb610a Export machine_to_phys start and end addresses to guests.
Use this info in Linux to bounds-check accesses to the
m2p table.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-20 12:01:09 +01:00
kaf24@firebug.cl.cam.ac.uk 1d0986e6b4 [LINUX] Eliminates a deadlock and reduce (sometimes significantly) the time
interrupts are off during context switch.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-06-13 15:56:28 +01:00
Ian.Campbell@xensource.com c9c67d5a02 [LINUX] Correctly return the results of {event_channel_op,physdev_op}_compat
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-06-13 10:14:20 +01:00
kaf24@firebug.cl.cam.ac.uk 3729abf36e [LINUX] Rename hw_resend_irq to allow it to be defined seperately per arch.
Signed-off-by Kevin Tian <kevin.tian@intel.com>
2006-06-07 14:38:36 +01:00
kfraser@dhcp93.uk.xensource.com 1f9df5417a Fix ACM hypercall macros (broke the x86/64 and ia64 builds).
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-05-31 13:26:10 +01:00
kaf24@firebug.cl.cam.ac.uk 9fea9fb410 [ACM] Add a hypervisor call macro to the linux kernel; it
completes the alignment of the ACM call interface with the other Xen 
hypervisor call interfaces. This macro is used to call from the a guest 
kernel directly into the ACM hypervisor module.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
Signed-off by: Bryan D. Payne <bdpayne@us.ibm.com>
2006-05-31 07:23:54 +01:00
kaf24@firebug.cl.cam.ac.uk 3231ebb6ba Define halt() and safe_halt() properly for Linux-on-Xen. Remove duplicated
code for initial bringup of secondary VCPUs.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-05-30 13:29:29 +01:00
Ian.Campbell@xensource.com 1fa74a12d2 Move include/asm-x86_64/e820.h to include/asm-x86_64/mach-xen/asm/e820.h
This fixes the native build.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>


--HG--
rename : linux-2.6-xen-sparse/include/asm-x86_64/e820.h => linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/e820.h
2006-05-26 11:23:55 +01:00
Ian.Campbell@xensource.com f715a4ce18 Convert x86/64 Linux to use the new memory map hypercall.
This change removes several of the differences between the bare-metal
and Xen versions.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-05-22 09:23:15 +01:00
Ian.Campbell@xensource.com c9e03023f9 Add include/asm-x86_64/e820.h to sparse tree
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-05-22 09:21:58 +01:00
kaf24@firebug.cl.cam.ac.uk 5856c39120 Remove Emacs variables settings from tail of our Linux files.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-05-18 11:39:03 +01:00
cl349@firebug.cl.cam.ac.uk 15efc30a11 Add support to domain builders for loading kernels with physical addresses in the elf paddr and entry fields.
Add a new __xen_guest header field to distinguish between kernels with
the previous use of the paddr field and the new use.
Add a new __xen_guest header field to control the kernel entry point,
since the elf header entry field now points to a physical address.
This header field is also useful for supporting alternative entry
points in kernel images which run both on xen and native.
Also add a kernel config option to control whether the resulting kernel
should include compatibility code to run on Xen 3.0.2 or whether such
code such be left out, resulting in a kernel which will only run on
newer Xen versions.  Default to having compatibility enabled.
Kernels built with the new use of the elf header fields would otherwise
not work on Xen versions prior to this changeset.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-05-11 17:30:50 +01:00
kaf24@firebug.cl.cam.ac.uk 3ae4dcdda2 x86/64 has the wrong number of arguments defined for HYPERVISOR_xenoprof_op.
Signed-off-by: Ray Bryant <raybry@mpdtxmail.amd.com>
2006-05-11 13:45:10 +01:00
kaf24@firebug.cl.cam.ac.uk 095470c787 Include string.h in the hypercall header file to ensure that memcpy() is defined.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-05-01 17:02:43 +01:00
kaf24@firebug.cl.cam.ac.uk 013351bd7a Define new event-channel and physdev hypercalls with a more extensible
interface (the legacy hypercalls would break if subcommands with large
argument structures were added, as it would grow the size of the 
union of all argument structures).

Also, based on a patch from Kevin Tian, add a new physdev op to
signal EOI for a particular irq.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-30 09:16:15 +01:00
Ian.Campbell@xensource.com a3fd8815ef Don't BUG_ON() if we cannot register an NMI callback since it is not a fatal
problem.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-04-21 18:06:06 +01:00
Ian.Campbell@xensource.com 8c18405bb3 Merge nmi_op functionality with the callback_op hypercall.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-04-21 17:19:22 +01:00
Ian.Campbell@xensource.com 41d7f059c5 Use set_callbacks hypercall if callback_op is not available.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-04-21 17:18:53 +01:00
kaf24@firebug.cl.cam.ac.uk d033b064ca Introduce page_to_bus() and use it in pci-dma-xen.c and swiotlb.c. On
xen/ia64 with the P2M/VP model pseudo physical address(gpaddr) is
fully virtualized so it defines
xen_features(XENFEAT_auto_translated_physmap) = 1.  In this case
page_to_phys(page) should return pseudo physical address like
pfn_to_mfn() and its families.  However dma is not virtualized, it
can't be used for pci-dma-xen.c, swiotlb.c.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-04-10 11:39:32 +01:00
ack@kneesa.uk.xensource.com c5b774278a Add xenoprof support
Signed-off-by: Jose Renato Santos <jsantos@hpl.hp.com>
2006-04-06 18:58:01 +01:00
kaf24@firebug.cl.cam.ac.uk 1da49c151e Cleanups to do_callback_op() new hypercall changeset.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-06 17:25:24 +01:00
Ian.Campbell@xensource.com d366b69d6a Add new hypercall "set_callback" taking a callback identifier and the
callback address.

This new hypercall incorporates the functionality of the existing set_callbacks
hypercall in a more flexible manner. set_callbacks is retained for compatibility.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-04-06 12:03:53 +01:00
cl349@firebug.cl.cam.ac.uk 13678d4465 Remove __HYPERVISOR_sched_op_new in favour of a header file interface version number system.
Define interface version in Kconfig and define it through CPPFLAGS for
C and assembly file compilation.
Add HYPERVISOR_{yield,block,shutdown} to remove direct use of sched_op
from guest code.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-03-30 17:50:44 +01:00
cl349@firebug.cl.cam.ac.uk e8e51446b5 Remove special handling of {set,clear}_in_cr4().
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-03-28 10:09:44 +01:00
kaf24@firebug.cl.cam.ac.uk c048a39db2 Paravirtualise the CPUID instruction by forcing emulation with an invalid-opcode prefix.
This allows to clear feature flags and hide unsupported features from guests.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-22 19:05:50 +01:00
kaf24@firebug.cl.cam.ac.uk 8d9256b041 Licensing clarifications in Linux source files:
1. Make it clear in all dual-licensed files that the
    license when distributed with Linux is GPLv2.
 2. Add MODULE_LICENSE(dual) in a few places.
 3. Change many of our EXPORT_SYMBOL() decls to EXPORT_SYMBOL_GPL().
    This is the preference of the Linux maintainers, and avoids any
    trouble down the road if our EXPORT_SYMBOL'ed functions use Linux
    internal interfaces that are GPL only.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-22 11:30:57 +01:00
kaf24@firebug.cl.cam.ac.uk badff410e4 Define a new sched_op hypercall called sched_op_new, which differs from the
legacy hypercall in that it takes a pointer to a block of extra arguments
rather than an opaque unsigned long. The old hypercall still exists, for
backwards compatibility.

The new hypercall supports new sub-command SCHEDOP_poll, which can be used to
wait on a set of event-channel ports with an optional timeout. This is exported
in XenLinux as HYPERVISOR_poll, and used in the pcifront driver to wait on a
response from the pciback driver.

Can also be used for debuggers. :-)

Signed-off-by: Keir Fraser <keir@xensource.com>
Signed-off-by: John Levon <john.levon@sun.com>
2006-03-14 19:33:45 +01:00
kaf24@firebug.cl.cam.ac.uk 1e0419bfee No need to pin/unpin intermediate pagetables in x86/64 xenlinux.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-12 19:37:38 +01:00
cl349@firebug.cl.cam.ac.uk 16c73f7f6c Map grant table pages in vmalloc kernel address space instead of fixmap.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-03-10 13:27:24 +00:00
kaf24@firebug.cl.cam.ac.uk b76d31960b Fix 64-bit Linux build.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-08 11:11:53 +01:00