| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
From: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
| |
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
|
|
|
|
|
|
| |
allocation.
From: Chris Lalancette <clalance@redhat.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|\ |
|
| |
| |
| |
| | |
Signed-off-by: Jake Wires <jwires@xensource.com>
|
| |
| |
| |
| | |
Signed-off-by: Keir Fraser <keir@xensource.com>
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| | |
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
|
| |
| |
| |
| | |
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
|
|\| |
|
| |
| |
| |
| |
| | |
suspend/resume. Xen/ia64 needs them.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
|
| |
| |
| |
| | |
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
|
| |
| |
| |
| |
| |
| | |
The DIG machine vector is no longer overloaded for Xen support.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| | |
These are necessary to create a Xen machine vector.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| | |
Add missing exclusion in time_resume() and steal time accounting
reinitialization after resume.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
|
| |
| |
| |
| | |
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
|
| |
| |
| |
| | |
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
| |
This patch adds support for xm debugkeys.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
|
|
|
|
| |
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
| |
Signed-off-by: Jake Wires <jwires@xensource.com>
|
|
|
|
|
| |
Spotted by Jan Beulich.
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
| |
XENFEAT_writable_page_tables.
Signed-of-by: Ian Campbell <ian.campbell@xensource.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
May be a cleaner fix which I'll let IanC do.
Signed-off-by: Steven Hand <steven@xensource.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
suggested by Herbert Xu.
Signed-off-by: Keir Fraser <keir@xensource.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| | |
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
|
| |
| |
| |
| | |
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
|