Commit Graph
1136 Commits
Author SHA1 Message Date
kaf24@firebug.cl.cam.ac.uk a20dde6f0b In both i386 and x86-64 Linux, using a static variable (and thus
having the potential of missing synchronization there,
as I suspect exists in native Linux) is not needed with the hypercall 
approach. In the hypervisor, the patch adds the
needed synchronization.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-04-20 14:10:35 +01:00
kaf24@firebug.cl.cam.ac.uk b9d8354383 Clean up the xenoprofile hypercall interface.
Signed-off-by: Jose Renato Santos <jsantos@hpl.hp.com>
2006-04-19 18:43:39 +01:00
emellor@leeni.uk.xensource.com e264f7c0c4 Merged. 2006-04-15 19:25:21 +01:00
emellor@leeni.uk.xensource.com 3ae4ba6c3c Read the message type out of the message before sending it to xenstored, and
use that saved value when handling the reply.  Xenstored will leave the
message type intact, _except_ when returning an error, in which case it will
change the type to XS_ERROR.  This meant that we failed to remove a
transaction from our internal list if xenstored returned EAGAIN, as we did not
realise that the message was XS_TRANSACTION_END.  This manifested itself as
the intended behaviour until the connection was closed, at which point all of
those failed transactions would erroneously be aborted.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-04-15 19:25:09 +01:00
kaf24@firebug.cl.cam.ac.uk dcdbc9744c Touch softlockup watchdog while warning user about use of
tls libraries.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-15 10:16:05 +01:00
kaf24@firebug.cl.cam.ac.uk 40212eeb61 Restrict netfront to 256 grant references to avoid
exhausting the global pool.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-04-14 15:05:28 +01:00
kaf24@firebug.cl.cam.ac.uk eea1cdc7f4 Introduce gnttab_empty_grant_references() to check whether grant
references is empty.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-04-14 15:05:04 +01:00
kaf24@firebug.cl.cam.ac.uk 6afda10e40 Since we don't reset the proto_csum_blank flag in the skb, the
checksum calculation gets done twice, which is not twice as good as
once.

With this patch, TCP/UDP checksum errors from dom0 are fixed, and
domUs can use TCP/UDP without turning off TX checksum offload.  Normal
non-VLAN bridged configs still work fine, tested with xm-test.

Signed-off-by: Jim Dykman <dykman@us.ibm.com>
2006-04-14 14:23:40 +01:00
kaf24@firebug.cl.cam.ac.uk a56425fa9d Call move_irq() during evtchn ->ack irq hook functions. This
triggers SMP affinity work.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-14 11:58:49 +01:00
kaf24@firebug.cl.cam.ac.uk e90ce31de3 Must use __copy_to_user_inatomic() in swiotlb's sync_single()
function, as we cannot sleep there.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-14 11:58:11 +01:00
kaf24@firebug.cl.cam.ac.uk 9f15c912a7 Allow PCI-E and PCMCIA config on 64-bit Xenlinux.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-13 15:15:56 +01:00
kaf24@firebug.cl.cam.ac.uk ba4a95bee1 In some cases, say for instance for some bizzare reason
the tree was checked out of CVS, which doens't neccessarily
store file permissions, mkbuildtree may not be executable.
So run them explicitly via bash.

Signed-Off-By: Horms <horms@verge.net.au>
2006-04-13 11:24:00 +01:00
kaf24@firebug.cl.cam.ac.uk 42f8fcaf1b This fixes the state machine of the vTPM driver.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-04-13 10:59:08 +01:00
kaf24@firebug.cl.cam.ac.uk bf1d9dba35 Make grant table map/unmap argument, host_addr, feature-specific.
Introduce gnttab_set_map_op() and gnttab_set_unmap_op() to initialize.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-04-13 10:29:27 +01:00
emellor@leeni.uk.xensource.com f9eb14bf6a Reset the cached state to XenbusStateInitialising on resume -- we're connecting
to a new backend, so the state value needs to be reset.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-04-12 18:53:38 +01:00
kaf24@firebug.cl.cam.ac.uk 72344c0921 Netfront must switch state using xenbus_switch_state() or this
is not picked up by the waiting code in xenbus_probe.c.

Also clean up the waiting code a little.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-10 18:56:34 +01:00
kaf24@firebug.cl.cam.ac.uk 6c33dc4782 Add a new config option for all backend drivers. This has two benefits:
1. All backend drivers can be disabled or modularised via
    one config option.
 2. Backend helper routines that are not specific to any particular driver
    can be disabled or modularised based on this config option. In
    particular this may allow backend drivers plus the service module
    to be upgraded separate from the kernel core as and when the backend
    interfaces change (and they will).

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-10 18:30:07 +01:00
emellor@leeni.uk.xensource.com 45fe4ec419 Fix the test inside all_devices_ready, and move it from xenbus_probe (a
postcore_initcall) to a new late_initcall, so that it happens after the
drivers have initialised.

Fixes the reopened bug #549 (I hope).

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-04-10 18:17:54 +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
kaf24@firebug.cl.cam.ac.uk 9958cf7167 Do not disable spurious irq debugging in i386 xenlinux. It may
be masking underlying problems, and the problem it was intended
to work around should be fixed properly.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-07 13:41:58 +01:00
kaf24@firebug.cl.cam.ac.uk 97a7c0c266 Power down an x86 system directly within domain0 rather than
executing a shutdown hypercall. Domain0 is able to execute
ACPI power-off code.

Signed-off-by: Harry Butterworth <butterwo@uk.ibm.com>
2006-04-07 13:40:22 +01:00
kaf24@firebug.cl.cam.ac.uk 2ec558319c Clean up xenoprof code a bit. The main remaining TODO is to
clean up the xenoprof hypercall interface.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-07 11:00:28 +01:00
ack@kneesa.uk.xensource.com 08d906dfa1 merge 2006-04-06 18:58:39 +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 6e5243b328 Do not create blkback vbd kernel thread until fully connected
to frontend driver. Otherwise the kernel thread may crash trying
to access the non-existent shared ring.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-06 18:39:00 +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
smh22@firebug.cl.cam.ac.uk 9444c07bdb Fix long-standing save/restore bug on x86-64.
Signed-off-by: Steven Hand <steven@xensource.com>
2006-04-06 16:15:28 +01:00
kaf24@firebug.cl.cam.ac.uk 535f8b893f Clean up files created by the XenLinux boot-xen code.
Signed-Off-By: Magnus Damm <magnus@valinux.co.jp>
2006-04-06 15:25:26 +01:00
kaf24@firebug.cl.cam.ac.uk 66edd49a38 Add code to make handling domain poweroff/reboot symmetrical between
paravirtualized and fully virtualized.  This approach uses the new
sched_op to handle other domains than the current domain.  The new
code, SCHEDOP_remote_shutdown, is very much like SCHEDOP_shutdown, but
is called with the id of the domain which is to be shut down. This
allows fully virtualized shutdown and para-virtualized shutdown to be
identical from that point forward.

A paravirtualized domain uses sched_op to shut down and set the reason
code. This will send a VIRQ_DOM_EXC, which can be handled in dom0 by
control software.  In some ways, this resembles SIGCHILD/waitpid, and
is a reasonable model.

The fully virtualized case has qemu invoke xm directly. This is a
different path than paravirtualized. It also removes decision and
policy making choices from the rest of the control software and places
it within qemu. When any dom0 logic eventually gets a VIRQ_DOM_EXC,
the information about the domain is gone having been destroyed by xm.

A libxenctrl wrapper, xc_shutdown_domain has been added and qemu now
calls it.

As a freebie, #if 0 some very verbose logging code in qemu.  Totally
unrelated, but as long as I was there...

Signed-off-by: Ben Thomas <ben@virtualiron.com>
2006-04-06 15:24:00 +01:00
kaf24@firebug.cl.cam.ac.uk f0a187ecb7 Move misplaced CONFIG_KEXEC code chunk in setup-xen.c to its proper location.
From: Jan Beulich

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-06 15:22:46 +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
kaf24@firebug.cl.cam.ac.uk 564a3bf276 More simplifications to blkback:
1. Remove blkif->status field as it's really not needed.
 2. Simplify connection logic.
 3. Get rid of atomic_t io_pending. There's no need for
    atomic r-m-w updates to the work-to-do flag, so replace
    with an integer and add barriers where serialisation is
    required.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-06 11:34:14 +01:00
kaf24@firebug.cl.cam.ac.uk 3f7c9e7d7e Stupidly forgot there is a separate waitqueue for free pending request
structures in blkback. Fix my changes to blkif_schedule().

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-06 11:13:33 +01:00
kaf24@firebug.cl.cam.ac.uk 4e52e7ef09 Fix the blkif_schedule() kthread loop. Much simpler; much more correct.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-06 10:20:32 +01:00
kaf24@firebug.cl.cam.ac.uk 14713b052f Allow CONFIG_DEBUG_INFO to be specified when building
x86/64 XenLinux. Builds and boots fine. Leave the option
disabled by default, as with all other defconfigs.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-06 09:47:58 +01:00
kaf24@firebug.cl.cam.ac.uk 0773e2a340 Fix a problem that was caused by recent changes to the xenbus's
behavior that cause the .remove function not to be called anymore
during suspend. Due to that the driver allocated one more interrupt on
every suspend/resume cycle.  Otherwise some code reformatting,
cleanups and improvements on allocation and freeing of data structure.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-04-06 09:39:30 +01:00
kaf24@firebug.cl.cam.ac.uk 96e1e63322 Remove unused code in netback's net_rx_action():
new_mfn and old_mfn are set in the end half of the function
but they are not used.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-04-06 09:34:30 +01:00
kaf24@firebug.cl.cam.ac.uk fd7dd2c0ce Use PAGE_OFFSET instead of __PAGE_OFFSET in netfront.c.
__PAGE_OFFSET is not defined on all platforms.
Linux/ia64 and Linux/ppc don't have __PAGE_OFFSET definition.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-04-06 09:32:55 +01:00
kaf24@firebug.cl.cam.ac.uk 21f9f9f916 Remove unused teardown_irq() definition. Removes two files from sparse tree.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-06 09:22:00 +01:00
kaf24@firebug.cl.cam.ac.uk ad9f21014f There are a couple of bugs with the current handling of reads and writes
in the configuration space overlay functions. The wrong offset is passed
to the virtual field handlers. This patch uses the variable which
contains the correct offset. This patch also fixes the logic which
generates the actual value to write to a given virtual configuration
space field.

Signed-off-by: Ryan Wilson <hap9@epoch.ncsc.mil>
2006-04-05 10:52:10 +01:00
kaf24@firebug.cl.cam.ac.uk 1b7e15f112 Fix checksum-offload problems introduced in c/s 9514, due to
data_validated flag not being properly specified on the
device channel.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-05 10:37:37 +01:00
emellor@leeni.uk.xensource.com 15b8695184 The attached patch fixes a race condition that occurs if after the
backend has been removed there are still requests pending. This patch
flushed all the pending requests.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-04-03 18:32:43 +01:00
Ian.Campbell@xensource.com d3cf31ddb2 Handle failure to register the xen store event channel instead of
just not initialising xenbus/store when the supervisor_mode_kernel
feature flag is enabled.

When initialising grant tables only -ENOSYS is a valid reason
to fail so BUG_ON anything else like we did prior to changeset
9498.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-04-03 14:34:20 +01:00
kaf24@firebug.cl.cam.ac.uk 0c48c2080d Make checksum handling in the virtual network drivers more robust.
Largely this involves making the logic symmetrical: for example,
not only should netfront be able to tell netback that a packet has
an empty protocol checksum field, but the reverse must also be true.

Another change is that the drivers only advertise IP checksum
offload functionality. There is currently no information
propagated across the device channel about the offset of the
protocol-specific checksum field. Therefore it is not safe to
defer checksum calculation for protocols the remote end may not
understand -- it will end up dropping having to drop the packet.

Yet another change is to allow netback to disable tx checksum
offload, just as we already could for netfront. Currently there is
no support for disabling rx checksum offload -- that would seem
to require some way of propagating the checksum-offload advertisement
(or lack of it) across the device channel, as it really ought to be
the transmitter that acts on it.

Thanks to Ian Jackson for pointing out some of the problems with
our checksum-offload handling. Several of the changes here are
due to his comments.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-02 16:16:53 +01:00
kaf24@firebug.cl.cam.ac.uk 17e838d026 [IA64] Include features header in xenbus_probe and build features.c
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-04-01 10:37:36 +01:00
cl349@firebug.cl.cam.ac.uk 05c8070bb4 Fix do_IRQ high bit masking.
Instead of setting the highest bit (which isn't easily done on native x86_64),
negate the interrupt vector stored in orig_{e,r}ax.
Also add patch for native build.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-03-31 17:44:26 +01:00
kaf24@firebug.cl.cam.ac.uk e5829dcbe1 Plumb network vif credit-based rate limiting thorugh xenbus
and xend into xm guest config files.

A new vif parameter 'rate' is supported, with an optional time window
paremeter for specifying granularity of credit replenishment. The default
window is 50ms. For example:

 'rate=10Mb/s'  'rate=250KB/s'  'rate=1MB/s@20ms'

From: Chris Clark <christopher.w.clark@gmail.com>

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-31 15:34:52 +01:00
Ian.Campbell@xensource.com 5a5d245c8c Disable xen bus and grant tables when supervisor_mode_kernel is enabled.
Neither of these features are useful/available in this mode since only a
single domain is supported.

Do not attempt to initialise xen bus when supervisor_mode_kernel is
enabled.

Do not BUG_ON() failure to setup grant tables, future versions
of supervisor_mode_kernel may return -ENOSYS here. 

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-03-31 11:04:42 +01:00
kaf24@firebug.cl.cam.ac.uk f651bf191b The ia64 build doesn't yet include drivers/xen/Kconfig directly so we
need to replicate the new XEN_INTERFACE_VERSION option in the arch
Kconfig.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-03-31 10:06:20 +01:00
emellor@leeni.uk.xensource.com 62b8bcaf48 Merged. 2006-03-31 00:26:07 +01:00