Re: linux-next: build warning after merge of the akpm tree

2020-12-08 Thread Stephen Rothwell
Hi Michael, On Wed, 09 Dec 2020 15:44:35 +1100 Michael Ellerman wrote: > > They should really be in DATA_DATA or similar shouldn't they? No other architecture appears t need them ... -- Cheers, Stephen Rothwell pgp8OwAZ8FWS2.pgp Description: OpenPGP digital signature

Re: [PATCH] powerpc/mm: Refactor the floor/ceiling check in hugetlb range freeing functions

2020-12-08 Thread Aneesh Kumar K.V
Christophe Leroy writes: > All hugetlb range freeing functions have a verification like the following, > which only differs by the mask used, depending on the page table level. > > start &= MASK; > if (start < floor) > return; > if (ceiling) { > ceili

Re: [PATCH v3 4/5] powerpc/fault: Avoid heavy search_exception_tables() verification

2020-12-08 Thread Christophe Leroy
Le 08/12/2020 à 16:07, Christophe Leroy a écrit : Le 08/12/2020 à 15:52, Aneesh Kumar K.V a écrit : Christophe Leroy writes: search_exception_tables() is an heavy operation, we have to avoid it. When KUAP is selected, we'll know the fault has been blocked by KUAP. Otherwise, it behaves j

[PATCH v4 6/6] powerpc/fault: Perform exception fixup in do_page_fault()

2020-12-08 Thread Christophe Leroy
Exception fixup doesn't require the heady full regs saving, do it from do_page_fault() directly. For that, split bad_page_fault() in two parts. As bad_page_fault() can also be called from other places than handle_page_fault(), it will still perform exception fixup and fallback on __bad_page_fault

[PATCH v4 4/6] powerpc/mm: Move the WARN() out of bad_kuap_fault()

2020-12-08 Thread Christophe Leroy
In order to prepare the removal of calls to search_exception_tables() on the fast path, move the WARN() out of bad_kuap_fault(). Signed-off-by: Christophe Leroy --- v4: New --- arch/powerpc/include/asm/book3s/32/kup.h | 6 +- arch/powerpc/include/asm/book3s/64/kup.h | 6 ++ arch/

[PATCH v4 3/6] powerpc/fault: Unnest definition of page_fault_is_write() and page_fault_is_bad()

2020-12-08 Thread Christophe Leroy
To make it more readable, separate page_fault_is_write() and page_fault_is_bad() to avoir several levels of #ifdefs Reviewed-by: Nicholas Piggin Signed-off-by: Christophe Leroy --- arch/powerpc/mm/fault.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/m

[PATCH v4 2/6] powerpc/mm: sanity_check_fault() should work for all, not only BOOK3S

2020-12-08 Thread Christophe Leroy
The verification and message introduced by commit 374f3f5979f9 ("powerpc/mm/hash: Handle user access of kernel address gracefully") applies to all platforms, it should not be limited to BOOK3S. Make the BOOK3S version of sanity_check_fault() the one for all, and bail out earlier if not BOOK3S. Fi

[PATCH v4 1/6] powerpc/book3s64/kuap: Improve error reporting with KUAP

2020-12-08 Thread Christophe Leroy
From: Aneesh Kumar K.V This partially reverts commit eb232b162446 ("powerpc/book3s64/kuap: Improve error reporting with KUAP") and update the fault handler to print [ 55.022514] Kernel attempted to access user page (7e6725b7) - exploit attempt? (uid: 0) [ 55.022528] BUG: Unable to handl

[PATCH v4 5/6] powerpc/fault: Avoid heavy search_exception_tables() verification

2020-12-08 Thread Christophe Leroy
search_exception_tables() is an heavy operation, we have to avoid it. When KUAP is selected, we'll know the fault has been blocked by KUAP. When it is blocked by KUAP, check whether we are in an expected userspace access place. If so, emit a warning to spot something is going work. Otherwise, just

Re: [PATCH] powerpc/mce: Remove per cpu variables from MCE handlers

2020-12-08 Thread Michael Ellerman
Mahesh Jagannath Salgaonkar writes: > On 12/8/20 4:16 PM, Ganesh wrote: >> >> On 12/8/20 4:01 PM, Michael Ellerman wrote: >>> Ganesh Goudar writes: diff --git a/arch/powerpc/include/asm/paca.h b/arch/powerpc/include/asm/paca.h index 9454d29ff4b4..4769954efa7d 100644 --- a/arc

Re: linux-next: build warning after merge of the akpm tree

2020-12-08 Thread Michael Ellerman
Stephen Rothwell writes: > Hi Stephen, > > On Fri, 4 Dec 2020 21:00:00 +1100 Stephen Rothwell > wrote: >> >> Hi all, >> >> After merging the akpm tree, today's linux-next build (powerpc >> allyesconfig) produced warnings like this: >> >> ld: warning: orphan section `.data..Lubsan_data177' from

[powerpc:next-test] BUILD SUCCESS db972a3787d12b1ce9ba7a31ec376d8a79e04c47

2020-12-08 Thread kernel test robot
allyesconfig powerpc allmodconfig powerpc allnoconfig x86_64 randconfig-a004-20201208 x86_64 randconfig-a006-20201208 x86_64 randconfig-a005-20201208 x86_64 randconfig

[powerpc:fixes-test] BUILD SUCCESS 5eedf9fe8db23313df104576845cec5f481b9b60

2020-12-08 Thread kernel test robot
allmodconfig powerpc allyesconfig powerpc allmodconfig powerpc allnoconfig i386 randconfig-a004-20201208 i386 randconfig-a005-20201208 i386 randconfig-a001-20201208 i386

Re: [PATCH 04/13] powerpc/xive: Use cpu_to_node() instead of ibm, chip-id property

2020-12-08 Thread Aneesh Kumar K.V
Cédric Le Goater writes: > The 'chip_id' field of the XIVE CPU structure is used to choose a > target for a source located on the same chip when possible. This field > is assigned on the PowerNV platform using the "ibm,chip-id" property > on pSeries under KVM when NUMA nodes are defined but it is

Re: [PATCH v2 4/4] KVM: PPC: Introduce new capability for 2nd DAWR

2020-12-08 Thread Paul Mackerras
On Tue, Nov 24, 2020 at 04:29:53PM +0530, Ravi Bangoria wrote: > Introduce KVM_CAP_PPC_DAWR1 which can be used by Qemu to query whether > kvm supports 2nd DAWR or not. This should be described in Documentation/virt/kvm/api.rst. Strictly speaking, it should be a capability which is disabled by def

Re: [PATCH v1 1/2] KVM: PPC: Book3S HV: Add support for H_RPT_INVALIDATE (nested case only)

2020-12-08 Thread Paul Mackerras
On Mon, Oct 19, 2020 at 04:56:41PM +0530, Bharata B Rao wrote: > Implements H_RPT_INVALIDATE hcall and supports only nested case > currently. > > A KVM capability KVM_CAP_RPT_INVALIDATE is added to indicate the > support for this hcall. I have a couple of questions about this patch: 1. Is this s

Re: [PATCH 1/3] powerpc/smp: Parse ibm, thread-groups with multiple properties

2020-12-08 Thread Michael Ellerman
Gautham R Shenoy writes: > Hello Srikar, > > Thanks for taking a look at the patch. > > On Mon, Dec 07, 2020 at 05:40:42PM +0530, Srikar Dronamraju wrote: >> * Gautham R. Shenoy [2020-12-04 10:18:45]: >> >> > From: "Gautham R. Shenoy" >> >> >> >> > >> > static int parse_thread_groups(struc

Re: [PATCH] drivers: usb: gadget: prefer pr_*() functions over raw printk()

2020-12-08 Thread Peter Chen
On 20-12-08 15:44:03, Enrico Weigelt, metux IT consult wrote: > Reduce a bit logging boilerplate by using the preferred pr_*() > macros instead of raw printk(). It is the device driver code, it is better to use dev_info/dev_dbg. Peter > > Signed-off-by: Enrico Weigelt, metux IT consult > --- >

Re: [PATCH v2 1/2] powerpc/rtas: Restrict RTAS requests from userspace

2020-12-08 Thread Andrew Donnellan
On 9/12/20 5:59 am, Tyrel Datwyler wrote: + { "ibm,open-errinct", -1, -1, -1, -1, -1 }, There is a typo here. Should be ibm,open-errinjct. kernel: [ 1100.408626] sys_rtas: RTAS call blocked - exploit attempt? kernel: [ 1100.408631] sys_rtas: token=0x26, nargs=0 (called by errinjct) Whic

Re: [PATCH] arch: fix 'unexpected IRQ trap at vector' warnings

2020-12-08 Thread Thomas Gleixner
On Tue, Dec 08 2020 at 13:11, Michael Ellerman wrote: > "Enrico Weigelt, metux IT consult" writes: >> All archs, except Alpha, print out the irq number in hex, but the message >> looks like it was a decimal number, which is quite confusing. Fixing this >> by adding "0x" prefix. > > Arguably decima

Re: [PATCH v2 01/17] ibmvfc: add vhost fields and defaults for MQ enablement

2020-12-08 Thread Tyrel Datwyler
On 12/7/20 3:56 AM, Hannes Reinecke wrote: > On 12/4/20 3:26 PM, Brian King wrote: >> On 12/2/20 11:27 AM, Tyrel Datwyler wrote: >>> On 12/2/20 7:14 AM, Brian King wrote: On 12/1/20 6:53 PM, Tyrel Datwyler wrote: > Introduce several new vhost fields for managing MQ state of the adapter >>>

[PATCH v2 1/1] powerpc/kvm: Fix mask size for emulated msgsndp

2020-12-08 Thread Leonardo Bras
According to ISAv3.1 and ISAv3.0b, the msgsndp is described to split RB in: msgtype <- (RB) 32:36 payload <- (RB) 37:63 t <- (RB) 57:63 The current way of getting 'msgtype', and 't' is missing their MSB: msgtype: ((arg >> 27) & 0xf) : Gets (RB) 33:36, missing bit 32 t: (arg &= 0x3f)

Re: [PATCH 14/20] ethernet: ucc_geth: don't statically allocate eight ucc_geth_info

2020-12-08 Thread Rasmus Villemoes
On 08/12/2020 16.13, Christophe Leroy wrote: > > > Le 05/12/2020 à 20:17, Rasmus Villemoes a écrit : >> @@ -3714,25 +3712,23 @@ static int ucc_geth_probe(struct >> platform_device* ofdev) >>   if ((ucc_num < 0) || (ucc_num > 7)) >>   return -ENODEV; >>   -    ug_info = &ugeth_info[uc

Re: [PATCH v6 0/5] PCI: Unify ECAM constants in native PCI Express drivers

2020-12-08 Thread Michael Walle
Am 2020-12-08 22:06, schrieb Bjorn Helgaas: [+cc Qian] On Tue, Dec 08, 2020 at 04:41:50PM +0100, Michael Walle wrote: Hi Lorenzo, Krzysztof, >On Sun, 29 Nov 2020 23:07:38 +, Krzysztof Wilczyński wrote: >> Unify ECAM-related constants into a single set of standard constants >> defining memo

Re: [PATCH v6 0/5] PCI: Unify ECAM constants in native PCI Express drivers

2020-12-08 Thread Bjorn Helgaas
[+cc Qian] On Tue, Dec 08, 2020 at 04:41:50PM +0100, Michael Walle wrote: > Hi Lorenzo, Krzysztof, > > >On Sun, 29 Nov 2020 23:07:38 +, Krzysztof Wilczyński wrote: > >> Unify ECAM-related constants into a single set of standard constants > >> defining memory address shift values for the byte-

Re: [PATCH v2 0/5] drop unused BACKLIGHT_GENERIC option

2020-12-08 Thread Arnd Bergmann
On Tue, Dec 8, 2020 at 6:00 PM Thomas Bogendoerfer wrote: > On Tue, Dec 08, 2020 at 05:34:46PM +0100, Arnd Bergmann wrote: > > [3/5] MIPS: configs: drop unused BACKLIGHT_GENERIC option > > commit: 2257682282531de45929c6006152f6e2ee881b42 > > this one is already in mips-next. Ok, dropped fro

Re: [PATCH 18/20] ethernet: ucc_geth: add helper to replace repeated switch statements

2020-12-08 Thread Rasmus Villemoes
On 08/12/2020 16.21, Christophe Leroy wrote: > > > Le 05/12/2020 à 20:17, Rasmus Villemoes a écrit : >> The translation from the ucc_geth_num_of_threads enum value to the >> actual count can be written somewhat more compactly with a small >> lookup table, allowing us to replace the four switch st

Re: [PATCH 02/20] ethernet: ucc_geth: fix definition and size of ucc_geth_tx_global_pram

2020-12-08 Thread Rasmus Villemoes
On 08/12/2020 20.14, Li Yang wrote: > On Sat, Dec 5, 2020 at 1:21 PM Rasmus Villemoes > wrote: >> >> Table 8-53 in the QUICC Engine Reference manual shows definitions of >> fields up to a size of 192 bytes, not just 128. But in table 8-111, >> one does find the text >> >> Base Address of the Glo

[PATCH] powerpc/rtas: fix typo of ibm,open-errinjct in rtas filter

2020-12-08 Thread Tyrel Datwyler
Commit bd59380c5ba4 ("powerpc/rtas: Restrict RTAS requests from userspace") introduced the following error when invoking the errinjct userspace tool. [root@ltcalpine2-lp5 librtas]# errinjct open [327884.071171] sys_rtas: RTAS call blocked - exploit attempt? [327884.071186] sys_rtas: token=0x26, na

Re: [PATCH] drivers: usb: gadget: prefer pr_*() functions over raw printk()

2020-12-08 Thread Laurent Pinchart
Hi Enrico, Thank you for the patch. On Tue, Dec 08, 2020 at 03:44:03PM +0100, Enrico Weigelt, metux IT consult wrote: > Reduce a bit logging boilerplate by using the preferred pr_*() > macros instead of raw printk(). > > Signed-off-by: Enrico Weigelt, metux IT consult > --- > drivers/usb/gadg

Re: [PATCH 02/20] ethernet: ucc_geth: fix definition and size of ucc_geth_tx_global_pram

2020-12-08 Thread Li Yang
On Sat, Dec 5, 2020 at 1:21 PM Rasmus Villemoes wrote: > > Table 8-53 in the QUICC Engine Reference manual shows definitions of > fields up to a size of 192 bytes, not just 128. But in table 8-111, > one does find the text > > Base Address of the Global Transmitter Parameter RAM Page. [...] >

Re: [PATCH v2 1/2] powerpc/rtas: Restrict RTAS requests from userspace

2020-12-08 Thread Tyrel Datwyler
On 8/19/20 9:45 PM, Andrew Donnellan wrote: > A number of userspace utilities depend on making calls to RTAS to retrieve > information and update various things. > > The existing API through which we expose RTAS to userspace exposes more > RTAS functionality than we actually need, through the sys_

Re: [PATCH 3/3] powerpc/cacheinfo: Print correct cache-sibling map/list for L2 cache

2020-12-08 Thread Gautham R Shenoy
On Mon, Dec 07, 2020 at 06:41:38PM +0530, Srikar Dronamraju wrote: > * Gautham R. Shenoy [2020-12-04 10:18:47]: > > > From: "Gautham R. Shenoy" > > > > > > Signed-off-by: Gautham R. Shenoy > > --- > > > > +extern bool thread_group_shares_l2; > > /* > > * On big-core systems, each core has

Re: [PATCH 2/3] powerpc/smp: Add support detecting thread-groups sharing L2 cache

2020-12-08 Thread Gautham R Shenoy
Hello Srikar, On Mon, Dec 07, 2020 at 06:10:39PM +0530, Srikar Dronamraju wrote: > * Gautham R. Shenoy [2020-12-04 10:18:46]: > > > From: "Gautham R. Shenoy" > > > > On POWER systems, groups of threads within a core sharing the L2-cache > > can be indicated by the "ibm,thread-groups" property

Re: [PATCH 09/13] powerpc/xive: Remove P9 DD1 flag XIVE_IRQ_FLAG_SHIFT_BUG

2020-12-08 Thread Greg Kurz
On Tue, 8 Dec 2020 16:11:20 +0100 Cédric Le Goater wrote: > This flag was used to support the PHB4 LSIs on P9 DD1 and we have > stopped supporting this CPU when DD2 came out. See skiboot commit: > > https://github.com/open-power/skiboot/commit/0b0d15e3c170 > > Signed-off-by: Cédric Le Goater

Re: [PATCH 1/3] powerpc/smp: Parse ibm,thread-groups with multiple properties

2020-12-08 Thread Gautham R Shenoy
Hello Srikar, Thanks for taking a look at the patch. On Mon, Dec 07, 2020 at 05:40:42PM +0530, Srikar Dronamraju wrote: > * Gautham R. Shenoy [2020-12-04 10:18:45]: > > > From: "Gautham R. Shenoy" > > > > > > > static int parse_thread_groups(struct device_node *dn, > > -

Re: [PATCH 08/13] powerpc: Increase NR_IRQS range to support more KVM guests

2020-12-08 Thread Greg Kurz
On Tue, 8 Dec 2020 16:11:19 +0100 Cédric Le Goater wrote: > PowerNV systems can handle up to 4K guests and 1M interrupt numbers > per chip. Increase the range of allowed interrupts to support a larger > number of guests. > > Signed-off-by: Cédric Le Goater > --- Reviewed-by: Greg Kurz > arc

Re: [PATCH 03/13] powerpc/xive: Introduce XIVE_IPI_HW_IRQ

2020-12-08 Thread Greg Kurz
On Tue, 8 Dec 2020 16:11:14 +0100 Cédric Le Goater wrote: > The XIVE driver deals with CPU IPIs in a peculiar way. Each CPU has > its own XIVE IPI interrupt allocated at the HW level, for PowerNV, or > at the hypervisor level for pSeries. In practice, these interrupts are > not always used. pSeri

Re: [PATCH v2 0/5] drop unused BACKLIGHT_GENERIC option

2020-12-08 Thread Thomas Bogendoerfer
On Tue, Dec 08, 2020 at 05:34:46PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > On Tue, 1 Dec 2020 22:29:17 +, Andrey Zhizhikin wrote: > > Since the removal of generic_bl driver from the source tree in commit > > 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is > > u

Re: [PATCH 02/13] powerpc/xive: Rename XIVE_IRQ_NO_EOI to show its a flag

2020-12-08 Thread Greg Kurz
On Tue, 8 Dec 2020 16:11:13 +0100 Cédric Le Goater wrote: > This is a simple cleanup to identify easily all flags of the XIVE > interrupt structure. The interrupts flagged with XIVE_IRQ_FLAG_NO_EOI > are the escalations used to wake up vCPUs in KVM. They are handled > very differently from the re

Re: [PATCH v2 0/5] drop unused BACKLIGHT_GENERIC option

2020-12-08 Thread Alexandre Belloni
Hi, On 08/12/2020 17:34:46+0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > On Tue, 1 Dec 2020 22:29:17 +, Andrey Zhizhikin wrote: > > Since the removal of generic_bl driver from the source tree in commit > > 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is > > unused")

Re: [PATCH v2 0/5] drop unused BACKLIGHT_GENERIC option

2020-12-08 Thread Arnd Bergmann
From: Arnd Bergmann On Tue, 1 Dec 2020 22:29:17 +, Andrey Zhizhikin wrote: > Since the removal of generic_bl driver from the source tree in commit > 7ecdea4a0226 ("backlight: generic_bl: Remove this driver as it is > unused") BACKLIGHT_GENERIC config option became obsolete as well and > there

Re: [PATCH v6 0/5] PCI: Unify ECAM constants in native PCI Express drivers

2020-12-08 Thread Qian Cai
07 [#1] SMP [ 186.484059][T1] Modules linked in: [ 186.487854][T1] CPU: 38 PID: 1 Comm: swapper/0 Tainted: GWL 5.10.0-rc7-next-20201208 #3 [ 186.497617][T1] Hardware name: HPE Apollo 70 /C01_APACHE_MB , BIOS L50_5.13_1.16 0

Re: [PATCH v6 0/5] PCI: Unify ECAM constants in native PCI Express drivers

2020-12-08 Thread Michael Walle
Hi Lorenzo, Krzysztof, >On Sun, 29 Nov 2020 23:07:38 +, Krzysztof Wilczyński wrote: >> Unify ECAM-related constants into a single set of standard constants >> defining memory address shift values for the byte-level address that can >> be used when accessing the PCI Express Configuration Space,

Re: [PATCH v5 10/19] dt-bindings: usb: Convert DWC USB3 bindings to DT schema

2020-12-08 Thread Rob Herring
On Sat, 05 Dec 2020 18:24:17 +0300, Serge Semin wrote: > DWC USB3 DT node is supposed to be compliant with the Generic xHCI > Controller schema, but with additional vendor-specific properties, the > controller-specific reference clocks and PHYs. So let's convert the > currently available legacy tex

Re: [PATCH 18/20] ethernet: ucc_geth: add helper to replace repeated switch statements

2020-12-08 Thread Christophe Leroy
Le 05/12/2020 à 20:17, Rasmus Villemoes a écrit : The translation from the ucc_geth_num_of_threads enum value to the actual count can be written somewhat more compactly with a small lookup table, allowing us to replace the four switch statements. Signed-off-by: Rasmus Villemoes --- drivers

Re: [PATCH 15/20] ethernet: ucc_geth: use UCC_GETH_{RX, TX}_BD_RING_ALIGNMENT macros directly

2020-12-08 Thread Christophe Leroy
Le 05/12/2020 à 20:17, Rasmus Villemoes a écrit : These macros both have the value 32, there's no point first initializing align to a lower value. If anything, one could throw in a BUILD_BUG_ON(UCC_GETH_TX_BD_RING_ALIGNMENT < 4), but it's not worth it - lots of code depends on named constants

[PATCH 05/13] powerpc/xive: Fix allocation of pages donated to the XIVE controller

2020-12-08 Thread Cédric Le Goater
The XIVE interrupt controller uses a set of internal tables to handle interrupt routing. The small tables (SBE, EAT) are direct tables and allocated by OPAL. The bigger ones (NVT, ENDT) are indirect, i.e., the first table entries point to a page which contains the XIVE structures used by HW. For th

Re: [PATCH 14/20] ethernet: ucc_geth: don't statically allocate eight ucc_geth_info

2020-12-08 Thread Christophe Leroy
Le 05/12/2020 à 20:17, Rasmus Villemoes a écrit : struct ucc_geth_info is somewhat large, and on systems with only one or two UCC instances, that just wastes a few KB of memory. So allocate and populate a chunk of memory at probe time instead of initializing them all during driver init. Note

[PATCH 06/13] powerpc/xive: Add a name to the IRQ domain

2020-12-08 Thread Cédric Le Goater
We hope one day to handle multiple irq_domain in the XIVE driver. Start simple by setting the name using the DT node. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/xive-internal.h | 4 ++-- arch/powerpc/sysdev/xive/common.c| 10 +- arch/powerpc/sysdev/xive/native.

[PATCH 13/13] powerpc/xive: Improve error reporting of OPAL calls

2020-12-08 Thread Cédric Le Goater
Introduce a vp_err() macro to standardize error reporting. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/native.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/arch/powerpc/sysdev/xive/native.c b/arch/powerpc/sysdev/xive/native

[PATCH 10/13] powerpc/xive: Remove P9 DD1 flag XIVE_IRQ_FLAG_MASK_FW

2020-12-08 Thread Cédric Le Goater
This flag was used to support the PHB4 LSIs on P9 DD1 and we have stopped supporting this CPU when DD2 came out. See skiboot commit: https://github.com/open-power/skiboot/commit/0b0d15e3c170 Signed-off-by: Cédric Le Goater --- arch/powerpc/include/asm/opal-api.h | 2 +- arch/powerpc/include/

[PATCH 07/13] powerpc/xive: Add a debug_show handler to the XIVE irq_domain

2020-12-08 Thread Cédric Le Goater
Full state of the Linux interrupt descriptors can be dumped under debugfs when compiled with CONFIG_GENERIC_IRQ_DEBUGFS. Add support for the XIVE interrupt controller. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 58 +++ 1 file changed, 58 i

[PATCH 03/13] powerpc/xive: Introduce XIVE_IPI_HW_IRQ

2020-12-08 Thread Cédric Le Goater
The XIVE driver deals with CPU IPIs in a peculiar way. Each CPU has its own XIVE IPI interrupt allocated at the HW level, for PowerNV, or at the hypervisor level for pSeries. In practice, these interrupts are not always used. pSeries/PowerVM prefers local doorbells for local threads since they are

[PATCH 01/13] KVM: PPC: Book3S HV: XIVE: Show detailed configuration in debug output

2020-12-08 Thread Cédric Le Goater
This is useful to track allocation of the HW resources on per guest basis. Making sure IPIs are local to the chip of the vCPUs reduces rerouting between interrupt controllers and gives better performance in case of pinning. Checking the distribution of VP structures on the chips also helps in reduc

[PATCH 11/13] powerpc/xive: Remove P9 DD1 flag XIVE_IRQ_FLAG_EOI_FW

2020-12-08 Thread Cédric Le Goater
This flag was used to support the P9 DD1 and we have stopped supporting this CPU when DD2 came out. See skiboot commit: https://github.com/open-power/skiboot/commit/0b0d15e3c170 Also, remove eoi handler which is now unused. Signed-off-by: Cédric Le Goater --- arch/powerpc/include/asm/opal-ap

[PATCH 12/13] powerpc/xive: Simplify xive_do_source_eoi()

2020-12-08 Thread Cédric Le Goater
Previous patches removed the need of the first argument which was a hack for Firwmware EOI. Remove it and flatten the routine which has became simpler. Signed-off-by: Cédric Le Goater --- arch/powerpc/sysdev/xive/common.c | 72 ++- 1 file changed, 33 insertions(+), 39

[PATCH 09/13] powerpc/xive: Remove P9 DD1 flag XIVE_IRQ_FLAG_SHIFT_BUG

2020-12-08 Thread Cédric Le Goater
This flag was used to support the PHB4 LSIs on P9 DD1 and we have stopped supporting this CPU when DD2 came out. See skiboot commit: https://github.com/open-power/skiboot/commit/0b0d15e3c170 Signed-off-by: Cédric Le Goater --- arch/powerpc/include/asm/opal-api.h | 2 +- arch/powerpc/inclu

[PATCH 00/13] powerpc/xive: misc cleanups

2020-12-08 Thread Cédric Le Goater
Hello, The most important change is the removal of support of OPAL flags required for P9 DD1. It provides a good cleanup of some complex routines. The series also includes a change on how the pages donated to the XIVE IC are allocated in Linux. The flags are changed to make sure that these pages

[PATCH 08/13] powerpc: Increase NR_IRQS range to support more KVM guests

2020-12-08 Thread Cédric Le Goater
PowerNV systems can handle up to 4K guests and 1M interrupt numbers per chip. Increase the range of allowed interrupts to support a larger number of guests. Signed-off-by: Cédric Le Goater --- arch/powerpc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/K

[PATCH 04/13] powerpc/xive: Use cpu_to_node() instead of ibm, chip-id property

2020-12-08 Thread Cédric Le Goater
The 'chip_id' field of the XIVE CPU structure is used to choose a target for a source located on the same chip when possible. This field is assigned on the PowerNV platform using the "ibm,chip-id" property on pSeries under KVM when NUMA nodes are defined but it is undefined under PowerVM. The XIVE

[PATCH 02/13] powerpc/xive: Rename XIVE_IRQ_NO_EOI to show its a flag

2020-12-08 Thread Cédric Le Goater
This is a simple cleanup to identify easily all flags of the XIVE interrupt structure. The interrupts flagged with XIVE_IRQ_FLAG_NO_EOI are the escalations used to wake up vCPUs in KVM. They are handled very differently from the rest. Signed-off-by: Cédric Le Goater --- arch/powerpc/include/asm/

Re: [PATCH v3 4/5] powerpc/fault: Avoid heavy search_exception_tables() verification

2020-12-08 Thread Christophe Leroy
Le 08/12/2020 à 15:52, Aneesh Kumar K.V a écrit : Christophe Leroy writes: search_exception_tables() is an heavy operation, we have to avoid it. When KUAP is selected, we'll know the fault has been blocked by KUAP. Otherwise, it behaves just as if the address was already in the TLBs and no

[PATCH] drivers: usb: gadget: prefer pr_*() functions over raw printk()

2020-12-08 Thread Enrico Weigelt, metux IT consult
Reduce a bit logging boilerplate by using the preferred pr_*() macros instead of raw printk(). Signed-off-by: Enrico Weigelt, metux IT consult --- drivers/usb/gadget/function/uvc.h | 2 +- drivers/usb/gadget/udc/atmel_usba_udc.c | 2 +- drivers/usb/gadget/udc/fsl_udc_core.c | 4 +-- d

Re: [PATCH v3 4/5] powerpc/fault: Avoid heavy search_exception_tables() verification

2020-12-08 Thread Aneesh Kumar K.V
Christophe Leroy writes: > search_exception_tables() is an heavy operation, we have to avoid it. > When KUAP is selected, we'll know the fault has been blocked by KUAP. > Otherwise, it behaves just as if the address was already in the TLBs > and no fault was generated. > > Signed-off-by: Christop

Re: [PATCH] arch: fix 'unexpected IRQ trap at vector' warnings

2020-12-08 Thread Helge Deller
On 12/8/20 3:11 AM, Michael Ellerman wrote: > "Enrico Weigelt, metux IT consult" writes: >> All archs, except Alpha, print out the irq number in hex, but the message >> looks like it was a decimal number, which is quite confusing. Fixing this >> by adding "0x" prefix. > > Arguably decimal would be

Re: [PATCH v3 4/5] powerpc/fault: Avoid heavy search_exception_tables() verification

2020-12-08 Thread Aneesh Kumar K.V
Christophe Leroy writes: > Le 08/12/2020 à 14:00, Aneesh Kumar K.V a écrit : >> On 12/8/20 2:07 PM, Christophe Leroy wrote: >>> search_exception_tables() is an heavy operation, we have to avoid it. >>> When KUAP is selected, we'll know the fault has been blocked by KUAP. >>> Otherwise, it behaves

Re: [PATCH v3 4/5] powerpc/fault: Avoid heavy search_exception_tables() verification

2020-12-08 Thread Christophe Leroy
Le 08/12/2020 à 14:00, Aneesh Kumar K.V a écrit : On 12/8/20 2:07 PM, Christophe Leroy wrote: search_exception_tables() is an heavy operation, we have to avoid it. When KUAP is selected, we'll know the fault has been blocked by KUAP. Otherwise, it behaves just as if the address was already in

Re: [PATCH] powerpc/book3s_hv_uvmem: Check for failed page migration

2020-12-08 Thread Ram Pai
On Thu, Dec 03, 2020 at 04:08:12PM +1100, Alistair Popple wrote: > migrate_vma_pages() may still clear MIGRATE_PFN_MIGRATE on pages which > are not able to be migrated. Drivers may safely copy data prior to > calling migrate_vma_pages() however a remote mapping must not be > established until after

Re: [PATCH v3 4/5] powerpc/fault: Avoid heavy search_exception_tables() verification

2020-12-08 Thread Aneesh Kumar K.V
On 12/8/20 2:07 PM, Christophe Leroy wrote: search_exception_tables() is an heavy operation, we have to avoid it. When KUAP is selected, we'll know the fault has been blocked by KUAP. Otherwise, it behaves just as if the address was already in the TLBs and no fault was generated. Signed-off-by:

Re: [RFC][PATCH 1/2] libnvdimm: Introduce ND_CMD_GET_STAT to retrieve nvdimm statistics

2020-12-08 Thread Peter Zijlstra
On Mon, Dec 07, 2020 at 04:54:21PM -0800, Dan Williams wrote: > [ add perf maintainers ] > > On Sun, Nov 8, 2020 at 1:16 PM Vaibhav Jain wrote: > > > > Implement support for exposing generic nvdimm statistics via newly > > introduced dimm-command ND_CMD_GET_STAT that can be handled by nvdimm > >

Re: [PATCH v2] powerpc/powermac: Fix low_sleep_handler with CONFIG_VMAP_STACK

2020-12-08 Thread Giuseppe Sacco
Hello Christophe, Il giorno mar, 08/12/2020 alle 05.24 +, Christophe Leroy ha scritto: > low_sleep_handler() can't restore the context from standard > stack because the stack can hardly be accessed with MMU OFF. > > Store everything in a global storage area instead of storing > a pointer to t

Re: [PATCH] powerpc/mce: Remove per cpu variables from MCE handlers

2020-12-08 Thread Mahesh Jagannath Salgaonkar
On 12/8/20 4:16 PM, Ganesh wrote: > > On 12/8/20 4:01 PM, Michael Ellerman wrote: >> Ganesh Goudar writes: >>> diff --git a/arch/powerpc/include/asm/paca.h >>> b/arch/powerpc/include/asm/paca.h >>> index 9454d29ff4b4..4769954efa7d 100644 >>> --- a/arch/powerpc/include/asm/paca.h >>> +++ b/arch/po

Re: linux-next: build warning after merge of the akpm tree

2020-12-08 Thread Stephen Rothwell
Hi Stephen, On Fri, 4 Dec 2020 21:00:00 +1100 Stephen Rothwell wrote: > > Hi all, > > After merging the akpm tree, today's linux-next build (powerpc > allyesconfig) produced warnings like this: > > ld: warning: orphan section `.data..Lubsan_data177' from > `arch/powerpc/oprofile/op_model_pa6t

Re: [PATCH] powerpc/mce: Remove per cpu variables from MCE handlers

2020-12-08 Thread Ganesh
On 12/8/20 4:01 PM, Michael Ellerman wrote: Ganesh Goudar writes: diff --git a/arch/powerpc/include/asm/paca.h b/arch/powerpc/include/asm/paca.h index 9454d29ff4b4..4769954efa7d 100644 --- a/arch/powerpc/include/asm/paca.h +++ b/arch/powerpc/include/asm/paca.h @@ -273,6 +274,17 @@ struct paca

Re: [PATCH] powerpc/mce: Remove per cpu variables from MCE handlers

2020-12-08 Thread Michael Ellerman
Ganesh Goudar writes: > diff --git a/arch/powerpc/include/asm/paca.h b/arch/powerpc/include/asm/paca.h > index 9454d29ff4b4..4769954efa7d 100644 > --- a/arch/powerpc/include/asm/paca.h > +++ b/arch/powerpc/include/asm/paca.h > @@ -273,6 +274,17 @@ struct paca_struct { > #ifdef CONFIG_MMIOWB >

linux-next: manual merge of the akpm-current tree with the powerpc tree

2020-12-08 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the akpm-current tree got conflicts in: drivers/misc/lkdtm/Makefile drivers/misc/lkdtm/lkdtm.h tools/testing/selftests/lkdtm/tests.txt between commit: 3ba150fb2120 ("lkdtm/powerpc: Add SLB multihit test") from the powerpc tree and commit: 014a486e

Re: [PATCH] EDAC/mv64x60: Remove orphan mv64x60 driver

2020-12-08 Thread Michael Ellerman
Borislav Petkov writes: > On Mon, Dec 07, 2020 at 03:02:53PM +1100, Michael Ellerman wrote: >> The mv64x60 EDAC driver depends on CONFIG_MV64X60. But that symbol is >> not user-selectable, and the last code that selected it was removed >> with the C2K board support in 2018, see: >> >> 92c8c16f3

[PATCH v3 1/5] powerpc/book3s64/kuap: Improve error reporting with KUAP

2020-12-08 Thread Christophe Leroy
From: Aneesh Kumar K.V This partially reverts commit eb232b162446 ("powerpc/book3s64/kuap: Improve error reporting with KUAP") and update the fault handler to print [ 55.022514] Kernel attempted to access user page (7e6725b7) - exploit attempt? (uid: 0) [ 55.022528] BUG: Unable to handl

[PATCH v3 3/5] powerpc/fault: Unnest definition of page_fault_is_write() and page_fault_is_bad()

2020-12-08 Thread Christophe Leroy
To make it more readable, separate page_fault_is_write() and page_fault_is_bad() to avoir several levels of #ifdefs Reviewed-by: Nicholas Piggin Signed-off-by: Christophe Leroy --- arch/powerpc/mm/fault.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/m

[PATCH v3 5/5] powerpc/fault: Perform exception fixup in do_page_fault()

2020-12-08 Thread Christophe Leroy
Exception fixup doesn't require the heady full regs saving, do it from do_page_fault() directly. For that, split bad_page_fault() in two parts. As bad_page_fault() can also be called from other places than handle_page_fault(), it will still perform exception fixup and fallback on __bad_page_fault

[PATCH v3 2/5] powerpc/mm: sanity_check_fault() should work for all, not only BOOK3S

2020-12-08 Thread Christophe Leroy
The verification and message introduced by commit 374f3f5979f9 ("powerpc/mm/hash: Handle user access of kernel address gracefully") applies to all platforms, it should not be limited to BOOK3S. Make the BOOK3S version of sanity_check_fault() the one for all, and bail out earlier if not BOOK3S. Fi

[PATCH v3 4/5] powerpc/fault: Avoid heavy search_exception_tables() verification

2020-12-08 Thread Christophe Leroy
search_exception_tables() is an heavy operation, we have to avoid it. When KUAP is selected, we'll know the fault has been blocked by KUAP. Otherwise, it behaves just as if the address was already in the TLBs and no fault was generated. Signed-off-by: Christophe Leroy Reviewed-by: Nicholas Piggin

Re: [PATCH 00/20] ethernet: ucc_geth: assorted fixes and simplifications

2020-12-08 Thread Rasmus Villemoes
On 08/12/2020 04.07, Qiang Zhao wrote: > On 06/12/2020 05:12, Rasmus Villemoes wrote: > >> I think patch 2 is a bug fix as well, but I'd like someone from NXP to >> comment. > > It 's ok for me. I was hoping for something a bit more than that. Can you please go check with the people who made