Re: [PATCH 1/4] powerpc/64s: Clear on-stack exception marker upon exception return

2019-02-01 Thread Balbir Singh
On Sat, Feb 2, 2019 at 12:14 PM Balbir Singh wrote: > > On Tue, Jan 22, 2019 at 10:57:21AM -0500, Joe Lawrence wrote: > > From: Nicolai Stange > > > > The ppc64 specific implementation of the reliable stacktracer, > > save_stack_trace_tsk_reliable(), bails out and reports an "unreliable > >

[PATCH V2 9/10] KVM: Add flush parameter for kvm_age_hva()

2019-02-01 Thread lantianyu1986
From: Lan Tianyu This patch is to add flush parameter for kvm_aga_hva() and move tlb flush from kvm_mmu_notifier_clear_flush_young() to kvm_age_hva(). kvm_age_hva() can check whether tlb flush is necessary when return value young is more than 0. Flush tlb if both conditions are met.

[PATCH V2 8/10] KVM: Use tlb range flush in the kvm_vm_ioctl_get/clear_dirty_log()

2019-02-01 Thread lantianyu1986
From: Lan Tianyu This patch is to use tlb range flush to flush memslot's in the kvm_vm_ioctl_get/clear_dirty_log() instead of flushing tlbs of entire ept page table when range flush is available. Signed-off-by: Lan Tianyu --- arch/x86/kvm/mmu.c | 8 +--- arch/x86/kvm/mmu.h | 7 +++

[PATCH V2 7/10] KVM: Add kvm_get_memslot() to get memslot via slot id

2019-02-01 Thread lantianyu1986
From: Lan Tianyu This patch is to add kvm_get_memslot() to get struct kvm_memory_slot via slot it and remove redundant codes. The function will also be used in the following changes. Signed-off-by: Lan Tianyu --- include/linux/kvm_host.h | 1 + virt/kvm/kvm_main.c | 45

[PATCH V2 6/10] KVM/MMU: Flush tlb directly in the kvm_mmu_slot_gfn_write_protect()

2019-02-01 Thread lantianyu1986
From: Lan Tianyu This patch is to flush tlb directly in the kvm_mmu_slot_gfn_write_protect() when range flush is available. Signed-off-by: Lan Tianyu --- arch/x86/kvm/mmu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index

[PATCH V2 5/10] KVM/MMU: Flush tlb with range list in sync_page()

2019-02-01 Thread lantianyu1986
From: Lan Tianyu This patch is to flush tlb via flush list function. Put page into flush list when return value of set_spte() includes flag SET_SPTE_NEED_REMOTE_TLB_FLUSH. kvm_flush_remote_ tlbs_with_list() checks whether the flush list is empty or not. It also checks whether range tlb flush is

[PATCH V2 4/10] KVM/MMU: Introduce tlb flush with range list

2019-02-01 Thread lantianyu1986
From: Lan Tianyu This patch is to introduce tlb flush with range list interface and use struct kvm_mmu_page as list entry. Use flush list function in the kvm_mmu_commit_zap_page(). Signed-off-by: Lan Tianyu --- arch/x86/kvm/mmu.c | 25 - 1 file changed, 24

[PATCH V2 3/10] KVM/MMU: Add last_level in the struct mmu_spte_page

2019-02-01 Thread lantianyu1986
From: Lan Tianyu This patch is to add last_level in the struct kvm_mmu_page. When build flush tlb range list, last_level will be used to identify whehter the page should be added into list. Signed-off-by: Lan Tianyu --- arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/mmu.c |

[PATCH V2 2/10] KVM/VMX: Fill range list in kvm_fill_hv_flush_list_func()

2019-02-01 Thread lantianyu1986
From: Lan Tianyu Populate ranges on the flush list into struct hv_guest_mapping_flush_list when flush list is available in the struct kvm_tlb_range. Signed-off-by: Lan Tianyu --- Change since v1: Make flush list as a "hlist" instead of a "list" in order to keep struct

[PATCH V2 1/10] X86/Hyper-V: Add parameter offset for hyperv_fill_flush_guest_mapping_list()

2019-02-01 Thread lantianyu1986
From: Lan Tianyu Add parameter offset to specify start position to add flush ranges in guest address list of struct hv_guest_mapping_flush_list. Signed-off-by: Lan Tianyu --- arch/x86/hyperv/nested.c| 4 ++-- arch/x86/include/asm/mshyperv.h | 2 +- arch/x86/kvm/vmx/vmx.c | 2

[PATCH V2 00/10] X86/KVM/Hyper-V: Add HV ept tlb range list flush support in KVM

2019-02-01 Thread lantianyu1986
From: Lan Tianyu This patchset is to introduce hv ept tlb range list flush function support in the KVM MMU component. Flushing ept tlbs of several address range can be done via single hypercall and new list flush function is used in the kvm_mmu_commit_zap_page() and FNAME(sync_page). This

Re: [PATCH 1/4] powerpc/64s: Clear on-stack exception marker upon exception return

2019-02-01 Thread Balbir Singh
On Tue, Jan 22, 2019 at 10:57:21AM -0500, Joe Lawrence wrote: > From: Nicolai Stange > > The ppc64 specific implementation of the reliable stacktracer, > save_stack_trace_tsk_reliable(), bails out and reports an "unreliable > trace" whenever it finds an exception frame on the stack. Stack frames

Re: [PATCH 4/4] powerpc/livepatch: return -ERRNO values in save_stack_trace_tsk_reliable()

2019-02-01 Thread Balbir Singh
On Tue, Jan 22, 2019 at 10:57:24AM -0500, Joe Lawrence wrote: > To match its x86 counterpart, save_stack_trace_tsk_reliable() should > return -EINVAL in cases that it is currently returning 1. No caller is > currently differentiating non-zero error codes, but let's keep the > arch-specific

Re: [PATCH 05/19] KVM: PPC: Book3S HV: add a new KVM device for the XIVE native exploitation mode

2019-02-01 Thread Cédric Le Goater
On 1/31/19 4:01 AM, Paul Mackerras wrote: > On Wed, Jan 30, 2019 at 08:01:22AM +0100, Cédric Le Goater wrote: >> On 1/30/19 5:29 AM, Paul Mackerras wrote: >>> On Mon, Jan 28, 2019 at 06:35:34PM +0100, Cédric Le Goater wrote: On 1/22/19 6:05 AM, Paul Mackerras wrote: > On Mon, Jan 07, 2019

Re: use generic DMA mapping code in powerpc V4

2019-02-01 Thread Christian Zigotzky
Hi Christoph, I will try it at the weekend. Thanks, Christian Sent from my iPhone > On 1. Feb 2019, at 09:04, Christoph Hellwig wrote: > >> On Thu, Jan 31, 2019 at 01:48:26PM +0100, Christian Zigotzky wrote: >> Hi Christoph, >> >> I compiled kernels for the X5000 and X1000 from your branch

[PATCH net-next v4 12/12] sock: Add SO_RCVTIMEO_NEW and SO_SNDTIMEO_NEW

2019-02-01 Thread Deepa Dinamani
Add new socket timeout options that are y2038 safe. Signed-off-by: Deepa Dinamani Cc: ccaul...@redhat.com Cc: da...@davemloft.net Cc: del...@gmx.de Cc: pau...@samba.org Cc: r...@linux-mips.org Cc: r...@twiddle.net Cc: cluster-de...@redhat.com Cc: linuxppc-dev@lists.ozlabs.org Cc:

[PATCH net-next v4 11/12] socket: Rename SO_RCVTIMEO/ SO_SNDTIMEO with _OLD suffixes

2019-02-01 Thread Deepa Dinamani
SO_RCVTIMEO and SO_SNDTIMEO socket options use struct timeval as the time format. struct timeval is not y2038 safe. The subsequent patches in the series add support for new socket timeout options with _NEW suffix that will use y2038 safe data structures. Although the existing struct timeval layout

[PATCH V2 00/10] X86/KVM/Hyper-V: Add HV ept tlb range list flush support in KVM

2019-02-01 Thread lantianyu1986
From: Lan Tianyu This patchset is to introduce hv ept tlb range list flush function support in the KVM MMU component. Flushing ept tlbs of several address range can be done via single hypercall and new list flush function is used in the kvm_mmu_commit_zap_page() and FNAME(sync_page). This

Re: [PATCH v02] powerpc/pseries: Check for ceded CPU's during LPAR migration

2019-02-01 Thread Michael Bringmann
See below. On 1/31/19 3:53 PM, Michael Bringmann wrote: > On 1/30/19 11:38 PM, Michael Ellerman wrote: >> Michael Bringmann writes: >>> This patch is to check for cede'ed CPUs during LPM. Some extreme >>> tests encountered a problem ehere Linux has put some threads to >>> sleep (possibly to

Re: [RFC PATCH] powerpc/6xx: Don't set back MSR_RI before reenabling MMU

2019-02-01 Thread Christophe Leroy
Le 01/02/2019 à 12:10, Michael Ellerman a écrit : Christophe Leroy writes: By delaying the setting of MSR_RI, a 1% improvment is optained on null_syscall selftest on an mpc8321. Without this patch: root@vgoippro:~# ./null_syscall 1134.33 ns 378.11 cycles With this patch:

Re: BUG: memcmp(): Accessing invalid memory location

2019-02-01 Thread Michael Ellerman
Michael Ellerman writes: > Adding Simon who wrote the code. > > Chandan Rajendra writes: >> When executing fstests' generic/026 test, I hit the following call trace, >> >> [ 417.061038] BUG: Unable to handle kernel data access at 0xc0062ac4 >> [ 417.062172] Faulting instruction

Re: [RFC PATCH] powerpc/6xx: Don't set back MSR_RI before reenabling MMU

2019-02-01 Thread Michael Ellerman
Christophe Leroy writes: > By delaying the setting of MSR_RI, a 1% improvment is optained on > null_syscall selftest on an mpc8321. > > Without this patch: > > root@vgoippro:~# ./null_syscall >1134.33 ns 378.11 cycles > > With this patch: > > root@vgoippro:~# ./null_syscall >1121.85

[PATCH v2] powerpc: drop page_is_ram() and walk_system_ram_range()

2019-02-01 Thread Christophe Leroy
Since commit c40dd2f76644 ("powerpc: Add System RAM to /proc/iomem") it is possible to use the generic walk_system_ram_range() and the generic page_is_ram(). To enable the use of walk_system_ram_range() by the IBM EHEA ethernet driver, the generic function has to be exported. As powerpc was the

Re: fix a layering violation in videobuf2 and improve dma_map_resource v2

2019-02-01 Thread Christoph Hellwig
On Fri, Feb 01, 2019 at 08:05:21AM +0100, Marek Szyprowski wrote: > Works fine on older Exynos based boards with IOMMU and CMA disabled. > > Tested-by: Marek Szyprowski Thanks. I've merged the ѕeries into the dma-mapping tree, and I've also made a stable branch available at:

Re: [PATCH] powerpc: drop page_is_ram() and walk_system_ram_range()

2019-02-01 Thread Christoph Hellwig
On Thu, Jan 31, 2019 at 07:28:49PM +, Christophe Leroy wrote: > Since commit c40dd2f76644 ("powerpc: Add System RAM to /proc/iomem") > it is possible to use the generic walk_system_ram_range() and > the generic page_is_ram(). > > Fixes: c40dd2f76644 ("powerpc: Add System RAM to /proc/iomem")

Re: use generic DMA mapping code in powerpc V4

2019-02-01 Thread Christoph Hellwig
On Thu, Jan 31, 2019 at 01:48:26PM +0100, Christian Zigotzky wrote: > Hi Christoph, > > I compiled kernels for the X5000 and X1000 from your branch 'powerpc-dma.6' > today. > > Gitweb: > http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/powerpc-dma.6 > > git clone