aboutsummaryrefslogtreecommitdiffstats
path: root/linux-2.6-xen-sparse
Commit message (Collapse)AuthorAgeFilesLines
* [NET] back: Add lazy copyingkfraser@localhost.localdomain2007-05-303-20/+143
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds lazy copying using the new unmap_and_replace grant table operation. We keep a list of pending entries sorted by arrival order. We'll process this list every time net_tx_action is invoked. We ensure that net_tx_action is invoked within one second of the arrival of the first packet in the list. When we process the list any entry that has been around for more than half a second is copied. This allows up to free the grant table entry and return it to domU. If the new grant table operation is not available (e.g., old HV or architectures that don't support it yet) we simply copy each packet as we receive them using skb_linearize. We also disable SG/TSO if this is the case. By default the new code is disabled. In order to enable it, the module needs to be loaded with the argument copy_skb=1. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* [LINUX] gnttab: Add basic DMA trackingkfraser@localhost.localdomain2007-05-304-11/+169
| | | | | | | | | | | | | | | | | | 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>
* [XEN] gnttab: Add new op unmap_and_replacekfraser@localhost.localdomain2007-05-301-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Correct 32on64 handling of VCPUOP_register_runstate_memory_area. WeIan Campbell2007-05-252-2/+6
| | | | | | | | | | | | were copying too many bytes from the guest so the test for area.addr.h.c != area.addr.p was failing. Added a WARN_ON to the kernel to catch this case. It would be a BUG_ON but this would break the new kernel on older hypervisors and the only real problem is that stolen time is not updated, which we can live with. Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
* LINUX/x86_64: Cleanup 15129:a40967e39652 by using __pgd rather thanIan Campbell2007-05-252-3/+3
| | | | | | | | | | 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>
* Factor out sparse tree makefile fragments and introduce hg-clone andIan Campbell2007-05-253-5/+3
| | | | | | | | | | | | | tarball methods in preparation for migrating away from the sparse tree layout. This re-introduces 14883:6568c1882af5 and 14862:98efd2e410ae plus further fixes. Also add makefile fragments to support building the paravirt ops tree (make linux-2.6-paravirt-build). Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
* linux: Fix PV-on-HVM crash when installing PV drivers on native system.kfraser@localhost.localdomain2007-05-252-0/+2
| | | | | From: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* linux/x86: consolidate pte_val/p[mug]d_val replacementskfraser@localhost.localdomain2007-05-248-73/+71
| | | | | | | | - 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>
* linux/x86-64: force _PAGE_NX on the 1:1 mapping (matching native)kfraser@localhost.localdomain2007-05-241-10/+7
| | | | Signed-off-by: Jan Beulich <jbeulich@novell.com>
* linux: Fix mem= kernel parameter when it is smaller than initial memory ↵kfraser@localhost.localdomain2007-05-242-2/+56
| | | | | | | allocation. From: Chris Lalancette <clalance@redhat.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* blktap: Small changes to blktap + add a hook to clear ptes on implicit ↵kfraser@localhost.localdomain2007-05-241-2/+115
| | | | | | | | | | | | | release of VMAs. * free memory on release * invalidate p2m entry when unmapping grants * check for alloc failure of idx_map * add DONTCOPY vma flag * hook for clearing ptes when a vma is freed by the kernel From: Geoffrey Lefebvre <geoffrey@cs.ubc.ca> Signed-off-by: Keir Fraser <keir@xensource.com>
* LINUX/x86_64: Ensure that the initial page tables allow userspaceIan Campbell2007-05-241-1/+1
| | | | | | | | mappings of the vsyscall page. This matches native behaviour by setting the U bit on the L2-L4 page table entries and controlling access using the L1 entries. Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
* Merge with xen-ia64-unstable.hgkfraser@localhost.localdomain2007-05-222-10/+14
|\
| * [BLKTAP] Ensure blktap doesn't try to re-create extant sysfs entriesJake Wires2007-05-191-5/+9
| | | | | | | | Signed-off-by: Jake Wires <jwires@xensource.com>
| * linux: Un-__init a couple of kexec vars that are accessed after init time.kfraser@localhost.localdomain2007-05-161-2/+2
| | | | | | | | Signed-off-by: Keir Fraser <keir@xensource.com>
| * static, __init and __initdata symbols in machine_kexec.cSimon Horman2007-05-161-5/+5
| | | | | | | | | | | | | | Some symbols in machine_kexec.c really ought to be static and, marked __init or __initdata. Signed-off-by: Simon Horman <horms@verge.net.au>
* | [IA64] Implement XENMEM_machine_memory_map on ia64.Alex Williamson2007-05-102-0/+27
| | | | | | | | | | | | | | This is necessary for kexec/kdump for xen/ia64. kexec-tools needs to know real machine's memory map. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* | [IA64] Code clean up using xen machine vector.Alex Williamson2007-05-085-72/+99
| | | | | | | | Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* | [IA64] Make p2m exposure compatible with suspend/resume and fix one bug.Alex Williamson2007-05-082-8/+75
| | | | | | | | Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* | merge with xen-unstable.hgAlex Williamson2007-05-081-2/+10
|\|
| * linux: Add two arch hooks xen_pre_suspend() and xen_post_suspend() forKeir Fraser2007-05-071-2/+10
| | | | | | | | | | suspend/resume. Xen/ia64 needs them. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* | [IA64] Prevent softlock up message when domain is restored.Alex Williamson2007-05-071-0/+5
| | | | | | | | Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* | [IA64] Remove machvec_dig.hAlex Williamson2007-05-071-16/+0
| | | | | | | | | | | | The DIG machine vector is no longer overloaded for Xen support. Signed-off-by: Alex Williamson <alex.williamson@hp.com>
* | [IA64] Switch to CONFIG_IA64_GENERIC config and wire in Xen machine vectorAlex Williamson2007-05-074-75/+14
| | | | | | | | | | | | | | 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>
* | [IA64] Create Xen machine vectorAlex Williamson2007-05-077-0/+199
| | | | | | | | | | | | | | | | 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>
* | [IA64] Paravirtualize sba_iommuAlex Williamson2007-05-071-16/+43
| | | | | | | | | | | | | | This paravirtualizes the iommu driver for HP Integrity systems. This allows dom0 to use the iommu just as it would on native hardware. Signed-off-by: Alex Williamson <alex.williamson@hp.com>
* | [IA64] Paravirtualize swiotlbAlex Williamson2007-05-071-16/+95
| | | | | | | | | | | | | | | | Paravirtualize our copy of swiotlb. A lot of the s/virt_to_phys/virt_to_bus converstions have already been done in upstream, so I won't special case them here. Signed-off-by: Alex Williamson <alex.williamson@hp.com>
* | [IA64] Fix PCI front with CONFIG_NUMAAlex Williamson2007-05-071-0/+1
| | | | | | | | | | | | | | | | 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>
* | [IA64] Add sparse files for machine vector supportAlex Williamson2007-05-062-0/+1415
| | | | | | | | | | | | These are necessary to create a Xen machine vector. Signed-off-by: Alex Williamson <alex.williamson@hp.com>
* | [IA64] Add iommu drivers to sparse treeAlex Williamson2007-05-062-0/+2936
| | | | | | | | | | | | | | | | | | These will be paravirtualized in upcoming commits. We're copying lib/swiotlb.c into arch/ia64/xen/swiotlb.c simply for convenience. Changes should be merged back into lib/swiotlb.c once Xen support merges into Linux. Signed-off-by: Alex Williamson <alex.williamson@hp.com>
* | [IA64] Fix vcpu hotplugAlex Williamson2007-05-031-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When domain is saved and restored, the following message is printed out. bind_ipi_to_irqhandler()/bind_virq_to_irqhandler() should be called in process context. Move the call from cpu_init() to __cpu_init() like x86. BUG: sleeping function called from invalid context at /src1/yamahata/hg/xen/ia64 /my150/compile/test-0/xen-ia64-unstable.hg/linux-2.6.18-xen/mm/slab.c:2901 in_atomic():0, irqs_disabled():1 Call Trace: [<a00000010001b190>] show_stack+0x50/0xa0 sp=e0000000004ff8b0 bsp=e0000000004f9358 [<a00000010001b210>] dump_stack+0x30/0x60 sp=e0000000004ffa80 bsp=e0000000004f9340 [<a000000100070f40>] __might_sleep+0x2c0/0x2e0 sp=e0000000004ffa80 bsp=e0000000004f9318 [<a00000010012c230>] __kmalloc+0xb0/0x320 sp=e0000000004ffa90 bsp=e0000000004f92e0 [<a0000001001a98d0>] proc_create+0x110/0x1c0 sp=e0000000004ffa90 bsp=e0000000004f9298 [<a0000001001a9ca0>] proc_mkdir_mode+0x40/0xe0 sp=e0000000004ffaa0 bsp=e0000000004f9268 [<a0000001001a9d70>] proc_mkdir+0x30/0x60 sp=e0000000004ffab0 bsp=e0000000004f9240 [<a0000001000e97e0>] register_handler_proc+0x1a0/0x1e0 sp=e0000000004ffab0 bsp=e0000000004f91f0 [<a0000001000e6420>] setup_irq+0x440/0x4e0 sp=e0000000004ffb30 bsp=e0000000004f9198 [<a0000001000e68c0>] request_irq+0x140/0x1a0 sp=e0000000004ffb30 bsp=e0000000004f9150 [<a0000001003e7a20>] bind_ipi_to_irqhandler+0x260/0x2c0 sp=e0000000004ffb30 bsp=e0000000004f90e8 [<a000000100019780>] xen_register_percpu_irq+0x2c0/0x880 sp=e0000000004ffb40 bsp=e0000000004f9098 [<a00000010001a1f0>] xen_smp_intr_init+0x170/0x1c0 sp=e0000000004ffb40 bsp=e0000000004f9070 [<a00000010003d350>] cpu_init+0x1090/0x10e0 sp=e0000000004ffb50 bsp=e0000000004f8fe0 [<a0000001000607a0>] start_secondary+0xc0/0x520 sp=e0000000004ffe30 bsp=e0000000004f8f90 [<a0000001000105f0>] __end_ivt_text+0x6d0/0x700 sp=e0000000004ffe30 bsp=e0000000004f8f90 Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* | [IA64] Fix time_resume()Alex Williamson2007-05-032-13/+56
| | | | | | | | | | | | | | Add missing exclusion in time_resume() and steal time accounting reinitialization after resume. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* | [IA64] Compliation work around for sparsememAlex Williamson2007-05-031-0/+9
| | | | | | | | Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* | [IA64] Remove unnecessary sparse tree filesAlex Williamson2007-05-033-483/+0
| | | | | | | | Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* | [IA64] Sparse tree cleanupAlex Williamson2007-05-035-22/+24
| | | | | | | | | | | | | | 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>
* | [IA64] Support debug_keys on ia64Alex Williamson2007-05-031-0/+9
|/ | | | | | This patch adds support for xm debugkeys. Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
* linux blkback/blktap: Request/response identifiers are u64, not long.kfraser@localhost.localdomain2007-05-012-6/+6
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Ensure blk{tap/back}'s vm_area is not freed twice on error case.Jake Wires2007-04-272-0/+2
| | | | Signed-off-by: Jake Wires <jwires@xensource.com>
* linux x86/64: Fix supervisor_mode_kernel test to read a single byte.kfraser@localhost.localdomain2007-04-251-1/+1
| | | | | Spotted by Jan Beulich. Signed-off-by: Keir Fraser <keir@xensource.com>
* LINUX: Fixes for XENFEAT_supervisor_mode_kernel and ↵Ian Campbell2007-04-242-3/+4
| | | | | | XENFEAT_writable_page_tables. Signed-of-by: Ian Campbell <ian.campbell@xensource.com>
* netback: Copy skbuffs that are presented to the start_xmit() functionkfraser@localhost.localdomain2007-04-231-3/+7
| | | | | | | | with a multi-page head buffer. The new skbuff will not have a multi-page head buffer, which is a necessary restriction until this is supported by the internals of the netback driver. Signed-off-by: Steven Smith <ssmith@xensource.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* Revert 14883:6568c1882af5 and 14862:98efd2e410ae.kfraser@localhost.localdomain2007-04-203-3/+5
| | | | | | | | | | | This reverts the preparation for removing the sparse tree, since these modified scripts are not yet ready: 1. XENGUEST suffix was lost yet depended on still by sparse tree Makefiles (hacked around by 14883; also reverted). 2. XEN_TARGET_X86_PAE default value seems to be ignored (out-of-the-box 'make dist' will build non-PAE kernels). Signed-off-by: Keir Fraser <keir@xensource.com>
* Fix dist target to keep previous symlink format.Steven Hand2007-04-203-5/+3
| | | | | | May be a cleaner fix which I'll let IanC do. Signed-off-by: Steven Hand <steven@xensource.com>
* netfront: use skb.cb for storing private datakfraser@localhost.localdomain2007-04-171-5/+12
| | | | | | | | | | | | Netfront's use of nh.raw and h.raw for storing page+offset is a bit hinky, and it breaks with upcoming network stack updates which reduce these fields to sub-pointer sizes. Fortunately, skb offers the "cb" field specifically for stashing this kind of info, so use it. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: Chris Wright <chrisw@sous-sol.org> Cc: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
* linux netfront: Fixes to locking after lockdep-derived changes, asKeir Fraser2007-04-131-5/+5
| | | | | suggested by Herbert Xu. Signed-off-by: Keir Fraser <keir@xensource.com>
* linux: netfront contains two locking problems found by lockdep:kfraser@localhost.localdomain2007-04-131-15/+15
| | | | | | | | | | | | 1. rx_lock is a normal spinlock, and tx_lock is an irq spinlock. This means that in normal use, tx_lock may be taken by an interrupt routine while rx_lock is held. However, netif_disconnect_backend takes them in the order tx_lock->rx_lock, which could lead to a deadlock. Reverse them. 2. rx_lock can also be used in softirq context, so it should be taken/released with spin_(un)lock_bh. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
* merge with xen-unstable.hgAlex Williamson2007-04-127-39/+16
|\
| * HVM: Do not watch control/shutdown to force domain shutdowns when PVkfraser@localhost.localdomain2007-04-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drivers are not present. The feature-foo mechanism does not actually work after save/restore since the fields do not get rewritten. And it doesn't work when we actually need the guest to be shutdown through Xen (e.g., on suspend). Since we can quite reasonably assume that the only entity to screw with control/shutdown is xend, and since the one place that does that now explicitly handles unenlightened HVM guests, we can simply strip all this stuff out. This has the nice benefit of making HVM save/restore with PV drivers much more reliable. Signed-off-by: Keir Fraser <keir@xensource.com>
| * [linux] Make CONFIG_XEN_COMPAT #if statements syntactically correct.Christian Limpach2007-04-112-2/+2
| | | | | | | | Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
| * LINUX: Cleanup a few stray uses of CONFIG_XEN_COMPAT_030002.Ian Campbell2007-04-112-2/+2
| | | | | | | | Signed-off-by: Ian Campbell <ian.campbell@xensource.com>