Commit Graph
13441 Commits
Author SHA1 Message Date
awilliam@xenbuild2.aw 2dc7e7b707 [IA64] Remove duplicate check is_running_on_xen
When these functions are called, it is running on XEN.

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
2007-01-17 19:51:40 -07:00
awilliam@xenbuild2.aw 6014962afe [IA64] Let Xen handle identity mapping for xenolinux region 7
During kernel build in dom0, half of the resulting slow reflections
are alt DTLB misses.  Since we know Linux identity maps region 7,
Xen can handle the miss itself.  This reduces the system time component
of the kernel build by nearly 15%.

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
2007-01-17 19:48:02 -07:00
awilliam@xenbuild2.aw 08577542ec [IA64] Paravirtualize syscall path in file fsys.S
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
2007-01-16 12:01:03 -07:00
awilliam@xenbuild2.aw 8d0eae20ed [IA64] Add fsys.S to sparse tree
From 2.6.16.33

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2007-01-16 11:51:45 -07:00
awilliam@xenbuild2.aw b633d40f7e [IA64] Remove dorfirfi completely
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
2007-01-16 11:48:43 -07:00
awilliam@xenbuild2.aw c0e6920bf3 [IA64] Add privilege check back for hypercall
hypercall is allowed when cpl=2

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
2007-01-16 11:22:44 -07:00
awilliam@xenbuild2.aw 5a1ef100be [IA64] Change vCPU initialization to avoid domVTi privregs memory leak
1) This patch moved some processing from vcpu_initialise() and
   added a new function vcpu_late_initialise().
   It executes the following initializations for VCPU of
   dom0/domU.
    - Allocate the VHPT
    - Allocate the privregs area and assign these pages into
      guest pseudo physical address space.
    - Set the tlbflush_timestamp.

   It is executed in the following sequence.

   dom0:
     start_kernel()
       ->domain_create()
       ->alloc_vcpu(VCPU0)
         ->alloc_vcpu_struct(VCPU0)
         ->vcpu_initialise(VCPU0)
       ->vcpu_late_initialise(VCPU0)

       ->construct_dom0
         ->alloc_vcpu(othe VCPUs)
           ->alloc_vcpu_struct(other VCPUs)
           ->vcpu_initialise(other VCPUs)

     ia64_hypercall(FW_HYPERCALL_IPI)
       ->fw_hypercall_ipi(XEN_SAL_BOOT_RENDEZ_VEC)
         ->arch_set_info_guest(other VCPUs)
           ->vcpu_late_initialise(other VCPUs)

   domU:
     do_domctl(XEN_DOMCTL_createdomain)
       ->domain_create()

     do_domctl(XEN_DOMCTL_max_vcpus)
       ->alloc_vcpu(all VCPUs)
         ->alloc_vcpu_struct(all VCPUs)
         ->vcpu_initialise(all VCPUs)

     do_domctl(XEN_DOMCTL_setvcpucontext)
       ->set_info_guest(VCPU0)
         ->arch_set_info_guest(VCPU0)
           ->vcpu_late_initialise(VCPU0)

     ia64_hypercall(FW_HYPERCALL_IPI)
       ->fw_hypercall_ipi(XEN_SAL_BOOT_RENDEZ_VEC)
         ->arch_set_info_guest(other VCPUs)
           ->vcpu_late_initialise(other VCPUs)


2) This patch modified the domain_set_shared_info_va().
   Currently, initialization of arch.privregs->interrupt_mask_addr
   of all VCPUs is executed in domain_set_shared_info_va().
   However, allocation of privregs area is late by modified of 1).
   Therefore, this patch modified initialization of
   arch.privregs->interrupt_mask_addr to the following sequence.

   dom0 and domU:
     ia64_hypercall(FW_HYPERCALL_SET_SHARED_INFO_VA)
       ->domain_set_shared_info_va()
         Initialize interrupt_mask_addr of VCPU0

     ia64_hypercall(FW_HYPERCALL_IPI)
       ->fw_hypercall_ipi(XEN_SAL_BOOT_RENDEZ_VEC)
         ->arch_set_info_guest(other VCPUs)
           ->vcpu_late_initialise(other VCPUs)
           Initialize interrupt_mask_addr of other VCPUs


Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-01-16 10:40:37 -07:00
awilliam@xenbuild2.aw b5a65552a9 merge with xen-unstable.hg 2007-01-15 15:15:26 -07:00
kaf24@firebug.cl.cam.ac.uk f28756a627 [MINIOS] Clean up final link stage of the build.
Allow extra application objects to be linked against a partial link of
minios with non-global names localised. For now we assume that global
names ill be assigned a xenos_ prefix in due course. We may decide to
choose a different prefix.

Those who wish to finish the link from an external Makefile can link
their own objects against mini-os.o (which must be first in link
order!) and specify the appropriate architecture linker script.

Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-15 12:25:04 +00:00
Steven Hand 29bbe50b23 Fix clean build after cset 13345:648e58e31c26
Signed-off-by: Steven Hand <steven@xensource.com>
2007-01-15 10:53:06 +00:00
awilliam@xenbuild2.aw e24fb235e0 [IA64] Fix save/restore
Using the new hypercall path, scratch registers are not saved/restored.

So after returning from hypercall, r20 may contain garbage data.
This triggered General Exception.

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
2007-01-14 22:18:38 -07:00
awilliam@xenbuild2.aw 67ce0b5900 [IA64] Fix multicall hypercall
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
2007-01-14 14:58:51 -07:00
kaf24@localhost.localdomain 0ea0df3d71 [XEN] Emulate BSF/BSR. Fix ARPL emulation.
Fix building POPA emulation on x86/32.
Fix asm constraints for in-memory operands.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-14 17:22:24 +00:00
kaf24@localhost.localdomain f06bcbb8cc [XEN] Emulate AMD-defined two-byte NOP opcodes with ModRM.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-14 16:12:42 +00:00
kaf24@localhost.localdomain fd6e8e8c3f [XEN] Emulate PUSHA/POPA/ARPL/BOUND.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-14 16:00:19 +00:00
kaf24@localhost.localdomain 99836a8c3b [XEN] Fix some e820 start-of-day issues by clipping all E820_RAM
regions to be page-sized and -aligned.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-14 13:15:13 +00:00
kaf24@localhost.localdomain 6d675a4ad8 [XEN] Emulate MUL/DIV. Tweak test suite build.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-14 12:03:31 +00:00
kaf24@localhost.localdomain ab5c6b8f11 [TESTS] Fix native jump to 1MB absolute address in emulator test.
Fix typo in emulator comment.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-13 21:36:31 +00:00
kaf24@localhost.localdomain 113bac3007 [XEN] Clean up long division code, fix for C99-mandated
truncation-towards-zero.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-13 20:55:39 +00:00
awilliam@xenbuild2.aw e6f3ffe5a0 [IA64] Implement hyper_get_psr
Mov from psr is used frequently by xeno.

Signed-of-by: Anthony Xu <anthony.xu@intel.com>
2007-01-12 13:01:25 -07:00
awilliam@xenbuild2.aw 81e756d415 [IA64] Fix xencomm_arch_hypercall_suspend
This hypercall is changed to new hypercall mechanism

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
2007-01-12 12:56:20 -07:00
awilliam@xenbuild2.aw ee74bcacd5 [IA64] Simplify lazy cover algorithm
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
2007-01-12 12:11:11 -07:00
kfraser@localhost.localdomain a4cd20a190 [XEN] 'd' key dumps both host and guest state.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-12 17:39:26 +00:00
kfraser@localhost.localdomain c69ab9d431 Extend emulator testing.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-12 17:16:45 +00:00
Ian Campbell c59635dc0f [PATCH] kexec/kdump: allow zero start for crashkernel
Some architectures, notably ia64, can automatically place
the crash kernel into an appropriate place if the start
address for crashkernel is specified as zero or omitted.

E.g. crashkernel=256M or crashkernel=256M@0

While xen does not actually have support for ia64 kexec,
I am working on it. And in any case this change should be harmless.
Just a small bit of infastructure that will make things easier in the
future.

This should also be possible on x86, now relocatable kernels
are reloacatble on x86. So once xen moves up to using linux ~2.6.19
it would make sense to look into implementing this.

The patch does 3 things.

* Firstly, parse_crashkernel() is modified to allows the size and start elements of kexec_crash_area
  to be set to any value, including zero. Previously if either size or
  start were specified as zero, they would both end up as zero.

* Secondly, when kexec_get() is called, if either the size or start
  elements of kexec_crash_area are zero, then zero is passed
  back to the hypercall caller for both values.

  This gives the same behaviour as having parse_crashkernel() set
  size and start to zero if either of them are zero, but it allows
  architecture sepcific code called between the invocation of
  parse_crashkernel() and kexec_get() to modify start (and size if
  there was a reason). In particular, this allows the
  architecture specific code to find a good start point if 0 is
  specified.

* Lastly, it ads an additional check to the x86 setup code.
  As this code currently does not know how to deal with a
  0 start address, it doesn't reserve memory if start is 0.

  This is neccessary as previously if start was specified as zero,
  parse_crashkernel() would set size to zero, but that is
  no longer the case, so a stronger check is needed.

I would really appreciate it if this patch was merged,
as I don't believe it harms anything, and it does allow
a nice path for moving forwards.

Signed-off-by: Simon Horman <horms@verge.net.au>
2007-01-12 16:03:33 +00:00
kfraser@localhost.localdomain 87f272150c linux: Add trivial forwarding of dma_{,un}map_page when not using highmem
Use non-trivial dma_{un,}map_page only when CONFIG_HIGHMEM, allowing
to not compile swiotlb_{un,}map_page in that case, which in neither
case need exporting.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-01-12 15:35:52 +00:00
kfraser@localhost.localdomain d779bf9529 linux: Reduce restrictions on address width for DMA operations
Use address width needed by device rather than dma_bits in
dma_alloc_coherent().
Probe supported address width in swiotlb initialization.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-01-12 15:34:30 +00:00
kfraser@localhost.localdomain b58029254d [MINIOS] Update __XEN_INTERFACE_VERSION__
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-12 15:27:09 +00:00
kfraser@localhost.localdomain 8c338f84ea [LINUX] ipv6: Disable addrconf on Xen bridge device
The ipv6-no-autoconf patch didn't disable IPv6 addrconf completely.
This means that the Xen bridge device still interfered with normal
IPv6 operation by engaging the IPv6 network with a bogus MAC address.

For details please refer to
        https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=200360

The following patch completely disables IPv6 on the Xen bridge device
by temporarily setting the MTU to a value less than the minimum
allowed for IPv6.

Upstream will provide a cleaner way to disable IPv6 addrconf in
future, possibly in the form of a proc sysctl.  Of course if the Xen
loopback device is removed it would render this change unnecessary.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2007-01-12 15:23:07 +00:00
kfraser@localhost.localdomain 772d62af6a merge 2007-01-12 15:19:23 +00:00
kfraser@localhost.localdomain 2cf1159751 [MINIOS] Implement a network frontend driver.
Signed-off-by: Jacob Gorm Hansen <jacobg@diku.dk>
2007-01-12 15:18:24 +00:00
kfraser@localhost.localdomain 213d576165 [MINIOS] Fix grant-entry freelist maintenance.
Signed-off-by: Jacob Gorm Hansen <jacobg@diku.dk>
2007-01-12 15:16:05 +00:00
kfraser@localhost.localdomain ffe8d02e0d [MINIOS] Support xenbus watches.
Signed-off-by: Jacob Gorm Hansen <jacobg@diku.dk>
2007-01-12 15:15:25 +00:00
Alastair Tse eb8b807d29 Make get-fields.sh really get run by bash rather than default /bin/sh.
Also fix some bashisms in the script.

Signed-off-by: Alastair Tse <atse@xensource.com>
2007-01-12 14:53:13 +00:00
kfraser@localhost.localdomain effd10be68 Fix xencomm_copy_{from, to}_guest.
It should not call paddr_to_maddr() with invalid address.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-01-12 14:51:27 +00:00
kfraser@localhost.localdomain e04e1175e8 [IA64]: noreturn cannot be used if function may return
The functions die_if_kernel and vmx_die_if_kernel can certainly
return.  This disqualifies them from using the noreturn keyword
which is reserved for functions that never return.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2007-01-12 14:50:01 +00:00
kfraser@localhost.localdomain 043158a97f x86/PAE linux: don't restrict upper half of page table entries to 3 bits
when dumping the page table contents during an oops.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-01-12 14:48:06 +00:00
kfraser@localhost.localdomain f48232576f Fix trivial bug in xentop main loop.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-12 14:46:21 +00:00
kfraser@localhost.localdomain 8c8d60ad1a Add vfb config examples.
From: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-12 14:43:50 +00:00
kfraser@localhost.localdomain ce9e6668ac Parse Solaris VTOCs in pygrub.
Signed-off-by: John Levon <john.levon@sun.com>
2007-01-12 14:42:07 +00:00
kfraser@localhost.localdomain a84893ee09 [PV-on-HVM] Allow platform interrupt to be used for entropy.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-12 14:40:13 +00:00
kfraser@localhost.localdomain b7a3ba02bd x86: properly handle LOCK prefix in privileged PV opcode emulation
- include LOCK prefix presence in calculation of which CR/DR is being
  targeted by moves to/from these registers
- fail any other opcodes when beingused with lock prefix

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-01-12 14:38:30 +00:00
kfraser@localhost.localdomain 481f5a7ac0 Fix xc_ptrace() for PAE.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-01-12 14:33:36 +00:00
kfraser@localhost.localdomain 54ca5bdead Fix udev check.
Quiesce 'which' invocation, and allow expanding variables in error
message.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-01-12 14:32:41 +00:00
kfraser@localhost.localdomain 51baeaf819 [XEN] Fix guest-access macros.
From: Christoph Egger <Christoph.Egger@amd.com>
2007-01-12 14:22:28 +00:00
kfraser@localhost.localdomain a5e0c983d0 [XEN] Default to 80x50 VGA text console.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-12 10:48:46 +00:00
kfraser@localhost.localdomain e8922851b5 [LINUX] swiotlb: eliminate KM_SWIOTLB and thus the need for a Xen-specific kmap_types.h.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-01-12 10:31:16 +00:00
kfraser@localhost.localdomain 9f7105d6ac linux/i386: allow CONFIG_HIGHPTE on i386
While, as discussed, the performance impact of this option is
certainly higher than on native Linux, the option should not be
entirely disallowed if people want to sacrifice performance for less
lowmem pressure.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-01-12 10:28:54 +00:00
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
kfraser@localhost.localdomain 11ee9a5faa [XEN] Consistent assumption that PTEs contain MFNs in both ptwr
page-fault handler and ptwr emulation handler.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-12 10:13:25 +00:00