[PATCH v3 -next] powerpc/powermac: Fix symbol not declared warnings

2022-11-03 Thread Chen Lifu
1. ppc_override_l2cr and ppc_override_l2cr_value are only used in l2cr_init() function, remove them and used *l2cr directly. 2. has_l2cache is not used outside of the file, so mark it static and do not initialise statics to 0. Fixes the following warning: arch/powerpc/platforms/powermac/s

Re: [PATCH v2 -next] powerpc/powermac: Fix symbol not declared warnings

2022-11-03 Thread chenlifu
在 2022/11/2 21:53, Christophe Leroy 写道: Le 31/10/2022 à 01:45, chenlifu a écrit : [Vous ne recevez pas souvent de courriers de chenl...@huawei.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] 在 2022/8/19 21:06, Chen Lifu 写道: 1. ppc_override_l2cr an

Re: [PATCH 20/44] KVM: MIPS: Setup VZ emulation? directly from kvm_mips_init()

2022-11-03 Thread Philippe Mathieu-Daudé
On 3/11/22 00:18, Sean Christopherson wrote: Invoke kvm_mips_emulation_init() directly from kvm_mips_init() instead of bouncing through kvm_init()=>kvm_arch_init(). Functionally, this is a glorified nop as invoking kvm_arch_init() is the very first action performed by kvm_init(). Emptying kvm_a

Re: [PATCH 21/44] KVM: MIPS: Register die notifier prior to kvm_init()

2022-11-03 Thread Philippe Mathieu-Daudé
On 3/11/22 00:18, Sean Christopherson wrote: Call kvm_init() only after _all_ setup is complete, as kvm_init() exposes /dev/kvm to userspace and thus allows userspace to create VMs (and call other ioctls). Signed-off-by: Sean Christopherson --- arch/mips/kvm/mips.c | 9 + 1 file chan

Re: [PATCH 22/44] KVM: RISC-V: Do arch init directly in riscv_kvm_init()

2022-11-03 Thread Philippe Mathieu-Daudé
On 3/11/22 00:18, Sean Christopherson wrote: Fold the guts of kvm_arch_init() into riscv_kvm_init() instead of bouncing through kvm_init()=>kvm_arch_init(). Functionally, this is a glorified nop as invoking kvm_arch_init() is the very first action performed by kvm_init(). Moving setup to riscv_

Re: [PATCH 25/44] KVM: s390: Do s390 specific init without bouncing through kvm_init()

2022-11-03 Thread Philippe Mathieu-Daudé
On 3/11/22 00:18, Sean Christopherson wrote: Move the guts of kvm_arch_init() into a new helper, __kvm_s390_init(), and invoke the new helper directly from kvm_s390_init() instead of bouncing through kvm_init(). Invoking kvm_arch_init() is the very first action performed by kvm_init(), i.e. this

Re: [PATCH 27/44] KVM: Drop kvm_arch_{init,exit}() hooks

2022-11-03 Thread Philippe Mathieu-Daudé
On 3/11/22 00:18, Sean Christopherson wrote: Drop kvm_arch_init() and kvm_arch_exit() now that all implementations are nops. No functional change intended. Signed-off-by: Sean Christopherson --- arch/arm64/kvm/arm.c| 11 --- arch/mips/kvm/mips.c| 10 -

Re: [PATCH 30/44] KVM: Drop kvm_arch_check_processor_compat() hook

2022-11-03 Thread Philippe Mathieu-Daudé
On 3/11/22 00:18, Sean Christopherson wrote: Drop kvm_arch_check_processor_compat() and its support code now that all architecture implementations are nops. Signed-off-by: Sean Christopherson --- arch/arm64/kvm/arm.c | 7 +-- arch/mips/kvm/mips.c | 7 +-- arch/powerpc/

Re: [PATCH 17/44] KVM: arm64: Do arm/arch initialiation without bouncing through kvm_init()

2022-11-03 Thread Philippe Mathieu-Daudé
Hi Sean, On 3/11/22 00:18, Sean Christopherson wrote: Move arm/arch specific initialization directly in arm's module_init(), now called kvm_arm_init(), instead of bouncing through kvm_init() to reach kvm_arch_init(). Invoking kvm_arch_init() is the very first action performed by kvm_init(), i.e

Re: [PATCH v3 -next] powerpc/powermac: Fix symbol not declared warnings

2022-11-03 Thread Christophe Leroy
Le 03/11/2022 à 08:01, Chen Lifu a écrit : > 1. ppc_override_l2cr and ppc_override_l2cr_value are only used in > l2cr_init() function, remove them and used *l2cr directly. > 2. has_l2cache is not used outside of the file, so mark it static and > do not initialise statics to 0. > > Fixe

Re: [PATCH] powerpc/kernel: fix repeated words in comments

2022-11-03 Thread Christophe Leroy
Le 22/10/2022 à 07:12, wangjianli a écrit : > Delete the redundant word 'the'. > > Signed-off-by: wangjianli > --- > arch/powerpc/kernel/process.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c > index e

Re: [PATCH] powerpc/8xx: Fix warning in hw_breakpoint_handler()

2022-11-03 Thread Christophe Leroy
Le 24/10/2022 à 06:13, Russell Currey a écrit : > In hw_breakpoint_handler(), ea is set by wp_get_instr_detail() except > for 8xx, leading the variable to be passed uninitialised to > wp_check_constraints(). This is safe as wp_check_constraints() returns > early without using ea, so just set it

Re: [PATCH] powerpc: Interrupt handler stack randomisation

2022-11-03 Thread Christophe Leroy
Le 25/10/2022 à 05:38, Rohan McLure a écrit : > Stack frames used by syscall handlers support random offsets as of > commit f4a0318f278d (powerpc: add support for syscall stack randomization). > Implement the same for general interrupt handlers, by applying the > random stack offset and then upda

Re: [PATCH v3 1/3] powerpc: Add common pud_pfn stub for all platforms

2022-11-03 Thread Christophe Leroy
Le 24/10/2022 à 02:35, Rohan McLure a écrit : > Prior to this commit, pud_pfn was implemented with BUILD_BUG as the inline > function for 64-bit Book3S systems but is never included, as its > invocations in generic code are guarded by calls to pud_devmap which return > zero on such systems. A fut

Re: [PATCH v3 2/3] powerpc: mm: add p{te,md,ud}_user_accessible_page helpers

2022-11-03 Thread Christophe Leroy
Le 24/10/2022 à 02:35, Rohan McLure a écrit : > Add the following helpers for detecting whether a page table entry > is a leaf and is accessible to user space. > > * pte_user_accessible_page > * pmd_user_accessible_page > * pud_user_accessible_page > > Also implement missing pud_user defi

Re: [PATCH] asm-generic: compat: fix compat_arg_u64 and compat_arg_u64_dual

2022-11-03 Thread Christophe Leroy
Le 31/10/2022 à 14:23, Andreas Schwab a écrit : > The macros are defined backwards. > > Fixes: 43d5de2b67d7 ("asm-generic: compat: Support BE for long long args in > 32-bit ABIs") > Signed-off-by: Andreas Schwab > --- > include/asm-generic/compat.h | 2 +- > 1 file changed, 1 insertion(+),

Re: [PATCH v2] random: do not include from random.h

2022-11-03 Thread Christophe Leroy
Le 29/10/2022 à 03:08, Jason A. Donenfeld a écrit : > The header is a random.c private detail, not > something to be called by other code. As such, don't make it > automatically available by way of random.h. > > Cc: Michael Ellerman > Cc: Heiko Carstens > Cc: linuxppc-dev@lists.ozlabs.org > C

Re: [RFC PATCH 05/19] powerpc/32: Use load and store multiple in GPR save/restore macros

2022-11-03 Thread Christophe Leroy
It contradicts commit a85c728cb5e1 ("powerpc/32: Don't use lmw/stmw for saving/restoring non volatile regs") Le 31/10/2022 à 06:54, Nicholas Piggin a écrit : > --- > arch/powerpc/include/asm/ppc_asm.h | 18 -- > 1 file changed, 16 insertions(+), 2 deletions(-) > > diff --git a

Re: [PATCH v5 2/2] powerpc/64: Add module check for ELF ABI version

2022-11-03 Thread Christophe Leroy
Le 31/10/2022 à 13:07, Nicholas Piggin a écrit : > Override the generic module ELF check to provide a check for the ELF ABI > version. This becomes important if we allow big-endian ELF ABI V2 builds > but it doesn't hurt to check now. > > Cc: Jessica Yu > Signed-off-by: Michael Ellerman > [np:

Re: [PATCH v3 2/3] powerpc: mm: add p{te,md,ud}_user_accessible_page helpers

2022-11-03 Thread Christophe Leroy
Le 24/10/2022 à 02:35, Rohan McLure a écrit : > Add the following helpers for detecting whether a page table entry > is a leaf and is accessible to user space. > > * pte_user_accessible_page > * pmd_user_accessible_page > * pud_user_accessible_page > > Also implement missing pud_user defi

Re: [PATCH v3 3/3] powerpc: mm: support page table check

2022-11-03 Thread Christophe Leroy
Le 24/10/2022 à 02:35, Rohan McLure a écrit : > On creation and clearing of a page table mapping, instrument such calls > by invoking page_table_check_pte_set and page_table_check_pte_clear > respectively. These calls serve as a sanity check against illegal > mappings. > > Enable ARCH_SUPPORTS_P

Re: [PATCH] asm-generic: compat: fix compat_arg_u64 and compat_arg_u64_dual

2022-11-03 Thread Arnd Bergmann
On Thu, Nov 3, 2022, at 09:20, Christophe Leroy wrote: >> >> #ifndef compat_arg_u64 >> -#ifdef CONFIG_CPU_BIG_ENDIAN >> +#ifndef CONFIG_CPU_BIG_ENDIAN > > Could be CONFIG_CPU_LITTLE_ENDIAN then ? I don't think that symbol exists on all architectures, unlike CONFIG_CPU_BIG_ENDIAN. Checkig "#if

Re: [PATCH v5 02/16] powerpc: Override __ALIGN and __ALIGN_STR macros

2022-11-03 Thread Peter Zijlstra
On Wed, Nov 02, 2022 at 12:35:07PM +, Christophe Leroy wrote: > > > Le 28/10/2022 à 16:33, Sathvika Vasireddy a écrit : > > In a subsequent patch, we would want to annotate powerpc assembly functions > > with SYM_FUNC_START_LOCAL macro. This macro depends on __ALIGN macro. > > > > The defaul

Re: [PATCH v5 0/2] powerpc module arch checks

2022-11-03 Thread Michael Ellerman
Luis Chamberlain writes: > On Mon, Oct 31, 2022 at 10:07:31PM +1000, Nicholas Piggin wrote: >> Luis if you would be okay for patch 1 to be merged via powerpc or >> prefer to take it in the module tree (or maybe you object to the >> code in the first place). > > Looks good to me, and nothing on my

Re: [PATCH v1 4/6] mm/autonuma: use can_change_(pte|pmd)_writable() to replace savedwrite

2022-11-03 Thread David Hildenbrand
On 02.11.22 22:22, Nadav Amit wrote: On Nov 2, 2022, at 12:12 PM, David Hildenbrand wrote: !! External Email commit b191f9b106ea ("mm: numa: preserve PTE write permissions across a NUMA hinting fault") added remembering write permissions using ordinary pte_write() for PROT_NONE mapped pages t

Re: [PATCH v1 4/6] mm/autonuma: use can_change_(pte|pmd)_writable() to replace savedwrite

2022-11-03 Thread David Hildenbrand
On 03.11.22 11:45, David Hildenbrand wrote: On 02.11.22 22:22, Nadav Amit wrote: On Nov 2, 2022, at 12:12 PM, David Hildenbrand wrote: !! External Email commit b191f9b106ea ("mm: numa: preserve PTE write permissions across a NUMA hinting fault") added remembering write permissions using ordi

Re: [PATCH 00/44] KVM: Rework kvm_init() and hardware enabling

2022-11-03 Thread Christian Borntraeger
Am 03.11.22 um 00:18 schrieb Sean Christopherson: Non-x86 folks, please test on hardware when possible. I made a _lot_ of mistakes when moving code around. Thankfully, x86 was the trickiest code to deal with, and I'm fairly confident that I found all the bugs I introduced via testing. But the

Re: [PATCH 25/44] KVM: s390: Do s390 specific init without bouncing through kvm_init()

2022-11-03 Thread Claudio Imbrenda
On Wed, 2 Nov 2022 23:18:52 + Sean Christopherson wrote: > Move the guts of kvm_arch_init() into a new helper, __kvm_s390_init(), > and invoke the new helper directly from kvm_s390_init() instead of > bouncing through kvm_init(). Invoking kvm_arch_init() is the very > first action performed

Re: [PATCH 04/44] KVM: Teardown VFIO ops earlier in kvm_exit()

2022-11-03 Thread Cornelia Huck
On Wed, Nov 02 2022, Sean Christopherson wrote: > Move the call to kvm_vfio_ops_exit() further up kvm_exit() to try and > bring some amount of symmetry to the setup order in kvm_init(), and more > importantly so that the arch hooks are invoked dead last by kvm_exit(). > This will allow arch code

Re: [PATCH v3 2/2] x86: Fix /proc/cpuinfo cpumask warning

2022-11-03 Thread Andrew Jones
On Wed, Nov 02, 2022 at 07:44:02PM +0100, Borislav Petkov wrote: > On Mon, Oct 31, 2022 at 11:03:27AM +0100, Andrew Jones wrote: > > Currently (after the revert of 78e5a3399421) > > After the revert? > > That commit is still in the latest Linus tree. The revert commit is 80493877d7d0 ("Revert "c

Re: [PATCH 25/44] KVM: s390: Do s390 specific init without bouncing through kvm_init()

2022-11-03 Thread Claudio Imbrenda
On Thu, 3 Nov 2022 13:44:15 +0100 Claudio Imbrenda wrote: > On Wed, 2 Nov 2022 23:18:52 + > Sean Christopherson wrote: > > > Move the guts of kvm_arch_init() into a new helper, __kvm_s390_init(), > > and invoke the new helper directly from kvm_s390_init() instead of > > bouncing through kv

Re: [PATCH 10/44] KVM: VMX: Clean up eVMCS enabling if KVM initialization fails

2022-11-03 Thread Paolo Bonzini
On 11/3/22 00:18, Sean Christopherson wrote: +static void hv_cleanup_evmcs(void) This needs to be __init. Paolo

Re: [PATCH 10/44] KVM: VMX: Clean up eVMCS enabling if KVM initialization fails

2022-11-03 Thread Paolo Bonzini
On Thu, Nov 3, 2022 at 3:01 PM Paolo Bonzini wrote: > > On 11/3/22 00:18, Sean Christopherson wrote: > > +static void hv_cleanup_evmcs(void) > > This needs to be __init. Error: brain temporarily disconnected. Paolo

[PATCH v4 1/1] x86: cpuinfo: Ensure inputs to cpumask_next are valid

2022-11-03 Thread Andrew Jones
The valid cpumask range is [0, nr_cpu_ids) and cpumask_next() currently calls find_next_bit() with its input CPU ID number plus one for the bit number, giving cpumask_next() the range [-1, nr_cpu_ids - 1). seq_read_iter() and cpuinfo's start and next seq operations implement a pattern like n = c

[PATCH v4 0/1] Fix /proc/cpuinfo cpumask warning

2022-11-03 Thread Andrew Jones
Commit 78e5a3399421 ("cpumask: fix checking valid cpu range") started issuing warnings[1] when cpu indices equal to nr_cpu_ids - 1 were passed to cpumask_next* functions. The commit has since been reverted with commit 80493877d7d0 ("Revert "cpumask: fix checking valid cpu range"."), which raises th

Re: [PATCH 10/44] KVM: VMX: Clean up eVMCS enabling if KVM initialization fails

2022-11-03 Thread Vitaly Kuznetsov
Sean Christopherson writes: > To make it obvious that KVM doesn't have a lurking bug, cleanup eVMCS > enabling if kvm_init() fails even though the enabling doesn't strictly > need to be unwound. eVMCS enabling only toggles values that are fully > contained in the VMX module, i.e. it's technicall

Re: [PATCH v3 2/2] x86: Fix /proc/cpuinfo cpumask warning

2022-11-03 Thread Borislav Petkov
On Thu, Nov 03, 2022 at 01:59:45PM +0100, Andrew Jones wrote: > The patch I'm proposing ensures cpumask_next()'s range, which is actually > [-1, nr_cpus_ids - 1), Lemme make sure I understand it correctly: on the upper boundary, if you supply for n the value nr_cpu_ids - 2, then it will return pot

Re: [PATCH 33/44] KVM: x86: Do VMX/SVM support checks directly in vendor code

2022-11-03 Thread Paolo Bonzini
On 11/3/22 00:19, Sean Christopherson wrote: + if (!boot_cpu_has(X86_FEATURE_MSR_IA32_FEAT_CTL) || + !boot_cpu_has(X86_FEATURE_VMX)) { + pr_err("VMX not enabled in MSR_IA32_FEAT_CTL\n"); + return false; I think the reference to the BIOS should remain

Re: [PATCH 36/44] KVM: x86: Do compatibility checks when onlining CPU

2022-11-03 Thread Paolo Bonzini
On 11/3/22 00:19, Sean Christopherson wrote: From: Chao Gao Do compatibility checks when enabling hardware to effectively add compatibility checks when onlining a CPU. Abort enabling, i.e. the online process, if the (hotplugged) CPU is incompatible with the known good setup. This paragraph is

Re: [PATCH 39/44] KVM: Drop kvm_count_lock and instead protect kvm_usage_count with kvm_lock

2022-11-03 Thread Paolo Bonzini
On 11/3/22 00:19, Sean Christopherson wrote: +- kvm_lock is taken outside kvm->mmu_lock Not surprising since one is a mutex and one is an rwlock. :) You can drop this hunk as well as the "Opportunistically update KVM's locking documentation" sentence in the commit message. - vcpu->mutex

Re: [PATCH 00/44] KVM: Rework kvm_init() and hardware enabling

2022-11-03 Thread Paolo Bonzini
On 11/3/22 13:08, Christian Borntraeger wrote: There are bug fixes throughout this series.  They are more scattered than I would usually prefer, but getting the sequencing correct was a gigantic pain for many of the x86 fixes due to needing to fix common code in order for the x86 fix to have any

Re: [PATCH 17/44] KVM: arm64: Do arm/arch initialiation without bouncing through kvm_init()

2022-11-03 Thread Sean Christopherson
On Thu, Nov 03, 2022, Philippe Mathieu-Daudé wrote: > Hi Sean, > > On 3/11/22 00:18, Sean Christopherson wrote: > > Move arm/arch specific initialization directly in arm's module_init(), > > now called kvm_arm_init(), instead of bouncing through kvm_init() to > > reach kvm_arch_init(). Invoking k

Re: [PATCH v3 2/2] x86: Fix /proc/cpuinfo cpumask warning

2022-11-03 Thread Andrew Jones
On Thu, Nov 03, 2022 at 04:02:12PM +0100, Borislav Petkov wrote: > On Thu, Nov 03, 2022 at 01:59:45PM +0100, Andrew Jones wrote: > > The patch I'm proposing ensures cpumask_next()'s range, which is actually > > [-1, nr_cpus_ids - 1), > > Lemme make sure I understand it correctly: on the upper boun

Re: [PATCH v3 2/2] x86: Fix /proc/cpuinfo cpumask warning

2022-11-03 Thread Borislav Petkov
On Thu, Nov 03, 2022 at 04:34:04PM +0100, Andrew Jones wrote: > Indeed, but that's less of an issue with cpumask_next() than with > the way cpuinfo implements its start and next seq ops (next > unconditionally increments *pos and then calls start and start > must use *pos - 1 since the first time i

Re: [PATCH 1/2] tools/perf: Fix printing os->prefix in CSV metrics output

2022-11-03 Thread Ian Rogers
On Wed, Nov 2, 2022 at 1:36 AM Athira Rajeev wrote: > > > > > On 18-Oct-2022, at 2:26 PM, Athira Rajeev > > wrote: > > > > Perf stat with CSV output option prints an extra empty > > string as first field in metrics output line. > > Sample output below: > > > > # ./perf stat -x, --per-socke

Re: [PATCH v3 2/2] x86: Fix /proc/cpuinfo cpumask warning

2022-11-03 Thread yury . norov
On Thu, Nov 03, 2022 at 04:34:04PM +0100, Andrew Jones wrote: > On Thu, Nov 03, 2022 at 04:02:12PM +0100, Borislav Petkov wrote: > > On Thu, Nov 03, 2022 at 01:59:45PM +0100, Andrew Jones wrote: > > > The patch I'm proposing ensures cpumask_next()'s range, which is actually > > > [-1, nr_cpus_ids -

[PATCH v2 3/4] EISA: Convert to use pci_bus_for_each_resource_p()

2022-11-03 Thread Andy Shevchenko
The pci_bus_for_each_resource_p() hides the iterator loop since it may be not used otherwise. With this, we may drop that iterator variable definition. Signed-off-by: Andy Shevchenko --- drivers/eisa/pci_eisa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/eisa/

[PATCH v2 0/4] PCI: Add pci_dev_for_each_resource() helper and refactor bus one

2022-11-03 Thread Andy Shevchenko
Provide two new helper macros to iterate over PCI device resources and convert users. Looking at it, refactor existing pci_bus_for_each_resource() and convert users accordingly. This applies on top of this patch Mika sent out earlier: https://lore.kernel.org/linux-pci/20221103103254.30497-1-mika.

[PATCH v2 4/4] pcmcia: Convert to use pci_bus_for_each_resource_p()

2022-11-03 Thread Andy Shevchenko
The pci_bus_for_each_resource_p() hides the iterator loop since it may be not used otherwise. With this, we may drop that iterator variable definition. Signed-off-by: Andy Shevchenko --- drivers/pcmcia/rsrc_nonstatic.c | 9 +++-- drivers/pcmcia/yenta_socket.c | 3 +-- 2 files changed, 4 in

[PATCH v2 2/4] PCI: Split pci_bus_for_each_resource_p() out of pci_bus_for_each_resource()

2022-11-03 Thread Andy Shevchenko
Refactor pci_bus_for_each_resource() in the same way as it's done in pci_dev_for_each_resource() case. This will allow to hide iterator inside the loop, where it's not used otherwise. No functional changes intended. Signed-off-by: Andy Shevchenko --- .clang-format | 1 + d

[PATCH v2 1/4] PCI: Introduce pci_dev_for_each_resource()

2022-11-03 Thread Andy Shevchenko
From: Mika Westerberg Instead of open-coding it everywhere introduce a tiny helper that can be used to iterate over each resource of a PCI device, and convert the most obvious users into it. While at it drop doubled empty line before pdev_sort_resources(). No functional changes intended. Sugge

Re: [PATCH v3 2/2] x86: Fix /proc/cpuinfo cpumask warning

2022-11-03 Thread Borislav Petkov
On Thu, Nov 03, 2022 at 09:30:54AM -0700, yury.no...@gmail.com wrote:a > Callers should pass sane arguments into internal functions if they > expect sane output. What internal function? It's in a global header. > The API not exported to userspace shouldn't sanity-check all inputs > arguments. Th

Re: [PATCH v2 4/4] pcmcia: Convert to use pci_bus_for_each_resource_p()

2022-11-03 Thread Andy Shevchenko
On Thu, Nov 03, 2022 at 06:03:24PM +0100, Dominik Brodowski wrote: > Am Thu, Nov 03, 2022 at 06:46:44PM +0200 schrieb Andy Shevchenko: ... > > - > > - for (i = 0; i < PCI_BRIDGE_RESOURCE_NUM; i++) { > > - res = s->cb_dev->bus->resource[i]; > > -#else > > - pci_bus_for_each_resource(

Re: [PATCH v2 4/4] pcmcia: Convert to use pci_bus_for_each_resource_p()

2022-11-03 Thread Dominik Brodowski
Am Thu, Nov 03, 2022 at 06:46:44PM +0200 schrieb Andy Shevchenko: > The pci_bus_for_each_resource_p() hides the iterator loop since > it may be not used otherwise. With this, we may drop that iterator > variable definition. Thanks for your patch! > diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/d

Re: [PATCH v2 4/4] pcmcia: Convert to use pci_bus_for_each_resource_p()

2022-11-03 Thread Dominik Brodowski
Am Thu, Nov 03, 2022 at 07:12:45PM +0200 schrieb Andy Shevchenko: > On Thu, Nov 03, 2022 at 06:03:24PM +0100, Dominik Brodowski wrote: > > Am Thu, Nov 03, 2022 at 06:46:44PM +0200 schrieb Andy Shevchenko: > > ... > > > > - > > > - for (i = 0; i < PCI_BRIDGE_RESOURCE_NUM; i++) { > > > - re

Re: [PATCH v3 2/2] x86: Fix /proc/cpuinfo cpumask warning

2022-11-03 Thread Yury Norov
On Thu, Nov 03, 2022 at 05:49:06PM +0100, Borislav Petkov wrote: > On Thu, Nov 03, 2022 at 09:30:54AM -0700, yury.no...@gmail.com wrote:a > > Callers should pass sane arguments into internal functions if they > > expect sane output. > > What internal function? It's in a global header. > > > The A

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-6.1-4 tag

2022-11-03 Thread Linus Torvalds
On Wed, Nov 2, 2022 at 7:09 PM Michael Ellerman wrote: > > - Fix an endian thinko in the asm-generic compat_arg_u64() which led to > syscall arguments >being swapped for some compat syscalls. Am I mis-reading this, or did this bug (introduced in this merge window by commit 43d5de2b67d7 "asm

Re: [PATCH 36/44] KVM: x86: Do compatibility checks when onlining CPU

2022-11-03 Thread Sean Christopherson
On Thu, Nov 03, 2022, Paolo Bonzini wrote: > On 11/3/22 00:19, Sean Christopherson wrote: > > From: Chao Gao > > > > Do compatibility checks when enabling hardware to effectively add > > compatibility checks when onlining a CPU. Abort enabling, i.e. the > > online process, if the (hotplugged) CPU

Re: [PATCH 39/44] KVM: Drop kvm_count_lock and instead protect kvm_usage_count with kvm_lock

2022-11-03 Thread Sean Christopherson
On Thu, Nov 03, 2022, Paolo Bonzini wrote: > On 11/3/22 00:19, Sean Christopherson wrote: > > +- kvm_lock is taken outside kvm->mmu_lock > > Not surprising since one is a mutex and one is an rwlock. :) Heh, Signed-off-by: Captain Obvious > You can drop this hunk as well as the "Opportunisti

Re: [PATCH 36/44] KVM: x86: Do compatibility checks when onlining CPU

2022-11-03 Thread Paolo Bonzini
On 11/3/22 18:44, Sean Christopherson wrote: Do compatibility checks when enabling hardware to effectively add compatibility checks when onlining a CPU. Abort enabling, i.e. the online process, if the (hotplugged) CPU is incompatible with the known good setup. This paragraph is not true with t

Re: [PATCH v2 4/4] pcmcia: Convert to use pci_bus_for_each_resource_p()

2022-11-03 Thread Andy Shevchenko
On Thu, Nov 03, 2022 at 06:25:45PM +0100, Dominik Brodowski wrote: > Am Thu, Nov 03, 2022 at 07:12:45PM +0200 schrieb Andy Shevchenko: > > On Thu, Nov 03, 2022 at 06:03:24PM +0100, Dominik Brodowski wrote: ... > > Considering this is done, can you issue your conditional tag so I will > > incorpor

Re: [PATCH v2 4/4] pcmcia: Convert to use pci_bus_for_each_resource_p()

2022-11-03 Thread Krzysztof Wilczyński
Hello, [...] > > > - > > > - for (i = 0; i < PCI_BRIDGE_RESOURCE_NUM; i++) { > > > - res = s->cb_dev->bus->resource[i]; > > > -#else > > > - pci_bus_for_each_resource(s->cb_dev->bus, res, i) { > > > #endif > > > + > > > + pci_bus_for_each_resource_p(s->cb_dev->bus, res) { > > >

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-6.1-4 tag

2022-11-03 Thread pr-tracker-bot
The pull request you sent on Thu, 03 Nov 2022 13:09:17 +1100: > https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git > tags/powerpc-6.1-4 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/4d74039149e0062e4ed25738d6e3e06970a38809 Thank you! -- Deet-doot-do

Re: [PATCH 33/44] KVM: x86: Do VMX/SVM support checks directly in vendor code

2022-11-03 Thread Sean Christopherson
On Thu, Nov 03, 2022, Paolo Bonzini wrote: > On 11/3/22 00:19, Sean Christopherson wrote: > > + if (!boot_cpu_has(X86_FEATURE_MSR_IA32_FEAT_CTL) || > > + !boot_cpu_has(X86_FEATURE_VMX)) { > > + pr_err("VMX not enabled in MSR_IA32_FEAT_CTL\n"); > > + return false; > > I

Re: [PATCH 33/44] KVM: x86: Do VMX/SVM support checks directly in vendor code

2022-11-03 Thread Paolo Bonzini
On 11/3/22 19:35, Sean Christopherson wrote: It's technically required. IA32_FEAT_CTL and thus KVM_INTEL depends on any of CPU_SUP_{INTEL,CENATUR,ZHAOXIN}, but init_ia32_feat_ctl() is invoked if and only if the actual CPU type matches one of the aforementioned CPU_SUP_*. E.g. running a kernel b

Re: [PATCH v2 4/4] pcmcia: Convert to use pci_bus_for_each_resource_p()

2022-11-03 Thread Dominik Brodowski
Am Fri, Nov 04, 2022 at 03:29:44AM +0900 schrieb Krzysztof Wilczyński: > Hello, > > [...] > > > > - > > > > - for (i = 0; i < PCI_BRIDGE_RESOURCE_NUM; i++) { > > > > - res = s->cb_dev->bus->resource[i]; > > > > -#else > > > > - pci_bus_for_each_resource(s->cb_dev->bus, re

Re: [PATCH 33/44] KVM: x86: Do VMX/SVM support checks directly in vendor code

2022-11-03 Thread Sean Christopherson
On Thu, Nov 03, 2022, Paolo Bonzini wrote: > On 11/3/22 19:35, Sean Christopherson wrote: > > It's technically required. IA32_FEAT_CTL and thus KVM_INTEL depends on any > > of > > CPU_SUP_{INTEL,CENATUR,ZHAOXIN}, but init_ia32_feat_ctl() is invoked if and > > only > > if the actual CPU type matc

Re: [PATCH v2 4/4] pcmcia: Convert to use pci_bus_for_each_resource_p()

2022-11-03 Thread Andy Shevchenko
On Fri, Nov 04, 2022 at 03:29:44AM +0900, Krzysztof Wilczyński wrote: > > > > - > > > > - for (i = 0; i < PCI_BRIDGE_RESOURCE_NUM; i++) { > > > > - res = s->cb_dev->bus->resource[i]; > > > > -#else > > > > - pci_bus_for_each_resource(s->cb_dev->bus, res, i) { > > > > #en

Re: [PATCH v2 4/4] pcmcia: Convert to use pci_bus_for_each_resource_p()

2022-11-03 Thread Andy Shevchenko
On Thu, Nov 03, 2022 at 07:38:07PM +0100, Dominik Brodowski wrote: > Am Fri, Nov 04, 2022 at 03:29:44AM +0900 schrieb Krzysztof Wilczyński: ... > > That said, Dominik is the maintainer of PCMCIA driver, so his is the last > > word, so to speak. :) > > > > > Considering this is done, can you issu

Re: [PATCH 36/44] KVM: x86: Do compatibility checks when onlining CPU

2022-11-03 Thread Isaku Yamahata
On Wed, Nov 02, 2022 at 11:19:03PM +, Sean Christopherson wrote: > From: Chao Gao > > Do compatibility checks when enabling hardware to effectively add > compatibility checks when onlining a CPU. Abort enabling, i.e. the > online process, if the (hotplugged) CPU is incompatible with the kn

[PATCH net-next v2 00/11] net: pcs: Add support for devices probed in the "usual" manner

2022-11-03 Thread Sean Anderson
For a long time, PCSs have been tightly coupled with their MACs. For this reason, the MAC creates the "phy" or mdio device, and then passes it to the PCS to initialize. This has a few disadvantages: - Each MAC must re-implement the same steps to look up/create a PCS - The PCS cannot use functions

[PATCH net-next v2 02/11] powerpc: dts: Add compatible strings for Lynx PCSs

2022-11-03 Thread Sean Anderson
This adds appropriate compatible strings for Lynx PCSs on PowerPC QorIQ platforms. This also changes the node name to avoid warnings from ethernet-phy.yaml. Signed-off-by: Sean Anderson --- Changes in v2: - Add compatibles for qoriq-fman3-0-10g-2/3.dtsi as well arch/powerpc/boot/dts/fsl/qoriq

[PATCH net-next] powerpc: dts: t208x: Disable 10G on MAC1 and MAC2

2022-11-03 Thread Sean Anderson
There aren't enough resources to run these ports at 10G speeds. Just keep the pcs changes, and revert the rest. This is not really correct, since the hardware could support 10g in some other configuration... Fixes: 36926a7d70c2 ("powerpc: dts: t208x: Mark MAC1 and MAC2 as 10G") Reported-by: Cameli

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-6.1-4 tag

2022-11-03 Thread Michael Ellerman
Linus Torvalds writes: > On Wed, Nov 2, 2022 at 7:09 PM Michael Ellerman wrote: >> >> - Fix an endian thinko in the asm-generic compat_arg_u64() which led to >> syscall arguments >>being swapped for some compat syscalls. > > Am I mis-reading this, or did this bug (introduced in this merge >

Re: [PATCH 36/44] KVM: x86: Do compatibility checks when onlining CPU

2022-11-03 Thread Sean Christopherson
On Thu, Nov 03, 2022, Isaku Yamahata wrote: > On Wed, Nov 02, 2022 at 11:19:03PM +, > Sean Christopherson wrote: > > diff --git a/arch/x86/include/asm/kvm_host.h > > b/arch/x86/include/asm/kvm_host.h > > index f223c845ed6e..c99222b71fcc 100644 > > --- a/arch/x86/include/asm/kvm_host.h > > +++

Re: [PATCH v3 2/2] x86: Fix /proc/cpuinfo cpumask warning

2022-11-03 Thread Borislav Petkov
On Thu, Nov 03, 2022 at 10:31:30AM -0700, Yury Norov wrote: > Let's take for example cpu_llc_shared_mask() added by you in > arch/x86/include/asm/smp.h recently: > > static inline struct cpumask *cpu_llc_shared_mask(int cpu) > { > return per_cpu(cpu_llc_shared_map, cpu); > } > > It

[Bug 216407] OF: unittest fails some tests on ppc and ppc64 (### dt-test ### end of unittest - 266 passed, 6 failed)

2022-11-03 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216407 --- Comment #4 from Erhard F. (erhar...@mailbox.org) --- Created attachment 303129 --> https://bugzilla.kernel.org/attachment.cgi?id=303129&action=edit dmesg (kernel 6.1-rc3, Talos II) No change on 6.1-rc3. # dmesg | grep FAIL [ 51.237023]

[Bug 216407] OF: unittest fails some tests on ppc and ppc64 (### dt-test ### end of unittest - 266 passed, 6 failed)

2022-11-03 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216407 --- Comment #5 from Erhard F. (erhar...@mailbox.org) --- Created attachment 303130 --> https://bugzilla.kernel.org/attachment.cgi?id=303130&action=edit kernel .config (kernel 6.1-rc3, Talos II) -- You may reply to this email to add a comment.

Re: [PATCH 02/44] KVM: Initialize IRQ FD after arch hardware setup

2022-11-03 Thread Chao Gao
On Wed, Nov 02, 2022 at 11:18:29PM +, Sean Christopherson wrote: > >+ r = kvm_irqfd_init(); >+ if (r) >+ goto err_irqfd; >+ > r = kvm_async_pf_init(); > if (r) >- goto out_free_4; >+ goto err_async_pf; > > kvm_chardev_ops.owne

[PATCH v2] macintosh: fix possible memory leak in macio_add_one_device()

2022-11-03 Thread Yang Yingliang
Afer commit 1fa5ae857bb1 ("driver core: get rid of struct device's bus_id string array"), the name of device is allocated dynamically, it need be freed when of_device_register() fails, call put_device() to give up the reference that hold in device_initialize(), so that it can be freed in kobject_cl