linux/drivers
David Vrabel 162e371712 x86/xen: safely map and unmap grant frames when in atomic context
arch_gnttab_map_frames() and arch_gnttab_unmap_frames() are called in
atomic context but were calling alloc_vm_area() which might sleep.

Also, if a driver attempts to allocate a grant ref from an interrupt
and the table needs expanding, then the CPU may already by in lazy MMU
mode and apply_to_page_range() will BUG when it tries to re-enable
lazy MMU mode.

These two functions are only used in PV guests.

Introduce arch_gnttab_init() to allocates the virtual address space in
advance.

Avoid the use of apply_to_page_range() by using saving and using the
array of PTE addresses from the alloc_vm_area() call.

N.B. 'alloc_vm_area' pre-allocates the pagetable so there is no need
to worry about having to do a PGD/PUD/PMD walk (like apply_to_page_range
does) and we can instead do set_pte.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
----
[v2: Add comment about alloc_vm_area]
[v3: Fix compile error found by 0-day bot]
2014-07-14 15:28:02 -04:00
..
accessibility
acpi Merge branch 'acpi-video' 2014-07-10 21:04:25 +02:00
amba
ata ahci_xgene: fix the dma state machine lockup for the IDENTIFY DEVICE PIO mode command. 2014-07-08 11:46:05 -04:00
atm
auxdisplay
base
bcma
block zram: revalidate disk after capacity change 2014-07-03 09:21:53 -07:00
bluetooth
bus
cdrom
char i8k: Fix non-SMP operation 2014-07-09 16:45:36 -07:00
clk This batch of fixes is for a handful of clock drivers from Allwinner, 2014-07-13 12:21:04 -07:00
clocksource clocksource: exynos_mct: Register the timer for stable udelay 2014-07-05 06:40:23 +09:00
connector
cpufreq cpufreq: Makefile: fix compilation for davinci platform 2014-07-09 02:54:15 +02:00
cpuidle
crypto crypto: caam - fix memleak in caam_jr module 2014-07-10 16:59:13 +08:00
dca
devfreq
dio
dma
edac
eisa
extcon
firewire
firmware
fmc
gpio
gpu Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux 2014-07-10 20:37:33 -07:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2014-07-07 13:13:03 -07:00
hsi
hv Drivers: hv: util: Fix a bug in the KVP code 2014-07-09 14:34:35 -07:00
hwmon hwmon: (adc128d818) Drop write support on inX_input attributes 2014-07-07 09:48:23 -07:00
hwspinlock
i2c
ide
idle
iio iio: ti_am335x_adc: Fix: Use same step id at FIFOs both ends 2014-07-08 21:21:22 +01:00
infiniband
input
iommu
ipack
irqchip
isdn
leds
lguest
macintosh
mailbox
mcb
md . Fix DM multipath IO hang regression from 3.15 due to logic bug in 2014-07-11 09:33:36 -07:00
media
memory
memstick
message
mfd
misc
mmc
mtd
net
nfc
ntb
nubus
of Devicetree bugfixe for v3.16 2014-07-06 12:11:57 -07:00
oprofile
parisc
parport
pci
pcmcia
phy USB fixes for 3.16-rc5 2014-07-12 14:13:10 -07:00
pinctrl pinctrl: berlin: fix an error code in berlin_pinctrl_probe() 2014-07-05 01:15:35 +02:00
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
regulator
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi SCSI for-linus on 20140705 2014-07-06 12:08:30 -07:00
sfi
sh
sn
soc
spi
spmi
ssb
staging
target
tc
thermal
tty serial: imx: Fix build breakage 2014-07-11 17:43:13 -07:00
uio
usb USB: serial: ftdi_sio: Add Infineon Triboard 2014-07-11 18:22:38 -07:00
uwb
vfio
vhost
video
virt
virtio
vlynq
vme
w1
watchdog
xen x86/xen: safely map and unmap grant frames when in atomic context 2014-07-14 15:28:02 -04:00
zorro
Kconfig
Makefile