Commit Graph
124 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
Steven Hand 1033df9144 Make sure we always have a sensible idle function; this fixes problems
booting dom0 on AMD introduced by -unstable cset 13213:bf25488db8eb.

Signed-off-by: Steven Hand <steven@xensource.com>
2007-01-04 10:58:01 +00:00
kfraser@localhost.localdomain 0550678b74 [LINUX] Implement the idle=poll option in the kernel when running on Xen.
This causes the kernel to use a polling loop rather than hypercall
down to block. I have found this useful to profile the amount of sleep
cycles when using xenoprof, there may be other uses.

Signed-off-by: Amitabha Roy <amitabha.roy@gmail.com>
2007-01-03 14:08:42 +00:00
Ian Campbell c720eb6ab7 [LINUX] Kexec: Remove remainder of kexec-generic.patch
Rename xen_machine_kexec() to just machine_kexec() and only compile in
the Xen or native version as appropriate.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-12-08 11:47:09 +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
Steven Smith 3c78f2e5d7 [LINUX] The removal of the console_use_vt hack was premature: it's still
required if CONFIG_VT is enabled but the domain isn't currently
configured to use the PV framebuffer.  Put it back in, in a slightly
more palatable form.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
2006-12-01 11:52:33 +00:00
Steven Smith a5ae44fcdf This is Anthony Liguori's virtual framebuffer forward ported and
extensively hacked based on feedback from xen-devel.

Its architecture is comparable to the common split device driver
architecture: xenfb and xenkbd modules serve as frontend in domU, and
the user space vncfb or sdlfb process serves as backend in dom0.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2006-12-01 09:48:32 +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
Ian Campbell 9276d7173d [LINUX] Update to Linux 2.6.16.31
Updated linux-2.6-xen-sparse/arch/x86_64/kernel/acpi/Makefile

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-11-27 13:50:02 +00:00
kfraser@localhost.localdomain a832c0ef5b [XENOPROFILE] Split linux-2.6-xen-sparse/arch/i386/oprofile/xenoprof.c into
linux-2.6-xen-sparse/drivers/xen/xenoprof/xenoprofile.c
without code changes except slight adjustment to compile.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-11-22 09:49:55 +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 8f3784dc2b [LINUX] Fix clear_fixmap().
On i386-PAE, clear_fixmap() results in ill use of set_pte(). In all
contexts, p2m translations shouldn't occur here. Note that this is not
really an issue on native linux, as there is
(a) no pfn-to-mfn translation and
(b) __set_fixmap() takes an unsigned long physical address rather than
    a paddr_t, which makes it so that bits 32 and up of the physical
    address are always zero, permitting either order store when
    clearing the entry.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-11-13 13:37:54 +00:00
kfraser@localhost.localdomain afb74c5973 Revert 12361:32f7b40ace426d3acdf26c21c20cb6b4562d9f10.
We should support the XENMEM_memory_map hypercall properly
to fix this issue.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-10 14:53:00 +00:00
kfraser@localhost.localdomain 6de27d5b5e [LINUX] Extend physical mapping to maxmem instead of mem
As currently physical mapping only reaches the initial reservation,
we're unable to balloon up to more than mem (even when maxmem > mem)
in any situation.

Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
2006-11-10 14:22:30 +00:00
kfraser@localhost.localdomain 77d409f7f2 [LINUX] Use pfn_to_page instead of relying in memory assumptions
This makes usage agnostic wrt the memory model being used.

Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
2006-11-07 09:28:18 +00:00
kfraser@localhost.localdomain 52432dc102 [LINUX] Don't bother to write a 5-bit value to a 2-bit field.
From: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-04 18:55:16 +01:00
kfraser@localhost.localdomain c0d4d58131 [LINUX] Provide permanent global version of machine_e820 map for
general use.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-09-21 09:37:03 +01:00
Christian Limpach 42ee90deeb [linux] Update to linux-2.6.16.29.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-09-19 14:26:22 +01:00
kfraser@localhost.localdomain 977599dbcb Clean up dom0_vga_console_info structure for v3.0.3.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-09-18 18:17:54 +01:00
kaf24@firebug.cl.cam.ac.uk 1a1adcfe49 [LINUX] /proc/iomem should not be initialised from pseudophysical e820 map.
This is because it should only contain real I/O memory address ranges,
otherwise we can get false conflicts between a real I/O range and a
'pseudophysical' RAM range, causing drivers to fail to work in a domU.
Also prevent kernel code/data being requested as iomem resources --
they are not contiguous in 'io memory' space so this would not make
sense.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-31 03:05:40 +01:00
kaf24@firebug.cl.cam.ac.uk c398044d5d [LINUX][X86_64] P2M map must be allocated on page aligned boundary.
Otherwise save/restore can break.
Signed-off-by: Kazuo Moriwaka <moriwaka@valinux.co.jp>
2006-08-30 17:56:49 +01:00
Ian Campbell b543b44c65 [XEN/LINUX] Define Xen ELF notes in kernel header and update dom0 builder.
ELF notes provide a cleaner interface for passing Xen specific
information from the kernel to the domain builder than the existing
__xen_guest section string. The __xen_guest string is retained in
kernels built with 3.0.2 compatability for domU however dom0 requires
the new interface.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-08-23 14:41:05 +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
Ian Campbell d08c8d1fee [LINUX] Revert bits of cset 11202 since they break the -xenU build for x86/64.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-08-22 11:30:13 +01:00
kaf24@localhost.localdomain 35f4fc005c [LINUX] Replace uses of CONFIG_XEN_PRIVILEGED_GUEST with is_initial_xendomain().
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-08-19 12:08:12 +01:00
kfraser@localhost.localdomain 121ec85fcf Clean up console fields in start_info structure. Add compat code for
older kernels so they can use the old start_info API.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-15 15:50:36 +01:00
kfraser@localhost.localdomain 21bee17870 Support for vga text modes bigger than 80x25.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-08-15 11:16:44 +01:00
kfraser@localhost.localdomain 3ef9a82056 [LINUX][ Fix x86/64 entry.S to use paravirtualized sti/cli properly.
This fixes
- one instance of using XEN_BLOCK_EVENTS where XEN_UNBLOCK_EVENTS was
  meant
- four instances of left-over cli-s that should have been replaced
  with XEN_BLOCK_EVENTS
- one instance of slightly wrong placement (without resulting in ill
  behavior, but needlessly making the diff to native more complex)

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-08-14 15:24:59 +01:00
kfraser@localhost.localdomain 2b88d7ed5f [LINUX] Provide a handy macro for detrmining if we are domain0.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-14 14:44:31 +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@localhost.localdomain b296701bb2 [LINUX] Disable configuration of ARCH_SPARSEMEM_ENABLE on x86/64.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-07-26 10:08:13 +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
kaf24@firebug.cl.cam.ac.uk 9c8f5290ef Small fixes to changesets 10424 and 10425 (spurious #PF detection).
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-17 12:57:03 +01:00
kfraser@dhcp93.uk.xensource.com d6a811acc8 [LINUX] Add spurious page-fault detection, intended primarily
for spurious write faults on mappings that have been
changed from read-only to writable. If a CPU has a stale
read-only entry in its TLB, it is allowed to fault on
the next write access without re-walking the page table.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-16 18:19:40 +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
kaf24@firebug.cl.cam.ac.uk a51b3e5765 [LINUX] Simplify /proc/iomem initialisation -- no need to fake a
domU memory map. The main e820 map already terminates at max_pfn.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-09 16:19:42 +01:00
kaf24@firebug.cl.cam.ac.uk 876b216779 [LINUX][X86/64] Initialise pages outside initial allocation so that
they are picked up by the balloon driver.
From: Jan Beulich
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-09 16:18:40 +01:00
kaf24@firebug.cl.cam.ac.uk b4c43b75ea [LINUX] Set up /proc/iomem in a sensibel way to indicate
code & data resources, and a RAM area on domU.
From: Gerd Hoffmann <kraxel@suse.de>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-08 10:24:48 +01:00
kaf24@firebug.cl.cam.ac.uk fe777d0a4c [LINUX][X86/64] Support IO-port permissions bitmaps (ioperm() syscall).
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-06-07 13:38:08 +01:00
kaf24@firebug.cl.cam.ac.uk 2ad3e284b4 x86/64 Linux: destroy entire init memory mapping beyond kernel image.
Avoids overlap with modules mapping area.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-06-07 11:24:44 +01:00
kaf24@firebug.cl.cam.ac.uk 44beffcd61 [LINUX] Simply shared_info mapping code. Always use a fixmap.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-02 19:14:44 +01:00
kfraser@dhcp93.uk.xensource.com 585c0a4528 [LINUX][X86_64] Destroy initial page-table mappings to avoid overlap with modules.
The temporary mappings needed to set up the 1:1 mappings must be torn
down after use; otherwise they may trigger the
WARN_ON() in vmap_pte_range() (namely if the chunk allocated to hold
kernel and initial page tables gets close to or
exceeds 128Mb, or if a sufficiently high mem= argument causes the
static allocations to grow beyond 128Mb, which in
either case means these mappings extend into the modules area).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-06-02 18:06:50 +01:00
kaf24@firebug.cl.cam.ac.uk cf7e961ca7 Use halt() instead of asm("hlt").
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-06-02 12:14:27 +01:00
kfraser@dhcp93.uk.xensource.com 5d30fd9f10 Build breakage: revert 10247:2fd7f4fb7d1453e4ff418c06961b0bd9fcb71129.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-02 09:15:51 +01:00
kaf24@firebug.cl.cam.ac.uk 410f6d8716 [LINUX][X86_64] Fix initial memory mapping code.
The temporary mappings needed to set up the 1:1 mappings must be torn down after use; otherwise they may trigger the
WARN_ON() in vmap_pte_range() (namely if the chunk allocated to hold kernel and initial page tables gets close to or
exceeds 128Mb, or if a sufficiently high mem= argument causes the static allocations to grow beyond 128Mb, which in
either case means these mappings extend into the modules area).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-06-01 19:07:40 +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 eb8b146a00 Fix x86/64 by passing the required length to reserve_bootmem instead of the end address
Fixup a warning since the machine_e820 and memmap variables are only used if
CONFIG_XEN_PRIVILEGED_GUEST.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-05-22 17:03:24 +01:00
Ian.Campbell@xensource.com b0084aa59b Fix x86/64 -xenU build. probe_roms() is only defined if building a privleged
or !xen build.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-05-22 15:03:46 +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