linux/arch/x86/xen
Jan Beulich 474773c42f Xen/gnttab: handle p2m update errors on a per-slot basis
commit 8310b77b48c5558c140e7a57a702e7819e62f04e upstream.

Bailing immediately from set_foreign_p2m_mapping() upon a p2m updating
error leaves the full batch in an ambiguous state as far as the caller
is concerned. Instead flags respective slots as bad, unmapping what
was mapped there right away.

HYPERVISOR_grant_table_op()'s return value and the individual unmap
slots' status fields get used only for a one-time - there's not much we
can do in case of a failure.

Note that there's no GNTST_enomem or alike, so GNTST_general_error gets
used.

The map ops' handle fields get overwritten just to be on the safe side.

This is part of XSA-367.

Cc: <stable@vger.kernel.org>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/96cccf5d-e756-5f53-b91a-ea269bfb9be0@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-07 12:20:49 +01:00
..
Kconfig
Makefile
apic.c
debugfs.c
debugfs.h
efi.c
enlighten.c x86/xen: Return from panic notifier 2019-10-07 17:53:30 -04:00
enlighten_hvm.c x86/xen: Add xen_no_vector_callback option to test PCI INTX delivery 2021-01-27 11:47:45 +01:00
enlighten_pv.c x86/xen: disable Firmware First mode for correctable memory errors 2020-11-01 12:01:05 +01:00
enlighten_pvh.c
grant-table.c
irq.c
mmu.c
mmu.h
mmu_hvm.c
mmu_pv.c
multicalls.c
multicalls.h
p2m.c Xen/gnttab: handle p2m update errors on a per-slot basis 2021-03-07 12:20:49 +01:00
pci-swiotlb-xen.c
platform-pci-unplug.c
pmu.c
pmu.h
setup.c
smp.c
smp.h
smp_hvm.c
smp_pv.c x86: Fix early boot crash on gcc-10, third try 2020-05-20 08:20:34 +02:00
spinlock.c x86/xen: don't unbind uninitialized lock_kicker_irq 2020-12-02 08:49:48 +01:00
suspend.c
suspend_hvm.c
suspend_pv.c
time.c
trace.c
vdso.h
vga.c
xen-asm.S
xen-asm_32.S x86/asm/32: Add ENDs to some functions and relabel with SYM_CODE_* 2021-01-17 14:05:30 +01:00
xen-asm_64.S
xen-head.S
xen-ops.h