Commit Graph
174 Commits
Author SHA1 Message Date
chris@ubuntu.eng.hq.xensource.com 45fb552eb2 Make set_pte_at and set_pte_at_sync macros instead of inline functions.
This avoids having to include sched.h to get a definition of init_mm.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-12-13 19:04:14 -07:00
kaf24@firebug.cl.cam.ac.uk e50c7df410 Make balloon driver arch-neutral.
Signed-off-by: Dan Magenheimer <dan.magenheimer@hp.com>
2005-12-08 15:33:10 +01:00
kaf24@firebug.cl.cam.ac.uk 8d547cb252 Simplify console driver and avoid unnecessary spinning in the
transmit handler.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-12-02 16:14:20 +01:00
kaf24@firebug.cl.cam.ac.uk 9bd97f28fa Bundle vcpu_time and vcpu_info structures together into a single
structure that is 64 bytes on x86. This ensures that indexing into
the array is fast (power-of-two size) and that accesses are cache
friendly (cache line size is usually 32 or 64 bytes).

Rename vcpu_data to vcpu_info, vcpu_time to vcpu_info.time.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-28 19:48:54 +01:00
kaf24@firebug.cl.cam.ac.uk 83120737f5 Implement new memory_op() XENMEM_machphys_mfn_list. Replaces old
privcmd Linux ioctl and includes an implementation for x86/64.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-25 18:43:35 +01:00
emellor@leeni.uk.xensource.com fefa6c7211 Move XenbusState from the Linux-specific xenbus.h into a new file with the Xen
public interfaces.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-25 11:19:03 +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
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
kaf24@firebug.cl.cam.ac.uk f2d946d367 Simplify arbitrary_virt_to_phys, and fix the x86/64 version to mask
out the NX bit.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-18 17:41:03 +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
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 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
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 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 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
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
djm@kirby.fc.hp.com 9b55020172 Merge xen-unstable into xen-ia64-unstable again (to get ioapic changes) 2005-11-07 20:40:31 -06:00
kaf24@firebug.cl.cam.ac.uk c60a806bc2 Fix pagetable pinning logic for xen/i386 kernels. The pin
flag is now associated with the pgd rather than the mm -- this
avoids a race where a pgd is allocated from the pgd_cache but,
before it gets associated with an mm, the kernel suspends itself.
At this point the kernel mappings will not get rewritten when the
kernel is resumed, and the system will fail.

A further advantage is that the code is slightly simpler and less
invasive (no changes to mm_context for example).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-07 18:14:45 +01:00
djm@kirby.fc.hp.com c179fd9015 Merge latest xen-unstable into xen-ia64-unstable 2005-11-07 11:13:38 -06:00
djm@kirby.fc.hp.com 15e7453af8 Minor driver code changes/rearrangement to reduce ia64-specific patches
Signed-off by: Dan Magenheimer <dan.magenheimer@hp.com>
2005-11-04 10:40:29 -06:00
djm@kirby.fc.hp.com c358323739 Enable test for running_on_xen from modules
Signed-off by: Dan Magenheimer <dan.magenheimer@hp.com>
2005-11-03 21:37:29 -06:00
sos22@douglas.cl.cam.ac.uk 0b76cfe422 Make SMP alternatives work under xenolinux rather than just native,
since part of it seems to have gotten lost.

Signed-off-by: Steven Smith, sos22@cam.ac.uk
2005-11-01 13:38:20 +01:00
emellor@leeni.uk.xensource.com 5b4535ea04 Change the grant table interface so that gnttab_end_foreign_access_ref returns
an error code if the page is still in use, and gnttab_end_foreign_access takes
a page to free.  This allows us to cope with frontends wanting to end access
while backends are still using pages by, eventually, placing the page and
grant table entry on a list, for freeing later.  At the moment, the page and
grant table entry are leaked, with a diagnostic.

Tidied up netfront.c's clean-up code.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-30 16:33:05 +01:00
kaf24@firebug.cl.cam.ac.uk 36e3401c27 New function direct_kernel_remap_pfn_range(). Like
direct_remap_pfn_range but doesn't take a vma and implicitly
maps into init_mm.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-20 12:10:14 +01:00
kaf24@firebug.cl.cam.ac.uk 5e91bc5c8a Fix -xen builds.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-18 19:28:16 +01:00
kaf24@firebug.cl.cam.ac.uk 0a105191a0 Merge i386/x86_64 smpboot.c into a simplified common Xen version.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-18 17:40:31 +01:00
emellor@leeni.uk.xensource.com ce4bbfbf11 Merged. 2005-10-17 16:23:26 +01:00
emellor@leeni.uk.xensource.com 706fcdf4de Have xenstored initialise its connections, meaning that xend can be out of
that loop completely -- the xc_init_store, initDomainStore calls can all go.

Have xenstored understand where the local domain information goes.  Xend no
longer has to generate a path and pass it to xenstored through
xs_introduce_domain -- we just allow xenstored to generate the path, and then
call GetDomainPath later.  There is still some work required to tidy this up.

Change the uuid module to generate uuids as lists of bytes, not in the
stringified form.  Added a unit test for that module.

Change the semantics of Xend restart, relying on these changes to the
xenstored semantics and earlier changes to add an opaque handle to the
hypervisor's domain-specific data block.  The semantics are now clearer, as
Xend can validate whether the details in the store match the current live
domain.

Added a usage statement to xenstored.

Some of this code is by Steven Hand.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-17 16:22:05 +01:00
kaf24@firebug.cl.cam.ac.uk dc66fe31f3 Remove useless SIF_XXX_BE_DOMAIN driver flags.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-17 15:54:28 +01:00
kaf24@firebug.cl.cam.ac.uk 3afe806f6f Make the event-channel pending and mask arrays consist of
longs. Thi sensures appropriate alignment for architectures
that require it, and also allows us to naturally support up
to 4096 event channels per 64-bit guest.

Moved 'n_vcpu' field from shared_info to start_info. Really it
ought to disappear altogether as the info can be derived from
xenstore.

Fix a weird bug in XendDomainInfo where 'vcpus' information for
a domain defaults to floating point value 1.0 rather than integer
1. This looks like a Python bug to me, but in any case it is
'fixed' by explicitly converting the default value to an integer.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-17 15:15:17 +01:00
kaf24@firebug.cl.cam.ac.uk 8ac022c344 Fix local_irq_save() and irqs_disabled() to be preemption-safe.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-16 11:45:51 +01:00
kaf24@firebug.cl.cam.ac.uk 37df894164 machine_specific_memory_setup() makes the following call to setup e820:
add_memory_region(0, PFN_PHYS(max_pfn), E820_RAM);

Since max_pfn is (rightly) an unsigned long, we overflow for the current
definition of PFN_PHYS. Attached is my preferred solution as it will
hopefully avoid similar situations that may come up in the future.

Signed-off-by: srparish@us.ibm.com
2005-10-14 22:15:21 +01:00
kaf24@firebug.cl.cam.ac.uk 9394398ccf Cleanup CPU hotplug and save/restore. Next step is to
simplify SMP initial boot and then should be easy to merge
i386 and x86/64 smpboot.c.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-13 17:08:59 +01:00
djm@kirby.fc.hp.com e57d870ddd Merged 2005-10-11 16:57:44 -06:00
kaf24@firebug.cl.cam.ac.uk 25517fd2f2 Extend xenbus/xenstore client interface to include a transaction
handle on appropriate operations. Next step is to plug this
through to the store daemon and get rid of the nasty serialisation
mutex for transactions.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-09 21:29:10 +01:00
kaf24@firebug.cl.cam.ac.uk 4657d174ab Refactor xenbus to break up the xenbus_lock and permit watches
to fire concurrently with request/reply pairs. Remove
watch_ack message: no longer needed.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-09 18:52:54 +01:00
djm@kirby.fc.hp.com 776ce3ec76 Update ia64 to keep up with core changes 2005-10-08 14:28:56 -06:00
djm@kirby.fc.hp.com c575162f2a Merge 2005-10-08 14:28:24 -06:00
djm@kirby.fc.hp.com 84c411d11e Add support for fast mov_to_kr privops
Signed-off by: Dan Magenheimer <dan.magenheimer@hp.com>
2005-10-08 11:37:45 -06:00
kaf24@firebug.cl.cam.ac.uk 5b013ee256 Rationalise xenstore header files a little. xenstored.h,
which defines aspects of the 'wire' protocol between
xs daemon and clients in user and kernel land, is now
xs_wire.h and moved to xen's public/io directory. From there
it is more easily accessible by kernels.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-07 16:49:29 +01:00
kaf24@firebug.cl.cam.ac.uk 79133a09fb Update kernel watch API to pass the array of watch arguments to the callback
instead of just passing the node.

This allows us to extend watches to have additional arguments (like domids).

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2005-10-07 15:52:43 +01:00
kaf24@firebug.cl.cam.ac.uk 5bd7984820 Remove bind_evtchn_to_irq/unbind_evtchn_from_irq from the
evtchn kernel interface. Fix error path in bind_evtchn_to_irqhandler.
Fix backend drivers to avoid double freeing IRQs.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-07 11:54:38 +01:00
kaf24@firebug.cl.cam.ac.uk e8c790c70c The attached fixes a few things to make the blkfront and netfront
drivers better follow the Linux driver model.  Changes include:
* Rename xenbus_register functions to more closely match what's used
with other buses.  Adjust callers
* There's no need to wait for the first vbd of vif and do a timeout if
they fail, device probing is async
* Add sysfs attributes for examining type and nodename
* Set device of gendisk so /sys/block/foo/device points to the right
place
* Set device of net_device so that /sys/class/net/foo/device points to
the right place

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-10-07 11:16:28 +01:00
kaf24@firebug.cl.cam.ac.uk f16cb294c5 Big simplification of the Xen event-channel interface.
EVTCHNOP_bind_interdomain in particular is much simpler.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-07 10:57:13 +01:00
kaf24@firebug.cl.cam.ac.uk 07a233ac7c User tools send evtchn notifications via /dev/xen/evtchn
rather than using hypercall directly.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-06 17:02:38 +01:00
kaf24@firebug.cl.cam.ac.uk c804adf4b6 Change how event channels are allocated and used by the control
tools. /dev/xen/evtchn is now used by daemons to connect to
remote domains: the advantage is that the local ports are garbage
collected automatically if the daemon dies. xen no longer
constructs end-to-end event-channel port pairs -- it allocates an
unbound port in new domU and writes that port to xenstore. It is
then picked up by teh appropriate daemon which does interdomain bind
via /dev/xen/evtchn.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-06 16:07:52 +01:00
kaf24@firebug.cl.cam.ac.uk e926a10696 Ensure that all fields of evtchn_op_t are initialised when
making an event_channel_op hypercall. Stefan Berger gets the
credit for diagnosing nasty domU driver problems that were a
result of garbage fields.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-06 10:42:32 +01:00
kaf24@firebug.cl.cam.ac.uk 1872f40d78 Clean up sched_op() hypercall interface. One particular
change to watch out for is that the suspend record, on
save/restore, is now passed via register %edx not %esi
(both i386 and x86/64).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-04 15:34:02 +01:00