Commit Graph
319 Commits
Author SHA1 Message Date
kaf24@firebug.cl.cam.ac.uk b588d4451a Update vtpm driver following the recent changes to the
xenbus driver and its semantics.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2005-11-25 09:14:01 +01:00
emellor@leeni.uk.xensource.com c039c43deb Added a count of the number of users of this block device, and refuse to close
down the frontend until that number becomes 0.  There are no reasonable
semantics for hot-unplugging a block device beneath a mounted filesystem, and
this solution ensures that the guest is not crashed nor the filesystem corruptedby the actions of the administrator.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-24 19:53:09 +00:00
emellor@leeni.uk.xensource.com 2128c9ba49 Minor tidy, no semantic change.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-24 15:52:42 +00:00
emellor@leeni.uk.xensource.com f6d80a7f57 Reverse accidental commits for changesets 8001 and 7996-7999.
The Mercurial Queues extensions suddenly looks a lot less useful than it first
seemed.
 
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-23 19:37:33 +00:00
emellor@leeni.uk.xensource.com d64896a9f0 Merged. 2005-11-23 19:31:22 +00:00
emellor@leeni.uk.xensource.com 96e138a54d Merged. 2005-11-23 19:19:04 +00:00
emellor@leeni.uk.xensource.com 034f2cd52e Inside xenbus_switch_state, don't write the new state if the node has already
disappeared.  This happens when the driver is being torn down, and we don't
want to resurrect the device directory in the store because of it.

Partially addresses bug #424.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-23 18:47:54 +00:00
emellor@leeni.uk.xensource.com d29719d231 Added a hotplug KOBJ_OFFLINE call, for symmetry with the ONLINE call used here.
We need a hook to be able to close down the device properly, but the REMOVE
event is no good because we don't get the script and vif environment variables
set in that case.

Closes bug #417.
 
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-23 18:45:57 +00:00
kaf24@firebug.cl.cam.ac.uk 5a808f1e05 Add __iomem and __user pointer annotations to linux sparse tree.
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
2005-11-23 14:14:01 +01:00
smh22@firebug.cl.cam.ac.uk 1366ee55cc Avoid GPF when attempting to save / restore 64bit guests. More thought
required as to best way to get M2P mfns under 64...

Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-22 19:10:50 +01:00
kaf24@firebug.cl.cam.ac.uk a1584b36b2 Change semantics of gnttab_transfer to take the page away
from the calling domain, even on error (except for special
error GNTST_bad_page). This has a knock-on advantage of
simplifying Linux's netback driver.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-21 18:10:35 +01:00
kaf24@firebug.cl.cam.ac.uk 0200af138e Fix grant-table transfer implementation. Also fix transfer
error paths in network frontend and backend drivers.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-21 14:17:50 +01:00
cl349@firebug.cl.cam.ac.uk a69feeba51 Move tpmfe.h file next to other xen specific header files.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>


--HG--
rename : linux-2.6-xen-sparse/include/linux/tpmfe.h => linux-2.6-xen-sparse/include/asm-xen/tpmfe.h
2005-11-19 02:27:20 +01:00
emellor@leeni.uk.xensource.com eaa3641b4f Merged. 2005-11-18 14:30:47 +01:00
kaf24@firebug.cl.cam.ac.uk de70603843 Remove conditionally-compiled code for Linux 2.4.
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
2005-11-18 13:46:18 +01:00
emellor@leeni.uk.xensource.com 3700b1715b Initialise the request ID in xs_talkv, to silence valgrind. We're not actually
using this value at the moment -- it's only there for use by future clients.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-17 20:20:44 +01:00
smh22@firebug.cl.cam.ac.uk b4c7ff25ae Fix race in blkfront resume path (watch thread could fire watch during the
(short-ish) time that we were in BLKIF_STATE_DISCONNECTED). 

Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-17 14:56:50 +01:00
emellor@leeni.uk.xensource.com 56bb0fdcd9 Merged. 2005-11-17 12:12:57 +01:00
emellor@leeni.uk.xensource.com 439bebba61 Here's the patch for making the otherend_changed entrypoint
optional.  The USB driver doesn't need this entrypoint because the state
machine driven by it is factored out of the driver code entirely into
xenidc.

Signed-off-by: Harry Butterworth butterwo@uk.ibm.com
2005-11-17 11:54:52 +01:00
kaf24@firebug.cl.cam.ac.uk 77625388ed Fix IOCTL_PRIVCMD_GET_MACH2PHYS_MFNS to work properly for
4MB superpages (32-bit non-pae).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-17 11:47:49 +01:00
smh22@firebug.cl.cam.ac.uk 4c908cf0e3 Many fixes for save/restore and related areas for PAE in particular. Now
should be able to save/restore successfully on machines with up to 16GB 
and any size of guest. 

Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-16 17:45:03 +01:00
kaf24@firebug.cl.cam.ac.uk 250a814ea4 Remove unnecessary cast of kmalloc() result.
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
2005-11-16 11:35:26 +01:00
kaf24@firebug.cl.cam.ac.uk 7cfd98e2f1 Correctly export xencons functions to avoid ugly 'extern'
declarations.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
2005-11-16 11:32:19 +01:00
kaf24@firebug.cl.cam.ac.uk 4f114eacb2 Fix function that shouldn't be globally defined.
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
2005-11-16 11:30:32 +01:00
kaf24@firebug.cl.cam.ac.uk 119496c00d Trivial coding style fix.
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
2005-11-16 11:29:52 +01:00
kaf24@firebug.cl.cam.ac.uk b30b10f57a Replace 0 with NULL when assigning pointer fields/parameters.
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
2005-11-16 11:27:19 +01:00
kaf24@firebug.cl.cam.ac.uk 3741b397bd Fix 64-bit build that I broke by making acpi table mapping
fixup dependent on CONFIG_XEN_X86 (that only xen/i386
defines).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-15 19:46:48 +01:00
kaf24@firebug.cl.cam.ac.uk 84cf021917 acpi change is Xen/x86 specific, so make it dependent on
CONFIG_XEN_X86.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-15 17:02:37 +01:00
kaf24@firebug.cl.cam.ac.uk 1ae4120aa8 Declare local variables at the start of a block, not in the middle
(ISO C constraint).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-14 11:47:38 +01:00
kaf24@firebug.cl.cam.ac.uk 26ed038491 Clean up xenstore/console shared page initialisation, which is
now handled solely by the domain builder.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-14 11:36:42 +01:00
kaf24@firebug.cl.cam.ac.uk 3947efa1c2 Revert accidentally applied changes from changeset
7783:5aad7e145e501fbfb346954950a33b042a963633.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-14 11:35:50 +01:00
kaf24@firebug.cl.cam.ac.uk e7b975b0b6 If /sbin/ isn't in the path, udev rules will erroneously not get
installed.

Signed-off-by: Nivedita Singhvi <niv@us.ibm.com>
2005-11-14 11:05:34 +01:00
emellor@leeni.uk.xensource.com 2654fdd1f6 New Xenbus driver structure, bringing an explicit state machine to the table.
This will make the drivers more robust to failure of the other end, and makes
current driver state more visible.  It also allows us to bring very similar
pieces of code from the drivers together into the xenbus driver.  This should
be the start of a fix to the problem with block and net device hotplugging,
because the code was previously confused about the difference between the
connection state of the kernel device layer, and the state of the xenbus
communication.  This confusion is addressed here.

Much of this work is influenced by Rusty Russell's skeleton driver, recently
posted to xen-devel, as that piece made suggestions as to structure and
arrangement that have been taken on board, albeit pushed down into the xenbus
layer.

A new file xenbus_client.c has been added.  This file implements the interface
between the xenbus layer and the layer specific to the driver.  Access to
lower layers is still allowed for those who do not need all the facilities of
the new driver.

xenbus_dev_error has moved from xenbus_xs.c into xenbus_client.c, and
xenbus_dev_ok has been removed, in favour of xenbus_switch_state.

DevController.py now closes down a device by writing a change to the Closing
state on the backend, to allow the frontend time to close down properly.  Its
also writes the frontend and backend details within the same transaction.

The timeout on the hotplug scripts has been cranked down from 2 minutes to 5
seconds.

The diagnose script has been updated to parse the new states.

The blktab and tpm drivers have yet to be ported to this structure.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-11 21:59:05 +01:00
emellor@leeni.uk.xensource.com 65052bf1d8 New location for code common to both netfront and netback, with the MAC parsing
pulled here.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-11 17:59:20 +01:00
kaf24@firebug.cl.cam.ac.uk 7be6aca3ad Missed two files from NULL-pointer-check changeset.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-11 14:54:20 +01:00
kaf24@firebug.cl.cam.ac.uk f8e8438eef Remove unnecessary NULL checks before freeing memory blocks.
The following functions check for NULL internally:
 free, kfree, xfree, free_xenheap_page[s]

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-11 12:55:47 +01:00
kaf24@firebug.cl.cam.ac.uk 5aa99be215 Merge with xen-unstable-ia64.hg 2005-11-11 10:47:43 +01:00
kaf24@firebug.cl.cam.ac.uk 41317fc7d5 Remove unnecessary ifdef in defn of xprintk. Install
xenguest.h.
Signed-off-by: Joseph Cihula <joseph.cihula@intel.com>
2005-11-11 10:39:20 +01:00
djm@kirby.fc.hp.com 093551c035 Merge latest xen-unstable into xen-ia64-unstable 2005-11-10 08:34:09 -06:00
kaf24@firebug.cl.cam.ac.uk 4440e29b50 Indirect writes to phys_to_machine_mapping array through an inline
function defined in page.h.

For self-migration, I need the ability to trap writes to the p2m map
during migration, because I keep a dictionary mapping mfns to pfns,
which I use for remapping the page tables once I am on the other side.

Signed-off-by: Jacob Gorm Hansen <jacobg@diku.dk>
2005-11-10 15:16:01 +01:00
kaf24@firebug.cl.cam.ac.uk 2ea876d2a0 Attached patch allows building of netfront and blkfront as modules
(xennet.ko and xenblk.ko).  

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-11-09 14:42:15 +01:00
kaf24@firebug.cl.cam.ac.uk 69e309b3b1 Remove use of get_gendisk in blkfront gen_gendisk is no long exported
by 2.6 kernel. Now blkfront can be built as a kernel module.

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-11-09 14:41:14 +01:00
djm@kirby.fc.hp.com 64123904fb Fix domU (by Kevin Tian) 2005-11-08 12:15:55 -06:00
kaf24@firebug.cl.cam.ac.uk 366aac2d16 Rationalise the kernel event-channel binding interfaces. The
new interfaces are simpler and should be implementable by any
architecture.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-08 15:58:31 +01:00
emellor@leeni.uk.xensource.com 7aa98216f5 Increase the static constant default number of loopback interfaces, nloopbacks,
to 8.  These interfaces are very cheap, so there's no problem having a few
spare.  Anyone with more than 8 NICs can still use the kernel command line or
the module parameter line to pass a larger limit to this module.

Detail the kernel command line parameter for nloopbacks in the diagnostic in
network-bridge.

Closes bug #381.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-08 15:15:02 +01:00
djm@kirby.fc.hp.com 7d9cb9cf9b Missed ia64 changes to one drivers/xen file 2005-11-07 11:25:59 -06:00
djm@kirby.fc.hp.com c179fd9015 Merge latest xen-unstable into xen-ia64-unstable 2005-11-07 11:13:38 -06:00
kaf24@firebug.cl.cam.ac.uk 676ad5da47 fast_flush_area() should index the unmap request array using
invcount, not i. Also, fix initialisation of pending_grant_handles:
it was happening too late, and the use of memset() was bogus.

Signed-off-by: Harry Butterworth <butterwo@uk.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-07 12:52:49 +01:00
kaf24@firebug.cl.cam.ac.uk 93859a896b Fix error path in blkback driver where a grant mapping in the
middle of a batch fails. Spotted by Harry Butterworth (IBM).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-06 17:50:24 +01:00
smh22@firebug.cl.cam.ac.uk 6054f20239 Quiet down balloon driver.
Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-05 10:55:38 +01:00