Commit Graph
647 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
awilliam@xenbuild.aw 02395c12da merge with xen-unstable.hg 2006-06-16 09:10:08 -06: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
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 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 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
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 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 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 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
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 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
kfraser@dhcp93.uk.xensource.com 542ad2f200 [NET] front: Turn grant-ref error into a fatal bug. That's the best we
can do until we have a backend driver recovery method.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-06 08:21:31 +01:00
kaf24@firebug.cl.cam.ac.uk 42d838e49b [NET] back: Add a few comments to the goriest parts of the scatter-gather patch.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-05 17:03:19 +01:00
kaf24@firebug.cl.cam.ac.uk 8267025532 [NET] front: Transmit SG packets if supported
This patch adds scatter-and-gather transmission support to the frontend.
This allows the MTU to be raised right now and the potential for TSO in
future.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-06-05 16:33:49 +01:00
kaf24@firebug.cl.cam.ac.uk 99812f4013 [NET] back: Add SG support
This patch adds scatter-and-gather support to the backend.  It also
advertises this fact through xenbus so that the frontend can detect
this and send through SG requests only if it is supported.

SG support is required to support skb's larger than one page.  This
in turn is needed for either jumbo MTU or TSO.  One of these is
required to bring local networking performance up to a level that
is acceptable.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-06-05 16:13:47 +01:00
kaf24@firebug.cl.cam.ac.uk 08f2d66ff6 [NET] back: fix synchronisation of access to deallocation buffer ring.
Must ensure ring is written to before producer index is incremented.
Bug diagnosed by Ky Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-05 15:14:58 +01:00
kaf24@firebug.cl.cam.ac.uk e16b4fa8fe [NET] loopback: Added support for SG
Just like the standard loopback device, SG support here is innate.
So all we need to do is mark it as such and zero the change_mtu method
so that the MTU can be changed at will.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-06-02 12:19:33 +01:00
kaf24@firebug.cl.cam.ac.uk 413629e69f Add backing support for HDIO_GETGEO ioctl to blkfront.
Inspired by an earlier patch from Charles Coffing.
Signed-Off-By: Jan Beulich <jbeulich@novell.com>
2006-06-02 12:13:34 +01:00
kaf24@firebug.cl.cam.ac.uk 6d747ccc8f [PAE] Fix support for pgdirs above 4GB. Requires an interface change so that %cr3
is extended to include high-order address bits at bottom of %cr3 value.
Guests who understand this interface change publish the fact by setting the
option 'PAE=yes[extended-cr3]' in their __xen_guest section.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-02 11:46:24 +01:00
kaf24@firebug.cl.cam.ac.uk a0746b30b0 [LINUX] Fix cpu_possible_map initialisation.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-01 19:14:42 +01:00
kaf24@firebug.cl.cam.ac.uk 296d1a2fd4 [LINUX] Converge ia64 versions of xen/drivers Makefiles with general versions.
This patch converges the ia64-specific and general versions of
xen/drivers/Makefile and xen/drivers/core/Makefile, using Kconfig
settings instead to control whether specific pieces are built.

Signed-off-by: Aron Griffis <aron@hp.com>
2006-06-01 18:29:23 +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
kaf24@firebug.cl.cam.ac.uk a3b519a9b5 [BALLOON] Remove the static lower bound on memory target from balloon driver.
Experimentation an discussion on xen-devel concludes that a dynamic method
for determining safe balloon size will be required.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-05-30 12:28:46 +01:00
kaf24@firebug.cl.cam.ac.uk e8ea99cff2 Fix SMP boot for kernels without CONFIG_HOTPLUG_CPU.
The function cpu_is_allowed() appears that it should return a boolean
but in fact returns zero on success and an errno on failure. Thus
rename it to the more vague cpu_up_check(), in line with its return
value and thge fact it has unspecified side effects.

Fix the macro definition of cpu_up_check() when building non-hotplug
kernel to return zero rather than one (which always failed secondary
cpu bringup!).

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-05-28 09:46:30 +01:00
kaf24@firebug.cl.cam.ac.uk 7dbca9d720 Remove net_driver_util module. Inline the one mac-parsing function
into the netfront and netback drivers. Take the opportunity to fix
the mac-parsing logic.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-05-25 22:57:44 +01:00
kaf24@firebug.cl.cam.ac.uk f7040135b3 Allow compat hypercalls to be made via privcmd (to support older userspaces).
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2006-05-25 21:24:47 +01:00
kaf24@firebug.cl.cam.ac.uk 1ec81e8864 [BALLOON] Do not allow target to be set below two percent of maximum
memory size.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-05-25 14:54:43 +01:00
kaf24@firebug.cl.cam.ac.uk c669499b45 Do not include asm/fixmap.h directly from non-arch-specific Linux files.
Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
2006-05-25 14:47:23 +01:00
kaf24@firebug.cl.cam.ac.uk 4cebc4c9b2 [NET] front: Use netif_carrier to model backend-connection state.
The tristate backend_state really only needs to be a boolean.  In fact
other virtualisation network drivers such as the s390 already model this
using netif_carrier_*.  So by converting backend_state over to the net
carrier flag we can tap into existing infrastructure rather than creating
new ones.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-05-25 14:29:21 +01:00
kaf24@firebug.cl.cam.ac.uk f7ea0be1ff Separate xenbusstate enumeration from typedef. Avoid using the typedef
in Linux coe as it is consider bad coding style.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-05-25 14:15:49 +01:00
kaf24@firebug.cl.cam.ac.uk f12403a5ea Remove unnecessary x86-specific mapping code from privcmd interface.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-05-24 14:49:24 +01:00
kaf24@firebug.cl.cam.ac.uk 300fe48878 Event-channel driver: Use for_each_possible_cpu instead
of for_each_cpu , or statically initialize data when possible.
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
2006-05-24 12:01:25 +01:00
kaf24@firebug.cl.cam.ac.uk 56d1a3fa40 Fix kcons_write and kcons_write_dom0 CodingStyle.
Use roundup_pow_of_two().

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
2006-05-24 11:57:37 +01:00
kaf24@firebug.cl.cam.ac.uk 9c62f76963 Use DEFINE_SPINLOCK in Linux drivers, conforming to coding style.
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
2006-05-24 11:56:40 +01:00
kaf24@firebug.cl.cam.ac.uk c9d2f9fc59 Move Xen CPU hotplug code into new file cpu_hotplug.c.
Cleaner and allows use by architectures which aren't currently
using Xen's smpboot.c.

Based on an original patch by Tristan Gingold.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-05-23 12:05:08 +01:00
kaf24@firebug.cl.cam.ac.uk 1e36436a10 [NET] front: Remove duplicate maybe_wake_tx
Since network_tx_buf_gc unconditionally calls network_maybe_wake_tx at
the end, there is no need to call it again right after a call to
network_tx_buf_gc.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-05-19 15:58:46 +01:00
kaf24@firebug.cl.cam.ac.uk cd04d3a538 [NET] front: remove use of typedefs for structures.
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
2006-05-19 15:51:26 +01:00
kaf24@firebug.cl.cam.ac.uk c00e364b1f Introduce is_running_on_xen() to test whether we are running on Xen before
initialising a Xen-specific driver or subsystem.

For ia64:
 * Call xen_init in setup_arch.
 * Remove xen_ksyms.c

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
2006-05-19 15:35:19 +01:00