Re: [PATCH v5 1/7] kvmppc: HMM backend driver to manage pages of secure guest

2019-07-18 Thread Christoph Hellwig
On Thu, Jul 11, 2019 at 10:38:48AM +0530, Bharata B Rao wrote: > Hmmm... I still find it in upstream, guess it will be removed soon? > > I find the below commit in mmotm. Please take a look at the latest hmm code in mainline, there have also been other significant changes as well.

Re: [PATCH v3 02/11] s390x/mm: Fail when an altmap is used for arch_add_memory()

2019-07-18 Thread Michal Hocko
On Mon 15-07-19 12:51:27, David Hildenbrand wrote: > On 01.07.19 14:46, Michal Hocko wrote: > > On Mon 01-07-19 09:43:06, Michal Hocko wrote: > >> On Mon 27-05-19 13:11:43, David Hildenbrand wrote: > >>> ZONE_DEVICE is not yet supported, fail if an altmap is passed, so we > >>> don't forget arch_ad

Re: [PATCH v3 06/11] mm/memory_hotplug: Allow arch_remove_pages() without CONFIG_MEMORY_HOTREMOVE

2019-07-18 Thread Michal Hocko
On Mon 15-07-19 12:54:20, David Hildenbrand wrote: [...] > So I'm leaving it like it is. arch_remove_memory() will be mandatory for > architectures implementing arch_add_memory(). I do agree that removing CONFIG_MEMORY_HOTREMOVE makes some sense. But this patch being a mid step should be simpler r

Re: [PATCH v3 10/11] mm/memory_hotplug: Make unregister_memory_block_under_nodes() never fail

2019-07-18 Thread Michal Hocko
On Mon 15-07-19 13:10:33, David Hildenbrand wrote: > On 01.07.19 12:27, Michal Hocko wrote: > > On Mon 01-07-19 11:36:44, Oscar Salvador wrote: > >> On Mon, Jul 01, 2019 at 10:51:44AM +0200, Michal Hocko wrote: > >>> Yeah, we do not allow to offline multi zone (node) ranges so the current > >>> cod

Re:[PATCH v7] cpufreq/pasemi: fix an use-after-freeinpas_cpufreq_cpu_init()

2019-07-18 Thread wen.yang99
>>> Hello Wen, >>> >>> Thanks for your patch! >>> >>> Did you test your patch with a P.A. Semi board? >>> >> Hello Christian, thank you. >> We don't have a P.A. Semi board yet, so we didn't test it. >> If you have such a board, could you please kindly help to test it? >> >> -- >> Thanks and regards

Re: [PATCH v2 1/3] tools/perf: Move kvm-stat header file from conditional inclusion to common include section

2019-07-18 Thread Ravi Bangoria
LGTM. For the series, Reviewed-By: Ravi Bangoria

[PATCH] powerpc/tm: Fix oops on sigreturn on systems without TM

2019-07-18 Thread Michael Neuling
On systems like P9 powernv where we have no TM (or P8 booted with ppc_tm=off), userspace can construct a signal context which still has the MSR TS bits set. The kernel tries to restore this context which results in the following crash: [ 74.980557] Unexpected TM Bad Thing exception at c0

[PATCH AUTOSEL 4.4 30/35] powerpc/eeh: Handle hugepages in ioremap space

2019-07-18 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 33439620680be5225c1b8806579a291e0d761ca0 ] In commit 4a7b06c157a2 ("powerpc/eeh: Handle hugepages in ioremap space") support for using hugepages in the vmalloc and ioremap areas was enabled for radix. Unfortunately this broke EEH MMIO error checking. De

[PATCH AUTOSEL 4.4 23/35] powerpc/4xx/uic: clear pending interrupt after irq type/pol change

2019-07-18 Thread Sasha Levin
From: Christian Lamparter [ Upstream commit 3ab3a0689e74e6aa5b41360bc18861040ddef5b1 ] When testing out gpio-keys with a button, a spurious interrupt (and therefore a key press or release event) gets triggered as soon as the driver enables the irq line for the first time. This patch clears any

[PATCH AUTOSEL 4.4 15/35] powerpc/pci/of: Fix OF flags parsing for 64bit BARs

2019-07-18 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit df5be5be8735ef2ae80d5ae1f2453cd81a035c4b ] When the firmware does PCI BAR resource allocation, it passes the assigned addresses and flags (prefetch/64bit/...) via the "reg" property of a PCI device device tree node so the kernel does not need to do re

[PATCH AUTOSEL 4.4 13/35] powerpc/pseries/mobility: rebuild cacheinfo hierarchy post-migration

2019-07-18 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit e610a466d16a086e321f0bd421e2fc75cff28605 ] It's common for the platform to replace the cache device nodes after a migration. Since the cacheinfo code is never informed about this, it never drops its references to the source system's cache nodes, causing it to

[PATCH AUTOSEL 4.4 12/35] powerpc/pseries/mobility: prevent cpu hotplug during DT update

2019-07-18 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit e59a175faa8df9d674247946f2a5a9c29c835725 ] CPU online/offline code paths are sensitive to parts of the device tree (various cpu node properties, cache nodes) that can be changed as a result of a migration. Prevent CPU hotplug while the device tree potentiall

[PATCH AUTOSEL 4.9 40/45] powerpc/eeh: Handle hugepages in ioremap space

2019-07-18 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 33439620680be5225c1b8806579a291e0d761ca0 ] In commit 4a7b06c157a2 ("powerpc/eeh: Handle hugepages in ioremap space") support for using hugepages in the vmalloc and ioremap areas was enabled for radix. Unfortunately this broke EEH MMIO error checking. De

[PATCH AUTOSEL 4.9 37/45] powerpc/boot: add {get, put}_unaligned_be32 to xz_config.h

2019-07-18 Thread Sasha Levin
From: Masahiro Yamada [ Upstream commit 9e005b761e7ad153dcf40a6cba1d681fe0830ac6 ] The next commit will make the way of passing CONFIG options more robust. Unfortunately, it would uncover another hidden issue; without this commit, skiroot_defconfig would be broken like this: | WRAParch/po

[PATCH AUTOSEL 4.9 29/45] powerpc/4xx/uic: clear pending interrupt after irq type/pol change

2019-07-18 Thread Sasha Levin
From: Christian Lamparter [ Upstream commit 3ab3a0689e74e6aa5b41360bc18861040ddef5b1 ] When testing out gpio-keys with a button, a spurious interrupt (and therefore a key press or release event) gets triggered as soon as the driver enables the irq line for the first time. This patch clears any

[PATCH AUTOSEL 4.9 18/45] powerpc/pci/of: Fix OF flags parsing for 64bit BARs

2019-07-18 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit df5be5be8735ef2ae80d5ae1f2453cd81a035c4b ] When the firmware does PCI BAR resource allocation, it passes the assigned addresses and flags (prefetch/64bit/...) via the "reg" property of a PCI device device tree node so the kernel does not need to do re

[PATCH AUTOSEL 4.14 51/60] powerpc/eeh: Handle hugepages in ioremap space

2019-07-18 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 33439620680be5225c1b8806579a291e0d761ca0 ] In commit 4a7b06c157a2 ("powerpc/eeh: Handle hugepages in ioremap space") support for using hugepages in the vmalloc and ioremap areas was enabled for radix. Unfortunately this broke EEH MMIO error checking. De

[PATCH AUTOSEL 4.14 48/60] powerpc/boot: add {get, put}_unaligned_be32 to xz_config.h

2019-07-18 Thread Sasha Levin
From: Masahiro Yamada [ Upstream commit 9e005b761e7ad153dcf40a6cba1d681fe0830ac6 ] The next commit will make the way of passing CONFIG options more robust. Unfortunately, it would uncover another hidden issue; without this commit, skiroot_defconfig would be broken like this: | WRAParch/po

[PATCH AUTOSEL 4.14 37/60] powerpc/4xx/uic: clear pending interrupt after irq type/pol change

2019-07-18 Thread Sasha Levin
From: Christian Lamparter [ Upstream commit 3ab3a0689e74e6aa5b41360bc18861040ddef5b1 ] When testing out gpio-keys with a button, a spurious interrupt (and therefore a key press or release event) gets triggered as soon as the driver enables the irq line for the first time. This patch clears any

[PATCH AUTOSEL 4.14 31/60] powerpc/xmon: Fix disabling tracing while in xmon

2019-07-18 Thread Sasha Levin
From: "Naveen N. Rao" [ Upstream commit aaf06665f7ea3ee9f9754e16c1a507a89f1de5b1 ] Commit ed49f7fd6438d ("powerpc/xmon: Disable tracing when entering xmon") added code to disable recording trace entries while in xmon. The commit introduced a variable 'tracing_enabled' to record if tracing was en

[PATCH AUTOSEL 4.14 23/60] powerpc/pci/of: Fix OF flags parsing for 64bit BARs

2019-07-18 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit df5be5be8735ef2ae80d5ae1f2453cd81a035c4b ] When the firmware does PCI BAR resource allocation, it passes the assigned addresses and flags (prefetch/64bit/...) via the "reg" property of a PCI device device tree node so the kernel does not need to do re

[PATCH AUTOSEL 4.14 17/60] powerpc/pseries/mobility: prevent cpu hotplug during DT update

2019-07-18 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit e59a175faa8df9d674247946f2a5a9c29c835725 ] CPU online/offline code paths are sensitive to parts of the device tree (various cpu node properties, cache nodes) that can be changed as a result of a migration. Prevent CPU hotplug while the device tree potentiall

[PATCH AUTOSEL 4.19 084/101] powerpc/eeh: Handle hugepages in ioremap space

2019-07-18 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 33439620680be5225c1b8806579a291e0d761ca0 ] In commit 4a7b06c157a2 ("powerpc/eeh: Handle hugepages in ioremap space") support for using hugepages in the vmalloc and ioremap areas was enabled for radix. Unfortunately this broke EEH MMIO error checking. De

[PATCH AUTOSEL 4.19 079/101] powerpc/boot: add {get, put}_unaligned_be32 to xz_config.h

2019-07-18 Thread Sasha Levin
From: Masahiro Yamada [ Upstream commit 9e005b761e7ad153dcf40a6cba1d681fe0830ac6 ] The next commit will make the way of passing CONFIG options more robust. Unfortunately, it would uncover another hidden issue; without this commit, skiroot_defconfig would be broken like this: | WRAParch/po

[PATCH AUTOSEL 4.19 062/101] powerpc/mm: Handle page table allocation failures

2019-07-18 Thread Sasha Levin
From: "Aneesh Kumar K.V" [ Upstream commit 2230ebf6e6dd0b7751e2921b40f6cfe34f09bb16 ] This fixes kernel crash that arises due to not handling page table allocation failures while allocating hugetlb page table. Fixes: e2b3d202d1db ("powerpc: Switch 16GB and 16MB explicit hugepages to a differen

[PATCH AUTOSEL 4.19 057/101] powerpc/4xx/uic: clear pending interrupt after irq type/pol change

2019-07-18 Thread Sasha Levin
From: Christian Lamparter [ Upstream commit 3ab3a0689e74e6aa5b41360bc18861040ddef5b1 ] When testing out gpio-keys with a button, a spurious interrupt (and therefore a key press or release event) gets triggered as soon as the driver enables the irq line for the first time. This patch clears any

[PATCH AUTOSEL 4.19 049/101] powerpc/xmon: Fix disabling tracing while in xmon

2019-07-18 Thread Sasha Levin
From: "Naveen N. Rao" [ Upstream commit aaf06665f7ea3ee9f9754e16c1a507a89f1de5b1 ] Commit ed49f7fd6438d ("powerpc/xmon: Disable tracing when entering xmon") added code to disable recording trace entries while in xmon. The commit introduced a variable 'tracing_enabled' to record if tracing was en

[PATCH AUTOSEL 4.19 048/101] powerpc/cacheflush: fix variable set but not used

2019-07-18 Thread Sasha Levin
From: Qian Cai [ Upstream commit 04db3ede40ae4fc23a5c4237254c4a53bbe4c1f2 ] The powerpc's flush_cache_vmap() is defined as a macro and never use both of its arguments, so it will generate a compilation warning, lib/ioremap.c: In function 'ioremap_page_range': lib/ioremap.c:203:16: warning: vari

[PATCH AUTOSEL 4.19 038/101] powerpc/pci/of: Fix OF flags parsing for 64bit BARs

2019-07-18 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit df5be5be8735ef2ae80d5ae1f2453cd81a035c4b ] When the firmware does PCI BAR resource allocation, it passes the assigned addresses and flags (prefetch/64bit/...) via the "reg" property of a PCI device device tree node so the kernel does not need to do re

[PATCH AUTOSEL 4.19 030/101] powerpc/pseries/mobility: prevent cpu hotplug during DT update

2019-07-18 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit e59a175faa8df9d674247946f2a5a9c29c835725 ] CPU online/offline code paths are sensitive to parts of the device tree (various cpu node properties, cache nodes) that can be changed as a result of a migration. Prevent CPU hotplug while the device tree potentiall

[PATCH AUTOSEL 5.1 119/141] powerpc/eeh: Handle hugepages in ioremap space

2019-07-18 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 33439620680be5225c1b8806579a291e0d761ca0 ] In commit 4a7b06c157a2 ("powerpc/eeh: Handle hugepages in ioremap space") support for using hugepages in the vmalloc and ioremap areas was enabled for radix. Unfortunately this broke EEH MMIO error checking. De

[PATCH AUTOSEL 5.1 112/141] powerpc/boot: add {get, put}_unaligned_be32 to xz_config.h

2019-07-18 Thread Sasha Levin
From: Masahiro Yamada [ Upstream commit 9e005b761e7ad153dcf40a6cba1d681fe0830ac6 ] The next commit will make the way of passing CONFIG options more robust. Unfortunately, it would uncover another hidden issue; without this commit, skiroot_defconfig would be broken like this: | WRAParch/po

[PATCH AUTOSEL 5.1 086/141] powerpc/mm: Handle page table allocation failures

2019-07-18 Thread Sasha Levin
From: "Aneesh Kumar K.V" [ Upstream commit 2230ebf6e6dd0b7751e2921b40f6cfe34f09bb16 ] This fixes kernel crash that arises due to not handling page table allocation failures while allocating hugetlb page table. Fixes: e2b3d202d1db ("powerpc: Switch 16GB and 16MB explicit hugepages to a differen

[PATCH AUTOSEL 5.1 081/141] powerpc/4xx/uic: clear pending interrupt after irq type/pol change

2019-07-18 Thread Sasha Levin
From: Christian Lamparter [ Upstream commit 3ab3a0689e74e6aa5b41360bc18861040ddef5b1 ] When testing out gpio-keys with a button, a spurious interrupt (and therefore a key press or release event) gets triggered as soon as the driver enables the irq line for the first time. This patch clears any

[PATCH AUTOSEL 5.1 071/141] powerpc/rtas: retry when cpu offline races with suspend/migration

2019-07-18 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit 9fb603050ffd94f8127df99c699cca2f575eb6a0 ] The protocol for suspending or migrating an LPAR requires all present processor threads to enter H_JOIN. So if we have threads offline, we have to temporarily bring them up. This can race with administrator actions s

[PATCH AUTOSEL 5.1 070/141] powerpc/xmon: Fix disabling tracing while in xmon

2019-07-18 Thread Sasha Levin
From: "Naveen N. Rao" [ Upstream commit aaf06665f7ea3ee9f9754e16c1a507a89f1de5b1 ] Commit ed49f7fd6438d ("powerpc/xmon: Disable tracing when entering xmon") added code to disable recording trace entries while in xmon. The commit introduced a variable 'tracing_enabled' to record if tracing was en

[PATCH AUTOSEL 5.1 069/141] powerpc/cacheflush: fix variable set but not used

2019-07-18 Thread Sasha Levin
From: Qian Cai [ Upstream commit 04db3ede40ae4fc23a5c4237254c4a53bbe4c1f2 ] The powerpc's flush_cache_vmap() is defined as a macro and never use both of its arguments, so it will generate a compilation warning, lib/ioremap.c: In function 'ioremap_page_range': lib/ioremap.c:203:16: warning: vari

[PATCH AUTOSEL 5.1 058/141] powerpc/pci/of: Fix OF flags parsing for 64bit BARs

2019-07-18 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit df5be5be8735ef2ae80d5ae1f2453cd81a035c4b ] When the firmware does PCI BAR resource allocation, it passes the assigned addresses and flags (prefetch/64bit/...) via the "reg" property of a PCI device device tree node so the kernel does not need to do re

[PATCH AUTOSEL 5.1 043/141] powerpc/pseries/mobility: prevent cpu hotplug during DT update

2019-07-18 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit e59a175faa8df9d674247946f2a5a9c29c835725 ] CPU online/offline code paths are sensitive to parts of the device tree (various cpu node properties, cache nodes) that can be changed as a result of a migration. Prevent CPU hotplug while the device tree potentiall

[PATCH AUTOSEL 5.2 148/171] powerpc/eeh: Handle hugepages in ioremap space

2019-07-18 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 33439620680be5225c1b8806579a291e0d761ca0 ] In commit 4a7b06c157a2 ("powerpc/eeh: Handle hugepages in ioremap space") support for using hugepages in the vmalloc and ioremap areas was enabled for radix. Unfortunately this broke EEH MMIO error checking. De

[PATCH AUTOSEL 5.2 141/171] powerpc/boot: add {get, put}_unaligned_be32 to xz_config.h

2019-07-18 Thread Sasha Levin
From: Masahiro Yamada [ Upstream commit 9e005b761e7ad153dcf40a6cba1d681fe0830ac6 ] The next commit will make the way of passing CONFIG options more robust. Unfortunately, it would uncover another hidden issue; without this commit, skiroot_defconfig would be broken like this: | WRAParch/po

[PATCH AUTOSEL 5.2 140/171] powerpc/irq: Don't WARN continuously in arch_local_irq_restore()

2019-07-18 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit 0fc12c022ad25532b66bf6f6c818ee1c1d63e702 ] When CONFIG_PPC_IRQ_SOFT_MASK_DEBUG is enabled (uncommon), we have a series of WARN_ON's in arch_local_irq_restore(). These are "should never happen" conditions, but if they do happen they can flood the console

[PATCH AUTOSEL 5.2 112/171] powerpc/mm: Handle page table allocation failures

2019-07-18 Thread Sasha Levin
From: "Aneesh Kumar K.V" [ Upstream commit 2230ebf6e6dd0b7751e2921b40f6cfe34f09bb16 ] This fixes kernel crash that arises due to not handling page table allocation failures while allocating hugetlb page table. Fixes: e2b3d202d1db ("powerpc: Switch 16GB and 16MB explicit hugepages to a differen

[PATCH AUTOSEL 5.2 107/171] powerpc/mm: mark more tlb functions as __always_inline

2019-07-18 Thread Sasha Levin
From: Masahiro Yamada [ Upstream commit 6d3ca7e73642ce17398f4cd5df1780da4a1ccdaf ] With CONFIG_OPTIMIZE_INLINING enabled, Laura Abbott reported error with gcc 9.1.1: arch/powerpc/mm/book3s64/radix_tlb.c: In function '_tlbiel_pid': arch/powerpc/mm/book3s64/radix_tlb.c:104:2: warning: asm ope

[PATCH AUTOSEL 5.2 106/171] powerpc/4xx/uic: clear pending interrupt after irq type/pol change

2019-07-18 Thread Sasha Levin
From: Christian Lamparter [ Upstream commit 3ab3a0689e74e6aa5b41360bc18861040ddef5b1 ] When testing out gpio-keys with a button, a spurious interrupt (and therefore a key press or release event) gets triggered as soon as the driver enables the irq line for the first time. This patch clears any

[PATCH AUTOSEL 5.2 105/171] powerpc: silence a -Wcast-function-type warning in dawr_write_file_bool

2019-07-18 Thread Sasha Levin
From: Mathieu Malaterre [ Upstream commit 548c54acba5bd1388d50727a9a126a42d0cd4ad0 ] In commit c1fe190c0672 ("powerpc: Add force enable of DAWR on P9 option") the following piece of code was added: smp_call_function((smp_call_func_t)set_dawr, &null_brk, 0); Since GCC 8 this triggers the fol

[PATCH AUTOSEL 5.2 094/171] powerpc/rtas: retry when cpu offline races with suspend/migration

2019-07-18 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit 9fb603050ffd94f8127df99c699cca2f575eb6a0 ] The protocol for suspending or migrating an LPAR requires all present processor threads to enter H_JOIN. So if we have threads offline, we have to temporarily bring them up. This can race with administrator actions s

[PATCH AUTOSEL 5.2 093/171] powerpc/xmon: Fix disabling tracing while in xmon

2019-07-18 Thread Sasha Levin
From: "Naveen N. Rao" [ Upstream commit aaf06665f7ea3ee9f9754e16c1a507a89f1de5b1 ] Commit ed49f7fd6438d ("powerpc/xmon: Disable tracing when entering xmon") added code to disable recording trace entries while in xmon. The commit introduced a variable 'tracing_enabled' to record if tracing was en

[PATCH AUTOSEL 5.2 092/171] powerpc/cacheflush: fix variable set but not used

2019-07-18 Thread Sasha Levin
From: Qian Cai [ Upstream commit 04db3ede40ae4fc23a5c4237254c4a53bbe4c1f2 ] The powerpc's flush_cache_vmap() is defined as a macro and never use both of its arguments, so it will generate a compilation warning, lib/ioremap.c: In function 'ioremap_page_range': lib/ioremap.c:203:16: warning: vari

[PATCH AUTOSEL 5.2 077/171] powerpc/pci/of: Fix OF flags parsing for 64bit BARs

2019-07-18 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit df5be5be8735ef2ae80d5ae1f2453cd81a035c4b ] When the firmware does PCI BAR resource allocation, it passes the assigned addresses and flags (prefetch/64bit/...) via the "reg" property of a PCI device device tree node so the kernel does not need to do re

[PATCH AUTOSEL 5.2 060/171] powerpc/pseries/mobility: prevent cpu hotplug during DT update

2019-07-18 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit e59a175faa8df9d674247946f2a5a9c29c835725 ] CPU online/offline code paths are sensitive to parts of the device tree (various cpu node properties, cache nodes) that can be changed as a result of a migration. Prevent CPU hotplug while the device tree potentiall

Re: [PATCH] powerpc: remove meaningless KBUILD_ARFLAGS addition

2019-07-18 Thread Michael Ellerman
Segher Boessenkool writes: > On Thu, Jul 18, 2019 at 11:19:58AM +0900, Masahiro Yamada wrote: >> On Thu, Jul 18, 2019 at 1:46 AM Segher Boessenkool >> wrote: >> Kbuild always uses thin archives as far as vmlinux is concerned. >> >> But, there are some other call-sites. >> >> masahiro@pug:~/ref/

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-18 Thread Nathan Chancellor
On Mon, Jul 08, 2019 at 11:49:52PM -0700, Nathan Chancellor wrote: > On Tue, Jul 09, 2019 at 07:04:43AM +0200, Christophe Leroy wrote: > > Is that a Clang bug ? > > No idea, it happens with clang-8 and clang-9 though (pretty sure there > were fixes for PowerPC in clang-8 so something before it pro

Re: [PATCH v4 4/8] KVM: PPC: Ultravisor: Use UV_WRITE_PATE ucall to register a PATE

2019-07-18 Thread Michael Ellerman
Claudio Carvalho writes: > On 7/11/19 9:57 AM, Michael Ellerman wrote: >>> static pmd_t *get_pmd_from_cache(struct mm_struct *mm) >>> diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c >>> b/arch/powerpc/mm/book3s64/radix_pgtable.c >>> index 8904aa1243d8..da6a6b76a040 100644 >>> --- a/arch/po

Re: [PATCH v9 08/10] open: openat2(2) syscall

2019-07-18 Thread Aleksa Sarai
On 2019-07-19, Dmitry V. Levin wrote: > On Sun, Jul 07, 2019 at 12:57:35AM +1000, Aleksa Sarai wrote: > [...] > > +/** > > + * Arguments for how openat2(2) should open the target path. If @extra is > > zero, > > + * then openat2(2) is identical to openat(2). > > + * > > + * @flags: O_* flags (unk

Re: [PATCH v9 08/10] open: openat2(2) syscall

2019-07-18 Thread Dmitry V. Levin
On Thu, Jul 18, 2019 at 11:29:50PM +0200, Arnd Bergmann wrote: [...] > 5. you get the same problem with seccomp and strace that >clone3() has -- these and others only track the register >arguments by default. Just for the record, this is definitely not the case for strace: it decodes array

Re: [PATCH v9 08/10] open: openat2(2) syscall

2019-07-18 Thread Dmitry V. Levin
On Sun, Jul 07, 2019 at 12:57:35AM +1000, Aleksa Sarai wrote: [...] > +/** > + * Arguments for how openat2(2) should open the target path. If @extra is > zero, > + * then openat2(2) is identical to openat(2). > + * > + * @flags: O_* flags (unknown flags ignored). What was the rationale for implem

Re: [PATCH v2 03/13] powerpc/prom_init: Add the ESM call to prom_init

2019-07-18 Thread Thiago Jung Bauermann
Alexey Kardashevskiy writes: > On 19/07/2019 07:28, Thiago Jung Bauermann wrote: >> >> Hello Segher, >> >> Thanks for your review and suggestions! >> >> Segher Boessenkool writes: >> >>> (Sorry to hijack your reply). >>> >>> On Thu, Jul 18, 2019 at 06:11:48PM +1000, Alexey Kardashevskiy wrote:

Re: [PATCH v2 03/13] powerpc/prom_init: Add the ESM call to prom_init

2019-07-18 Thread Alexey Kardashevskiy
On 19/07/2019 07:28, Thiago Jung Bauermann wrote: Hello Segher, Thanks for your review and suggestions! Segher Boessenkool writes: (Sorry to hijack your reply). On Thu, Jul 18, 2019 at 06:11:48PM +1000, Alexey Kardashevskiy wrote: On 13/07/2019 16:00, Thiago Jung Bauermann wrote: From

Re: Crash in kvmppc_xive_release()

2019-07-18 Thread Cédric Le Goater
On 18/07/2019 15:14, Cédric Le Goater wrote: > On 18/07/2019 14:49, Michael Ellerman wrote: >> Anyone else seen this? >> >> This is running ~176 VMs on a Power9 (1 per thread), host crashes: > > This is beyond the underlying limits of XIVE. > > As we allocate 2K vCPUs per VM, that is 16K EQs for

Re: [PATCH v9 08/10] open: openat2(2) syscall

2019-07-18 Thread Arnd Bergmann
On Thu, Jul 18, 2019 at 6:12 PM Aleksa Sarai wrote: > On 2019-07-18, Arnd Bergmann wrote: > > On Sat, Jul 6, 2019 at 5:00 PM Aleksa Sarai wrote: > > > > In fact, that seems similar enough to the existing openat() that I think > > you could also just add the fifth argument to the existing call wh

Re: [PATCH v2 03/13] powerpc/prom_init: Add the ESM call to prom_init

2019-07-18 Thread Thiago Jung Bauermann
Hello Segher, Thanks for your review and suggestions! Segher Boessenkool writes: > (Sorry to hijack your reply). > > On Thu, Jul 18, 2019 at 06:11:48PM +1000, Alexey Kardashevskiy wrote: >> On 13/07/2019 16:00, Thiago Jung Bauermann wrote: >> >From: Ram Pai >> >+static int enter_secure_mode(

Re: [PATCH v4 4/8] KVM: PPC: Ultravisor: Use UV_WRITE_PATE ucall to register a PATE

2019-07-18 Thread Claudio Carvalho
On 7/11/19 9:57 AM, Michael Ellerman wrote: > >> >> static pmd_t *get_pmd_from_cache(struct mm_struct *mm) >> diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c >> b/arch/powerpc/mm/book3s64/radix_pgtable.c >> index 8904aa1243d8..da6a6b76a040 100644 >> --- a/arch/powerpc/mm/book3s64/radix_

Re: [PATCH] powerpc: remove meaningless KBUILD_ARFLAGS addition

2019-07-18 Thread Segher Boessenkool
Hi! On Thu, Jul 18, 2019 at 11:19:58AM +0900, Masahiro Yamada wrote: > On Thu, Jul 18, 2019 at 1:46 AM Segher Boessenkool > wrote: > Kbuild always uses thin archives as far as vmlinux is concerned. > > But, there are some other call-sites. > > masahiro@pug:~/ref/linux$ git grep '$(AR)' -- :^Do

Re: [PATCH v2 04/13] powerpc/pseries/svm: Add helpers for UV_SHARE_PAGE and UV_UNSHARE_PAGE

2019-07-18 Thread Thiago Jung Bauermann
Hello Alexey, Thanks for your review! Alexey Kardashevskiy writes: > On 13/07/2019 16:00, Thiago Jung Bauermann wrote: >> From: Ram Pai >> >> These functions are used when the guest wants to grant the hypervisor >> access to certain pages. >> >> Signed-off-by: Ram Pai >> Signed-off-by: Thia

Re: [PATCH v2 03/13] powerpc/prom_init: Add the ESM call to prom_init

2019-07-18 Thread Segher Boessenkool
(Sorry to hijack your reply). On Thu, Jul 18, 2019 at 06:11:48PM +1000, Alexey Kardashevskiy wrote: > On 13/07/2019 16:00, Thiago Jung Bauermann wrote: > >From: Ram Pai > >+static int enter_secure_mode(unsigned long kbase, unsigned long fdt) > >+{ > >+register uint64_t func asm("r3") = UV_ESM

Re: [PATCH 2/3] DMA mapping: Move SME handling to x86-specific files

2019-07-18 Thread Thiago Jung Bauermann
Thomas Gleixner writes: > On Fri, 12 Jul 2019, Thiago Jung Bauermann wrote: >> diff --git a/include/linux/mem_encrypt.h b/include/linux/mem_encrypt.h >> index b310a9c18113..f2e399fb626b 100644 >> --- a/include/linux/mem_encrypt.h >> +++ b/include/linux/mem_encrypt.h >> @@ -21,23 +21,11 @@ >>

Re: [PATCH 1/2] powerpc/rtas: use device model APIs and serialization during LPM

2019-07-18 Thread Nathan Lynch
Nathan Lynch writes: > During LPAR migration, cpu hotplug and migration operations can > interleave like so: > > cd /sys/devices/system/cpu/cpu7/ | drmgr -m -c pmig -p pre \ > echo 0 > online | -s 0xd7a884f83d830e6d -t 19 \ > echo 1 > online | -n -d 1 5 > ---

Re: [PATCH] powerpc/dma: Fix invalid DMA mmap behavior

2019-07-18 Thread Shawn Anastasio
On 7/18/19 4:52 AM, Christoph Hellwig wrote: On Thu, Jul 18, 2019 at 10:49:34AM +0200, Christoph Hellwig wrote: On Thu, Jul 18, 2019 at 01:45:16PM +1000, Oliver O'Halloran wrote: Other than m68k, mips, and arm64, everybody else that doesn't have ARCH_NO_COHERENT_DMA_MMAP set uses this default i

Re: [PATCH v3 0/6] Remove x86-specific code from generic headers

2019-07-18 Thread Thiago Jung Bauermann
Lendacky, Thomas writes: > On 7/17/19 10:28 PM, Thiago Jung Bauermann wrote: >> Hello, >> >> This version is mostly about splitting up patch 2/3 into three separate >> patches, as suggested by Christoph Hellwig. Two other changes are a fix in >> patch 1 which wasn't selecting ARCH_HAS_MEM_ENCR

[PATCH] scsi: ibmvscsi: remove casting dma_alloc_coherent

2019-07-18 Thread Vasyl Gomonovych
Fix allocation style Generated by: alloc_cast.cocci Signed-off-by: Vasyl Gomonovych --- drivers/scsi/ibmvscsi/ibmvscsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index 7f66a7783209..7e9b3e409851 100

[PATCH 1/2] powerpc/rtas: use device model APIs and serialization during LPM

2019-07-18 Thread Nathan Lynch
During LPAR migration, cpu hotplug and migration operations can interleave like so: cd /sys/devices/system/cpu/cpu7/ | drmgr -m -c pmig -p pre \ echo 0 > online | -s 0xd7a884f83d830e6d -t 19 \ echo 1 > online | -n -d 1 5 -+-

[PATCH 2/2] powerpc/rtas: allow rescheduling while changing cpu states

2019-07-18 Thread Nathan Lynch
rtas_cpu_state_change_mask() potentially operates on scores of cpus, so explicitly allow rescheduling in the loop body. Signed-off-by: Nathan Lynch --- arch/powerpc/kernel/rtas.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index f

[PATCH 0/2] more migration vs CPU hotplug fixes

2019-07-18 Thread Nathan Lynch
Despite recent fixes, userspace-initiated CPU hotplug still can destructively race with the migration code's CPU state manipulations on the destination. Also, since such manipulations can consist of mass-onlining and -offlining half or more of the CPUs in the system, take care to reschedule when ne

[PATCH v2 3/3] tools/perf: Set 'trace_cycles' as defaultevent for perf kvm record in powerpc

2019-07-18 Thread Anju T Sudhakar
Use 'trace_imc/trace_cycles' as the default event for 'perf kvm record' in powerpc. Signed-off-by: Anju T Sudhakar --- tools/perf/arch/powerpc/util/kvm-stat.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tools/perf/arch/powerpc/util/kvm-stat.c b/tools/per

[PATCH v2 2/3] tools/perf: Add arch neutral function to choose event for perf kvm record

2019-07-18 Thread Anju T Sudhakar
'perf kvm record' uses 'cycles'(if the user did not specify any event) as the default event to profile the guest. This will not provide any proper samples from the guest incase of powerpc architecture, since in powerpc the PMUs are controlled by the guest rather than the host. Patch adds a functio

[PATCH v2 1/3] tools/perf: Move kvm-stat header file from conditional inclusion to common include section

2019-07-18 Thread Anju T Sudhakar
Move kvm-stat header file to the common include section, and make the definitions in the header file under the conditional inclusion `#ifdef HAVE_KVM_STAT_SUPPORT`. This helps to define other perf kvm related function prototypes in kvm-stat header file, which may not need kvm-stat support. Signe

Re: [PATCH v3 4/6] x86,s390/mm: Move sme_active() and sme_me_mask to x86-specific header

2019-07-18 Thread Christoph Hellwig
On Thu, Jul 18, 2019 at 05:42:18PM +, Lendacky, Thomas wrote: > You may want to try and build the out-of-tree nvidia driver just to be > sure you can remove the EXPORT_SYMBOL(). But I believe that was related > to the DMA mask check, which now removed, may no longer be a problem. Out of tree d

Re: [PATCH v3 0/6] Remove x86-specific code from generic headers

2019-07-18 Thread Lendacky, Thomas
On 7/17/19 10:28 PM, Thiago Jung Bauermann wrote: > Hello, > > This version is mostly about splitting up patch 2/3 into three separate > patches, as suggested by Christoph Hellwig. Two other changes are a fix in > patch 1 which wasn't selecting ARCH_HAS_MEM_ENCRYPT for s390 spotted by > Janani and

Re: [PATCH v3 5/6] fs/core/vmcore: Move sev_active() reference to x86 arch code

2019-07-18 Thread Lendacky, Thomas
On 7/17/19 10:28 PM, Thiago Jung Bauermann wrote: > Secure Encrypted Virtualization is an x86-specific feature, so it shouldn't > appear in generic kernel code because it forces non-x86 architectures to > define the sev_active() function, which doesn't make a lot of sense. > > To solve this proble

Re: [PATCH v3 4/6] x86, s390/mm: Move sme_active() and sme_me_mask to x86-specific header

2019-07-18 Thread Lendacky, Thomas
On 7/17/19 10:28 PM, Thiago Jung Bauermann wrote: > Now that generic code doesn't reference them, move sme_active() and > sme_me_mask to x86's . > > Also remove the export for sme_active() since it's only used in files that > won't be built as modules. sme_me_mask on the other hand is used in > ar

Re: [PATCH v3 3/6] dma-mapping: Remove dma_check_mask()

2019-07-18 Thread Lendacky, Thomas
On 7/17/19 10:28 PM, Thiago Jung Bauermann wrote: > sme_active() is an x86-specific function so it's better not to call it from > generic code. Christoph Hellwig mentioned that "There is no reason why we > should have a special debug printk just for one specific reason why there > is a requirement

Re: [PATCH v3 2/6] swiotlb: Remove call to sme_active()

2019-07-18 Thread Lendacky, Thomas
On 7/17/19 10:28 PM, Thiago Jung Bauermann wrote: > sme_active() is an x86-specific function so it's better not to call it from > generic code. > > There's no need to mention which memory encryption feature is active, so > just use a more generic message. Besides, other architectures will have > d

Re: [PATCH v3 6/6] s390/mm: Remove sev_active() function

2019-07-18 Thread Thiago Jung Bauermann
Halil Pasic writes: > On Thu, 18 Jul 2019 10:44:56 +0200 > Christoph Hellwig wrote: > >> > -/* are we a protected virtualization guest? */ >> > -bool sev_active(void) >> > -{ >> > - return is_prot_virt_guest(); >> > -} >> > - >> > bool force_dma_unencrypted(struct device *dev) >> > { >> > -

Re: [PATCH v3 6/6] s390/mm: Remove sev_active() function

2019-07-18 Thread Thiago Jung Bauermann
Christoph Hellwig writes: >> -/* are we a protected virtualization guest? */ >> -bool sev_active(void) >> -{ >> -return is_prot_virt_guest(); >> -} >> - >> bool force_dma_unencrypted(struct device *dev) >> { >> -return sev_active(); >> +return is_prot_virt_guest(); >> } > > Do we

[PATCH] powerpc/rtas: unexport rtas_online_cpus_mask, rtas_offline_cpus_mask

2019-07-18 Thread Nathan Lynch
These aren't used by modular code, nor should they be. Fixes: 120496ac2d2d ("powerpc: Bring all threads online prior to migration/hibernation") Signed-off-by: Nathan Lynch --- arch/powerpc/kernel/rtas.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/powerpc/kernel/rtas.c b/arch/power

Re: [PATCH v9 08/10] open: openat2(2) syscall

2019-07-18 Thread Aleksa Sarai
On 2019-07-18, Arnd Bergmann wrote: > On Sat, Jul 6, 2019 at 5:00 PM Aleksa Sarai wrote: > > > diff --git a/arch/alpha/kernel/syscalls/syscall.tbl > > b/arch/alpha/kernel/syscalls/syscall.tbl > > index 9e7704e44f6d..1703d048c141 100644 > > --- a/arch/alpha/kernel/syscalls/syscall.tbl > > +++ b/

Re: [PATCH v9 08/10] open: openat2(2) syscall

2019-07-18 Thread Aleksa Sarai
On 2019-07-18, Rasmus Villemoes wrote: > On 06/07/2019 16.57, Aleksa Sarai wrote: > > --- a/fs/open.c > > +++ b/fs/open.c > > @@ -928,24 +928,32 @@ struct file *open_with_fake_path(const struct path > > *path, int flags, > > } > > EXPORT_SYMBOL(open_with_fake_path); > > > > -static inline int

Re: [PATCH v9 08/10] open: openat2(2) syscall

2019-07-18 Thread Arnd Bergmann
On Sat, Jul 6, 2019 at 5:00 PM Aleksa Sarai wrote: > diff --git a/arch/alpha/kernel/syscalls/syscall.tbl > b/arch/alpha/kernel/syscalls/syscall.tbl > index 9e7704e44f6d..1703d048c141 100644 > --- a/arch/alpha/kernel/syscalls/syscall.tbl > +++ b/arch/alpha/kernel/syscalls/syscall.tbl > @@ -461,6

Re: [PATCH v9 08/10] open: openat2(2) syscall

2019-07-18 Thread Rasmus Villemoes
On 06/07/2019 16.57, Aleksa Sarai wrote: > > --- a/fs/open.c > +++ b/fs/open.c > @@ -928,24 +928,32 @@ struct file *open_with_fake_path(const struct path > *path, int flags, > } > EXPORT_SYMBOL(open_with_fake_path); > > -static inline int build_open_flags(int flags, umode_t mode, struct > op

Re: Crash in kvmppc_xive_release()

2019-07-18 Thread Cédric Le Goater
On 18/07/2019 14:49, Michael Ellerman wrote: > Anyone else seen this? > > This is running ~176 VMs on a Power9 (1 per thread), host crashes: This is beyond the underlying limits of XIVE. As we allocate 2K vCPUs per VM, that is 16K EQs for interrupt events. The overall EQ count is 1M. I let you

Re: [PATCH] powerpc: mm: Limit rma_size to 1TB when running without HV mode

2019-07-18 Thread Michael Ellerman
On Wed, 2019-07-10 at 05:20:18 UTC, Suraj Jitindar Singh wrote: > The virtual real mode addressing (VRMA) mechanism is used when a > partition is using HPT (Hash Page Table) translation and performs > real mode accesses (MSR[IR|DR] = 0) in non-hypervisor mode. In this > mode effective address bits

Re: [PATCH 1/3] KVM: PPC: Book3S HV: Always save guest pmu for guest capable of nesting

2019-07-18 Thread Michael Ellerman
On Wed, 2019-07-03 at 01:20:20 UTC, Suraj Jitindar Singh wrote: > The performance monitoring unit (PMU) registers are saved on guest exit > when the guest has set the pmcregs_in_use flag in its lppaca, if it > exists, or unconditionally if it doesn't. If a nested guest is being > run then the hyper

Re: [PATCH 1/1] powerpc: fix off by one in max_zone_pfn initialization for ZONE_DMA

2019-07-18 Thread Michael Ellerman
On Tue, 2019-06-25 at 14:17:27 UTC, Andrea Arcangeli wrote: > 25078dc1f74be16b858e914f52cc8f4d03c2271a first introduced an off by > one error in the ZONE_DMA initialization of PPC_BOOK3E_64=y and since > 9739ab7eda459f0669ec9807e0d9be5020bab88c the off by one applies to > PPC32=y too. This simply c

Re: [PATCH v3 6/6] s390/mm: Remove sev_active() function

2019-07-18 Thread Halil Pasic
On Thu, 18 Jul 2019 10:44:56 +0200 Christoph Hellwig wrote: > > -/* are we a protected virtualization guest? */ > > -bool sev_active(void) > > -{ > > - return is_prot_virt_guest(); > > -} > > - > > bool force_dma_unencrypted(struct device *dev) > > { > > - return sev_active(); > > + retur

Crash in kvmppc_xive_release()

2019-07-18 Thread Michael Ellerman
Anyone else seen this? This is running ~176 VMs on a Power9 (1 per thread), host crashes: [ 66.403750][ T6423] xive: OPAL failed to allocate VCPUs order 11, err -10 [188523.080935670,4] Spent 1783 msecs in OPAL call 135! [ 66.484965][ T6250] BUG: Kernel NULL pointer dereference at 0x000

[PATCH v7] cpufreq/pasemi: fix an use-after-free inpas_cpufreq_cpu_init()

2019-07-18 Thread Christian Zigotzky
On 09.07.2019 at 03:39am, wen.yan...@zte.com.cn wrote: Hello Wen, Thanks for your patch! Did you test your patch with a P.A. Semi board? Hello Christian, thank you. We don't have a P.A. Semi board yet, so we didn't test it. If you have such a board, could you please kindly help to test it? -

Re: [PATCH] powerpc/dma: Fix invalid DMA mmap behavior

2019-07-18 Thread Christoph Hellwig
On Thu, Jul 18, 2019 at 10:49:34AM +0200, Christoph Hellwig wrote: > On Thu, Jul 18, 2019 at 01:45:16PM +1000, Oliver O'Halloran wrote: > > > Other than m68k, mips, and arm64, everybody else that doesn't have > > > ARCH_NO_COHERENT_DMA_MMAP set uses this default implementation, so > > > I assume th

Re: [PATCH] powerpc/dma: Fix invalid DMA mmap behavior

2019-07-18 Thread Christoph Hellwig
On Thu, Jul 18, 2019 at 01:45:16PM +1000, Oliver O'Halloran wrote: > > Other than m68k, mips, and arm64, everybody else that doesn't have > > ARCH_NO_COHERENT_DMA_MMAP set uses this default implementation, so > > I assume this behavior is acceptable on those architectures. > > It might be acceptab

Re: [PATCH V3] cpufreq: Make cpufreq_generic_init() return void

2019-07-18 Thread Rafael J. Wysocki
On Tuesday, July 16, 2019 6:06:08 AM CEST Viresh Kumar wrote: > It always returns 0 (success) and its return type should really be void. > Over that, many drivers have added error handling code based on its > return value, which is not required at all. > > change its return type to void and update

  1   2   >