Re: [RFC PATCH 0/3] enable bpf_prog_pack allocator for powerpc

2022-11-16 Thread Christophe Leroy
Le 16/11/2022 à 18:01, Hari Bathini a écrit : > > > On 16/11/22 12:14 am, Christophe Leroy wrote: >> >> >> Le 14/11/2022 à 18:27, Christophe Leroy a écrit : >>> >>> >>> Le 14/11/2022 à 15:47, Hari Bathini a écrit : Hi Christophe, On 11/11/22 4:55 pm, Christophe Leroy wrote:

[powerpc:fixes-test] BUILD SUCCESS eb761a1760bf30cf64e98ee8d914866e62ec9e8a

2022-11-16 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git fixes-test branch HEAD: eb761a1760bf30cf64e98ee8d914866e62ec9e8a powerpc: Fix writable sections being moved into the rodata region elapsed time: 725m configs tested: 67 configs skipped: 2 The following configs

[powerpc:merge] BUILD SUCCESS b9b83072dc2b0a262b201eac66ed2cafd202a93e

2022-11-16 Thread kernel test robot
rhel-8.3 x86_64rhel-8.3-kselftests i386 randconfig-a012 x86_64 allyesconfig arc randconfig-r043-20221116 i386 allyesconfig x86_64

Re: [PATCH v2 3/3] treewide: use get_random_u32_between() when possible

2022-11-16 Thread Jason A. Donenfeld
On Thu, Nov 17, 2022 at 12:55:47AM +0100, Jason A. Donenfeld wrote: > 1) How/whether to make f(0, UR2_MAX) safe, >- without additional 64-bit arithmetic, >- minimizing the number of branches. >I have a few ideas I'll code golf for a bit. > I think I can make progress with (1) alone by

Re: [PATCH 38/44] KVM: Disable CPU hotplug during hardware enabling

2022-11-16 Thread Huang, Kai
On Wed, 2022-11-16 at 17:11 +, Sean Christopherson wrote: > On Wed, Nov 16, 2022, Huang, Kai wrote: > > On Tue, 2022-11-15 at 20:16 +, Sean Christopherson wrote: > > > On Thu, Nov 10, 2022, Huang, Kai wrote: > > > > On Thu, 2022-11-10 at 01:33 +, Huang, Kai wrote: > > > > Hmm.. I

Re: [PATCH mm-unstable v1 12/20] RDMA/siw: remove FOLL_FORCE usage

2022-11-16 Thread Jason Gunthorpe
On Wed, Nov 16, 2022 at 11:26:51AM +0100, David Hildenbrand wrote: > GUP now supports reliable R/O long-term pinning in COW mappings, such > that we break COW early. MAP_SHARED VMAs only use the shared zeropage so > far in one corner case (DAXFS file with holes), which can be ignored > because GUP

Re: [PATCH mm-unstable v1 11/20] RDMA/usnic: remove FOLL_FORCE usage

2022-11-16 Thread Jason Gunthorpe
On Wed, Nov 16, 2022 at 11:26:50AM +0100, David Hildenbrand wrote: > GUP now supports reliable R/O long-term pinning in COW mappings, such > that we break COW early. MAP_SHARED VMAs only use the shared zeropage so > far in one corner case (DAXFS file with holes), which can be ignored > because GUP

Re: [PATCH mm-unstable v1 10/20] RDMA/umem: remove FOLL_FORCE usage

2022-11-16 Thread Jason Gunthorpe
On Wed, Nov 16, 2022 at 11:26:49AM +0100, David Hildenbrand wrote: > GUP now supports reliable R/O long-term pinning in COW mappings, such > that we break COW early. MAP_SHARED VMAs only use the shared zeropage so > far in one corner case (DAXFS file with holes), which can be ignored > because GUP

Re: [PATCH v2 3/3] treewide: use get_random_u32_between() when possible

2022-11-16 Thread Jason A. Donenfeld
On Wed, Nov 16, 2022 at 04:31:18PM -0800, Kees Cook wrote: > On Thu, Nov 17, 2022 at 01:03:14AM +0100, Jason A. Donenfeld wrote: > > On Thu, Nov 17, 2022 at 12:55:47AM +0100, Jason A. Donenfeld wrote: > > > 2) What to call it: > > >- between I still like, because it mirrors "I'm thinking of a

Re: [PATCH v2 3/3] treewide: use get_random_u32_between() when possible

2022-11-16 Thread Kees Cook
On Thu, Nov 17, 2022 at 01:03:14AM +0100, Jason A. Donenfeld wrote: > On Thu, Nov 17, 2022 at 12:55:47AM +0100, Jason A. Donenfeld wrote: > > 2) What to call it: > >- between I still like, because it mirrors "I'm thinking of a number > > between 1 and 10 and..." that everybody knows, > >

Re: [PATCH v2 3/3] treewide: use get_random_u32_between() when possible

2022-11-16 Thread Jason A. Donenfeld
On Thu, Nov 17, 2022 at 12:55:47AM +0100, Jason A. Donenfeld wrote: > 2) What to call it: >- between I still like, because it mirrors "I'm thinking of a number > between 1 and 10 and..." that everybody knows, >- inclusive I guess works, but it's not a preposition, >- bikeshed

Re: [PATCH v2 3/3] treewide: use get_random_u32_between() when possible

2022-11-16 Thread Jason A. Donenfeld
On Wed, Nov 16, 2022 at 02:43:13PM -0800, Kees Cook wrote: > On Mon, Nov 14, 2022 at 05:45:58PM +0100, Jason A. Donenfeld wrote: > > - (get_random_u32_below(1024) + 1) * PAGE_SIZE; > > + get_random_u32_between(1, 1024 + 1) * PAGE_SIZE; > > I

Re: [PATCH v4 2/3] powerpc/pseries: PLPKS SED Opal keystore support

2022-11-16 Thread Greg Joyce
On Fri, 2022-10-07 at 19:09 +, Elliott, Robert (Servers) wrote: > > -Original Message- > > From: gjo...@linux.vnet.ibm.com > > Sent: Friday, August 19, 2022 5:32 PM > > To: linux-bl...@vger.kernel.org > > Cc: linuxppc-dev@lists.ozlabs.org; jonathan.derr...@linux.dev; > >

Re: [PATCH v4 3/3] block: sed-opal: keystore access for SED Opal keys

2022-11-16 Thread Greg Joyce
On Fri, 2022-10-07 at 12:21 -0600, Jonathan Derrick wrote: > LGTM besides comment below > > Reviewed-by: Jonathan Derrick > > On 8/19/2022 4:31 PM, gjo...@linux.vnet.ibm.com wrote: > > From: Greg Joyce > > > > Allow for permanent SED authentication keys by > > reading/writing to the SED Opal

Re: [patch 13/39] PCI/MSI: Use msi_domain_info::bus_token

2022-11-16 Thread Thomas Gleixner
On Wed, Nov 16 2022 at 13:51, Jason Gunthorpe wrote: > On Fri, Nov 11, 2022 at 02:54:35PM +0100, Thomas Gleixner wrote: >> /* PCI-MSI is oneshot-safe */ >> info->chip->flags |= IRQCHIP_ONESHOT_SAFE; >> +/* Let the core update the bus token */ >> +info->bus_token =

Re: [patch 12/39] genirq/msi: Add bus token to struct msi_domain_info

2022-11-16 Thread Thomas Gleixner
On Wed, Nov 16 2022 at 13:49, Jason Gunthorpe wrote: > On Fri, Nov 11, 2022 at 02:54:33PM +0100, Thomas Gleixner wrote: >> From: Ahmed S. Darwish >> >> Add a bus token member to struct msi_domain_info and let >> msi_create_irq_domain() set the bus token. >> >> That allows to remove the bus

Re: [patch 08/39] genirq/msi: Provide msi_domain_ops::post_free()

2022-11-16 Thread Thomas Gleixner
On Wed, Nov 16 2022 at 13:44, Jason Gunthorpe wrote: > On Fri, Nov 11, 2022 at 02:54:27PM +0100, Thomas Gleixner wrote: >> To prepare for removing the exposure of __msi_domain_free_irqs() provide a >> post_free() callback in the MSI domain ops which can be used to solve >> the problem of the only

Re: [PATCH v2 3/3] treewide: use get_random_u32_between() when possible

2022-11-16 Thread Kees Cook
On Mon, Nov 14, 2022 at 05:45:58PM +0100, Jason A. Donenfeld wrote: > - (get_random_u32_below(1024) + 1) * PAGE_SIZE; > + get_random_u32_between(1, 1024 + 1) * PAGE_SIZE; I really don't like "between". Can't this be named "inclusive" (and

Re: [PATCH 2/2] cxl: fix possible null-ptr-deref in cxl_pci_init_afu|adapter()

2022-11-16 Thread Frederic Barrat
On 11/11/2022 15:54, Yang Yingliang wrote: If device_register() fails in cxl_pci_afu|adapter(), the device is not added, device_unregister() can not be called in the error path, otherwise it will cause a null-ptr-deref because of removing not added device. As comment of device_register()

Re: [patch 39/39] x86/apic: Remove X86_IRQ_ALLOC_CONTIGUOUS_VECTORS

2022-11-16 Thread Jason Gunthorpe
On Fri, Nov 11, 2022 at 02:55:17PM +0100, Thomas Gleixner wrote: > Now that the PCI/MSI core code does early checking for multi-MSI support > X86_IRQ_ALLOC_CONTIGUOUS_VECTORS is not required anymore. > Remove the flag and rely on MSI_FLAG_MULTI_PCI_MSI. Reviewed-by: Jason Gunthorpe Jason

Re: [PATCH 1/2] cxl: fix possible null-ptr-deref in cxl_guest_init_afu|adapter()

2022-11-16 Thread Frederic Barrat
On 11/11/2022 15:54, Yang Yingliang wrote: If device_register() fails in cxl_register_afu|adapter(), the device is not added, device_unregister() can not be called in the error path, otherwise it will cause a null-ptr-deref because of removing not added device. As comment of

Re: [patch 38/39] genirq/msi: Remove msi_domain_ops::msi_check()

2022-11-16 Thread Jason Gunthorpe
On Fri, Nov 11, 2022 at 02:55:15PM +0100, Thomas Gleixner wrote: > No more users. > > Signed-off-by: Thomas Gleixner > --- > include/linux/msi.h |4 > kernel/irq/msi.c| 17 + > 2 files changed, 1 insertion(+), 20 deletions(-) Reviewed-by: Jason Gunthorpe Jason

Re: [patch 37/39] PCI/MSI: Remove redundant msi_check() callback

2022-11-16 Thread Jason Gunthorpe
On Fri, Nov 11, 2022 at 02:55:14PM +0100, Thomas Gleixner wrote: > All these sanity checks are now done _before_ any allocation work > happens. No point in doing it twice. > > Signed-off-by: Thomas Gleixner > --- > drivers/pci/msi/irqdomain.c | 48 >

Re: [patch 36/39] PCI/MSI: Validate MSIX contiguous restriction early

2022-11-16 Thread Jason Gunthorpe
On Fri, Nov 11, 2022 at 02:55:12PM +0100, Thomas Gleixner wrote: > With interrupt domains the sanity check for MSI-X vector validation can be > done _before_ any allocation happens. The sanity check only applies to the > allocation functions which have an 'entries' array argument. The entries >

Re: [patch 35/39] PCI/MSI: Reject MSI-X early

2022-11-16 Thread Jason Gunthorpe
On Fri, Nov 11, 2022 at 02:55:11PM +0100, Thomas Gleixner wrote: > Similar to PCI multi-MSI reject MSI-X enablement when a irq domain is > attached to the device which does not support MSI-X. > > Signed-off-by: Thomas Gleixner > --- > drivers/pci/msi/msi.c |4 > 1 file changed, 4

Re: [patch 34/39] PCI/MSI: Reject multi-MSI early

2022-11-16 Thread Jason Gunthorpe
On Fri, Nov 11, 2022 at 02:55:09PM +0100, Thomas Gleixner wrote: > When hierarchical MSI interrupt domains are enabled then there is no point > to do tons of work and detect the missing support for multi-MSI late in the > allocation path. > > Just query the domain feature flags right away. The

Re: [patch 33/39] PCI/MSI: Sanitize MSI-X checks

2022-11-16 Thread Jason Gunthorpe
On Fri, Nov 11, 2022 at 02:55:07PM +0100, Thomas Gleixner wrote: > There is no point in doing the same sanity checks over and over in a loop > during MSI-X enablement. Put them in front of the loop and return early > when they fail. > > Signed-off-by: Thomas Gleixner > --- >

Re: [patch 18/39] PCI/MSI: Move mask and unmask helpers to msi.h

2022-11-16 Thread Jason Gunthorpe
On Fri, Nov 11, 2022 at 02:54:43PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > The upcoming support for per device MSI interrupt domains needs to share > some of the inline helpers with the MSI implementation. > > Move them to the header file. > > Signed-off-by: Ahmed S. Darwish

Re: [patch 17/39] PCI/MSI: Get rid of externs in msi.h

2022-11-16 Thread Jason Gunthorpe
On Fri, Nov 11, 2022 at 02:54:42PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > Follow the style of > > Signed-off-by: Ahmed S. Darwish > Signed-off-by: Thomas Gleixner > --- > drivers/pci/msi/msi.h |8 > 1 file changed, 4 insertions(+), 4 deletions(-)

Re: [patch 16/39] genirq: Get rid of GENERIC_MSI_IRQ_DOMAIN

2022-11-16 Thread Jason Gunthorpe
On Fri, Nov 11, 2022 at 02:54:40PM +0100, Thomas Gleixner wrote: > Adjust to reality and remove another layer of pointless Kconfig > indirection. CONFIG_GENERIC_MSI_IRQ is good enough to serve > all purposes. > > Signed-off-by: Thomas Gleixner > --- > drivers/base/Makefile |2 +- >

Re: [patch 15/39] PCI/MSI: Get rid of PCI_MSI_IRQ_DOMAIN

2022-11-16 Thread Jason Gunthorpe
On Fri, Nov 11, 2022 at 02:54:38PM +0100, Thomas Gleixner wrote: > What a zoo: > > PCI_MSI > select GENERIC_MSI_IRQ > > PCI_MSI_IRQ_DOMAIN > def_bool y > depends on PCI_MSI > select GENERIC_MSI_IRQ_DOMAIN > > Ergo PCI_MSI enables PCI_MSI_IRQ_DOMAIN which in

Re: [patch 14/39] PCI/MSI: Let the MSI core free descriptors

2022-11-16 Thread Jason Gunthorpe
On Fri, Nov 11, 2022 at 02:54:37PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > Let the core do the freeing of descriptors and just keep it around for the > legacy case. > > Signed-off-by: Ahmed S. Darwish > Signed-off-by: Thomas Gleixner > --- > drivers/pci/msi/irqdomain.c |

Re: [patch 13/39] PCI/MSI: Use msi_domain_info::bus_token

2022-11-16 Thread Jason Gunthorpe
On Fri, Nov 11, 2022 at 02:54:35PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > Set the bus token in the msi_domain_info structure and let the core code > handle the update. > > Signed-off-by: Ahmed S. Darwish > Signed-off-by: Thomas Gleixner > --- > drivers/pci/msi/irqdomain.c

Re: [patch 12/39] genirq/msi: Add bus token to struct msi_domain_info

2022-11-16 Thread Jason Gunthorpe
On Fri, Nov 11, 2022 at 02:54:33PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > Add a bus token member to struct msi_domain_info and let > msi_create_irq_domain() set the bus token. > > That allows to remove the bus token updates at the call sites. > > Suggested-by: Thomas

Re: [patch 11/39] genirq/irqdomain: Move bus token enum into a seperate header

2022-11-16 Thread Jason Gunthorpe
On Fri, Nov 11, 2022 at 02:54:32PM +0100, Thomas Gleixner wrote: > Split the bus token defines out into a seperate header file to avoid > inclusion of irqdomain.h in msi.h. > > Signed-off-by: Thomas Gleixner > --- > include/linux/irqdomain.h | 22 +- >

Re: [patch 10/39] genirq/msi: Make __msi_domain_free_irqs() static

2022-11-16 Thread Jason Gunthorpe
On Fri, Nov 11, 2022 at 02:54:30PM +0100, Thomas Gleixner wrote: > Now that the last user is gone, confine it to the core code. > > Signed-off-by: Thomas Gleixner > --- > include/linux/msi.h |4 > kernel/irq/msi.c|3 ++- > 2 files changed, 2 insertions(+), 5 deletions(-)

Re: [patch 09/39] powerpc/pseries/msi: Use msi_domain_ops::msi_post_free()

2022-11-16 Thread Jason Gunthorpe
On Fri, Nov 11, 2022 at 02:54:28PM +0100, Thomas Gleixner wrote: > Use the new msi_post_free() callback which is invoked after the interrupts > have been freed to tell the hypervisor about the shutdown. > > This allows to remove the exposure of __msi_domain_free_irqs(). > > Signed-off-by: Thomas

Re: [patch 08/39] genirq/msi: Provide msi_domain_ops::post_free()

2022-11-16 Thread Jason Gunthorpe
On Fri, Nov 11, 2022 at 02:54:27PM +0100, Thomas Gleixner wrote: > To prepare for removing the exposure of __msi_domain_free_irqs() provide a > post_free() callback in the MSI domain ops which can be used to solve > the problem of the only user of __msi_domain_free_irqs() in arch/powerpc. > >

Re: [patch 07/39] genirq/msi: Make __msi_domain_alloc_irqs() static

2022-11-16 Thread Jason Gunthorpe
On Fri, Nov 11, 2022 at 02:54:25PM +0100, Thomas Gleixner wrote: > Nothing outside of the core code requires this. > > Signed-off-by: Thomas Gleixner > --- > include/linux/msi.h |7 ++- > kernel/irq/msi.c|6 -- > 2 files changed, 6 insertions(+), 7 deletions(-) Reviewed-by:

Re: [patch 06/39] genirq/msi: Add missing kernel doc to msi_next_desc()

2022-11-16 Thread Jason Gunthorpe
On Fri, Nov 11, 2022 at 02:54:23PM +0100, Thomas Gleixner wrote: > W=1 complains about this. > > Signed-off-by: Thomas Gleixner > --- > kernel/irq/msi.c |1 + > 1 file changed, 1 insertion(+) Reviewed-by: Jason Gunthorpe Jason

Re: [patch 05/39] genirq/msi: Remove filter from msi_free_descs_free_range()

2022-11-16 Thread Jason Gunthorpe
On Fri, Nov 11, 2022 at 02:54:22PM +0100, Thomas Gleixner wrote: > When a range of descriptors is freed then all of them are not associated to > a linux interrupt. Remove the filter and add a warning to the free function. > > Signed-off-by: Thomas Gleixner > --- > drivers/base/platform-msi.c |

Re: [patch 04/39] genirq/msi: Use MSI_DESC_ALL in msi_add_simple_msi_descs()

2022-11-16 Thread Jason Gunthorpe
On Fri, Nov 11, 2022 at 02:54:20PM +0100, Thomas Gleixner wrote: > There are no associated MSI descriptors in the requested range when the MSI > descriptor allocation fails. Use MSI_DESC_ALL as the filter which prepares > the next step to get rid of the filter for freeing. > > Signed-off-by:

Re: [patch 01/39] PCI/MSI: Check for MSI enabled in __pci_msix_enable()

2022-11-16 Thread Jason Gunthorpe
On Fri, Nov 11, 2022 at 02:54:15PM +0100, Thomas Gleixner wrote: > PCI/MSI and PCI/MSI-X are mutually exclusive, but the MSI-X enable code > lacks a check for already enabled MSI. > > Signed-off-by: Thomas Gleixner > --- > drivers/pci/msi/msi.c |5 + > 1 file changed, 5 insertions(+)

Re: [patch 30/39] PCI/MSI: Move pci_msi_restore_state() to api.c

2022-11-16 Thread Jason Gunthorpe
On Fri, Nov 11, 2022 at 02:55:03PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > To distangle the maze in msi.c, all exported device-driver MSI APIs are > now to be grouped in one file, api.c. > > Move pci_msi_enabled() and add kernel-doc for the function. > >

Re: [patch 02/39] iommu/vt-d: Remove bogus check for multi MSI-X

2022-11-16 Thread Ashok Raj
On Wed, Nov 16, 2022 at 06:02:30PM +0100, Thomas Gleixner wrote: > On Wed, Nov 16 2022 at 07:52, Ashok Raj wrote: > > On Fri, Nov 11, 2022 at 02:54:17PM +0100, Thomas Gleixner wrote: > >> PCI/Multi-MSI is MSI specific and not supported for MSI-X. > >> > >> Signed-off-by: Thomas Gleixner > >> ---

Re: [patch 31/39] Documentation: PCI: Add reference to PCI/MSI device driver APIs

2022-11-16 Thread Jason Gunthorpe
On Fri, Nov 11, 2022 at 02:55:04PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > All exported device-driver MSI APIs are now grouped in one place at > drivers/pci/msi/api.c with comprehensive kernel-docs added. > > Reference these kernel-docs in the official PCI/MSI howto. > >

Re: [RFC PATCH 0/3] enable bpf_prog_pack allocator for powerpc

2022-11-16 Thread Christophe Leroy
Le 16/11/2022 à 18:01, Hari Bathini a écrit : >> >> I also managed to test it on QEMU. The config is based on >> pmac32_defconfig. > > I had the same config but hit this problem: > > # echo 1 > /proc/sys/net/core/bpf_jit_enable; modprobe test_bpf > test_bpf: #0 TAX >

Re: [PATCH 38/44] KVM: Disable CPU hotplug during hardware enabling

2022-11-16 Thread Sean Christopherson
On Wed, Nov 16, 2022, Huang, Kai wrote: > On Tue, 2022-11-15 at 20:16 +, Sean Christopherson wrote: > > On Thu, Nov 10, 2022, Huang, Kai wrote: > > > On Thu, 2022-11-10 at 01:33 +, Huang, Kai wrote: > > > Hmm.. I wasn't thinking thoroughly. I forgot CPU compatibility check also > > >

Re: [patch 32/39] PCI/MSI: Reorder functions in msi.c

2022-11-16 Thread Thomas Gleixner
On Wed, Nov 16 2022 at 10:28, Bjorn Helgaas wrote: > On Fri, Nov 11, 2022 at 02:55:06PM +0100, Thomas Gleixner wrote: >> From: Ahmed S. Darwish >> >> There is no way to navigate msi.c without banging the head against the wall >> every now and then because MSI and MSI-X specific functions are >>

Re: [patch 27/39] PCI/MSI: Move pci_disable_msix() to api.c

2022-11-16 Thread Thomas Gleixner
On Wed, Nov 16 2022 at 10:26, Bjorn Helgaas wrote: >> /** >> + * pci_disable_msix() - Disable MSI-X interrupt mode on device >> + * @dev: the PCI device to operate on >> + * >> + * Legacy device driver API to disable MSI-X interrupt mode on device, >> + * free earlier-allocated interrupt vectors,

Re: [patch 23/39] PCI/MSI: Move pci_alloc_irq_vectors_affinity() to api.c

2022-11-16 Thread Thomas Gleixner
On Wed, Nov 16 2022 at 10:23, Bjorn Helgaas wrote: > On Fri, Nov 11, 2022 at 02:54:51PM +0100, Thomas Gleixner wrote: >> + * Same as pci_alloc_irq_vectors(), but with the extra @affd parameter. >> + * Check that function docs, and irq_affinity, for more details. > > Is " irq_affinity" some

Re: [patch 22/39] PCI/MSI: Move pci_alloc_irq_vectors() to api.c

2022-11-16 Thread Thomas Gleixner
On Wed, Nov 16 2022 at 10:22, Bjorn Helgaas wrote: >> + * Allocate up to @max_vecs interrupt vectors on device. MSI-X irq > > s/irq/IRQ/ > >> + * vector allocation has a higher precedence over plain MSI, which has a >> + * higher precedence over legacy INTx emulation. >> + * >> + * Upon a

Re: [patch 20/39] PCI/MSI: Move pci_enable_msi() API to api.c

2022-11-16 Thread Thomas Gleixner
On Wed, Nov 16 2022 at 10:18, Bjorn Helgaas wrote: > On Fri, Nov 11, 2022 at 02:54:46PM +0100, Thomas Gleixner wrote: >> From: Ahmed S. Darwish >> >> To distangle the maze in msi.c all exported device-driver MSI APIs are now >> to be grouped in one file, api.c. >> >> Move pci_enable_msi() and

Re: [patch 15/39] PCI/MSI: Get rid of PCI_MSI_IRQ_DOMAIN

2022-11-16 Thread Thomas Gleixner
On Wed, Nov 16 2022 at 10:12, Bjorn Helgaas wrote: > On Fri, Nov 11, 2022 at 02:54:38PM +0100, Thomas Gleixner wrote: >> What a zoo: >> >> PCI_MSI >> select GENERIC_MSI_IRQ >> >> PCI_MSI_IRQ_DOMAIN >> def_bool y >> depends on PCI_MSI >> select

Re: [patch 11/39] genirq/irqdomain: Move bus token enum into a seperate header

2022-11-16 Thread Ashok Raj
On Fri, Nov 11, 2022 at 02:54:32PM +0100, Thomas Gleixner wrote: > Split the bus token defines out into a seperate header file to avoid > inclusion of irqdomain.h in msi.h. > > Signed-off-by: Thomas Gleixner > --- > include/linux/irqdomain.h | 22 +- >

Re: [patch 03/39] iommu/amd: Remove bogus check for multi MSI-X

2022-11-16 Thread Thomas Gleixner
On Wed, Nov 16 2022 at 08:02, Ashok Raj wrote: > On Fri, Nov 11, 2022 at 02:54:19PM +0100, Thomas Gleixner wrote: >> PCI/Multi-MSI is MSI specific and not supported for MSI-X >> >> Signed-off-by: Thomas Gleixner >> --- >> drivers/iommu/amd/iommu.c |3 +-- >> 1 file changed, 1 insertion(+),

Re: [patch 02/39] iommu/vt-d: Remove bogus check for multi MSI-X

2022-11-16 Thread Thomas Gleixner
On Wed, Nov 16 2022 at 07:52, Ashok Raj wrote: > On Fri, Nov 11, 2022 at 02:54:17PM +0100, Thomas Gleixner wrote: >> PCI/Multi-MSI is MSI specific and not supported for MSI-X. >> >> Signed-off-by: Thomas Gleixner >> --- >> drivers/iommu/intel/irq_remapping.c |3 +-- >> 1 file changed, 1

Re: [RFC PATCH 0/3] enable bpf_prog_pack allocator for powerpc

2022-11-16 Thread Hari Bathini
On 16/11/22 12:14 am, Christophe Leroy wrote: Le 14/11/2022 à 18:27, Christophe Leroy a écrit : Le 14/11/2022 à 15:47, Hari Bathini a écrit : Hi Christophe, On 11/11/22 4:55 pm, Christophe Leroy wrote: Le 10/11/2022 à 19:43, Hari Bathini a écrit : Most BPF programs are small, but

Re: [patch 01/39] PCI/MSI: Check for MSI enabled in __pci_msix_enable()

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:54:15PM +0100, Thomas Gleixner wrote: > PCI/MSI and PCI/MSI-X are mutually exclusive, but the MSI-X enable code > lacks a check for already enabled MSI. > > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/msi.c |5 + > 1 file

Re: [patch 28/39] PCI/MSI: Move pci_irq_get_affinity() to api.c

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:54:59PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > To distangle the maze in msi.c, all exported device-driver MSI APIs are > now to be grouped in one file, api.c. > > Move pci_irq_get_affinity() and let its kernel-doc match rest of the > file. > >

Re: [patch 37/39] PCI/MSI: Remove redundant msi_check() callback

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:55:14PM +0100, Thomas Gleixner wrote: > All these sanity checks are now done _before_ any allocation work > happens. No point in doing it twice. > > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/irqdomain.c | 48 >

Re: [patch 36/39] PCI/MSI: Validate MSIX contiguous restriction early

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:55:12PM +0100, Thomas Gleixner wrote: > With interrupt domains the sanity check for MSI-X vector validation can be > done _before_ any allocation happens. The sanity check only applies to the > allocation functions which have an 'entries' array argument. The entries >

Re: [patch 35/39] PCI/MSI: Reject MSI-X early

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:55:11PM +0100, Thomas Gleixner wrote: > Similar to PCI multi-MSI reject MSI-X enablement when a irq domain is > attached to the device which does not support MSI-X. > > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/msi.c |4

Re: [patch 34/39] PCI/MSI: Reject multi-MSI early

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:55:09PM +0100, Thomas Gleixner wrote: > When hierarchical MSI interrupt domains are enabled then there is no point > to do tons of work and detect the missing support for multi-MSI late in the > allocation path. > > Just query the domain feature flags right away. The

Re: [patch 33/39] PCI/MSI: Sanitize MSI-X checks

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:55:07PM +0100, Thomas Gleixner wrote: > There is no point in doing the same sanity checks over and over in a loop > during MSI-X enablement. Put them in front of the loop and return early > when they fail. > > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas >

Re: [patch 32/39] PCI/MSI: Reorder functions in msi.c

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:55:06PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > There is no way to navigate msi.c without banging the head against the wall > every now and then because MSI and MSI-X specific functions are > intermingled and the code flow is completely non-obvious.

Re: [patch 31/39] Documentation: PCI: Add reference to PCI/MSI device driver APIs

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:55:04PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > All exported device-driver MSI APIs are now grouped in one place at > drivers/pci/msi/api.c with comprehensive kernel-docs added. > > Reference these kernel-docs in the official PCI/MSI howto. > >

Re: [patch 30/39] PCI/MSI: Move pci_msi_restore_state() to api.c

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:55:03PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > To distangle the maze in msi.c, all exported device-driver MSI APIs are > now to be grouped in one file, api.c. > > Move pci_msi_enabled() and add kernel-doc for the function. > >

Re: [patch 29/39] PCI/MSI: Move pci_msi_enabled() to api.c

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:55:01PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > To distangle the maze in msi.c, all exported device-driver MSI APIs are > now to be grouped in one file, api.c. > > Move pci_msi_enabled() and make its kernel-doc comprehensive. > > Signed-off-by:

Re: [patch 27/39] PCI/MSI: Move pci_disable_msix() to api.c

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:54:58PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > To distangle the maze in msi.c, all exported device-driver MSI APIs are > now to be grouped in one file, api.c. > > Move pci_disable_msix() and make its kernel-doc comprehensive. > > Signed-off-by:

Re: [patch 26/39] PCI/MSI: Move pci_msix_vec_count() to api.c

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:54:56PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > To distangle the maze in msi.c, all exported device-driver MSI APIs are > now to be grouped in one file, api.c. > > Move pci_msix_vec_count() and make its kernel-doc comprehensive. > > Signed-off-by:

Re: [patch 25/39] PCI/MSI: Move pci_free_irq_vectors() to api.c

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:54:54PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > To distangle the maze in msi.c, all exported device-driver MSI APIs are > now to be grouped in one file, api.c. > > Move pci_free_irq_vectors() and make its kernel-doc comprehensive. > >

Re: [patch 24/39] PCI/MSI: Move pci_irq_vector() to api.c

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:54:53PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > To distangle the maze in msi.c, all exported device-driver MSI APIs are > now to be grouped in one file, api.c. > > Move pci_irq_vector() and let its kernel-doc match the rest of the file. > >

Re: [patch 23/39] PCI/MSI: Move pci_alloc_irq_vectors_affinity() to api.c

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:54:51PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > To distangle the maze in msi.c, all exported device-driver MSI APIs are > now to be grouped in one file, api.c. > > Move pci_alloc_irq_vectors_affinity() and let its kernel-doc reference >

[PATCH printk v5 25/40] tty: hvc: use console_is_registered()

2022-11-16 Thread John Ogness
It is not reliable to check for CON_ENABLED in order to identify if a console is registered. Use console_is_registered() instead. Signed-off-by: John Ogness Reviewed-by: Petr Mladek --- drivers/tty/hvc/hvc_console.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [patch 22/39] PCI/MSI: Move pci_alloc_irq_vectors() to api.c

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:54:50PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > To distangle the maze in msi.c, all exported device-driver MSI APIs are > now to be grouped in one file, api.c. > > Make pci_alloc_irq_vectors() a real function instead of wrapper and add > proper

[PATCH printk v5 00/40] reduce console_lock scope

2022-11-16 Thread John Ogness
This is v5 of a series to prepare for threaded/atomic printing. v4 is here [0]. This series focuses on reducing the scope of the BKL console_lock. It achieves this by switching to SRCU and a dedicated mutex for console list iteration and modification, respectively. The console_lock will no longer

Re: [patch 21/39] PCI/MSI: Move pci_enable_msix_range() to api.c

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:54:48PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > To distangle the maze in msi.c, all exported device-driver MSI APIs are > now to be grouped in one file, api.c. > > Move pci_enable_msix_range() and make its kernel-doc comprehensive. > >

Re: [patch 20/39] PCI/MSI: Move pci_enable_msi() API to api.c

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:54:46PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > To distangle the maze in msi.c all exported device-driver MSI APIs are now > to be grouped in one file, api.c. > > Move pci_enable_msi() and make its kernel-doc comprehensive. > > Signed-off-by: Ahmed

Re: [patch 19/39] PCI/MSI: Move pci_disable_msi() to api.c

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:54:45PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > msi.c is a maze of randomly sorted functions which makes the code > unreadable. As a first step split the driver visible API and the internal > implementation which also allows proper API documentation

Re: [patch 18/39] PCI/MSI: Move mask and unmask helpers to msi.h

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:54:43PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > The upcoming support for per device MSI interrupt domains needs to share > some of the inline helpers with the MSI implementation. > > Move them to the header file. > > Signed-off-by: Ahmed S. Darwish

Re: [patch 17/39] PCI/MSI: Get rid of externs in msi.h

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:54:42PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > Follow the style of > > Signed-off-by: Ahmed S. Darwish > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/msi.h |8 > 1 file changed, 4 insertions(+),

Re: [patch 14/39] PCI/MSI: Let the MSI core free descriptors

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:54:37PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > Let the core do the freeing of descriptors and just keep it around for the > legacy case. > > Signed-off-by: Ahmed S. Darwish > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- >

Re: [patch 13/39] PCI/MSI: Use msi_domain_info::bus_token

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:54:35PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > Set the bus token in the msi_domain_info structure and let the core code > handle the update. > > Signed-off-by: Ahmed S. Darwish > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- >

Re: [patch 04/39] genirq/msi: Use MSI_DESC_ALL in msi_add_simple_msi_descs()

2022-11-16 Thread Ashok Raj
On Fri, Nov 11, 2022 at 02:54:20PM +0100, Thomas Gleixner wrote: > There are no associated MSI descriptors in the requested range when the MSI > descriptor allocation fails. Use MSI_DESC_ALL as the filter which prepares > the next step to get rid of the filter for freeing. > > Signed-off-by:

Re: [patch 15/39] PCI/MSI: Get rid of PCI_MSI_IRQ_DOMAIN

2022-11-16 Thread Bjorn Helgaas
On Fri, Nov 11, 2022 at 02:54:38PM +0100, Thomas Gleixner wrote: > What a zoo: > > PCI_MSI > select GENERIC_MSI_IRQ > > PCI_MSI_IRQ_DOMAIN > def_bool y > depends on PCI_MSI > select GENERIC_MSI_IRQ_DOMAIN > > Ergo PCI_MSI enables PCI_MSI_IRQ_DOMAIN which in

Re: [patch 03/39] iommu/amd: Remove bogus check for multi MSI-X

2022-11-16 Thread Ashok Raj
On Fri, Nov 11, 2022 at 02:54:19PM +0100, Thomas Gleixner wrote: > PCI/Multi-MSI is MSI specific and not supported for MSI-X > > Signed-off-by: Thomas Gleixner > --- > drivers/iommu/amd/iommu.c |3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > --- a/drivers/iommu/amd/iommu.c >

Re: [patch 02/39] iommu/vt-d: Remove bogus check for multi MSI-X

2022-11-16 Thread Ashok Raj
On Fri, Nov 11, 2022 at 02:54:17PM +0100, Thomas Gleixner wrote: > PCI/Multi-MSI is MSI specific and not supported for MSI-X. > > Signed-off-by: Thomas Gleixner > --- > drivers/iommu/intel/irq_remapping.c |3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > ---

Re: [PATCH 13/44] KVM: x86: Serialize vendor module initialization (hardware setup)

2022-11-16 Thread Sean Christopherson
On Wed, Nov 16, 2022, Huang, Kai wrote: > On Wed, 2022-11-02 at 23:18 +, Sean Christopherson wrote: > > Acquire a new mutex, vendor_module_lock, in kvm_x86_vendor_init() while > > doing hardware setup to ensure that concurrent calls are fully serialized. > > KVM rejects attempts to load vendor

Re: [patch 01/39] PCI/MSI: Check for MSI enabled in __pci_msix_enable()

2022-11-16 Thread Ashok Raj
On Fri, Nov 11, 2022 at 02:54:15PM +0100, Thomas Gleixner wrote: > PCI/MSI and PCI/MSI-X are mutually exclusive, but the MSI-X enable code > lacks a check for already enabled MSI. > > Signed-off-by: Thomas Gleixner > --- > drivers/pci/msi/msi.c |5 + > 1 file changed, 5 insertions(+) >

Re: [PATCH 38/44] KVM: Disable CPU hotplug during hardware enabling

2022-11-16 Thread Huang, Kai
On Tue, 2022-11-15 at 20:16 +, Sean Christopherson wrote: > On Thu, Nov 10, 2022, Huang, Kai wrote: > > On Thu, 2022-11-10 at 01:33 +, Huang, Kai wrote: > > > > @@ -9283,7 +9283,13 @@ static int > > > > kvm_x86_check_processor_compatibility(struct kvm_x86_init_ops *ops) > > > >   int

Re: [RFC PATCH] seccomp: Add protection keys into seccomp_data

2022-11-16 Thread Stephen Röttger
On Tue, Nov 15, 2022 at 5:16 AM Michael Sammler wrote: > > We're currently working on a feature in chromium that uses pkeys for > > in-process isolation. Being able to use the pkey state in the seccomp > > filter would be pretty useful for this. For example, it would allow > > us to enforce that

[PATCH] arch/powerpc/setup: Fix reference count issue in pas_setup_mce_regs()

2022-11-16 Thread Xiongfeng Wang
pci_get_device() will increase the reference count for the returned pci_dev, and also decrease the reference count for the input parameter *from* if it is not NULL. In function pas_setup_mce_regs(), after we break out the loop with 'dev' not NULL, we need to decrease the reference count of 'dev'.

Re: [PATCH mm-unstable v1 17/20] drm/exynos: remove FOLL_FORCE usage

2022-11-16 Thread Daniel Vetter
On Wed, Nov 16, 2022 at 11:26:56AM +0100, David Hildenbrand wrote: > FOLL_FORCE is really only for ptrace access. As we unpin the pinned pages > using unpin_user_pages_dirty_lock(true), the assumption is that all these > pages are writable. > > FOLL_FORCE in this case seems to be a legacy

Re: [PATCH mm-unstable v1 16/20] mm/frame-vector: remove FOLL_FORCE usage

2022-11-16 Thread Daniel Vetter
On Wed, Nov 16, 2022 at 11:26:55AM +0100, David Hildenbrand wrote: > FOLL_FORCE is really only for ptrace access. According to commit > 707947247e95 ("media: videobuf2-vmalloc: get_userptr: buffers are always > writable"), get_vaddr_frames() currently pins all pages writable as a > workaround for

Re: [PATCH mm-unstable v1 14/20] drm/etnaviv: remove FOLL_FORCE usage

2022-11-16 Thread Daniel Vetter
On Wed, Nov 16, 2022 at 11:26:53AM +0100, David Hildenbrand wrote: > GUP now supports reliable R/O long-term pinning in COW mappings, such > that we break COW early. MAP_SHARED VMAs only use the shared zeropage so > far in one corner case (DAXFS file with holes), which can be ignored > because GUP

Re: [PATCH mm-unstable v1 13/20] media: videobuf-dma-sg: remove FOLL_FORCE usage

2022-11-16 Thread Daniel Vetter
On Wed, Nov 16, 2022 at 11:26:52AM +0100, David Hildenbrand wrote: > GUP now supports reliable R/O long-term pinning in COW mappings, such > that we break COW early. MAP_SHARED VMAs only use the shared zeropage so > far in one corner case (DAXFS file with holes), which can be ignored > because GUP

Re: [PATCH mm-unstable v1 09/20] mm/gup: reliable R/O long-term pinning in COW mappings

2022-11-16 Thread Daniel Vetter
On Wed, Nov 16, 2022 at 11:26:48AM +0100, David Hildenbrand wrote: > We already support reliable R/O pinning of anonymous memory. However, > assume we end up pinning (R/O long-term) a pagecache page or the shared > zeropage inside a writable private ("COW") mapping. The next write access > will

[PATCH mm-unstable v1 19/20] habanalabs: remove FOLL_FORCE usage

2022-11-16 Thread David Hildenbrand
FOLL_FORCE is really only for ptrace access. As we unpin the pinned pages using unpin_user_pages_dirty_lock(true), the assumption is that all these pages are writable. FOLL_FORCE in this case seems to be due to copy-and-past from other drivers. Let's just remove it. Acked-by: Oded Gabbay Cc:

[PATCH mm-unstable v1 18/20] RDMA/hw/qib/qib_user_pages: remove FOLL_FORCE usage

2022-11-16 Thread David Hildenbrand
FOLL_FORCE is really only for ptrace access. As we unpin the pinned pages using unpin_user_pages_dirty_lock(true), the assumption is that all these pages are writable. FOLL_FORCE in this case seems to be a legacy leftover. Let's just remove it. Cc: Dennis Dalessandro Cc: Jason Gunthorpe Cc:

  1   2   >