Commit Graph
496 Commits
Author SHA1 Message Date
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 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
awilliam@xenbuild.aw b4fa7c40e9 merge with xen-unstable.hg 2006-04-11 18:54:18 -06: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
awilliam@xenbuild.aw 6728b1f190 [IA64] dom0 vp model linux part: import agp.h from linux-2.6.16-rc3
[note: verified same as linux-2.6.16]

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-04-07 14:06:44 -06:00
awilliam@xenbuild.aw 4975601849 [IA64] dom0 vp model linux part: import machvec.h from linux-2.6.16-rc3
[note: verified same as linux-2.6.16]

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-04-07 14:05:40 -06:00
awilliam@xenbuild.aw d8db9ef619 [IA64] dom0 vp model linux part: import dma-mapping.h from linux-2.6.16-rc3
[note: verified same as linux-2.6.16]

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-04-07 14:04:28 -06:00
awilliam@xenbuild.aw 06eac1001e [IA64] dom0 vp model linux part: import pgalloc.h from linux-2.6.16-rc3
[note: verified same as linux-2.6.16]

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-04-07 14:02:31 -06:00
awilliam@xenbuild.aw c713fd1cd3 [IA64] dom0 vp model linux part: import page.h from linux-2.6.16-rc3
[note: verified same as linux-2.6.16]

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-04-07 14:01:13 -06:00
awilliam@xenbuild.aw adf86bd46a [IA64] dom0 vp model linux part: import io.h from linux-2.6.16-rc3
[note: verified same as linux-2.6.16]

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-04-07 13:46:23 -06: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 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
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 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 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
emellor@leeni.uk.xensource.com 62b8bcaf48 Merged. 2006-03-31 00:26:07 +01:00
emellor@leeni.uk.xensource.com f207095aac Remove the transaction parameter from xenbus_switch_state and move the state
switch out of a transaction, in the few cases where it is inside one.

In order to behave properly, it is necessary for a driver to know its own
xenbus state (see changeset 9469:b3cb19d2b07f, for example).  This
value is stored as xenbus_device.state and updated by xenbus_switch_state.

If xenbus_switch_state occurs within a transaction, then there is a possibility
that the transaction would be aborted, leaving the state field dangerously out
of sync with the value currently in the store.

This fixes recent problems seen whereby bringing multiple devices up at the
same time results in some devices not coming up (often all of the even-numbered
ones, because of the pattern of transaction conflict).

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-31 00:24:54 +01:00
awilliam@xenbuild.aw abab07c253 [IA64] Merge vpsr.i with evtchn_upcall_mask tosolve one trickish bug
Per agreement on the summit, xen/ia64 will move to event channel
model same as xen/x86, under which event is the layer under pirq
(external interrupt), virq, and ipi with the latter three bound
to event ports. Within that model, no external interrupt will be
injected directly and evtchn_upcall_mask is the flag to  control
whether events are deliverable.

So xenlinux needs to operate evtchn_upcall_mask at all places 
where it originally operates vpsr.i. However these two flags are
presented at different shared area, and thus xenlinux can't ensure
atomical update on two flags which leaves severe stability issues.
One severe bug comes for this reason where some hypercall may be
restarted infinitely when events pending.

Actually based on description of future model, events become the
superset of external interrupts and thus evtchn_upcall_mask super-
set of vpsr.i (interrupt_delivery_enable). We can merge two flags
into one by removing the latter. By this way, we ensure correctness
and most importantly conform to common code which always assumes
upon evtchn_upcall_mask. 

Signed-off-by Kevin Tian <kevin.tian@intel.com>
2006-03-30 09:55:26 -07:00
cl349@firebug.cl.cam.ac.uk 13678d4465 Remove __HYPERVISOR_sched_op_new in favour of a header file interface version number system.
Define interface version in Kconfig and define it through CPPFLAGS for
C and assembly file compilation.
Add HYPERVISOR_{yield,block,shutdown} to remove direct use of sched_op
from guest code.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-03-30 17:50:44 +01:00
kaf24@firebug.cl.cam.ac.uk fd8719a931 Clean up and fix VCPU hotplug and SMP save/restore.
1. No longer hold xenbus_lock while taking down VCPUs
    in SMP suspend path. This allows block device hotplug
    to continue working and so we will not deadlock on
    paging in userspace hotplug code.
 2. Track xenbus and local-admin permitted cpumasks for 
    VCPUs to bring online. So, if a local admin takes a
    CPU down, that won't surprisingly get overridden next
    time the kernel interrogates xenstore.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-28 18:43:30 +01:00
awilliam@xenbuild.aw aba2f778df merge with xen-unstable.hg 2006-03-28 08:54:58 -07:00
cl349@firebug.cl.cam.ac.uk e8e51446b5 Remove special handling of {set,clear}_in_cr4().
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-03-28 10:09:44 +01:00
awilliam@xenbuild.aw 1d0e975ead [IA64] fix build breakage
Looks like we do need to include asm/hypercall.h

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-03-24 11:36:22 -07:00
awilliam@xenbuild.aw 11525d7477 [IA64] obvious compilation fix (hypercall.h, hypervisor.h)
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-03-24 10:36:14 -07:00
kaf24@firebug.cl.cam.ac.uk c671da80d2 Rename generic_page_range as apply_to_page_range, export the symbol
to GPL modules. Rename pte_page parameter to pmd_page (following the
Linux idiom). apply_to_pte_range() should take the pte spinlock.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-23 15:30:00 +01:00
kaf24@firebug.cl.cam.ac.uk c048a39db2 Paravirtualise the CPUID instruction by forcing emulation with an invalid-opcode prefix.
This allows to clear feature flags and hide unsupported features from guests.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-22 19:05:50 +01:00
kaf24@firebug.cl.cam.ac.uk ea509d3a44 Use shiny new mutexes instead of semaphores where possible in our Linux code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-22 11:55:43 +01:00
kaf24@firebug.cl.cam.ac.uk 8d9256b041 Licensing clarifications in Linux source files:
1. Make it clear in all dual-licensed files that the
    license when distributed with Linux is GPLv2.
 2. Add MODULE_LICENSE(dual) in a few places.
 3. Change many of our EXPORT_SYMBOL() decls to EXPORT_SYMBOL_GPL().
    This is the preference of the Linux maintainers, and avoids any
    trouble down the road if our EXPORT_SYMBOL'ed functions use Linux
    internal interfaces that are GPL only.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-22 11:30:57 +01:00
kaf24@firebug.cl.cam.ac.uk 728b3dab17 Creates a module that exports Xen Hypervisor attributes to sysfs. The
module has a tri-state configuration so it can be a loadable module.

Views the hypervisor as hardware device, uses sysfs as  a scripting
interface for user space tools that need these attributes.

Some user space apps, particularly for systems management, need to
know if their kernel is running in a virtual machine and if so in
what type of virtual machine. This property is contained in the
file /sys/hypervisor/type.

The file hypervisor_sysfs.c creates a generic  hypervisor subsystem
that can be linked to by any hypervisor. The file xen_sysfs.c exports
the xen-specific attributes.

Signed-off-by: Mike D. Day <ncmike@us.ibm.com>
2006-03-21 12:17:19 +01:00
kaf24@firebug.cl.cam.ac.uk ed87d736e9 merge with xen-ia64-unstable.hg 2006-03-18 10:59:11 +01:00
cl349@firebug.cl.cam.ac.uk ce0bcf0e64 Update to Linux 2.6.16-rc6.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>


--HG--
rename : patches/linux-2.6.16-rc5/i386-mach-io-check-nmi.patch => patches/linux-2.6.16-rc6/i386-mach-io-check-nmi.patch
rename : patches/linux-2.6.16-rc5/net-csum.patch => patches/linux-2.6.16-rc6/net-csum.patch
rename : patches/linux-2.6.16-rc5/pmd-shared.patch => patches/linux-2.6.16-rc6/pmd-shared.patch
rename : patches/linux-2.6.16-rc5/smp-alts.patch => patches/linux-2.6.16-rc6/smp-alts.patch
2006-03-18 00:12:26 +00:00
awilliam@xenbuild.aw 824bd8fc88 [IA64] remaining privified insns removed
Privified insns replaced by hyperprivops.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
2006-03-16 12:20:59 -07:00
awilliam@xenbuild.aw 499341ff62 [IA64] remove warning of xen_init()
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
2006-03-15 08:20:28 -07:00
awilliam@xenbuild.aw 44784246fc merge 2006-03-14 13:50:35 -07:00
kaf24@firebug.cl.cam.ac.uk badff410e4 Define a new sched_op hypercall called sched_op_new, which differs from the
legacy hypercall in that it takes a pointer to a block of extra arguments
rather than an opaque unsigned long. The old hypercall still exists, for
backwards compatibility.

The new hypercall supports new sub-command SCHEDOP_poll, which can be used to
wait on a set of event-channel ports with an optional timeout. This is exported
in XenLinux as HYPERVISOR_poll, and used in the pcifront driver to wait on a
response from the pciback driver.

Can also be used for debuggers. :-)

Signed-off-by: Keir Fraser <keir@xensource.com>
Signed-off-by: John Levon <john.levon@sun.com>
2006-03-14 19:33:45 +01:00
kaf24@firebug.cl.cam.ac.uk d82dd13c9e Fix PAE ptep_get_and_clear_full(). The fast path requires us to manually clear
the low half before the high half. Otherwise the compiler may reorder the writes
and validation in Xen will fail.

From: Jan Beulich
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-14 15:25:33 +01:00
kaf24@firebug.cl.cam.ac.uk 1e0419bfee No need to pin/unpin intermediate pagetables in x86/64 xenlinux.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-12 19:37:38 +01:00
awilliam@xenbuild.aw 5950e11777 [IA64] compilation fix hypercall.h
it refers dom0_op_t.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-03-10 09:18:52 -07:00
cl349@firebug.cl.cam.ac.uk 16c73f7f6c Map grant table pages in vmalloc kernel address space instead of fixmap.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-03-10 13:27:24 +00:00
cl349@firebug.cl.cam.ac.uk e2b8c75165 Change the location of the shared_info page for auto_translated_physmap guests.
Instead of putting the page outside of the guests pseudo-physical address
space, we put it next to the other pages filled by the domain builder,
such that the page is already mapped in the initial pagetables and/or a
lowmem-type memory mapping.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-03-09 16:24:57 +00:00
kaf24@firebug.cl.cam.ac.uk b76d31960b Fix 64-bit Linux build.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-08 11:11:53 +01:00
kaf24@firebug.cl.cam.ac.uk 97bdaa5bdf Upgrade all hypercalls to use the new guest_handle interface (on the Xen side).
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-07 18:40:42 +01:00
cl349@firebug.cl.cam.ac.uk 343d7d9b01 Cleanup whitespace.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-03-06 17:15:10 +00:00
emellor@leeni.uk.xensource.com f8de6179af Added a 'state' field to the xenbus_device structure, which caches the state
at the local end of the xenbus connection (i.e. that value that is passed
through xenbus_switch_state).  This means that xenbus_probe can wait for all
the boot devices to become ready without having to hurt the store.

Also, fix this probing -- previously, the wrong value was being returned by 
all_devices_ready_, so this polling would only have waited for one device. 

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-03-04 19:10:56 +01:00
cl349@firebug.cl.cam.ac.uk 99e08d6078 linux: clean up setup_arch_post.h
- machine_specific_memory_setup() was unused on x86-64
- machine_specific_modify_cpu_capabilities() must not be __init (for CPU hotplug)
- machine_specific_modify_cpu_capabilities() should be called in similar ways on 32- and 64-bits

From: Jan Beulich <JBeulich@novell.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-03-02 15:33:47 +00:00
kaf24@firebug.cl.cam.ac.uk 2f760d09a8 Merge xen-ia64-unstable.hg 2006-03-02 10:49:19 +01:00
vhanquez@kneesa.uk.xensource.com dcb858b089 Removing out-of-date unused file.
current code available in io/xs_wire.h

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
2006-03-02 02:14:45 +00:00
awilliam@xenbuild.aw 8bda27c810 merge 2006-03-01 12:47:25 -07:00
awilliam@xenbuild.aw 138d5932c2 [IA64] Cleanup hypercall.h
Cleanup to hypercall.h of ia64 xenlinux, and remove used stuff.

Signed-off-by Kevin Tian <kevin.tian@intel.com>
2006-02-28 10:13:55 -07:00
cl349@firebug.cl.cam.ac.uk 9d77d697b1 Update to Linux 2.6.16-rc5.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2006-02-27 16:56:08 +00:00