Commit Graph
583 Commits
Author SHA1 Message Date
kfraser@localhost.localdomain 403542f910 [LINUX] gnttab: Add basic DMA tracking
This patch adds basic tracking of outstanding DMA requests on
grant table entries marked as PageForeign.

When a PageForeign struct page is about to be mapped for DMA,
we set its map count to 1 (or zero in actual value).  This is
then checked for when we need to free a grant table entry early
to ensure that we don't free an entry that's currently used for
DMA.

So any entry that has been marked for DMA will not be freed early.

If the unmapping API had a struct page (which exists for the sg
case) then we could do this properly.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2007-05-30 10:46:13 +01:00
kfraser@localhost.localdomain 38d075a82c [XEN] gnttab: Add new op unmap_and_replace
The operation unmap_and_replace is an extension of unmap_grant_ref.
A new argument in the form of a virtual address (for PV) is given.
Instead of modifying the PTE for the mapped grant table entry to
null, we change it to the PTE for the new address.  In turn we
point the new address to null.

As it stands grant table entries once mapped cannot be
remapped by the guest OS (it can however perform a new
mapping on the same entry but that is within our control).
Therefore it's safe to manipulate the mapped PTE entry to
redirect it to a normal page where we've copied the contents.

It's intended to be used as follows:

1) map_grant_ref to v1
2) ...
3) alloc page at v2
4) copy the page at v1 to v2
5) unmap_and_replace v1 with v2

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Added compat integration (PAE-on-64).

Signed-off-by: Keir Fraser <keir@xensource.com>
2007-05-30 10:45:44 +01:00
Ian Campbell d1252ef838 LINUX/x86_64: Cleanup 15129:a40967e39652 by using __pgd rather than
abusing mk_kernel_pgd.

Also set the user bit on the vsyscall entry in the user pgd.

Both changes suggested by Jan Beulich.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-05-25 11:24:02 +01:00
kfraser@localhost.localdomain 26e96c98bc linux/x86: consolidate pte_val/p[mug]d_val replacements
- replace incomplete pXX_val_ma() set with complete __pXX_val() set
 - use __pXX_val() instead of pXX_val() when only flags are accessed or
   the frame number is only compared against zero

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-05-24 15:13:13 +01:00
Alex Williamson ec0ae52f36 [IA64] Code clean up using xen machine vector.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-05-08 10:48:39 -06:00
Alex Williamson 87f7479c3f [IA64] Make p2m exposure compatible with suspend/resume and fix one bug.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-05-08 10:39:51 -06:00
Alex Williamson 3f5380afe2 [IA64] Remove machvec_dig.h
The DIG machine vector is no longer overloaded for Xen support.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2007-05-07 08:56:28 -06:00
Alex Williamson 0accb29430 [IA64] Switch to CONFIG_IA64_GENERIC config and wire in Xen machine vector
This enables the switch to the generic flavor ia64 kernel for the -xen
and -xen0 kernels.  -xenU is changed to a CONFIG_IA64_XEN build.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2007-05-07 08:54:56 -06:00
Alex Williamson a832734a51 [IA64] Create Xen machine vector
This allows us to easily switch between hardware or software iommu and
simple remapping.  The Xen machine vector is only intended for domU
guests at this point.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2007-05-07 08:52:12 -06:00
Alex Williamson 456c1672ce [IA64] Fix PCI front with CONFIG_NUMA
We get a bad pointer dereference if we don't fill something in
here.  -1 will give us a global allocation, which is good enough
until we have better NUMA support.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2007-05-07 08:32:26 -06:00
Alex Williamson 6816e515a8 [IA64] Add sparse files for machine vector support
These are necessary to create a Xen machine vector.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2007-05-06 20:34:15 -06:00
Alex Williamson 36723573e5 [IA64] Compliation work around for sparsemem
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-05-03 14:14:41 -06:00
Alex Williamson ffca2f0a46 [IA64] Remove unnecessary sparse tree files
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-05-03 14:10:19 -06:00
Alex Williamson f395f0ab65 [IA64] Sparse tree cleanup
With this patch we can remove linux-2.6-xen-sparse/arch/ia64/dig/setup.c,
linux-2.6-xen-sparse/include/asm-ia64/machvec.h.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-05-03 14:08:24 -06:00
Ian Campbell 169b990abc LINUX: Fixes for XENFEAT_supervisor_mode_kernel and XENFEAT_writable_page_tables.
Signed-of-by: Ian Campbell <ian.campbell@xensource.com>
2007-04-24 22:35:16 +01:00
Alex Williamson 0dd835abe0 merge with xen-unstable.hg 2007-04-12 10:30:12 -06:00
Alex Williamson 097c62e7ad [IA64] Fix PV-on-HVM driver
xen-platform-pci fails to load w/ undefined symbols for some of the
sched_op hypercalls in machine_reboot.c.  This adds them to xencomm
mini to allow them to be called from modules.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2007-04-11 23:15:30 -06:00
Alex Williamson ec0addc57f merge with xen-unstable.hg 2007-04-11 07:30:02 -06:00
Alex Williamson 5ff2059b7d [IA64] Handle NAT bit for dom0 and domU
This fixes ia32 apps running under the IA32-EL.

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
2007-04-11 07:24:44 -06:00
Christian Limpach 6d618d8bb6 [linux] Make CONFIG_XEN_COMPAT #if statements syntactically correct.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2007-04-11 18:39:05 +01:00
Ian Campbell aad2bffaa3 LINUX: Cleanup a few stray uses of CONFIG_XEN_COMPAT_030002.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-04-11 16:08:35 +01:00
kfraser@localhost.localdomain 20f2780026 PV-on-HVM: Fixes for save/restore. Also gets rid of separate modules
reboot.ko and xenbus.ko. These are now part of xen-platform-pci.ko.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-04-10 15:31:53 +01:00
Keir Fraser e4daaaabe1 PV-on-HVM: A bit more re-jigging so the build gets further against
native Linux 2.6.5. It's not quite there still, but closer.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-04-06 11:17:08 +01:00
kfraser@localhost.localdomain e1290b1524 linux: simplify and perform checking of multicall status
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-04-05 10:43:50 +01:00
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