Commit Graph
649 Commits
Author SHA1 Message Date
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@tempest.cl.cam.ac.uk 99e88d6dd7 Trivial fixes for 64bit and xend.
Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-16 18:03:48 +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 cebb9d12a5 Change ISA_IO_BASE to fix_to_virt(FIX_ISAMAP_BEGIN). It used to be
PAGE_OFFSET, which was unaltered from vanilla Linux 2.6.12.6 kernels
and caused isa_memcpy_fromio() to not read physical memory from
0xf0000 - 0xfffff correctly.

http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=393

Signed-off-by: Andrew D. Ball <aball@us.ibm.com>
2005-11-16 11:39:38 +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 0b15c25a49 Add definitions of some swiotlb symbols to pci-dma.c.
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
2005-11-16 11:34:54 +01:00
kaf24@firebug.cl.cam.ac.uk 817d4d02cf /dev/mem write function should use copy_from_user, not copy_to_user.
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
2005-11-16 11:34:19 +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 7448bc78c5 Add function declarations, and ensure we prevent mismatch
of function definition vs. declaration.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
2005-11-16 11:28:12 +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 fcde973e26 Ensure we initialise the cpu_present_map before
topology_init() is called. In latest Linux kernels it
iterates over cpu_present_map rather than cpu_possible_map.

Also, save/restore should really iterate over
possible cpus, not present ones (not that it really matters,
but it's a small cleanup).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-15 18:43:28 +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 1cdce56648 Initialise secondary CPUs via an arch_initcall rather than
a subsys_initcall. This ensures that initialisation occurs
before topology_init().

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-15 11:28:01 +01:00
kaf24@firebug.cl.cam.ac.uk 7355824f56 Use make_lowmem_page_readonly/writable() in preference to the
generic functions where appropriate. This prevents us using the
generic functions early during boot, when pte_pfn() does not work
(because max_mapnr is not initialised).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-14 18:13:38 +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 6b9e8cc03b Merged. 2005-11-11 21:59:33 +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
smh22@firebug.cl.cam.ac.uk 58aaf6643c Fix make_page_readonly/make_page_writeable on PAE guests - previous behaviour
was incorrect when machine address > 4GB. We believe this fixes bugzilla #267. 

Also tidy up and fix show_page_walk.


Signed-off-by: Steven Hand <steven@xensource.com> 
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-11 19:02:49 +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 284be486e4 Max xen skbuff allocation is now 64KB. kmem caches only
get populated with objects on first allocation, so if large
caches end up being unused, they don't actually cost us
very much.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-11 11:01:32 +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 5076bff75d Blkfront no longer built by default, need CONFIG_XEN_BLKDEV_FRONTEND 2005-11-10 14:02:01 -06:00
kaf24@firebug.cl.cam.ac.uk 0f6857b3cd Fix Linux fault.c indentation.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-10 19:43:56 +01:00
smh22@firebug.cl.cam.ac.uk 65dcdd1ffe Fix page-table dump on PAE with >4GB MFNs.
Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-10 19:32:09 +01:00
djm@kirby.fc.hp.com cab735cf69 Fix typo 2005-11-10 09:07:47 -06:00
djm@kirby.fc.hp.com 093551c035 Merge latest xen-unstable into xen-ia64-unstable 2005-11-10 08:34:09 -06:00
djm@kirby.fc.hp.com 0add1f8a92 Adapt to new evtchn interfaces.
Signed-off-by Kevin Tian <kevin.tian@intel.com>
2005-11-10 08:18:25 -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 df1231853e When creating exception/interrupt stack frames for a guest,
set saved eflags.IF to !saved_upcall_mask. This allows the
guest to test interrupts-enabled in the interrupted context
in the same way as when running natively.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-10 15:03:33 +01:00
kaf24@firebug.cl.cam.ac.uk 79d289ec5f Enable export of set_nmi_callback in suitably priv 64-bit doms.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-10 11:58:39 +01:00
kaf24@firebug.cl.cam.ac.uk 84b8ebc5d3 Move linear faulting address (%cr2) out of the page fault
stack frame and into vcpu_info_t (in shared_info_t). This
makes the guest #PF handler much more similar to native.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-09 17:23:46 +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 d47fc2945e gnttab_request_free_callback needs to be exported for building modular
blkfront

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-11-09 14:41:37 +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
kaf24@firebug.cl.cam.ac.uk 4b6d60a8f0 Allow xen_create_contiguous_region() to fail gracefully if it
cannot allocate a contiguous multi-page extent of memory. This
should avoid unnecessary crashes in the xen-specific skbuff
cache constructor.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-09 14:39:32 +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 0444e5275d Fix alloc_skb() to ensure data is always physically contiguous.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-08 16:48:42 +01: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