Commit Graph
1385 Commits
Author SHA1 Message Date
kaf24@firebug.cl.cam.ac.uk d994f81846 [LINUX] Fix dependencies on CONFIG_PROC_FS.
Signed-off-by: Horms <horms@verge.net.au>
2006-06-17 08:56:02 +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
kfraser@dhcp93.uk.xensource.com 8d9ab5812a Merge with xen-ia64-unstable.hg. 2006-06-16 18:08:27 +01:00
awilliam@xenbuild.aw 02395c12da merge with xen-unstable.hg 2006-06-16 09:10:08 -06:00
kfraser@dhcp93.uk.xensource.com a2ee238fcf [LINUX] Use new XENMEM_exchange hypercall (where possible)
to provide watertight implementations that should never crash
in ENOMEM situations.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-16 14:45:01 +01:00
kaf24@firebug.cl.cam.ac.uk 12217db9c5 [LINUX] Export new gnttab_cancel_free_callback() to modules.
Signed-off-by: Charles Arnold <carnold@novell.com>
2006-06-16 10:52:49 +01:00
awilliam@xenbuild.aw 364f9d8028 merge with xen-unstable.hg 2006-06-15 10:23:57 -06:00
awilliam@xenbuild.aw 42162a97c0 [IA64] work around for skbuff_ctor() on non-privileged domain
populate physmap/increase reservation hypercall fail with
extent order > 0 on non-privileged domain.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-06-15 09:10:14 -06:00
awilliam@xenbuild.aw fc22e34ca6 [IA64] fix garbage in irq_ia64.c kernel message
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
2006-06-15 08:56:47 -06:00
kaf24@firebug.cl.cam.ac.uk 1bf1344c7c [LINUX][PAE] Fix e820 setup for PAE guests: preserve high-order bits of max_pfn.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-15 13:30:35 +01:00
kaf24@firebug.cl.cam.ac.uk d406847ecc [LINUX] Network buffers do not need to be multi-page contiguous
for unprivileged domains (in any case, can fall back to swiotlb).
On non-privileged domain of Xen/IA64, this caused some trouble.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-06-15 13:19:04 +01:00
kaf24@firebug.cl.cam.ac.uk aedc7640e6 [LINUX] Only destroy a machine-contiguous memory region if
it really is contiguous (e.g., create_contiguous did not fail).
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-15 11:35:23 +01:00
kaf24@firebug.cl.cam.ac.uk 45b1830267 [LINUX][PAE] More fixes to pgd allocation. Since allocating pmds
can sleep, we could race save/restore and end up with stale
machine addresses stores in pgd entries. Avoid this by
remembering virtuall addresses and translating to machine
addresses all at the end and protected by the pgd_lock.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-14 17:06:28 +01:00
kaf24@firebug.cl.cam.ac.uk 2fd80b3aac [NET] front: Discard packets in tx ring rather than attempting retransmit
when reconnecting to backend driver (e.g., after save/restore or migrate).

Two main reasons for this: 
 1. The retransmit code is broken for fragmented packets. It would need
    a rewrite to cope with the new scatter-gather format.
 2. We will drop packets anyway, in both directions (e.g., takes some
    time for received packets to be redirected to new virtual interface;
    also further transmitted packets from the network stack are dropped
    after we call netif_carrier_off(), so even if we retransmite what's
    already in the ring it is likely that some subsequent packets will
    already be lost).

If this causes downtimes that are too long (particularly for live
relocation) then the whole strategy for buffering packets while the
frontend-backend connection is severed needs to be considered.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-14 13:11:44 +01:00
kaf24@firebug.cl.cam.ac.uk e2f381e315 [LINUX][PAE] Improve allocation strategy when PAE pgdirs must be below 4GB.
Moving the re-allocation to low memory into pgd_alloc() has several
advantages:
 1. Avoids race with save/restore where pgdir may end up above 4GB after
    save/restore.
 2. If pgdir cannot be re-allocated we can return failure to the caller
    rather than BUG().
 3. Slightly reduces diff against native Linux code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-14 12:36:06 +01:00
kaf24@firebug.cl.cam.ac.uk be252f5f66 [LINUX][BLK] front: More care over device teardown.
1. We must ensure gnttab callbacks are disabled and all work
    flushed before tearing down device state. A new gnttab interface
    call is added for this purpose.
 2. blkif_free() must check for a request_queue before deref'ing it.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-14 11:19:53 +01:00
awilliam@xenbuild.aw af12de808b [IA64] Remove Makefile entry for xenia64_init
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-06-13 12:50:47 -06:00
awilliam@xenbuild.aw 3d089e3ba1 merge with xen-unstable.hg 2006-06-13 12:12:24 -06:00
awilliam@xenbuild.aw ba7d0c6127 [IA64] Define mfn_to_local_pfn()
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-06-13 11:41:05 -06:00
awilliam@xenbuild.aw e4f73d5c2a [IA64] Revert xen-ia64-unstable.hg cset 10237
back out the change set 10237 which causes domain creation failure.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-06-13 09:00:32 -06:00
awilliam@xenbuild.aw 59c720c672 [IA64] Revert xen-ia64-unstable.hg cset 10238
back out the change set 10238 which causes domU creation failure.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-06-13 08:59:26 -06: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 423ce9cf9e [LINUX] A better way to stop blkdev request handling in blkfront
driver.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-13 15:33:10 +01:00
kfraser@dhcp93.uk.xensource.com ade82aac45 [LINUX] Fix blkfront driver to check connection status to backend in
all critical circumstances.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-13 15:13:29 +01:00
kfraser@dhcp93.uk.xensource.com 063f4cc497 [LINUX] Export some tlb-flush functions to modules, which are
directly accessible via macros in tlbflush.h.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-13 14:08:37 +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
kfraser@dhcp93.uk.xensource.com ea266bc5e8 [LINUX] Fix code indentation in Linux drivers.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-12 18:32:47 +01:00
shand@chelmsford.uk.xensource.com 9f640de2b0 Fix race in device resume path - need to ensure we add the watch only
after the device-specific resume code has run. Also removed some unused / 
usless code from netfront.c. 

Signed-off-by: Steven Hand <steven@xensource.com>
2006-06-12 17:56:20 +01:00
kaf24@firebug.cl.cam.ac.uk b4bd6fd400 [LINUX] Fix interaction between idle loop and RCU subsystem.
There is a problem with the current implementation of stop_hz_timer in
arch/i386/kernel/time-xen.c where the hz timer can be stopped on a CPU
which has RCU callbacks pending.

This patch backports a new RCU API created to fix this problem for the
s390 implementation of stop_hz_timer and also updates the time-xen.c
implementation of stop_hz_timer to call the new API.

Signed-off-by: Harry Butterworth <butterwo@uk.ibm.com>
2006-06-12 14:17:05 +01:00
kaf24@firebug.cl.cam.ac.uk 7cc16fdd1b [LINUX] Clean up unused variable in mm/memory.c.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
2006-06-12 09:57:23 +01:00
kaf24@firebug.cl.cam.ac.uk 0f71d8d704 [LINUX] Fix IRQ SMP affinity logic for event channels.
The logic now mimics native x86 behaviour: a request to change
affinity via /proc is held until the next interrupt on that
event channel. So /proc/irq/n/smp_affinity may not change
immediately!
Other notes:
 1. CPU-specific interrupts silently ignore requests to change
    affinity. For example, resched0, timer0, callfunc0, ...
 2. Reading smp_affinity always returns a cpumask containing
    a single cpu. An event channel can only be bound to a single
    cpu at a time. Neither Xen nor XenLinux implement IRQ
    balancing: requires a user-space balancing daemon.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-11 09:54:35 +01:00
kaf24@firebug.cl.cam.ac.uk 6e9ae8d1e8 [LINUX] Remove the only use of evtchn_upcall_mask in common code.
Replace with an assertion of irq_disabled().
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-10 11:05:11 +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 92fffc0727 [LINUX][XENBUS] replace xenbus_transaction_t with an opaque transaction ID.
xenbus_transaction_t -> struct xenbus_transaction, which just contains
a single u32.  Also renamed XBT_NULL to XBT_NIL to emphasize that it
isn't a NULL pointer, but a NIL transaction ID.  Compile and boot tested.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
[chrisw: updated for xen-unstable from patchqueue]
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
2006-06-09 14:25:46 +01:00
kaf24@firebug.cl.cam.ac.uk 40c3d9a1be [LINUX][XENBUS] Drop (struct xenbus_device)->data, and simply use ->dev.driver_data
instead, since that's what it is there for.  Similar to patch
in patchqueue started by Jeremy, and expanded by me to include all
relevant drivers in xen-unstable.

Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
2006-06-09 14:23:50 +01:00
kaf24@firebug.cl.cam.ac.uk 893e7ced35 [LINUX][BLKTAP] This code doesn't compile, is marked as DANGEROUS, and
is said to be removed when block drivers use grant tables.
So let's remove it.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
2006-06-09 14:20:09 +01:00
kaf24@firebug.cl.cam.ac.uk e2a3e4897e [LINUX] Use structs not typedefs, remove trailing whitespaces, place symbol
EXPORTs with functions, order includes, eliminate unsed macros, don't
initialize static data to NULL, etc.  Cleanups from patchqueue.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
2006-06-09 14:13:18 +01:00
kaf24@firebug.cl.cam.ac.uk 720b2f61b3 [NET] front: There's a small leak on a couple error paths in setup_device().
While there rearrange the ring setup order slightly to simplify error
path since netif_free() will cleanup once ring_ref is valid.  And use
get_zeroed_page() instead of __get_free_page()/memset().  Handle error if
bind_evtchn_to_irqhandler() fails, as bad info->irq value is likely to
cause oops later.  In create_device(), gnttab_free_grant_references()
is accidentally called twice on tx_head during cleanup from failed
gnttab_alloc_grant_references() on rx_head, which could corrupt
gnttab_free_count.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
2006-06-09 14:10:32 +01:00
awilliam@xenbuild.aw 45758ec272 [IA64] sparse tree cleanups
Here's a first pass at some sparse tree cleanups based on feedback
 we've gotten on linux-ia64.  I haven't taken all of the comments into
 account yet, this is just a start.  Specific changes:

  - CONFIG_ARCH_XEN is no longer necessary
  - simple is_running_on_xen() checks can be handled w/o CONFIG_XEN
  - pulled forward a drivers/xen/Makefile change that broken make clean
  - changed some comments from C++ style to C
  - turned HYPERVISOR_ioremap into a macro for !CONFIG_XEN
  - made hypervisor.h and privop.h include-able for !CONFIG_XEN

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-06-08 10:17:22 -06:00
awilliam@xenbuild.aw eeecb3f9b9 [IA64] clean out xen/drivers/patches in the sparse tree
This is all old, unused code.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-06-08 10:15:09 -06:00
kaf24@firebug.cl.cam.ac.uk 80c6044fb3 [LINUX] swiotlb allocates multiple smaller contiguous DMA regions,
rather than a single big one.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-08 16:48:23 +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 3f63cf9724 [LINUX] Only trigger unhandled irq path if irq is not shared across
multiple guests (another guest may have handled the interrupt).
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-08 10:11:04 +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
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
awilliam@xenbuild.aw 478e357a66 [IA64] remove xenia64_init.c
Relocate the few bits left to ia64 specific parts of the tree.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-06-06 09:06:19 -06:00
kaf24@firebug.cl.cam.ac.uk d404680bc3 Use explicitly-sized types in the dom0_ops and privcmd structures.
As discussed previously, the these operations are not performance-sensitive, so
the additional cache footprint shouldn't be an issue.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-06-06 10:25:59 +01:00
kaf24@firebug.cl.cam.ac.uk ab8096f27d Represent PFNs with their own type, rather than 'unsigned long'.
('long' changes size and alignment between 32- and 64-bit ABIs.)
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-06-06 09:48:17 +01:00