Commit Graph
559 Commits
Author SHA1 Message Date
kfraser@localhost.localdomain 6b5e36a305 linux: improve x86 page table handling performance
Where possible,
- use hypercalls instead of writing to read-only pages
- fold TLB flushes into page table update hypercalls
- on PAE, use single-access updates instead of two-access ones

The single change to PAE pte_clear() yields a 25-30% boost for kernel
builds on a 4x2x2 CPUs, 8Gb box; the other changes together yield
improvements of 2-5%.

Also, adjust backward compatibility handling in a few more places.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-04-05 09:10:33 +01:00
kfraser@localhost.localdomain c93368e0fb linux: make compatibility config options more scalable
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-04-05 08:58:32 +01:00
Keir Fraser ed34f48aa8 Various cleanups and fixes for PV-on-HVM drivers.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-04-04 21:49:04 +01:00
Keir Fraser f24c3877e5 linux: Avoid use of ptep_get_and_clear_full name as it's a macro on
some architectures.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-03-31 17:22:46 +01:00
Keir Fraser 990f0419bd linux: User-space grant table device.
A character device for accessing (in user-space) pages that have been
granted by other domains.

Signed-off-by: Derek Murray <Derek.Murray@cl.cam.ac.uk>

Fix ioctl interface to be 32/64-bit invariant. Move xen_class
mechanism to common util.c.

Signed-off-by: Keir Fraser <keir@xensource.com>
2007-03-31 13:53:24 +01:00
Keir Fraser 7fd0f937ba linux: Add a hook before a page table entry is cleared, for use with
the grant-table device.

Signed-off-by: Derek Murray <Derek.Murray@cl.cam.ac.uk>
2007-03-31 12:42:02 +01:00
awilliam@xenbuild2.aw ebdb5845be merge with xen-unstable.hg 2007-03-20 15:19:38 -06:00
Ian Campbell 3b8a13159a [LINUX] Update crash-kernel-32-on-64.patch with more sensible version from -mm.
The previous version had side effects outside of the crash dump code.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-03-19 14:00:07 +00:00
awilliam@xenbuild2.aw bd56728806 merge with xen-unstable.hg 2007-03-15 09:04:23 -06:00
kfraser@localhost.localdomain 26e24b46d1 linux: No need to force pcibios_scan_all_fns() on modern Xen.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-03-13 13:28:26 +00:00
awilliam@xenbuild2.aw 04a0164bad merge with xen-unstable.hg 2007-03-12 10:07:08 -06:00
kfraser@localhost.localdomain 16ea519d6c linux: Upgrade to latest Xen interface version (0x00030205).
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-03-09 11:44:31 +00:00
awilliam@xenbuild2.aw 115488f1ea [IA64] Add HYPERVISOR_vcpu_op
For support of steal time accounting, only supports
VCPUOP_register_runstate_memory_area right now.

Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
2007-03-08 09:50:25 -07:00
kfraser@localhost.localdomain 74bca0b6e8 linux: scan DMI early
While shuffling quite a few things around, this gets us closer to
native, which clearly had a reason to do the DMI scan early.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-03-05 15:46:33 +00:00
kfraser@localhost.localdomain bba72daaae linux/x86-64 2.6.18: do away with pud_offset_k()
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-03-05 15:06:13 +00:00
kfraser@localhost.localdomain 744703ccb7 linux/x86_64 2.6.18: remove orig_ist
orig_ist is bound to presence of a TSS, hence is meaningless on Xen
kernels.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-03-05 15:04:28 +00:00
kfraser@localhost.localdomain 12b8d19b31 linux 2.6.18: miscellaneous
Various minor changes not fitting elsewhere and not warranting
separate patches.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-03-05 13:57:11 +00:00
Keir Fraser 3a65ca09cd linux: Some save/restore simplifications and cleanups.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-03-02 23:01:36 +00:00
kfraser@localhost.localdomain 700ba2f69b linux: allow use of split page table locks
This changes netback to use struct page's mapping field instead of the
index one, and the PageForeign logic the other way around. That way,
CONFIG_SPLIT_PTLOCK_CPUS doesn't have to be suppressed anymore for x86.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-03-02 15:59:12 +00:00
kfraser@localhost.localdomain e6de910c4d linux/x86: avoid a re-definition warning on x86-64 and change i386
similarly to be consistent.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-03-02 15:12:54 +00:00
kfraser@localhost.localdomain 188ac9feda linux: Support new 'fast suspend' mode which does not require us to
hotplug all auxiliary CPUs.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-03-02 12:11:52 +00:00
kfraser@localhost.localdomain ed372f4e41 linux: More save/restore fixes. Fix deadlock of cpu_hotplug_lock vs
workqueue_mutex. This is a new deadlock since the workqueue_mutex is
acquired in the workqueue_cpu_calbback() function across
CPU_UP_PREPARE->CPU_ONLINE.

The fix is for us not to rudely grab the cpu_hotplug_lock() during
save/restore -- it's really not necessary.

This patch is applicable to any of our 2.6 kernels, but is absolutely
required from 2.6.18 onwards.

Signed-off-by: Keir Fraser <keir@xensource.com>
2007-02-28 17:55:19 +00:00
kfraser@localhost.localdomain a3546dd2fc linux: Fix backward compatibility in page table handling
A 3.0.2 compatibility requirement slipped my attention before
submitting the original page table handling changes.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-02-26 14:09:08 +00:00
Ian Campbell f380fac05a [LINUX] Purge include <linux/config.h>. It has been obsolete for some time now.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-02-23 16:56:45 +00:00
kfraser@localhost.localdomain 2b1b3844b2 linux: Fix current_vcpu_info for UP case
Under !CONFIG_SMP, smp.h is not always included and hence
smp_processor_id() not always visible.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-02-23 10:43:00 +00:00
awilliam@xenbuild2.aw 5a0cbf9162 merge with xen-unstable.hg 2007-02-20 12:58:22 -07:00
kfraser@localhost.localdomain 99f8ff2844 linux: Fix swiotlb bug-out due to uninitialised end_pfn/max_mapnr.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-02-20 12:27:03 +00:00
kfraser@localhost.localdomain 2d59634928 linux/x86: Clean up page table handling headers
- remove dead code
- fix line breaking and space vs. tab usage
- remove redundant parentheses

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-02-20 09:41:32 +00:00
kfraser@localhost.localdomain eee7931c83 linux/x86: Adjust and fix page table handling.
Ensure that all and only those page table entries that have their
present bit set undergo p2m/m2p translation in all relevant places.
This should fix migration issues with _PAGE_PROTNONE pages which
previously could retain MFNs in PTEs while having the present bit
clear (and thus were not getting (un)canonicalized during save/
restore).

Many thanks to Keir Fraser for his analysis, suggestions, and
corrections.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-02-20 09:33:14 +00:00
kfraser@localhost.localdomain 5f855af627 linux: Fix 32-bit build after changeset 13993:168030c8e0a93d8401cf5e783e10ecdf0938abda
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-02-19 22:50:07 +00:00
kfraser@localhost.localdomain 408c8a79de linux: Introduce {current_,}vcpu_info.
Also consolidate time-xen.c in giving get_time_values_from_xen() a
'cpu' parameter to match other functions (this consolidation could of
course also be done the other way around, but I think this way the
resulting code can be more efficient).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-02-19 16:11:56 +00:00
Keir Fraser bbf3a3eebd linux: vmalloc_sync_all() is not a no-op when running in PAE mode on Xen.
Also vmalloc_sync_all() is only defined for x86 architectures so make
use of it in driver code conditional on CONFIG_X86.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-02-17 13:26:33 +00:00
kfraser@localhost.localdomain 090fa70b37 linux: remove {lock,unlock}_vm_area(). Instead use vmalloc_sync_all()
in alloc_vm_area().
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-02-16 11:24:10 +00:00
kfraser@localhost.localdomain 07c2f1f3b0 linux: avoid need to modify include/linux/pfn.h
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-02-15 13:49:04 +00:00
kfraser@localhost.localdomain 5ce8fafa94 Dynamic grant-table sizing.
Signed-off-by: Christopher CLark <christopher.clark@cl.cam.ac.uk>
Signed-off-by: Andrei Petrov <andrei.petrov@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-02-15 10:54:12 +00:00
awilliam@xenbuild2.aw b98d4e619b [IA64] dma-mapping.h user our own swiotlb.h header
Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
2007-02-12 10:02:10 -07:00
kfraser@localhost.localdomain 6f7ae0fe6f Merge with xen-ia64-unstable.hg. 2007-02-08 17:27:30 +00:00
Keir Fraser a9a8f70bdf Remove unnecessarily modified a.out.h.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-02-08 17:21:04 +00:00
awilliam@xenbuild2.aw a6e547a237 merge with xen-unstable.hg 2007-02-04 12:24:53 -07:00
kfraser@localhost.localdomain e03f6e62c8 linux: Allow xenbus_strstate() to be used from modules.
The function is referenced by a number of DPRINTK()-s. Also, properly
const-ify it.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-02-02 16:04:11 +00:00
awilliam@xenbuild2.aw 2353f24ee8 [IA64] Add arch_free_page()
Without this, Linux can hit bad_page()

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-01-31 10:59:56 -07:00
awilliam@xenbuild2.aw c77420064f [IA64] Remove PG_foreign hack
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2007-01-28 16:37:02 -07:00
awilliam@xenbuild2.aw 2be162b951 [IA64] New resend_irq_on_evtchn() params
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2007-01-28 16:33:18 -07:00
kfraser@localhost.localdomain d32128e96e bimodal blkback: Support multiple ring protocols.
This is needed for 32-on-64 support.  Right now there are three
protocols: native, x86_32 and x86_64.  If needed it can be extended.

Interface changes (io/blkif.h)
 * Define the x86_32 and x86_64 structs additionally to the native
   version.
 * Add helper functions to convert them requests to native.

Backend changes:
 * Look at the "protocol" name of the frontend and switch ring
   handling accordingly.  If the protocol node isn't present it
   assumes native protocol.
 * As the request struct is copied anyway before being processed (for
   security reasons) it is converted to native at that point so most
   backend code doesn't need to know what the frontend speaks.
 * In case of blktap this is completely transparent to userspace, the
   kernel/userspace ring is always native no matter what the frontend
   speaks.

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
2007-01-24 10:38:17 +00:00
kfraser@localhost.localdomain 50f5003308 linux: Fix enable_irq() crash by removing a BUG_ON() assumption in our
event-channel retrigger() function. Also clean up bitmap usages.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-23 13:39:20 +00:00
kfraser@localhost.localdomain 525a723565 linux/i386: widen physical address range
32on64 supports 168Gb for 32-bit guests, hence at least 38 bits must
be specified here. The foreign frame bit is MFN bit 31, so the maximum
valid value here would be 43.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-01-22 15:57:19 +00:00
kfraser@localhost.localdomain 44a156d31f linux/i386: relax highpte pinning/write-protecting
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-01-22 15:42:13 +00:00
kfraser@localhost.localdomain f272b20670 Add unsuspend hook for resuming devices in the checkpoint parent.
Nothing uses it at the moment.

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
2007-01-19 16:11:31 +00:00
kfraser@localhost.localdomain 931818cacb Make xen_suspend handle resume.
Don't destroy xenstore watches on suspend, and only recreate them when
resuming in a new domain. Likewise, only invoke frontend device resume
code when in a new domain (the resume functions all tear down the
existing function and wait for the backend to negotiate a new one,
which does not happen in the source domain).

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-19 16:06:09 +00:00
Christian Limpach c6a0a466fa [merge] with xen-unstable
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2007-01-19 14:48:57 +00:00