android_kernel_google_msm/arch/x86/xen
Andy Lutomirski 97e0c90821 x86/iopl/64: Properly context-switch IOPL on Xen PV
commit b7a584598aea7ca73140cb87b40319944dd3393f upstream.

On Xen PV, regs->flags doesn't reliably reflect IOPL and the
exit-to-userspace code doesn't change IOPL.  We need to context
switch it manually.

I'm doing this without going through paravirt because this is
specific to Xen PV.  After the dust settles, we can merge this with
the 32-bit code, tidy up the iopl syscall implementation, and remove
the set_iopl pvop entirely.

Fixes XSA-171.

Reviewewd-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jan Beulich <JBeulich@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/693c3bd7aeb4d3c27c92c622b7d0f554a458173c.1458162709.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
[ kamal: backport to 3.19-stable: no X86_FEATURE_XENPV so just call
  xen_pv_domain() directly ]
Acked-by: Andy Lutomirski <luto <at> kernel.org>
Signed-off-by: Kamal Mostafa <kamal <at> canonical.com>
Signed-off-by: Zefan Li <lizefan@huawei.com>
2016-04-27 18:55:30 +08:00
..
debugfs.c switch debugfs to umode_t 2012-01-03 22:54:56 -05:00
debugfs.h switch debugfs to umode_t 2012-01-03 22:54:56 -05:00
enlighten.c x86/iopl/64: Properly context-switch IOPL on Xen PV 2016-04-27 18:55:30 +08:00
grant-table.c Merge commit 'v3.2-rc3' into stable/for-linus-3.3 2011-12-20 17:01:18 -05:00
irq.c xen: use this_cpu_xxx replace percpu_xxx funcs 2012-01-24 12:20:24 -05:00
Kconfig xen: Make XEN_MAX_DOMAIN_MEMORY have more sensible defaults 2011-11-21 17:14:46 -05:00
Makefile
mmu.c x86, mm: Patch out arch_flush_lazy_mmu_mode() when running on bare metal 2013-04-16 21:27:27 -07:00
mmu.h
multicalls.c
multicalls.h xen: use this_cpu_xxx replace percpu_xxx funcs 2012-01-24 12:20:24 -05:00
p2m.c xen/m2p: do not reuse kmap_op->dev_bus_addr 2012-10-02 10:30:06 -07:00
pci-swiotlb-xen.c X86 & IA64: adapt for dma_map_ops changes 2012-03-28 16:36:31 +02:00
platform-pci-unplug.c
setup.c x86/xen: Do not clip xen_e820_map to xen_e820_map_entries when sanitizing map 2016-04-27 18:55:24 +08:00
smp.c xen/smp/spinlock: Fix leakage of the spinlock interrupt line for every CPU online/offline 2014-03-11 16:10:06 -07:00
spinlock.c xen: Send spinlock IPI to all waiters 2013-02-28 06:59:00 -08:00
suspend.c
time.c xen/time: remove blocked time accounting from xen "clockchip" 2013-07-21 18:19:01 -07:00
trace.c
vdso.h
vga.c
xen-asm.h
xen-asm.S xen: correctly check for pending events when restoring irq flags 2012-04-27 16:04:21 -04:00
xen-asm_32.S x86/xen: don't assume %ds is usable in xen_iret for 32-bit PVOPS. 2013-02-17 10:49:26 -08:00
xen-asm_64.S
xen-head.S
xen-ops.h