Re: [PATCH v2 4/9] x86/mm/tlb: Flush remote and local TLBs concurrently

2019-07-03 Thread Juergen Gross
Zhang Cc: Stephen Hemminger Cc: Sasha Levin Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x...@kernel.org Cc: Juergen Gross Cc: Paolo Bonzini Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Boris Ostrovsky Cc: linux-hyp...@vger.kernel.org Cc: linux-ker...@vger.

Re: [RFC PATCH v2 04/12] x86/mm/tlb: Flush remote and local TLBs concurrently

2019-05-31 Thread Juergen Gross
hen Hemminger > Cc: Sasha Levin > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: Borislav Petkov > Cc: x...@kernel.org > Cc: Juergen Gross > Cc: Paolo Bonzini > Cc: Dave Hansen > Cc: Andy Lutomirski > Cc: Peter Zijlstra > Cc: Boris Ostrovsky > Cc: li

Re: [PATCH v7 11/12] x86/paravirt: Adapt assembly for PIE support

2019-05-26 Thread Juergen Gross
will allow to extend the > KASLR randomization range below 0x8000. > > Signed-off-by: Thomas Garnier Acked-by: Juergen Gross Juergen ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxf

Re: [RFC PATCH 5/6] x86/mm/tlb: Flush remote and local TLBs concurrently

2019-05-25 Thread Juergen Gross
hen Hemminger > Cc: Sasha Levin > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: Borislav Petkov > Cc: x...@kernel.org > Cc: Juergen Gross > Cc: Paolo Bonzini > Cc: Dave Hansen > Cc: Andy Lutomirski > Cc: Peter Zijlstra > Cc: Boris Ostrovsky > Cc: li

Re: [PATCH 00/10] s390: virtio: support protected virtualization

2019-05-03 Thread Juergen Gross
On 03/05/2019 11:55, Cornelia Huck wrote: > On Fri, 26 Apr 2019 20:32:35 +0200 > Halil Pasic wrote: > >> Enhanced virtualization protection technology may require the use of >> bounce buffers for I/O. While support for this was built into the virtio >> core, virtio-ccw wasn't changed

Re: [PATCH] x86/paravirt: Guard against invalid cpu # in pv_vcpu_is_preempted()

2019-04-01 Thread Juergen Gross
On 25/03/2019 19:03, Waiman Long wrote: > On 03/25/2019 12:40 PM, Juergen Gross wrote: >> On 25/03/2019 16:57, Waiman Long wrote: >>> It was found that passing an invalid cpu number to pv_vcpu_is_preempted() >>> might panic the kernel in a VM guest. For example, >&g

Re: [PATCH 2/5] x86: Convert some slow-path static_cpu_has() callers to boot_cpu_has()

2019-03-30 Thread Juergen Gross
the paravirt part: Reviewed-by: Juergen Gross Juergen ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH] MAINTAINERS: Update PARAVIRT_OPS_INTERFACE and VMWARE_HYPERVISOR_INTERFACE

2019-03-28 Thread Juergen Gross
On 28/03/2019 13:06, Thomas Hellstrom wrote: > Alok Kataria will be handing over VMware's maintainership of these > interfaces to Thomas Hellström, with pv-drivers as backup contact. > > Cc: Juergen Gross > Cc: virtualization@lists.linux-foundation.org > Cc: x...@

Re: [PATCH] x86/paravirt: Guard against invalid cpu # in pv_vcpu_is_preempted()

2019-03-25 Thread Juergen Gross
On 25/03/2019 16:57, Waiman Long wrote: > It was found that passing an invalid cpu number to pv_vcpu_is_preempted() > might panic the kernel in a VM guest. For example, > > [2.531077] Oops: [#1] SMP PTI > : > [2.532545] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 > [

Re: [PATCH 0/2] i8253: Fix PIT shutdown quirk on Hyper-V

2018-11-02 Thread Juergen Gross
On 01/11/2018 18:30, Michael Kelley wrote: > pit_shutdown() doesn't work on Hyper-V because of a quirk in the > PIT emulation. This problem exists in all versions of Hyper-V and > had not been noticed previously. When the counter register is set > to zero, the emulated PIT continues to interrupt

[PATCH] x86/paravirt: remove unused _paravirt_ident_32

2018-10-30 Thread Juergen Gross
There is no user of _paravirt_ident_32 left in the tree. Remove it together with the related paravirt_patch_ident_32(). paravirt_patch_ident_64() can be moved inside CONFIG_PARAVIRT_XXL. Signed-off-by: Juergen Gross --- arch/x86/include/asm/paravirt_types.h | 2 -- arch/x86/kernel/paravirt.c

[PATCH] x86/paravirt: pv_ops isn't GPL only

2018-10-29 Thread Juergen Gross
). Change that by using EXPORT_SYMBOL(pv_ops). Fixes: 5c83511bdb9832 ("x86/paravirt: Use a single ops structure") Signed-off-by: Juergen Gross --- arch/x86/kernel/paravirt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/ker

Re: [PATCH] x86/paravirt: fix some warning messages

2018-09-19 Thread Juergen Gross
On 19/09/18 12:35, Dan Carpenter wrote: > The first argument to WARN_ONCE() is a condition. > > Fixes: 5800dc5c19f3 ("x86/paravirt: Fix spectre-v2 mitigations for paravirt > guests") > Signed-off-by: Dan Carpenter Reviewed-by:

Re: [PATCH v2] x86/paravirt: Cleanup native_patch()

2018-09-11 Thread Juergen Gross
>patch_site: > > but those labels can simply be removed by directly calling the > respective functions there. > > Get rid of local variables too, while at it. Also, simplify function > flow for better readability. > > Signed-off-by: Borislav Petkov > Cc: Juergen Gros

Re: [PATCH] x86/paravirt: Cleanup native_patch()

2018-09-10 Thread Juergen Gross
On 10/09/18 09:01, Borislav Petkov wrote: > On Mon, Sep 10, 2018 at 08:54:12AM +0200, Juergen Gross wrote: >>> + case PARAVIRT_PATCH(lock.queued_spin_unlock): >>> + if (pv_is_native_spin_unlock()) >>> + return

Re: [PATCH] x86/paravirt: Cleanup native_patch()

2018-09-10 Thread Juergen Gross
>patch_site: > > but those labels can simply be removed by directly calling the > respective functions there. > > Get rid of local variables too, while at it. > > Signed-off-by: Borislav Petkov > Cc: Juergen Gross > Cc: x...@kernel.org > Cc: virtualization@lists.li

Re: [PATCH v2] x86/paravirt: Get rid of patch_site and patch_default labels

2018-09-07 Thread Juergen Gross
ng the > respective functions there. > > Signed-off-by: Borislav Petkov > Cc: Juergen Gross > Cc: x...@kernel.org > Cc: virtualization@lists.linux-foundation.org > --- > arch/x86/kernel/paravirt_patch_32.c | 21 ++--- > arch/x86/kernel/paravirt_patch_6

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

2018-08-28 Thread Juergen Gross
loading a module). Signed-off-by: Juergen Gross --- V2: - shorten pv_ops sub-structure names (Jan Beulich) V3: - rebase to master - fix build failure on ARM --- arch/arm/include/asm/paravirt.h | 9 +- arch/arm/kernel/paravirt.c| 4 +- arch/arm64/include/asm/paravirt.h | 9

[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 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 b/arch/x86/include/

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

2018-08-28 Thread Juergen Gross
PARAVIRT_XXL, too, in order to enable moving the irq ops under PARAVIRT_XXL. Signed-off-by: Juergen Gross --- V3: - let VSMP select PARAVIRT_XXL (Peter Zijlstra) --- arch/x86/Kconfig | 4 arch/x86/boot/compressed/misc.h| 1 + arch/x86/mm/mem_encrypt_identity.c | 1 + arch/x86

[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 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 +--- arch/x86/include/asm

[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 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 00/15] x86/paravirt, xen: several cleanups

2018-08-28 Thread Juergen Gross
errors on ARM - let VSMP select PARAVIRT_XXL, put all irq_ops under PARAVIRT_XXL Changes in V2: - patch 4: shorten pv_ops sub-structure names (Jan Beulich) - patch 11: new patch Juergen Gross (15): xen: move pv irq related functions under CONFIG_XEN_PV umbrella xen: move pv specific parts

[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) --- arch/arm/xen

[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 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 01/15] xen: move pv irq related functions under CONFIG_XEN_PV umbrella

2018-08-28 Thread Juergen Gross
on CONFIG_XEN_PVHVM. While at it reformat the Makefile to make it more readable. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Acked-by: Thomas Gleixner --- arch/x86/entry/entry_32.S | 8 +--- arch/x86/entry/entry_64.S | 8 +--- arch/x86/xen/Makefile | 41

[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

Re: [PATCH v2 10/11] x86/paravirt: move the Xen-only pv_mmu_ops under the PARAVIRT_XXL umbrella

2018-08-24 Thread Juergen Gross
On 24/08/18 16:12, Peter Zijlstra wrote: > On Mon, Aug 13, 2018 at 09:37:38AM +0200, Juergen Gross wrote: >> struct pv_mmu_ops { >> +/* TLB operations */ >> +void (*flush_tlb_user)(void); >> +void (*flush_tlb_kernel)(void); >> +void (*flush

Re: [PATCH v2 09/11] x86/paravirt: move the Xen-only pv_irq_ops under the PARAVIRT_XXL umbrella

2018-08-24 Thread Juergen Gross
On 24/08/18 16:10, Peter Zijlstra wrote: > On Mon, Aug 13, 2018 at 09:37:37AM +0200, Juergen Gross wrote: >> Some of the paravirt ops defined in pv_irq_ops are for Xen PV guests >> only. Define them only if CONFIG_PARAVIRT_XXL is set. >> diff --git a/arch/x86/include/asm/p

Re: [PATCH v2 00/11] x86/paravirt: several cleanups

2018-08-24 Thread Juergen Gross
On 13/08/18 09:37, Juergen Gross wrote: > 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. > > A pvops kernel without XEN_PV being conf

[PATCH v2 10/11] x86/paravirt: move the Xen-only pv_mmu_ops under the PARAVIRT_XXL umbrella

2018-08-13 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 | 115

[PATCH v2 08/11] x86/paravirt: move the Xen-only pv_cpu_ops under the PARAVIRT_XXL umbrella

2018-08-13 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 v2 11/11] x86/paravirt: remove unneeded mmu related paravirt ops bits

2018-08-13 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 b/arch/x86/include/

[PATCH v2 09/11] x86/paravirt: move the Xen-only pv_irq_ops under the PARAVIRT_XXL umbrella

2018-08-13 Thread Juergen Gross
Some of the paravirt ops defined in pv_irq_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/irqflags.h | 38 ++- arch/x86/include/asm/paravirt.h | 2 -- arch/x86

[PATCH v2 07/11] x86/paravirt: move items in pv_info under PARAVIRT_XXL umbrella

2018-08-13 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 v2 05/11] x86/paravirt: remove unused paravirt bits

2018-08-13 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 v2 06/11] x86/paravirt: introduce new config option PARAVIRT_XXL

2018-08-13 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 PARACVIRT_XXL umbrella. Signed-off-by: Juergen Gross --- arch/x86/Kconfig | 3 +++ arch/x86/xen/Kconfig | 1

[PATCH v2 00/11] x86/paravirt: several cleanups

2018-08-13 Thread Juergen Gross
ore Xen PV-only code behind CONFIG_XEN_PV. Changes in V2: - patch 4: shorten pv_ops sub-structure names (Jan Beulich) - patch 11: new patch Juergen Gross (11): x86/paravirt: make paravirt_patch_call() and paravirt_patch_jmp() static x86/paravirt: remove clobbers parameter from para

[PATCH v2 03/11] x86/paravirt: remove clobbers from struct paravirt_patch_site

2018-08-13 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 --- arch/x86/include/asm/paravirt.h | 33

[PATCH v2 02/11] x86/paravirt: remove clobbers parameter from paravirt patch functions

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

[PATCH v2 01/11] x86/paravirt: make paravirt_patch_call() and paravirt_patch_jmp() static

2018-08-13 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 --- arch/x86/include/asm/paravirt_types.h | 6 -- arch/x86/kernel/paravirt.c| 12 ++-- 2 files changed, 6 insertions(+), 12 deletions

Re: [PATCH 06/10] x86/paravirt: introduce new config option PARAVIRT_XXL

2018-08-10 Thread Juergen Gross
On 10/08/18 16:22, Boris Ostrovsky wrote: > On 08/10/2018 07:52 AM, Juergen Gross wrote: >> 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 un

Re: [Xen-devel] [PATCH 04/10] x86/paravirt: use a single ops structure

2018-08-10 Thread Juergen Gross
On 10/08/18 14:06, Jan Beulich wrote: On 10.08.18 at 13:52, wrote: >> --- a/arch/x86/hyperv/mmu.c >> +++ b/arch/x86/hyperv/mmu.c >> @@ -228,9 +228,9 @@ void hyperv_setup_mmu_ops(void) >> >> if (!(ms_hyperv.hints & HV_X64_EX_PROCESSOR_MASKS_RECOMMENDED)) { >>

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

2018-08-10 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 | 115

[PATCH 09/10] x86/paravirt: move the Xen-only pv_irq_ops under the PARAVIRT_XXL umbrella

2018-08-10 Thread Juergen Gross
Some of the paravirt ops defined in pv_irq_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/irqflags.h | 38 ++- arch/x86/include/asm/paravirt.h | 2 -- arch/x86

[PATCH 08/10] x86/paravirt: move the Xen-only pv_cpu_ops under the PARAVIRT_XXL umbrella

2018-08-10 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 07/10] x86/paravirt: move items in pv_info under PARAVIRT_XXL umbrella

2018-08-10 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 04/10] x86/paravirt: use a single ops structure

2018-08-10 Thread Juergen Gross
loading a module). Signed-off-by: Juergen Gross --- arch/x86/hyperv/mmu.c | 4 +- arch/x86/include/asm/paravirt.h | 51 --- arch/x86/include/asm/paravirt_types.h | 13 +- arch/x86/kernel/alternative.c | 2 +- arch/x86/kernel/asm-offsets.c | 14 +- arch

[PATCH 05/10] x86/paravirt: remove unused paravirt bits

2018-08-10 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 06/10] x86/paravirt: introduce new config option PARAVIRT_XXL

2018-08-10 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 PARACVIRT_XXL umbrella. Signed-off-by: Juergen Gross --- arch/x86/Kconfig | 3 +++ arch/x86/xen/Kconfig | 1

[PATCH 02/10] x86/paravirt: remove clobbers parameter from paravirt patch functions

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

[PATCH 03/10] x86/paravirt: remove clobbers from struct paravirt_patch_site

2018-08-10 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 --- arch/x86/include/asm/paravirt.h | 33

[PATCH 00/10] x86/paravirt: several cleanups

2018-08-10 Thread Juergen Gross
ore Xen PV-only code behind CONFIG_XEN_PV. Juergen Gross (10): x86/paravirt: make paravirt_patch_call() and paravirt_patch_jmp() static x86/paravirt: remove clobbers parameter from paravirt patch functions x86/paravirt: remove clobbers from struct paravirt_patch_site x86/paravirt: us

[PATCH 01/10] x86/paravirt: make paravirt_patch_call() and paravirt_patch_jmp() static

2018-08-10 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 --- arch/x86/include/asm/paravirt_types.h | 6 -- arch/x86/kernel/paravirt.c| 12 ++-- 2 files changed, 6 insertions(+), 12 deletions

Re: [PATCH v6 3/3] x86: paravirt: make native_save_fl extern inline

2018-07-03 Thread Juergen Gross
On 26/06/18 18:22, Nick Desaulniers wrote: > On Tue, Jun 26, 2018 at 3:13 AM Ingo Molnar wrote: >> Ok! >> >> Acked-by: Ingo Molnar >> >> What's the planned upstreaming route for these patches/fixes? > > While the fix is mainly for paravirt, 2/3 of the patches exclusively > touch arch/x86, so I

Re: [PATCH] x86-64: use RIP-relative calls for paravirt indirect ones

2018-07-02 Thread Juergen Gross
On 25/06/18 12:29, Jan Beulich wrote: > This saves one insn byte per instance, summing up to a savings of over > 4k in my (stripped down) configuration. No variant of to be patched in > replacement code relies on the one byte larger size. > > Signed-off-by: Jan Beulich Revie

Re: [PATCH v4 6/9] x86: prevent inline distortion by paravirt ops

2018-06-19 Thread Juergen Gross
fter (+14819) > > Static text symbols: > Before: 40053 > After:39942 (-111) > > Cc: Juergen Gross > Cc: Alok Kataria > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: "H. Peter Anvin" > Cc: x...@kernel.org > Cc: virtualization@lis

Re: [PATCH v5 0/3] extern inline native_save_fl for paravirt

2018-06-19 Thread Juergen Gross
arch/x86/kernel/Makefile| 1 + > arch/x86/kernel/irqflags.S | 26 +++ > include/linux/compiler-gcc.h| 29 ++++ > 5 files changed, 109 insertions(+), 8 deletions(-) > create mode 100644 arch/x86/kernel/irqflags.S > For the series: Acked-by

Re: [PATCH v3 18/27] xen: Adapt assembly for PIE support

2018-05-24 Thread Juergen Gross
low to extended the > KASLR randomization range below the -2G memory limit. > > Signed-off-by: Thomas Garnier <thgar...@google.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Juergen ___ Virtualization mailing list Virtualizat

Re: [PATCH v3 1/6] jailhouse: Provide detection for non-x86 systems

2018-02-28 Thread Juergen Gross
I'd appreciate if you'd Cc: the maintainers of the touched files... Reviewed-by: Juergen Gross <jgr...@suse.com> Juergen ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [v2 1/1] xen, mm: Allow deferred page initialization for xen pv domains

2018-02-26 Thread Juergen Gross
On 26/02/18 17:01, Pavel Tatashin wrote: > Juergen Gross noticed that commit > f7f99100d8d ("mm: stop zeroing memory during allocation in vmemmap") > broke XEN PV domains when deferred struct page initialization is enabled. > > This is because the xen's PagePinned() fl

Re: [v1 1/1] xen, mm: Allow deferred page initialization for xen pv domains

2018-02-25 Thread Juergen Gross
On 24/02/18 00:25, Pavel Tatashin wrote: > Juergen Gross noticed that commit > f7f99100d8d ("mm: stop zeroing memory during allocation in vmemmap") > broke XEN PV domains when deferred struct page initialization is enabled. > > This is because the xen's PagePinned() fl

Re: [PATCH 03/13] x86/paravirt: Convert native patch assembly code strings to macros

2017-11-18 Thread Juergen Gross
On 17/11/17 20:42, Josh Poimboeuf wrote: > On Fri, Nov 17, 2017 at 08:10:13PM +0100, Juergen Gross wrote: >> On 17/11/17 19:07, Borislav Petkov wrote: >>> On Wed, Oct 04, 2017 at 10:58:24AM -0500, Josh Poimboeuf wrote: >>>> Convert the hard-coded native patch a

Re: [PATCH 03/13] x86/paravirt: Convert native patch assembly code strings to macros

2017-11-17 Thread Juergen Gross
On 17/11/17 19:07, Borislav Petkov wrote: > On Wed, Oct 04, 2017 at 10:58:24AM -0500, Josh Poimboeuf wrote: >> Convert the hard-coded native patch assembly code strings to macros to >> facilitate sharing common code between 32-bit and 64-bit. >> >> These macros will also be used by a future patch

Re: [PATCH 02/13] x86/paravirt: Fix output constraint macro names

2017-11-16 Thread Juergen Gross
On 16/11/17 21:50, Josh Poimboeuf wrote: > On Wed, Oct 25, 2017 at 11:33:43AM +0200, Juergen Gross wrote: >> On 04/10/17 17:58, Josh Poimboeuf wrote: >>> Some of the paravirt '*_CLOBBERS' macros refer to output constraints >>> instead of clobbers, which makes the co

Re: [PATCH 10/13] x86/alternative: Support indirect call replacement

2017-11-16 Thread Juergen Gross
On 16/11/17 22:19, Josh Poimboeuf wrote: > On Wed, Oct 25, 2017 at 01:25:02PM +0200, Juergen Gross wrote: >> On 04/10/17 17:58, Josh Poimboeuf wrote: >>> Add alternative patching support for replacing an instruction with an >>> indirect call. This will be needed fo

Re: [PATCH RFC v3 1/6] x86/paravirt: Add pv_idle_ops to paravirt ops

2017-11-14 Thread Juergen Gross
On 14/11/17 12:43, Quan Xu wrote: > > > On 2017/11/14 18:27, Juergen Gross wrote: >> On 14/11/17 10:38, Quan Xu wrote: >>> >>> On 2017/11/14 15:30, Juergen Gross wrote: >>>> On 14/11/17 08:02, Quan Xu wrote: >>>>> On 2017/11/13 18:53,

Re: [PATCH RFC v3 1/6] x86/paravirt: Add pv_idle_ops to paravirt ops

2017-11-14 Thread Juergen Gross
On 14/11/17 10:38, Quan Xu wrote: > > > On 2017/11/14 15:30, Juergen Gross wrote: >> On 14/11/17 08:02, Quan Xu wrote: >>> >>> On 2017/11/13 18:53, Juergen Gross wrote: >>>> On 13/11/17 11:06, Quan Xu wrote: >>>>> From: Quan

Re: [PATCH RFC v3 1/6] x86/paravirt: Add pv_idle_ops to paravirt ops

2017-11-13 Thread Juergen Gross
On 14/11/17 08:02, Quan Xu wrote: > > > On 2017/11/13 18:53, Juergen Gross wrote: >> On 13/11/17 11:06, Quan Xu wrote: >>> From: Quan Xu <quan@gmail.com> >>> >>> So far, pv_idle_ops.poll is the only ops for pv_idle. .poll is called >>>

Re: [PATCH RFC v3 1/6] x86/paravirt: Add pv_idle_ops to paravirt ops

2017-11-13 Thread Juergen Gross
.@gmail.com> > Signed-off-by: Quan Xu <quan@gmail.com> > Cc: Juergen Gross <jgr...@suse.com> > Cc: Alok Kataria <akata...@vmware.com> > Cc: Rusty Russell <ru...@rustcorp.com.au> > Cc: Thomas Gleixner <t...@linutronix.de> > Cc: Ingo Molnar

[PATCH v2 1/5] x86: merge x86_hyper into x86_platform and x86_init

2017-11-09 Thread Juergen Gross
...@linuxdriverproject.org Cc: virtualization@lists.linux-foundation.org Cc: k...@vger.kernel.org Cc: xen-de...@lists.xenproject.org Suggested-by: Ingo Molnar <mi...@kernel.org> Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/include/asm/hypervisor.h | 25 -- arch/x86

[PATCH v2 0/5] x86/xen: support booting PVH guest via standard boot path

2017-11-09 Thread Juergen Gross
: a...@arndb.de Cc: gre...@linuxfoundation.org Cc: linux-in...@vger.kernel.org Cc: r...@rjwysocki.net Cc: len.br...@intel.com Cc: pa...@ucw.cz Cc: linux...@vger.kernel.org Juergen Gross (5): x86: merge x86_hyper into x86_platform and x86_init x86: add enum for hypervisors to replace x86_hyper x86/acpi: add

[PATCH v2 2/5] x86: add enum for hypervisors to replace x86_hyper

2017-11-09 Thread Juergen Gross
: dmitry.torok...@gmail.com Cc: xdeguill...@vmware.com Cc: moltm...@vmware.com Cc: a...@arndb.de Cc: gre...@linuxfoundation.org Cc: linux-in...@vger.kernel.org Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/hyperv/hv_init.c | 2 +- arch/x86/include/asm/hypervisor.

Re: [PATCH-tip v2 2/2] x86/xen: Deprecate xen_nopvspin

2017-11-02 Thread Juergen Gross
On 02/11/17 14:25, Waiman Long wrote: > On 11/01/2017 06:01 PM, Boris Ostrovsky wrote: >> On 11/01/2017 04:58 PM, Waiman Long wrote: >>> +/* TODO: To be removed in a future kernel version */ >>> static __init int xen_parse_nopvspin(char *arg) >>> { >>> - xen_pvspin = false; >>> +

Re: [PATCH] x86/paravirt: Add kernel parameter to choose paravirt lock type

2017-11-01 Thread Juergen Gross
On 01/11/17 16:32, Waiman Long wrote: > Currently, there are 3 different lock types that can be chosen for > the x86 architecture: > > - qspinlock > - pvqspinlock > - unfair lock > > One of the above lock types will be chosen at boot time depending on > a number of different factors. > >

Re: [locking/paravirt] static_key_disable_cpuslocked(): static key 'virt_spin_lock_key+0x0/0x20' used before call to jump_label_init()

2017-10-30 Thread Juergen Gross
t; 41 5c 5d c3 48 89 fa 48 c7 c6 40 93 a3 81 48 c7 c7 00 8b cb 81 e8 95 b5 > f3 ff <0f> ff eb a8 0f ff eb b3 48 89 df e8 14 fc ff ff eb c7 66 90 e8 > [    0.00] ---[ end trace c12d07f00399ce78 ]--- > [    0.00] Built 2 zonelists, mobility grouping on.  Total pages: > 33006159 >

Re: [PATCH] x86: Remove unnecessary return from void function

2017-10-27 Thread Juergen Gross
On 23/06/17 18:23, Anton Vasilyev wrote: > The patch removes unnecessary return from void function. > > Found by Linux Driver Verification project (linuxtesting.org). > > Signed-off-by: Anton Vasilyev <vasil...@ispras.ru> Reviewed-by: Juergen Gross <jg

[PATCH] maintainers: drop Chris Wright from pvops

2017-10-26 Thread Juergen Gross
Mails to chr...@sous-sol.org are not deliverable since several months. Drop him as PARAVIRT_OPS maintainer. Signed-off-by: Juergen Gross <jgr...@suse.com> --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index d85c08956875..af0cb69f6a3e

Re: [PATCH 10/13] x86/alternative: Support indirect call replacement

2017-10-25 Thread Juergen Gross
On 04/10/17 17:58, Josh Poimboeuf wrote: > Add alternative patching support for replacing an instruction with an > indirect call. This will be needed for the paravirt alternatives. > > Signed-off-by: Josh Poimboeuf > --- > arch/x86/kernel/alternative.c | 22

Re: [PATCH 09/13] x86/asm: Convert ALTERNATIVE*() assembler macros to preprocessor macros

2017-10-25 Thread Juergen Gross
On 04/10/17 17:58, Josh Poimboeuf wrote: > The ALTERNATIVE() and ALTERNATIVE_2() macros are GNU assembler macros, > which makes them quite inflexible for future changes. Convert them to > preprocessor macros. > > Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Revie

Re: [PATCH 08/13] x86/paravirt: Clean up paravirt_types.h

2017-10-25 Thread Juergen Gross
On 04/10/17 17:58, Josh Poimboeuf wrote: > Make paravirt_types.h more understandable: > > - Use more consistent and logical naming > - Simplify interfaces > - Put related macros together > - Improve whitespace > > Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com&g

Re: [PATCH 07/13] x86/paravirt: Simplify ____PVOP_CALL()

2017-10-25 Thread Juergen Gross
t;jpoim...@redhat.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Juergen ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH 06/13] x86/paravirt: Clean up paravirt-asm.h

2017-10-25 Thread Juergen Gross
On 04/10/17 17:58, Josh Poimboeuf wrote: > Some cleanup to make the code easier to read and understand: > > - Use the common "PV_" prefix > - Simplify the PV_SITE macro interface > - Improve whitespace > > Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com

Re: [PATCH 05/13] x86/paravirt: Move paravirt asm macros to paravirt-asm.h

2017-10-25 Thread Juergen Gross
hat.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Juergen ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH 04/13] x86/paravirt: Convert DEF_NATIVE macro to GCC extended asm syntax

2017-10-25 Thread Juergen Gross
sm syntax so the NATIVE_* macros can be shared more > broadly. > > Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Juergen ___ Virtualization mailing list Virtualization

Re: [PATCH 03/13] x86/paravirt: Convert native patch assembly code strings to macros

2017-10-25 Thread Juergen Gross
'%' characters instead of one when specifying > a register name. > > Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Mind adding another patch to merge the now nearly identical paravirt_patch_32.c and paravirt_patch_64.c either

Re: [PATCH 02/13] x86/paravirt: Fix output constraint macro names

2017-10-25 Thread Juergen Gross
On 04/10/17 17:58, Josh Poimboeuf wrote: > Some of the paravirt '*_CLOBBERS' macros refer to output constraints > instead of clobbers, which makes the code extra confusing. Rename the > output constraint related macros to '*_OUTPUTS'. > > Signed-off-by: Josh Poimboeuf I'm

Re: [PATCH 01/13] x86/paravirt: remove wbinvd() paravirt interface

2017-10-24 Thread Juergen Gross
On 04/10/17 17:58, Josh Poimboeuf wrote: > Since lguest was removed, only the native version of wbinvd() is used. > The paravirt interface is no longer needed. > > Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Reviewed-by: Juergen Gross <jgr..

[PATCH v3 2/2] paravirt,xen: correct xen_nopvspin case

2017-09-06 Thread Juergen Gross
r to avoid this disable the virt_spin_lock_key. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/xen/spinlock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c index 25a7c4302ce7..e8ab80ad7a6f 100644 --- a/arch/x86/xen/spinlock.c ++

[PATCH v3 0/2] guard virt_spin_lock() with a static key

2017-09-06 Thread Juergen Gross
metal behavior. V3: - remove test for hypervisor environment from virt_spin_lock(9 as suggested by Waiman Long V2: - use static key instead of making virt_spin_lock() a pvops function Juergen Gross (2): paravirt/locks: use new static key for controlling call of virt_spin_lock() paravirt

[PATCH v3 1/2] paravirt/locks: use new static key for controlling call of virt_spin_lock()

2017-09-06 Thread Juergen Gross
static key controlling whether virt_spin_lock() should be called or not. When running on bare metal set the new key to false. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/include/asm/qspinlock.h | 11 ++- arch/x86/kernel/paravirt-spinlocks.c | 6 ++ arch/x86/

Re: [PATCH v2 1/2] paravirt/locks: use new static key for controlling call of virt_spin_lock()

2017-09-06 Thread Juergen Gross
On 06/09/17 18:13, Waiman Long wrote: > On 09/06/2017 12:04 PM, Peter Zijlstra wrote: >> On Wed, Sep 06, 2017 at 11:49:49AM -0400, Waiman Long wrote: #define virt_spin_lock virt_spin_lock static inline bool virt_spin_lock(struct qspinlock *lock) { + if

[PATCH v2 1/2] paravirt/locks: use new static key for controlling call of virt_spin_lock()

2017-09-06 Thread Juergen Gross
static key controlling whether virt_spin_lock() should be called or not. When running on bare metal set the new key to false. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/include/asm/qspinlock.h | 11 +++ arch/x86/kernel/paravirt-spinlocks.c | 6 ++ arch/x86/

[PATCH v2 2/2] paravirt,xen: correct xen_nopvspin case

2017-09-06 Thread Juergen Gross
r to avoid this disable the virt_spin_lock_key. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/xen/spinlock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c index 25a7c4302ce7..e8ab80ad7a6f 100644 --- a/arch/x86/xen/spinlock.c ++

<    1   2   3   4   5   >