Re: [PATCH] powerpc/smp: Dynamically build powerpc topology

2023-09-04 Thread Srikar Dronamraju
* Peter Zijlstra [2023-09-05 00:10:04]: > On Wed, Aug 30, 2023 at 05:56:14PM +0530, Srikar Dronamraju wrote: > > Currently there are four powerpc specific sched topologies. These are > > all statically defined. However not all these topologies are used by > > all powerpc systems. > > > > To

Re: [PATCH V3 01/14] blk-mq: add blk_mq_max_nr_hw_queues()

2023-09-04 Thread Baoquan He
Hi Hari, Michael On 08/11/23 at 01:23pm, Hari Bathini wrote: > > > On 10/08/23 8:31 am, Baoquan He wrote: > > On 08/10/23 at 10:06am, Ming Lei wrote: > > > On Thu, Aug 10, 2023 at 09:18:27AM +0800, Baoquan He wrote: > > > > On 08/10/23 at 08:09am, Ming Lei wrote: > > > > > On Wed, Aug 09, 2023

Re: [PATCH] powerpc/64e: Fix wrong test in __ptep_test_and_clear_young()

2023-09-04 Thread Christophe Leroy
Le 05/09/2023 à 04:36, Michael Ellerman a écrit : > Christophe Leroy writes: >> Commit 45201c879469 ("powerpc/nohash: Remove hash related code from >> nohash headers.") replaced: >> >>if ((pte_val(*ptep) & (_PAGE_ACCESSED | _PAGE_HASHPTE)) == 0) >> return 0; >> >> By: >> >>if

[PATCH v4 11/11] docs: powerpc: Document nested KVM on POWER

2023-09-04 Thread Jordan Niethe
From: Michael Neuling Document support for nested KVM on POWER using the existing API as well as the new PAPR API. This includes the new HCALL interface and how it used by KVM. Signed-off-by: Michael Neuling Signed-off-by: Jordan Niethe --- v2: - Separated into individual patch v3: - Fix

[PATCH v4 10/11] KVM: PPC: Add support for nestedv2 guests

2023-09-04 Thread Jordan Niethe
A series of hcalls have been added to the PAPR which allow a regular guest partition to create and manage guest partitions of its own. KVM already had an interface that allowed this on powernv platforms. This existing interface will now be called "nestedv1". The newly added PAPR interface will be

[PATCH v4 09/11] KVM: PPC: Book3s HV: Hold LPIDs in an unsigned long

2023-09-04 Thread Jordan Niethe
The LPID register is 32 bits long. The host keeps the lpids for each guest in an unsigned word struct kvm_arch. Currently, LPIDs are already limited by mmu_lpid_bits and KVM_MAX_NESTED_GUESTS_SHIFT. The nestedv2 API returns a 64 bit "Guest ID" to be used be the L1 host for each L2 guest. This

[PATCH v4 08/11] KVM: PPC: Add helper library for Guest State Buffers

2023-09-04 Thread Jordan Niethe
The PAPR "Nestedv2" guest API introduces the concept of a Guest State Buffer for communication about L2 guests between L1 and L0 hosts. In the new API, the L0 manages the L2 on behalf of the L1. This means that if the L1 needs to change L2 state (e.g. GPRs, SPRs, partition table...), it must

[PATCH v4 07/11] KVM: PPC: Book3S HV: Introduce low level MSR accessor

2023-09-04 Thread Jordan Niethe
kvmppc_get_msr() and kvmppc_set_msr_fast() serve as accessors for the MSR. However because the MSR is kept in the shared regs they include a conditional check for kvmppc_shared_big_endian() and endian conversion. Within the Book3S HV specific code there are direct reads and writes of shregs::msr.

[PATCH v4 06/11] KVM: PPC: Book3S HV: Use accessors for VCPU registers

2023-09-04 Thread Jordan Niethe
Introduce accessor generator macros for Book3S HV VCPU registers. Use the accessor functions to replace direct accesses to this registers. This will be important later for Nested APIv2 support which requires additional functionality for accessing and modifying VCPU state. Signed-off-by: Jordan

[PATCH v4 05/11] KVM: PPC: Use accessors VCORE registers

2023-09-04 Thread Jordan Niethe
Introduce accessor generator macros for VCORE registers. Use the accessor functions to replace direct accesses to this registers. This will be important later for Nested APIv2 support which requires additional functionality for accessing and modifying VCPU state. Signed-off-by: Jordan Niethe

[PATCH v4 04/11] KVM: PPC: Use accessors for VCPU registers

2023-09-04 Thread Jordan Niethe
Introduce accessor generator macros for VCPU registers. Use the accessor functions to replace direct accesses to this registers. This will be important later for Nested APIv2 support which requires additional functionality for accessing and modifying VCPU state. Signed-off-by: Jordan Niethe ---

[PATCH v4 03/11] KVM: PPC: Rename accessor generator macros

2023-09-04 Thread Jordan Niethe
More "wrapper" style accessor generating macros will be introduced for the nestedv2 guest support. Rename the existing macros with more descriptive names now so there is a consistent naming convention. Reviewed-by: Nicholas Piggin Signed-off-by: Jordan Niethe --- v3: - New to series v4: -

[PATCH v4 02/11] KVM: PPC: Introduce FPR/VR accessor functions

2023-09-04 Thread Jordan Niethe
Introduce accessor functions for floating point and vector registers like the ones that exist for GPRs. Use these to replace the existing FPR and VR accessor macros. This will be important later for Nested APIv2 support which requires additional functionality for accessing and modifying VCPU

[PATCH v4 01/11] KVM: PPC: Always use the GPR accessors

2023-09-04 Thread Jordan Niethe
Always use the GPR accessor functions. This will be important later for Nested APIv2 support which requires additional functionality for accessing and modifying VCPU state. Signed-off-by: Jordan Niethe --- v4: - Split into unique patch --- arch/powerpc/kvm/book3s_64_vio.c | 4 ++--

[PATCH v4 00/11] KVM: PPC: Nested APIv2 guest support

2023-09-04 Thread Jordan Niethe
A nested-HV API for PAPR has been developed based on the KVM-specific nested-HV API that is upstream in Linux/KVM and QEMU. The PAPR API had to break compatibility to accommodate implementation in other hypervisors and partitioning firmware. The existing KVM-specific API will be known as the

Re: [PATCH 0/4] ppc, fbdev: Clean up fbdev mmap helper

2023-09-04 Thread Michael Ellerman
Thomas Zimmermann writes: > Refactor fb_pgprotect() in PowerPC to work without struct file. Then > clean up and rename fb_pgprotect(). This change has been discussed at > [1] in the context of refactoring fbdev's mmap code. > > The first three patches adapt PowerPC's internal interfaces to >

Re: [PATCH RFC 1/2] powerpc/pseries: papr-vpd char driver for VPD retrieval

2023-09-04 Thread Michael Ellerman
Michal Suchánek writes: > On Thu, Aug 31, 2023 at 12:59:25PM -0500, Nathan Lynch wrote: ... >> You (Michal) seem to favor a kernel-user ABI where user space is allowed >> to invoke arbitrary RTAS functions by name. But we already have that in >> the form of the rtas() syscall. (User space looks

Re: [PATCH] powerpc/64e: Fix wrong test in __ptep_test_and_clear_young()

2023-09-04 Thread Michael Ellerman
Christophe Leroy writes: > Commit 45201c879469 ("powerpc/nohash: Remove hash related code from > nohash headers.") replaced: > > if ((pte_val(*ptep) & (_PAGE_ACCESSED | _PAGE_HASHPTE)) == 0) > return 0; > > By: > > if (pte_young(*ptep)) > return 0; > > But it should be: > > if

Re: [PATCH 1/2] vmcore: allow alternate dump capturing methods to export vmcore without is_kdump_kernel()

2023-09-04 Thread Baoquan He
On 09/04/23 at 08:04pm, Hari Bathini wrote: > Hi Baoquan, > > Thanks for the review... > > On 03/09/23 9:06 am, Baoquan He wrote: > > Hi Hari, > > > > On 09/02/23 at 12:34am, Hari Bathini wrote: > > > Currently, is_kdump_kernel() returns true when elfcorehdr_addr is set. > > > While

Re: [PATCH] powerpc/smp: Dynamically build powerpc topology

2023-09-04 Thread Peter Zijlstra
On Wed, Aug 30, 2023 at 05:56:14PM +0530, Srikar Dronamraju wrote: > Currently there are four powerpc specific sched topologies. These are > all statically defined. However not all these topologies are used by > all powerpc systems. > > To avoid unnecessary degenerations by the scheduler ,

Re: [PATCH v2 1/3] kconfig: add dependencies of POWER_RESET for mips malta

2023-09-04 Thread Philippe Mathieu-Daudé
On 4/9/23 19:40, Yuan Tan wrote: On 9/4/2023 6:58 PM, Christophe Leroy wrote: Le 04/09/2023 à 12:51, Philippe Mathieu-Daudé a écrit : On 4/9/23 11:24, Yuan Tan wrote: Hi, On 9/4/2023 3:40 PM, Philippe Mathieu-Daudé wrote: Hi, On 1/9/23 04:42, Yuan Tan wrote: MIPS Malta's power off

Re: [PATCH v2 1/3] kconfig: add dependencies of POWER_RESET for mips malta

2023-09-04 Thread Yuan Tan
On 9/4/2023 6:58 PM, Christophe Leroy wrote: Le 04/09/2023 à 12:51, Philippe Mathieu-Daudé a écrit : On 4/9/23 11:24, Yuan Tan wrote: Hi, On 9/4/2023 3:40 PM, Philippe Mathieu-Daudé wrote: Hi, On 1/9/23 04:42, Yuan Tan wrote: MIPS Malta's power off depends on PCI, PCI_QUIRKS, and

Re: [PATCH v4] drivers/net: process the result of hdlc_open() and add call of hdlc_close() in uhdlc_close()

2023-09-04 Thread Christophe Leroy
Le 04/09/2023 à 19:03, Christophe Leroy a écrit : > > > Le 04/09/2023 à 14:31, Alexandra Diupina a écrit : >> Process the result of hdlc_open() and call uhdlc_close() >> in case of an error. It is necessary to pass the error >> code up the control flow, similar to a possible >> error in

Re: [PATCH v4] drivers/net: process the result of hdlc_open() and add call of hdlc_close() in uhdlc_close()

2023-09-04 Thread Christophe Leroy
Le 04/09/2023 à 14:31, Alexandra Diupina a écrit : > Process the result of hdlc_open() and call uhdlc_close() > in case of an error. It is necessary to pass the error > code up the control flow, similar to a possible > error in request_irq(). > Also add a hdlc_close() call to the uhdlc_close() >

Re: KASAN debug kernel fails to boot at early stage when CONFIG_SMP=y is set (kernel 6.5-rc5, PowerMac G4 3,6)

2023-09-04 Thread Christophe Leroy
Le 04/09/2023 à 16:48, Christophe Leroy a écrit : > > > Le 03/09/2023 à 23:06, Erhard Furtner a écrit : >> On Fri, 1 Sep 2023 07:43:34 + >> Christophe Leroy wrote: >> > Can you try what happens when you remove the call to kasan_init() > at the > start of setup_arch() in

Re: KASAN debug kernel fails to boot at early stage when CONFIG_SMP=y is set (kernel 6.5-rc5, PowerMac G4 3,6)

2023-09-04 Thread Christophe Leroy
Le 03/09/2023 à 23:06, Erhard Furtner a écrit : > On Fri, 1 Sep 2023 07:43:34 + > Christophe Leroy wrote: > Can you try what happens when you remove the call to kasan_init() at the start of setup_arch() in arch/powerpc/kernel/setup-common.c >>> >>> Ok, so I left the other patches

Re: [PATCH 1/2] vmcore: allow alternate dump capturing methods to export vmcore without is_kdump_kernel()

2023-09-04 Thread Hari Bathini
Hi Baoquan, Thanks for the review... On 03/09/23 9:06 am, Baoquan He wrote: Hi Hari, On 09/02/23 at 12:34am, Hari Bathini wrote: Currently, is_kdump_kernel() returns true when elfcorehdr_addr is set. While elfcorehdr_addr is set for kexec based kernel dump mechanism, alternate dump capturing

[PATCH v4] drivers/net: process the result of hdlc_open() and add call of hdlc_close() in uhdlc_close()

2023-09-04 Thread Alexandra Diupina
Process the result of hdlc_open() and call uhdlc_close() in case of an error. It is necessary to pass the error code up the control flow, similar to a possible error in request_irq(). Also add a hdlc_close() call to the uhdlc_close() because the comment to hdlc_close() says it must be called by

Re: [PATCH v2 1/3] kconfig: add dependencies of POWER_RESET for mips malta

2023-09-04 Thread Christophe Leroy
Le 04/09/2023 à 12:51, Philippe Mathieu-Daudé a écrit : > On 4/9/23 11:24, Yuan Tan wrote: >> Hi, >> >> On 9/4/2023 3:40 PM, Philippe Mathieu-Daudé wrote: >>> Hi, >>> >>> On 1/9/23 04:42, Yuan Tan wrote: MIPS Malta's power off depends on PCI, PCI_QUIRKS, and POWER_RESET_PIIX4_POWEROFF

Re: [PATCH v2 1/3] kconfig: add dependencies of POWER_RESET for mips malta

2023-09-04 Thread Philippe Mathieu-Daudé
On 4/9/23 11:24, Yuan Tan wrote: Hi, On 9/4/2023 3:40 PM, Philippe Mathieu-Daudé wrote: Hi, On 1/9/23 04:42, Yuan Tan wrote: MIPS Malta's power off depends on PCI, PCI_QUIRKS, and POWER_RESET_PIIX4_POWEROFF to work. Enable them when POWER_RESET is set for convenience. Suggested-by: Zhangjin

Re: [PATCH RFC 1/2] powerpc/pseries: papr-vpd char driver for VPD retrieval

2023-09-04 Thread Michal Suchánek
On Thu, Aug 31, 2023 at 03:34:37PM +1000, Michael Ellerman wrote: > Michal Suchánek writes: > > Hello, > > > > thanks for working on this. > > > > On Tue, Aug 22, 2023 at 04:33:39PM -0500, Nathan Lynch via B4 Relay wrote: > >> From: Nathan Lynch > >> > >> PowerVM LPARs may retrieve Vital

Re: [PATCH v2 1/3] kconfig: add dependencies of POWER_RESET for mips malta

2023-09-04 Thread Philippe Mathieu-Daudé
Hi, On 1/9/23 04:42, Yuan Tan wrote: MIPS Malta's power off depends on PCI, PCI_QUIRKS, and POWER_RESET_PIIX4_POWEROFF to work. Enable them when POWER_RESET is set for convenience. Suggested-by: Zhangjin Wu Signed-off-by: Yuan Tan --- arch/mips/Kconfig | 3 +++ 1 file changed, 3

Re: [PATCH RFC 1/2] powerpc/pseries: papr-vpd char driver for VPD retrieval

2023-09-04 Thread Michal Suchánek
Hello, On Thu, Aug 31, 2023 at 12:59:25PM -0500, Nathan Lynch wrote: > Michal Suchánek writes: > > On Thu, Aug 31, 2023 at 09:37:12PM +1000, Michael Ellerman wrote: > >> Michal Suchánek writes: > >> > On Thu, Aug 31, 2023 at 03:34:37PM +1000, Michael Ellerman wrote: > >> >> Michal Suchánek

Re: [PATCH 4/4] fbdev: Replace fb_pgprotect() with fb_pgprot_device()

2023-09-04 Thread Geert Uytterhoeven
On Sat, Sep 2, 2023 at 11:13 AM Thomas Zimmermann wrote: > Rename the fbdev mmap helper fb_pgprotect() to fb_pgprot_device(). > The helper sets VMA page-access flags for framebuffers in device I/O > memory. The new name follows pgprot_device(), which does the same for > arbitrary devices. > >