[PATCH v7] virtio_blk: add discard and write zeroes support

2018-08-28 Thread Daniel Verkamp
From: Changpeng Liu In commit 88c85538, "virtio-blk: add discard and write zeroes features to specification" (https://github.com/oasis-tcs/virtio-spec), the virtio block specification has been extended to add VIRTIO_BLK_T_DISCARD and VIRTIO_BLK_T_WRITE_ZEROES commands. This patch enables

[PATCH v3 03/15] xen: link platform-pci-unplug.o only if CONFIG_XEN_PVHVM

2018-08-28 Thread Juergen Gross
Instead of using one large #ifdef CONFIG_XEN_PVHVM in arch/x86/xen/platform-pci-unplug.c add the object file depending on CONFIG_XEN_PVHVM being set. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky --- arch/x86/xen/Makefile | 2 +- arch/x86/xen/platform-pci-unplug.c | 2

[PATCH v3 01/15] xen: move pv irq related functions under CONFIG_XEN_PV umbrella

2018-08-28 Thread Juergen Gross
All functions in arch/x86/xen/irq.c and arch/x86/xen/xen-asm*.S are specific to PV guests. Include them in the kernel with CONFIG_XEN_PV only. Make the PV specific code in arch/x86/entry/entry_*.S dependent on CONFIG_XEN_PV instead of CONFIG_XEN. The HVM specific code should depend on

[PATCH v3 04/15] xen: add SPDX identifier in arch/x86/xen files

2018-08-28 Thread Juergen Gross
Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky --- arch/x86/xen/efi.c | 14 +- arch/x86/xen/enlighten.c | 2 ++ arch/x86/xen/enlighten_hvm.c | 2 ++ arch/x86/xen/grant-table.c | 25 + arch/x86/xen/mmu.c

[PATCH v3 05/15] x86/paravirt: make paravirt_patch_call() and paravirt_patch_jmp() static

2018-08-28 Thread Juergen Gross
paravirt_patch_call() and paravirt_patch_jmp() are used in paravirt.c only. Convert them to static. Signed-off-by: Juergen Gross Reviewed-by: Thomas Gleixner --- arch/x86/include/asm/paravirt_types.h | 6 -- arch/x86/kernel/paravirt.c| 12 ++-- 2 files changed, 6

[PATCH v3 02/15] xen: move pv specific parts of arch/x86/xen/mmu.c to mmu_pv.c

2018-08-28 Thread Juergen Gross
There are some PV specific functions in arch/x86/xen/mmu.c which can be moved to mmu_pv.c. This in turn enables us to make multicalls.c dependent on CONFIG_XEN_PV. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky --- V3: - fix build failure on ARM (Boris Ostrovsky) ---

[PATCH v3 00/15] x86/paravirt, xen: several cleanups

2018-08-28 Thread Juergen Gross
This series removes some no longer needed stuff from paravirt infrastructure and puts large quantities of paravirt ops under a new config option PARAVIRT_XXL which is selected by XEN_PV only. Some Xen related cleanups: - move some pv-only code from CONFIG_XEN to CONFIG_XEN_PV - use

[PATCH v3 09/15] x86/paravirt: remove unused paravirt bits

2018-08-28 Thread Juergen Gross
The macros ENABLE_INTERRUPTS_SYSEXIT, GET_CR0_INTO_EAX and PARAVIRT_ADJUST_EXCEPTION_FRAME are used nowhere. Remove their definitions. Signed-off-by: Juergen Gross --- arch/x86/include/asm/irqflags.h | 4 arch/x86/include/asm/paravirt.h | 9 + arch/x86/kernel/asm-offsets.c | 1 -

[PATCH v3 06/15] x86/paravirt: remove clobbers parameter from paravirt patch functions

2018-08-28 Thread Juergen Gross
The clobbers parameter from paravirt_patch_default() et al isn't used any longer. Remove it. Signed-off-by: Juergen Gross Reviewed-by: Thomas Gleixner --- arch/x86/include/asm/paravirt_types.h | 7 +++ arch/x86/kernel/alternative.c | 2 +- arch/x86/kernel/paravirt.c|

[PATCH v3 11/15] x86/paravirt: move items in pv_info under PARAVIRT_XXL umbrella

2018-08-28 Thread Juergen Gross
All items but name in pv_info are needed by Xen PV only. Define them with CONFIG_PARAVIRT_XXL set only. Signed-off-by: Juergen Gross --- arch/x86/include/asm/paravirt.h | 2 ++ arch/x86/include/asm/paravirt_types.h | 2 ++ arch/x86/include/asm/pgtable-3level_types.h | 2 +-

[PATCH v3 13/15] x86/paravirt: move the pv_irq_ops under the PARAVIRT_XXL umbrella

2018-08-28 Thread Juergen Gross
All of the paravirt ops defined in pv_irq_ops are for Xen PV guests or VSMP only. Define them only if CONFIG_PARAVIRT_XXL is set. Signed-off-by: Juergen Gross --- V3: - put all irq ops under XXL (Peter Zijlstra) --- arch/x86/include/asm/irqflags.h | 8 +---

[PATCH v3 10/15] x86/paravirt: introduce new config option PARAVIRT_XXL

2018-08-28 Thread Juergen Gross
A large amount of paravirt ops is used by Xen PV guests only. Add a new config option PARAVIRT_XXL which is selected by XEN_PV. Later we can put the Xen PV only paravirt ops under the PARAVIRT_XXL umbrella. Since irq related paravirt ops are used only by VSMP and Xen PV, let VSMP select

[PATCH v3 07/15] x86/paravirt: remove clobbers from struct paravirt_patch_site

2018-08-28 Thread Juergen Gross
There is no need any longer to store the clobbers in struct paravirt_patch_site. Remove clobbers from the struct and from the related macros. While at it fix some lines longer than 80 characters. Signed-off-by: Juergen Gross Reviewed-by: Thomas Gleixner --- arch/x86/include/asm/paravirt.h

[PATCH v3 12/15] x86/paravirt: move the Xen-only pv_cpu_ops under the PARAVIRT_XXL umbrella

2018-08-28 Thread Juergen Gross
Most of the paravirt ops defined in pv_cpu_ops are for Xen PV guests only. Define them only if CONFIG_PARAVIRT_XXL is set. Signed-off-by: Juergen Gross --- arch/x86/include/asm/debugreg.h | 2 +- arch/x86/include/asm/desc.h | 4 ++-- arch/x86/include/asm/irqflags.h | 16

[PATCH v3 15/15] x86/paravirt: remove unneeded mmu related paravirt ops bits

2018-08-28 Thread Juergen Gross
There is no need to have 32-bit code for CONFIG_PGTABLE_LEVELS >= 4. Remove it. Signed-off-by: Juergen Gross --- arch/x86/include/asm/paravirt.h | 20 +++- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/arch/x86/include/asm/paravirt.h

[PATCH v3 14/15] x86/paravirt: move the Xen-only pv_mmu_ops under the PARAVIRT_XXL umbrella

2018-08-28 Thread Juergen Gross
Most of the paravirt ops defined in pv_mmu_ops are for Xen PV guests only. Define them only if CONFIG_PARAVIRT_XXL is set. Signed-off-by: Juergen Gross --- arch/x86/include/asm/fixmap.h | 2 +- arch/x86/include/asm/mmu_context.h| 4 +- arch/x86/include/asm/paravirt.h | 125

[PATCH v3 08/15] x86/paravirt: use a single ops structure

2018-08-28 Thread Juergen Gross
Instead of using six globally visible paravirt ops structures combine them in a single structure, keeping the original structures as sub-structures. This avoids the need to assemble struct paravirt_patch_template at runtime on the stack each time apply_paravirt() is being called (i.e. when