Re: [PATCH v7 0/7] KVMPPC driver to manage secure guest pages

2019-08-22 Thread Paul Mackerras
On Thu, Aug 22, 2019 at 03:56:13PM +0530, Bharata B Rao wrote: > Hi, > > A pseries guest can be run as a secure guest on Ultravisor-enabled > POWER platforms. On such platforms, this driver will be used to manage > the movement of guest pages between the normal memory managed by > hypervisor(HV)

Re: [PATCH kernel] vfio/spapr_tce: Fix incorrect tce_iommu_group memory free

2019-08-22 Thread Paul Mackerras
On Mon, Aug 19, 2019 at 11:51:17AM +1000, Alexey Kardashevskiy wrote: > The @tcegrp variable is used in 1) a loop over attached groups > 2) it stores a pointer to a newly allocated tce_iommu_group if 1) found > nothing. However the error handler does not distinguish how we got there > and

RE: [PATCH v2 06/10] PCI: layerscape: Modify the way of getting capability with different PEX

2019-08-22 Thread Xiaowei Bao
> -Original Message- > From: Kishon Vijay Abraham I > Sent: 2019年8月23日 11:40 > To: Xiaowei Bao ; bhelg...@google.com; > robh...@kernel.org; mark.rutl...@arm.com; shawn...@kernel.org; Leo Li > ; lorenzo.pieral...@arm.co > ; a...@arndb.de; gre...@linuxfoundation.org; > M.h. Lian ; Mingkai

Re: [PATCH v3 1/2] powerpc/powernv: Enhance opal message read interface

2019-08-22 Thread Vasant Hegde
On 8/22/19 9:06 PM, Vasant Hegde wrote: On 8/22/19 11:21 AM, Oliver O'Halloran wrote: On Wed, 2019-08-21 at 13:43 +0530, Vasant Hegde wrote: Use "opal-msg-size" device tree property to allocate memory for "opal_msg". Cc: Mahesh Salgaonkar Cc: Jeremy Kerr Signed-off-by: Vasant Hegde ---

Re: [PATCH v6 7/7] powerpc/kvm: Use UV_RETURN ucall to return to ultravisor

2019-08-22 Thread Paul Mackerras
On Thu, Aug 22, 2019 at 12:48:38AM -0300, Claudio Carvalho wrote: > From: Sukadev Bhattiprolu > > When an SVM makes an hypercall or incurs some other exception, the > Ultravisor usually forwards (a.k.a. reflects) the exceptions to the > Hypervisor. After processing the exception, Hypervisor uses

Re: [PATCH v2 06/10] PCI: layerscape: Modify the way of getting capability with different PEX

2019-08-22 Thread Kishon Vijay Abraham I
Hi, (Fixed Lorenzo's email address. All the patches in the series have wrong email id) On 23/08/19 8:09 AM, Xiaowei Bao wrote: > > >> -Original Message- >> From: Kishon Vijay Abraham I >> Sent: 2019年8月22日 19:44 >> To: Xiaowei Bao ; bhelg...@google.com; >> robh...@kernel.org;

RE: [PATCH v2 06/10] PCI: layerscape: Modify the way of getting capability with different PEX

2019-08-22 Thread Xiaowei Bao
> -Original Message- > From: Kishon Vijay Abraham I > Sent: 2019年8月22日 19:44 > To: Xiaowei Bao ; bhelg...@google.com; > robh...@kernel.org; mark.rutl...@arm.com; shawn...@kernel.org; Leo Li > ; lorenzo.pieral...@arm.co; a...@arndb.de; > gre...@linuxfoundation.org; M.h. Lian ; Mingkai >

Re: [PATCH 2/3] powerpc/numa: Early request for home node associativity

2019-08-22 Thread Nathan Lynch
Srikar Dronamraju writes: > * Nathan Lynch [2019-08-22 12:17:48]: >> > However home node associativity requires cpu's hwid which is set in >> > smp_setup_pacas. Hence call smp_setup_pacas before numa_setup_cpus. >> >> But this seems like it would negatively affect pacas' NUMA placements? >> >>

Re: [PATCH 2/3] powerpc/numa: Early request for home node associativity

2019-08-22 Thread Srikar Dronamraju
* Nathan Lynch [2019-08-22 12:17:48]: > Hi Srikar, Thanks Nathan for the review. > > > However home node associativity requires cpu's hwid which is set in > > smp_setup_pacas. Hence call smp_setup_pacas before numa_setup_cpus. > > But this seems like it would negatively affect pacas' NUMA

[PATCH] powerpc/64: don't select ARCH_HAS_SCALED_CPUTIME on book3E

2019-08-22 Thread Christophe Leroy
Book3E doesn't have SPRN_SPURR/SPRN_PURR. Activating ARCH_HAS_SCALED_CPUTIME is just wasting CPU time. Signed-off-by: Christophe Leroy Link: https://github.com/linuxppc/issues/issues/171 --- arch/powerpc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH 2/3] powerpc/numa: Early request for home node associativity

2019-08-22 Thread Nathan Lynch
Hi Srikar, Srikar Dronamraju writes: > Currently the kernel detects if its running on a shared lpar platform > and requests home node associativity before the scheduler sched_domains > are setup. However between the time NUMA setup is initialized and the > request for home node associativity,

Re: [PATCH v2 3/8] powerpc: Fix vDSO clock_getres()

2019-08-22 Thread Sasha Levin
Hi, [This is an automated email] This commit has been processed because it contains a "Fixes:" tag, fixing commit: a7f290dad32e [PATCH] powerpc: Merge vdso's and add vdso support to 32 bits kernel. The bot has tested the following trees: v5.2.9, v4.19.67, v4.14.139, v4.9.189, v4.4.189.

Re: next take at setting up a dma mask by default for platform devices v2

2019-08-22 Thread Greg Kroah-Hartman
On Fri, Aug 16, 2019 at 08:24:29AM +0200, Christoph Hellwig wrote: > Hi all, > > this is another attempt to make sure the dma_mask pointer is always > initialized for platform devices. Not doing so lead to lots of > boilerplate code, and makes platform devices different from all our > major

Re: [PATCH v5 01/23] PCI: Fix race condition in pci_enable/disable_device()

2019-08-22 Thread Marta Rybczynska
- On 16 Aug, 2019, at 18:50, Sergey Miroshnichenko s.miroshniche...@yadro.com wrote: > This is a yet another approach to fix an old [1-2] concurrency issue, when: > - two or more devices are being hot-added into a bridge which was > initially empty; > - a bridge with two or more devices

Re: [PATCH 1/3] powerpc/vphn: Check for error from hcall_vphn

2019-08-22 Thread Nathan Lynch
Hi Srikar, Srikar Dronamraju writes: > There is no point in unpacking associativity, if > H_HOME_NODE_ASSOCIATIVITY hcall has returned an error. > > Also added error messages for H_PARAMETER and default case in > vphn_get_associativity. These are two logical changes and should be separated IMO.

[PATCH v2 6/8] powerpc/vdso32: use LOAD_REG_IMMEDIATE()

2019-08-22 Thread Christophe Leroy
Use LOAD_REG_IMMEDIATE() to load registers with immediate value. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/vdso32/gettimeofday.S | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kernel/vdso32/gettimeofday.S

[PATCH v2 8/8] powerpc/vdso32: miscellaneous optimisations

2019-08-22 Thread Christophe Leroy
Various optimisations by inverting branches and removing redundant instructions. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/vdso32/datapage.S | 3 +-- arch/powerpc/kernel/vdso32/getcpu.S | 6 +++--- arch/powerpc/kernel/vdso32/gettimeofday.S | 18 +- 3

[PATCH v2 7/8] powerpc/vdso32: implement clock_getres entirely

2019-08-22 Thread Christophe Leroy
clock_getres returns hrtimer_res for all clocks but coarse ones for which it returns KTIME_LOW_RES. return EINVAL for unknown clocks. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/asm-offsets.c | 3 +++ arch/powerpc/kernel/vdso32/gettimeofday.S | 19 +++ 2

[PATCH v2 5/8] powerpc/vdso32: Don't read cache line size from the datapage on PPC32.

2019-08-22 Thread Christophe Leroy
On PPC32, the cache lines have a fixed size known at build time. Don't read it from the datapage. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/vdso_datapage.h | 4 arch/powerpc/kernel/asm-offsets.c| 2 +- arch/powerpc/kernel/vdso.c | 5 -

[PATCH v2 4/8] powerpc/vdso32: inline __get_datapage()

2019-08-22 Thread Christophe Leroy
__get_datapage() is only a few instructions to retrieve the address of the page where the kernel stores data to the VDSO. By inlining this function into its users, a bl/blr pair and a mflr/mtlr pair is avoided, plus a few reg moves. The improvement is noticeable (about 55 nsec/call on an 8xx)

[PATCH v2 2/8] powerpc/vdso32: Add support for CLOCK_{REALTIME/MONOTONIC}_COARSE

2019-08-22 Thread Christophe Leroy
This is copied and adapted from commit 5c929885f1bb ("powerpc/vdso64: Add support for CLOCK_{REALTIME/MONOTONIC}_COARSE") from Santosh Sivaraj Benchmark from vdsotest-all: clock-gettime-realtime: syscall: 3601 nsec/call clock-gettime-realtime:libc: 1072 nsec/call clock-gettime-realtime:

[PATCH v2 0/8] powerpc/vdso32 enhancement and optimisation

2019-08-22 Thread Christophe Leroy
This series: - adds getcpu() - adds coarse clocks in clock_gettime - fixes and adds all clocks in clock_getres - optimises the retrieval of the datapage address - optimises the cache functions It puts together the three patches sent out earlier allthought they were not presented as a series,

[PATCH v2 3/8] powerpc: Fix vDSO clock_getres()

2019-08-22 Thread Christophe Leroy
From: Vincenzo Frascino clock_getres in the vDSO library has to preserve the same behaviour of posix_get_hrtimer_res(). In particular, posix_get_hrtimer_res() does: sec = 0; ns = hrtimer_resolution; and hrtimer_resolution depends on the enablement of the high resolution timers that can

[PATCH v2 1/8] powerpc/32: Add VDSO version of getcpu

2019-08-22 Thread Christophe Leroy
Commit 18ad51dd342a ("powerpc: Add VDSO version of getcpu") added getcpu() for PPC64 only, by making use of a user readable general purpose SPR. PPC32 doesn't have any such SPR, a full system call can still be avoided by implementing a fast system call which reads the CPU id in the task struct

Re: [PATCH] powerpc/vdso64: inline __get_datapage()

2019-08-22 Thread Santosh Sivaraj
Christophe Leroy writes: > Le 21/08/2019 à 14:15, Segher Boessenkool a écrit : >> On Wed, Aug 21, 2019 at 01:50:52PM +0200, Christophe Leroy wrote: >>> Do you have any idea on how to avoid that bcl/mflr stuff ? >> >> Do a load from some fixed address? Maybe an absolute address, even? >> lwz

Re: [PATCH v3 1/2] powerpc/powernv: Enhance opal message read interface

2019-08-22 Thread Vasant Hegde
On 8/22/19 11:21 AM, Oliver O'Halloran wrote: On Wed, 2019-08-21 at 13:43 +0530, Vasant Hegde wrote: Use "opal-msg-size" device tree property to allocate memory for "opal_msg". Cc: Mahesh Salgaonkar Cc: Jeremy Kerr Signed-off-by: Vasant Hegde --- Changes in v3: - Call BUG_ON, if we fail

[PATCH -next] crypto: nx - remove unused variables 'nx_driver_string' and 'nx_driver_version'

2019-08-22 Thread YueHaibing
drivers/crypto/nx/nx.h:12:19: warning: nx_driver_string defined but not used [-Wunused-const-variable=] drivers/crypto/nx/nx.h:13:19: warning: nx_driver_version defined but not used [-Wunused-const-variable=] They are never used, so just remove it. Reported-by: Hulk Robot Signed-off-by:

[PATCH 3/3] powerpc/numa: Remove late request for home node associativity

2019-08-22 Thread Srikar Dronamraju
With commit ("powerpc/numa: Early request for home node associativity"), commit 2ea626306810 ("powerpc/topology: Get topology for shared processors at boot") which was requesting home node associativity becomes redundant. Hence remove the late request for home node associativity. Signed-off-by:

[PATCH 2/3] powerpc/numa: Early request for home node associativity

2019-08-22 Thread Srikar Dronamraju
Currently the kernel detects if its running on a shared lpar platform and requests home node associativity before the scheduler sched_domains are setup. However between the time NUMA setup is initialized and the request for home node associativity, workqueue initializes its per node cpumask. The

[PATCH 1/3] powerpc/vphn: Check for error from hcall_vphn

2019-08-22 Thread Srikar Dronamraju
There is no point in unpacking associativity, if H_HOME_NODE_ASSOCIATIVITY hcall has returned an error. Also added error messages for H_PARAMETER and default case in vphn_get_associativity. Signed-off-by: Srikar Dronamraju Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Nathan Lynch Cc:

[PATCH 0/3] Early node associativity

2019-08-22 Thread Srikar Dronamraju
Abdul reported a warning on a shared lpar. "WARNING: workqueue cpumask: online intersect > possible intersect". This is because per node workqueue possible mask is set very early in the boot process even before the system was querying the home node associativity. However per node workqueue online

[PATCH v2] powerpc/smp: Use nid as fallback for package_id

2019-08-22 Thread Srikar Dronamraju
Package_id is to find out all cores that are part of the same chip. On PowerNV machines, package_id defaults to chip_id. However ibm,chip_id property is not present in device-tree of PowerVM Lpars. Hence lscpu output shows one core per socket and multiple cores. To overcome this, use nid as the

[Bug 204371] BUG kmalloc-4k (Tainted: G W ): Object padding overwritten

2019-08-22 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=204371 --- Comment #39 from David Sterba (dste...@suse.com) --- Though I don't like neither of the patches, I'll apply one of them so it works and we can think of a better fix later. -- You are receiving this mail because: You are on the CC list for

Re: [PATCH v11 1/7] powerpc/mce: Schedule work from irq_work

2019-08-22 Thread Michael Ellerman
On Tue, 2019-08-20 at 08:13:46 UTC, Santosh Sivaraj wrote: > schedule_work() cannot be called from MCE exception context as MCE can > interrupt even in interrupt disabled context. > > fixes: 733e4a4c ("powerpc/mce: hookup memory_failure for UE errors") > Reviewed-by: Mahesh Salgaonkar >

Re: [PATCH] powerpc/603: fix handling of the DIRTY flag

2019-08-22 Thread Michael Ellerman
On Mon, 2019-08-19 at 06:40:25 UTC, Christophe Leroy wrote: > If a page is already mapped RW without the DIRTY flag, the DIRTY > flag is never set and a TLB store miss exception is taken forever. > > This is easily reproduced with the following app: > > void main(void) > { > volatile char

Re: [PATCH] powerpc/32: Add warning on misaligned copy_page() or clear_page()

2019-08-22 Thread Michael Ellerman
On Fri, 2019-08-16 at 07:52:20 UTC, Christophe Leroy wrote: > copy_page() and clear_page() expect page aligned destination, and > use dcbz instruction to clear entire cache lines based on the > assumption that the destination is cache aligned. > > As shown during analysis of a bug in BTRFS

Re: [PATCH 1/5] powerpc/mm: define empty update_mmu_cache() as static inline

2019-08-22 Thread Michael Ellerman
On Fri, 2019-08-16 at 05:41:40 UTC, Christophe Leroy wrote: > Only BOOK3S and FSL_BOOK3E have a usefull update_mmu_cache(). > > For the others, just define it static inline. > > In the meantime, simplify the FSL_BOOK3E related ifdef as > book3e_hugetlb_preload() only exists when

Re: [PATCH 1/3] powerpc/xmon: Check for HV mode when dumping XIVE info from OPAL

2019-08-22 Thread Michael Ellerman
On Wed, 2019-08-14 at 15:47:52 UTC, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= wrote: > Currently, the xmon 'dx' command calls OPAL to dump the XIVE state in > the OPAL logs and also outputs some of the fields of the internal XIVE > structures in Linux. The OPAL calls can only be done on baremetal >

Re: [PATCH] powerpc/mm: don't display empty early ioremap area

2019-08-22 Thread Michael Ellerman
On Wed, 2019-08-14 at 14:36:10 UTC, Christophe Leroy wrote: > On the 8xx, the layout displayed at boot is: > > [0.00] Memory: 121856K/131072K available (5728K kernel code, 592K > rwdata, 1248K rodata, 560K init, 448K bss, 9216K reserved, 0K cma-reserved) > [0.00] Kernel virtual

Re: [PATCH 1/5] powerpc/ptdump: fix addresses display on PPC32

2019-08-22 Thread Michael Ellerman
On Wed, 2019-08-14 at 12:36:09 UTC, Christophe Leroy wrote: > Commit 453d87f6a8ae ("powerpc/mm: Warn if W+X pages found on boot") > wrongly changed KERN_VIRT_START from 0 to PAGE_OFFSET, leading to a > shift in the displayed addresses. > > Lets revert that change to resync walk_pagetables()'s

Re: [PATCH v2] powerpc/32s: fix boot failure with DEBUG_PAGEALLOC without KASAN.

2019-08-22 Thread Michael Ellerman
On Wed, 2019-08-14 at 10:02:20 UTC, Christophe Leroy wrote: > When KASAN is selected, the definitive hash table has to be > set up later, but there is already an early temporary one. > > When KASAN is not selected, there is no early hash table, > so the setup of the definitive hash table cannot

Re: [PATCH] powerpc/futex: fix warning: 'oldval' may be used uninitialized in this function

2019-08-22 Thread Michael Ellerman
On Wed, 2019-08-14 at 09:25:52 UTC, Christophe Leroy wrote: > CC kernel/futex.o > kernel/futex.c: In function 'do_futex': > kernel/futex.c:1676:17: warning: 'oldval' may be used uninitialized in this > function [-Wmaybe-uninitialized] >return oldval == cmparg; > ^ >

Re: [PATCH] powerpc/kasan: fix parallele loading of modules.

2019-08-22 Thread Michael Ellerman
On Fri, 2019-08-09 at 14:58:09 UTC, Christophe Leroy wrote: > Parallele loading of modules may lead to bad setup of shadow > page table entries. > > First, lets align modules so that two modules never share the same > shadow page. > > Second, ensure that two modules cannot allocate two page

Re: [PATCH] powerpc/kasan: fix shadow area set up for modules.

2019-08-22 Thread Michael Ellerman
On Fri, 2019-08-09 at 14:58:10 UTC, Christophe Leroy wrote: > When loading modules, from time to time an Oops is encountered > during the init of shadow area for globals. This is due to the > last page not always being mapped depending on the exact distance > between the start and the end of the

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

2019-08-22 Thread Michael Ellerman
On Fri, 2019-08-02 at 19:29:24 UTC, Nathan Lynch wrote: > The LPAR migration implementation and userspace-initiated cpu hotplug > can interleave their executions like so: > > 1. Set cpu 7 offline via sysfs. > > 2. Begin a partition migration, whose implementation requires the OS >to ensure

Re: [PATCH 1/5] powerpc/64s/radix: Fix memory hotplug section page table creation

2019-08-22 Thread Michael Ellerman
On Wed, 2019-07-24 at 08:46:34 UTC, Nicholas Piggin wrote: > create_physical_mapping expects physical addresses, but creating and > splitting these mappings after boot is supplying virtual (effective) > addresses. This can be irritated by booting with mem= to limit memory > then probing an unused

Re: [PATCH kernel v5 1/4] powerpc/powernv/ioda: Fix race in TCE level allocation

2019-08-22 Thread Michael Ellerman
On Thu, 2019-07-18 at 05:11:36 UTC, Alexey Kardashevskiy wrote: > pnv_tce() returns a pointer to a TCE entry and originally a TCE table > would be pre-allocated. For the default case of 2GB window the table > needs only a single level and that is fine. However if more levels are > requested, it is

Re: [PATCH] powerpc/hw_breakpoint: move instruction stepping out of hw_breakpoint_handler()

2019-08-22 Thread Michael Ellerman
On Fri, 2019-06-28 at 15:55:52 UTC, Christophe Leroy wrote: > On 8xx, breakpoints stop after executing the instruction, so > stepping/emulation is not needed. Move it into a sub-function and > remove the #ifdefs. > > Signed-off-by: Christophe Leroy > Reviewed-by: Ravi Bangoria Applied to

Re: [PATCH] powerpc/64: allow compiler to cache 'current'

2019-08-22 Thread Michael Ellerman
On Wed, 2019-06-12 at 14:03:17 UTC, Nicholas Piggin wrote: > current may be cached by the compiler, so remove the volatile asm > restriction. This results in better generated code, as well as being > smaller and fewer dependent loads, it can avoid store-hit-load flushes > like this one that shows

Re: [PATCH v3] powerpc/pseries: Fix cpu_hotplug_lock acquisition in resize_hpt()

2019-08-22 Thread Michael Ellerman
On Wed, 2019-05-15 at 07:45:52 UTC, "Gautham R. Shenoy" wrote: > From: "Gautham R. Shenoy" > > The calls to arch_add_memory()/arch_remove_memory() are always made > with the read-side cpu_hotplug_lock acquired via > memory_hotplug_begin(). On pSeries, > arch_add_memory()/arch_remove_memory()

Re: [PATCH v1 4/4] mmc: sdhci-of-esdhc: add erratum A011334 support in ls1028a 1.0 SoC

2019-08-22 Thread Ulf Hansson
On Wed, 14 Aug 2019 at 09:24, Yinbo Zhu wrote: > > This patch is to add erratum A011334 support in ls1028a 1.0 SoC > > Signed-off-by: Yinbo Zhu Applied for next, thanks! Kind regards Uffe > --- > drivers/mmc/host/sdhci-of-esdhc.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git

Re: [PATCH v2 06/10] PCI: layerscape: Modify the way of getting capability with different PEX

2019-08-22 Thread Kishon Vijay Abraham I
Hi, On 22/08/19 4:52 PM, Xiaowei Bao wrote: > The different PCIe controller in one board may be have different > capability of MSI or MSIX, so change the way of getting the MSI > capability, make it more flexible. please use different pci_epc_features table for different boards. Thanks Kishon >

[PATCH v2 10/10] misc: pci_endpoint_test: Add LS1088a in pci_device_id table

2019-08-22 Thread Xiaowei Bao
Add LS1088a in pci_device_id table so that pci-epf-test can be used for testing PCIe EP in LS1088a. Signed-off-by: Xiaowei Bao --- v2: - No change. drivers/misc/pci_endpoint_test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/misc/pci_endpoint_test.c

[PATCH v2 09/10] arm64: dts: layerscape: Add PCIe EP node for ls1088a

2019-08-22 Thread Xiaowei Bao
Add PCIe EP node for ls1088a to support EP mode. Signed-off-by: Xiaowei Bao --- v2: - Remove the pf-offset proparty. arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 31 ++ 1 file changed, 31 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi

[PATCH v2 08/10] PCI: layerscape: Add EP mode support for ls1088a and ls2088a

2019-08-22 Thread Xiaowei Bao
Add PCIe EP mode support for ls1088a and ls2088a, there are some difference between LS1 and LS2 platform, so refactor the code of the EP driver. Signed-off-by: Xiaowei Bao --- v2: - New mechanism for layerscape EP driver. drivers/pci/controller/dwc/pci-layerscape-ep.c | 76

[PATCH v2 07/10] PCI: layerscape: Modify the MSIX to the doorbell way

2019-08-22 Thread Xiaowei Bao
The layerscape platform use the doorbell way to trigger MSIX interrupt in EP mode. Signed-off-by: Xiaowei Bao --- v2: - No change. drivers/pci/controller/dwc/pci-layerscape-ep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH v2 06/10] PCI: layerscape: Modify the way of getting capability with different PEX

2019-08-22 Thread Xiaowei Bao
The different PCIe controller in one board may be have different capability of MSI or MSIX, so change the way of getting the MSI capability, make it more flexible. Signed-off-by: Xiaowei Bao --- v2: - Remove the repeated assignment code. drivers/pci/controller/dwc/pci-layerscape-ep.c | 26

[PATCH v2 05/10] PCI: layerscape: Fix some format issue of the code

2019-08-22 Thread Xiaowei Bao
Fix some format issue of the code in EP driver. Signed-off-by: Xiaowei Bao --- v2: - No change. drivers/pci/controller/dwc/pci-layerscape-ep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-layerscape-ep.c

[PATCH v2 04/10] dt-bindings: pci: layerscape-pci: add compatible strings for ls1088a and ls2088a

2019-08-22 Thread Xiaowei Bao
Add compatible strings for ls1088a and ls2088a. Signed-off-by: Xiaowei Bao --- v2: - No change. Documentation/devicetree/bindings/pci/layerscape-pci.txt | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/pci/layerscape-pci.txt

[PATCH v2 03/10] PCI: designware-ep: Move the function of getting MSI capability forward

2019-08-22 Thread Xiaowei Bao
Move the function of getting MSI capability to the front of init function, because the init function of the EP platform driver will use the return value by the function of getting MSI capability. Signed-off-by: Xiaowei Bao --- v2: - No change. drivers/pci/controller/dwc/pcie-designware-ep.c |

[PATCH v2 01/10] PCI: designware-ep: Add multiple PFs support for DWC

2019-08-22 Thread Xiaowei Bao
Add multiple PFs support for DWC, different PF have different config space we use pf-offset property which get from the DTS to access the different pF config space. Signed-off-by: Xiaowei Bao --- v2: - Remove duplicate redundant code. - Reimplement the PF config space access way.

[PATCH v2 02/10] PCI: designware-ep: Add the doorbell mode of MSI-X in EP mode

2019-08-22 Thread Xiaowei Bao
Add the doorbell mode of MSI-X in EP mode. Signed-off-by: Xiaowei Bao --- v2: - Remove the macro of no used. drivers/pci/controller/dwc/pcie-designware-ep.c | 14 ++ drivers/pci/controller/dwc/pcie-designware.h| 12 2 files changed, 26 insertions(+) diff --git

Re: [PATCH v2 3/3] powerpc/xive: Implement get_irqchip_state method for XIVE to fix shutdown race

2019-08-22 Thread Michael Ellerman
On Tue, 2019-08-13 at 10:06:48 UTC, Paul Mackerras wrote: > Testing has revealed the existence of a race condition where a XIVE > interrupt being shut down can be in one of the XIVE interrupt queues > (of which there are up to 8 per CPU, one for each priority) at the > point where free_irq() is

Re: [PATCH v2 2/3] KVM: PPC: Book3S HV: Don't push XIVE context when not using XIVE device

2019-08-22 Thread Michael Ellerman
On Tue, 2019-08-13 at 10:01:00 UTC, Paul Mackerras wrote: > At present, when running a guest on POWER9 using HV KVM but not using > an in-kernel interrupt controller (XICS or XIVE), for example if QEMU > is run with the kernel_irqchip=off option, the guest entry code goes > ahead and tries to load

Re: [PATCH v2 1/3] KVM: PPC: Book3S HV: Fix race in re-enabling XIVE escalation interrupts

2019-08-22 Thread Michael Ellerman
On Tue, 2019-08-13 at 10:03:49 UTC, Paul Mackerras wrote: > Escalation interrupts are interrupts sent to the host by the XIVE > hardware when it has an interrupt to deliver to a guest VCPU but that > VCPU is not running anywhere in the system. Hence we disable the > escalation interrupt for the

Re: [PATCH] KVM: PPC: Book3S HV: XIVE: Free escalation interrupts before disabling the VP

2019-08-22 Thread Michael Ellerman
On Tue, 2019-08-06 at 17:25:38 UTC, =?utf-8?q?C=C3=A9dric_Le_Goater?= wrote: > When a vCPU is brought done, the XIVE VP is first disabled and then > the event notification queues are freed. When freeing the queues, we > check for possible escalation interrupts and free them also. > > But when a

[PATCH v7 7/7] KVM: PPC: Ultravisor: Add PPC_UV config option

2019-08-22 Thread Bharata B Rao
From: Anshuman Khandual CONFIG_PPC_UV adds support for ultravisor. Signed-off-by: Anshuman Khandual Signed-off-by: Bharata B Rao Signed-off-by: Ram Pai [ Update config help and commit message ] Signed-off-by: Claudio Carvalho --- arch/powerpc/Kconfig | 17 + 1 file changed,

[PATCH v7 6/7] kvmppc: Support reset of secure guest

2019-08-22 Thread Bharata B Rao
Add support for reset of secure guest via a new ioctl KVM_PPC_SVM_OFF. This ioctl will be issued by QEMU during reset and includes the the following steps: - Ask UV to terminate the guest via UV_SVM_TERMINATE ucall - Unpin the VPA pages so that they can be migrated back to secure side when

[PATCH v7 5/7] kvmppc: Radix changes for secure guest

2019-08-22 Thread Bharata B Rao
- After the guest becomes secure, when we handle a page fault of a page belonging to SVM in HV, send that page to UV via UV_PAGE_IN. - Whenever a page is unmapped on the HV side, inform UV via UV_PAGE_INVAL. - Ensure all those routines that walk the secondary page tables of the guest don't do

[PATCH v7 4/7] kvmppc: Handle memory plug/unplug to secure VM

2019-08-22 Thread Bharata B Rao
Register the new memslot with UV during plug and unregister the memslot during unplug. Signed-off-by: Bharata B Rao Acked-by: Paul Mackerras --- arch/powerpc/include/asm/ultravisor-api.h | 1 + arch/powerpc/include/asm/ultravisor.h | 5 + arch/powerpc/kvm/book3s_hv.c |

[PATCH v7 3/7] kvmppc: H_SVM_INIT_START and H_SVM_INIT_DONE hcalls

2019-08-22 Thread Bharata B Rao
H_SVM_INIT_START: Initiate securing a VM H_SVM_INIT_DONE: Conclude securing a VM As part of H_SVM_INIT_START, register all existing memslots with the UV. H_SVM_INIT_DONE call by UV informs HV that transition of the guest to secure mode is complete. These two states (transition to secure mode

[PATCH v7 2/7] kvmppc: Shared pages support for secure guests

2019-08-22 Thread Bharata B Rao
A secure guest will share some of its pages with hypervisor (Eg. virtio bounce buffers etc). Support sharing of pages between hypervisor and ultravisor. Once a secure page is converted to shared page, the device page is unmapped from the HV side page tables. Signed-off-by: Bharata B Rao ---

[PATCH v7 1/7] kvmppc: Driver to manage pages of secure guest

2019-08-22 Thread Bharata B Rao
KVMPPC driver to manage page transitions of secure guest via H_SVM_PAGE_IN and H_SVM_PAGE_OUT hcalls. H_SVM_PAGE_IN: Move the content of a normal page to secure page H_SVM_PAGE_OUT: Move the content of a secure page to normal page Private ZONE_DEVICE memory equal to the amount of secure memory

[PATCH v7 0/7] KVMPPC driver to manage secure guest pages

2019-08-22 Thread Bharata B Rao
Hi, A pseries guest can be run as a secure guest on Ultravisor-enabled POWER platforms. On such platforms, this driver will be used to manage the movement of guest pages between the normal memory managed by hypervisor(HV) and secure memory managed by Ultravisor(UV). Private ZONE_DEVICE memory

Re: [PATCH v1 5/5] mm/memory_hotplug: Remove zone parameter from __remove_pages()

2019-08-22 Thread David Hildenbrand
On 21.08.19 17:40, David Hildenbrand wrote: > No longer in use, let's drop it. We no longer access the zone of > possibly never onlined memory (and therefore don't read garabage in > these scenarios). > > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Tony Luck > Cc: Fenghua Yu > Cc: Benjamin

Re: [PATCH] powerpc/8xx: drop unused self-modifying code alternative to FixupDAR.

2019-08-22 Thread Joakim Tjernlund
On Wed, 2019-08-21 at 20:00 +, Christophe Leroy wrote: > > The code which fixups the DAR on TLB errors for dbcX instructions > has a self-modifying code alternative that has never been used. > > Drop it. Argh, my master piece from way back :) But it is time for it to go. Reviewed-by:

[PATCH] powerpc: dump kernel log before carrying out fadump or kdump

2019-08-22 Thread Ganesh Goudar
Die or panic path in system reset handler dumps kernel log to nvram, since commit 4388c9b3a6ee ("powerpc: Do not send system reset request through the oops path") system reset request is not allowed to take die path if fadump or kdump is configured, hence we miss dumping kernel log to nvram, call

[PATCH] powerpc/eeh: Fixup EEH for pSeries hotplug

2019-08-22 Thread Sam Bobroff
Signed-off-by: Sam Bobroff --- Let's move the test into eeh_add_device_tree_late(). Thanks, Sam. arch/powerpc/kernel/eeh.c | 2 ++ arch/powerpc/kernel/of_platform.c | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/eeh.c

Re: [linux-next][PPC][bisected c7d8b7][gcc 6.4.1] build error at drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:1471

2019-08-22 Thread Stephen Rothwell
Hi Abdul, On Thu, 22 Aug 2019 11:16:51 +0530 Abdul Haleem wrote: > > Today's linux-next kernel 5.3.0-rc5-next-20190820 failed to build on my > powerpc machine > > Build errors: > drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c: In function amdgpu_exit: > drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:1471:2:

Re: [PATCH 2/3] powerpc/pcidn: Make VF pci_dn management CONFIG_PCI_IOV specific

2019-08-22 Thread Sam Bobroff
On Wed, Aug 21, 2019 at 04:26:54PM +1000, Oliver O'Halloran wrote: > The powerpc PCI code requires that a pci_dn structure exists for all > devices in the system. This is fine for real devices since at boot a pci_dn > is created for each PCI device in the DT and it's fine for hotplugged devices >

Re: [PATCH 3/3] powerpc/pcidn: Warn when sriov pci_dn management is used incorrectly

2019-08-22 Thread Sam Bobroff
On Wed, Aug 21, 2019 at 04:26:55PM +1000, Oliver O'Halloran wrote: > These functions can only be used on a SR-IOV capable physical function and > they're only called in pcibios_sriov_enable / disable. Make them emit a > warning in the future if they're used incorrectly and remove the dead > code