[PATCH kernel] powerps/pseries/dma: Add support for 2M IOMMU page size

2021-09-28 Thread Alexey Kardashevskiy
The upcoming PAPR spec adds a 2M page size, bit 23 right after the 16G page size in the "ibm,query-pe-dma-window" call. This adds support for the new page size. Since the new page size is out of sorted order, this changes the loop to not assume that shift[] is sorted. Signed-off-by: Alexey

Re: [RFC PATCH 4/8] powerpc: add CPU field to struct thread_info

2021-09-28 Thread Ard Biesheuvel
On Tue, 28 Sept 2021 at 02:16, Michael Ellerman wrote: > > Michael Ellerman writes: > > Ard Biesheuvel writes: > >> On Tue, 14 Sept 2021 at 14:11, Ard Biesheuvel wrote: > >>> > >>> The CPU field will be moved back into thread_info even when > >>> THREAD_INFO_IN_TASK is enabled, so add it back

Re: [next-20210827][ppc][multipathd] INFO: task hung in dm_table_add_target

2021-09-28 Thread Abdul Haleem
On 9/1/21 7:06 PM, Christoph Hellwig wrote: On Wed, Sep 01, 2021 at 04:47:26PM +0530, Abdul Haleem wrote: Greeting's multiple task hung while adding the vfc disk back to the multipath on my powerpc box running linux-next kernel Can you retry to reproduce this with lockdep enabled to see if

[PATCH v8 1/2] powerpc/pseries: Interface to represent PAPR firmware attributes

2021-09-28 Thread Pratik R. Sampat
Adds a generic interface to represent the energy and frequency related PAPR attributes on the system using the new H_CALL "H_GET_ENERGY_SCALE_INFO". H_GET_EM_PARMS H_CALL was previously responsible for exporting this information in the lparcfg, however the H_GET_EM_PARMS H_CALL will be deprecated

[PATCH v5 0/4] Add perf interface to expose nvdimm

2021-09-28 Thread Kajol Jain
Patchset adds performance stats reporting support for nvdimm. Added interface includes support for pmu register/unregister functions. A structure is added called nvdimm_pmu to be used for adding arch/platform specific data such as cpumask, nvdimm device pointer and pmu event functions like

Re: [PATCH v8 1/2] powerpc/pseries: Interface to represent PAPR firmware attributes

2021-09-28 Thread Pratik Sampat
Hello Greg, Thank you for your review. On 28/09/21 5:38 pm, Greg KH wrote: On Tue, Sep 28, 2021 at 05:21:01PM +0530, Pratik R. Sampat wrote: Adds a generic interface to represent the energy and frequency related PAPR attributes on the system using the new H_CALL "H_GET_ENERGY_SCALE_INFO".

[PATCH v5 4/4] docs: ABI: sysfs-bus-nvdimm: Document sysfs event format entries for nvdimm pmu

2021-09-28 Thread Kajol Jain
Details are added for the event, cpumask and format attributes in the ABI documentation. Signed-off-by: Kajol Jain --- Documentation/ABI/testing/sysfs-bus-nvdimm | 35 ++ 1 file changed, 35 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-bus-nvdimm

Re: [PATCH v4 4/8] PCI: replace pci_dev::driver usage that gets the driver name

2021-09-28 Thread Kalle Valo
Uwe Kleine-König writes: > From: Uwe Kleine-König > > struct pci_dev::driver holds (apart from a constant offset) the same > data as struct pci_dev::dev->driver. With the goal to remove struct > pci_dev::driver to get rid of data duplication replace getting the > driver name by

Re: [PATCH v4 4/8] PCI: replace pci_dev::driver usage that gets the driver name

2021-09-28 Thread Uwe Kleine-König
On Tue, Sep 28, 2021 at 12:01:28PM +0200, Simon Horman wrote: > On Mon, Sep 27, 2021 at 10:43:22PM +0200, Uwe Kleine-König wrote: > > From: Uwe Kleine-König > > > > struct pci_dev::driver holds (apart from a constant offset) the same > > data as struct pci_dev::dev->driver. With the goal to

[PATCH v5 3/4] powerpc/papr_scm: Add perf interface support

2021-09-28 Thread Kajol Jain
Performance monitoring support for papr-scm nvdimm devices via perf interface is added which includes addition of pmu functions like add/del/read/event_init for nvdimm_pmu struture. A new parameter 'priv' in added to the pdev_archdata structure to save nvdimm_pmu device pointer, to handle the

[PATCH v5 2/4] drivers/nvdimm: Add perf interface to expose nvdimm performance stats

2021-09-28 Thread Kajol Jain
A common interface is added to get performance stats reporting support for nvdimm devices. Added interface defines supported event list, config fields for the event attributes and their corresponding bit values which are exported via sysfs. Interface also added support for pmu register/unregister

Re: [PATCH v2 4/4] s390: Use generic version of arch_is_kernel_initmem_freed()

2021-09-28 Thread Heiko Carstens
On Tue, Sep 28, 2021 at 09:15:37AM +0200, Christophe Leroy wrote: > Generic version of arch_is_kernel_initmem_freed() now does the same > as s390 version. > > Remove the s390 version. > > Cc: Gerald Schaefer > Signed-off-by: Christophe Leroy > --- > v2: No change > --- >

[PATCH] powerpc/powernv/prd: Unregister OPAL_MSG_PRD2 notifier during module unload

2021-09-28 Thread Vasant Hegde
Commit 587164cd, introduced new opal message type (OPAL_MSG_PRD2) and added opal notifier. But I missed to unregister the notifier during module unload path. This results in below call trace if you try to unload and load opal_prd module. Sample calltrace (modprobe -r opal_prd; modprobe opal_prd)

Re: [PATCH 1/4] crypto: nintendo-aes - add a new AES driver

2021-09-28 Thread Geert Uytterhoeven
On Wed, Sep 22, 2021 at 4:12 AM Joel Stanley wrote: > On Tue, 21 Sept 2021 at 21:47, Emmanuel Gil Peyrot > wrote: > > > > This engine implements AES in CBC mode, using 128-bit keys only. It is > > present on both the Wii and the Wii U, and is apparently identical in > > both consoles. > > > >

[PATCH] powerpc: fix unbalanced node refcount in check_kvm_guest()

2021-09-28 Thread Nathan Lynch
When check_kvm_guest() succeeds in looking up a /hypervisor OF node, it returns without performing a matching put for the lookup, leaving the node's reference count elevated. Add the necessary call to of_node_put(), rearranging the code slightly to avoid repetition or goto. Signed-off-by: Nathan

[PATCH v2 4/4] s390: Use generic version of arch_is_kernel_initmem_freed()

2021-09-28 Thread Christophe Leroy
Generic version of arch_is_kernel_initmem_freed() now does the same as s390 version. Remove the s390 version. Cc: Gerald Schaefer Signed-off-by: Christophe Leroy --- v2: No change --- arch/s390/include/asm/sections.h | 12 arch/s390/mm/init.c | 3 --- 2 files

[PATCH v8 0/2] Interface to represent PAPR firmware attributes

2021-09-28 Thread Pratik R. Sampat
RFC: https://lkml.org/lkml/2021/6/4/791 PATCH v1: https://lkml.org/lkml/2021/6/16/805 PATCH v2: https://lkml.org/lkml/2021/7/6/138 PATCH v3: https://lkml.org/lkml/2021/7/12/2799 PATCH v4: https://lkml.org/lkml/2021/7/16/532 PATCH v5: https://lkml.org/lkml/2021/7/19/247 PATCH v6:

[PATCH v8 2/2] selftest/powerpc: Add PAPR sysfs attributes sniff test

2021-09-28 Thread Pratik R. Sampat
Include a testcase to check if the sysfs files for energy and frequency related have its related attribute files exist and populated Signed-off-by: Pratik R. Sampat --- tools/testing/selftests/powerpc/Makefile | 1 + .../powerpc/papr_attributes/.gitignore| 2 +

Re: [PATCH v8 1/2] powerpc/pseries: Interface to represent PAPR firmware attributes

2021-09-28 Thread Greg KH
On Tue, Sep 28, 2021 at 05:21:01PM +0530, Pratik R. Sampat wrote: > Adds a generic interface to represent the energy and frequency related > PAPR attributes on the system using the new H_CALL > "H_GET_ENERGY_SCALE_INFO". > > H_GET_EM_PARMS H_CALL was previously responsible for exporting this >

[PATCH v2 2/4] mm: Make generic arch_is_kernel_initmem_freed() do what it says

2021-09-28 Thread Christophe Leroy
Commit 7a5da02de8d6 ("locking/lockdep: check for freed initmem in static_obj()") added arch_is_kernel_initmem_freed() which is supposed to report whether an object is part of already freed init memory. For the time being, the generic version of arch_is_kernel_initmem_freed() always reports

[PATCH v2 3/4] powerpc: Use generic version of arch_is_kernel_initmem_freed()

2021-09-28 Thread Christophe Leroy
Generic version of arch_is_kernel_initmem_freed() now does the same as powerpc version. Remove the powerpc version. Signed-off-by: Christophe Leroy --- v2: No change --- arch/powerpc/include/asm/sections.h | 13 - 1 file changed, 13 deletions(-) diff --git

[PATCH v2 1/4] mm: Create a new system state and fix core_kernel_text()

2021-09-28 Thread Christophe Leroy
core_kernel_text() considers that until system_state in at least SYSTEM_RUNNING, init memory is valid. But init memory is freed a few lines before setting SYSTEM_RUNNING, so we have a small period of time when core_kernel_text() is wrong. Create an intermediate system state called

[PATCH v5 1/4] drivers/nvdimm: Add nvdimm pmu structure

2021-09-28 Thread Kajol Jain
A structure is added called nvdimm_pmu, for performance stats reporting support of nvdimm devices. It can be used to add device pmu data such as pmu data structure for performance stats, nvdimm device pointer along with cpumask attributes. Signed-off-by: Kajol Jain --- include/linux/nd.h | 20

Re: [PATCH v2 9/9] iommu/vt-d: Use pci core's DVSEC functionality

2021-09-28 Thread Dan Williams
On Thu, Sep 23, 2021 at 10:27 AM Ben Widawsky wrote: > > Reduce maintenance burden of DVSEC query implementation by using the > centralized PCI core implementation. > > Cc: io...@lists.linux-foundation.org > Cc: David Woodhouse > Cc: Lu Baolu > Signed-off-by: Ben Widawsky > --- >

[PATCH v4 0/8] Implement generic cc_platform_has() helper function

2021-09-28 Thread Borislav Petkov
From: Borislav Petkov Hi all, here's v4 of the cc_platform_has() patchset with feedback incorporated. I'm going to route this through tip if there are no objections. Thx. Tom Lendacky (8): x86/ioremap: Selectively build arch override encryption functions arch/cc: Introduce a function to

Re: [PATCH 02/10] i2c: pasemi: Use io{read,write}32

2021-09-28 Thread Sven Peter
On Mon, Sep 27, 2021, at 09:39, Arnd Bergmann wrote: > On Sun, Sep 26, 2021 at 12:00 PM Sven Peter wrote: >> >> In preparation for splitting this driver up into a platform_driver >> and a pci_driver, replace outl/inl usage with ioport_map and >> ioread32/iowrite32. >> >> Signed-off-by: Sven Peter

Re: [PATCH v4 4/8] PCI: replace pci_dev::driver usage that gets the driver name

2021-09-28 Thread Bjorn Helgaas
On Tue, Sep 28, 2021 at 09:29:36PM +0200, Uwe Kleine-König wrote: > On Tue, Sep 28, 2021 at 12:17:59PM -0500, Bjorn Helgaas wrote: > > [+to Oliver, Russell for eeh_driver_name() question below] > > > > On Mon, Sep 27, 2021 at 10:43:22PM +0200, Uwe Kleine-König wrote: > > > From: Uwe Kleine-König

[PATCH 3/8] x86/sev: Add an x86 version of cc_platform_has()

2021-09-28 Thread Borislav Petkov
From: Tom Lendacky Introduce an x86 version of the cc_platform_has() function. This will be used to replace vendor specific calls like sme_active(), sev_active(), etc. Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov --- arch/x86/Kconfig | 1 +

[PATCH 2/8] arch/cc: Introduce a function to check for confidential computing features

2021-09-28 Thread Borislav Petkov
From: Tom Lendacky In preparation for other confidential computing technologies, introduce a generic helper function, cc_platform_has(), that can be used to check for specific active confidential computing attributes, like memory encryption. This is intended to eliminate having to add multiple

[PATCH 4/8] powerpc/pseries/svm: Add a powerpc version of cc_platform_has()

2021-09-28 Thread Borislav Petkov
From: Tom Lendacky Introduce a powerpc version of the cc_platform_has() function. This will be used to replace the powerpc mem_encrypt_active() implementation, so the implementation will initially only support the CC_ATTR_MEM_ENCRYPT attribute. Signed-off-by: Tom Lendacky Signed-off-by:

[PATCH 1/8] x86/ioremap: Selectively build arch override encryption functions

2021-09-28 Thread Borislav Petkov
From: Tom Lendacky In preparation for other uses of the cc_platform_has() function besides AMD's memory encryption support, selectively build the AMD memory encryption architecture override functions only when CONFIG_AMD_MEM_ENCRYPT=y. These functions are: - early_memremap_pgprot_adjust() -

Re: [PATCH v4 4/8] PCI: replace pci_dev::driver usage that gets the driver name

2021-09-28 Thread Bjorn Helgaas
[+to Oliver, Russell for eeh_driver_name() question below] On Mon, Sep 27, 2021 at 10:43:22PM +0200, Uwe Kleine-König wrote: > From: Uwe Kleine-König > > struct pci_dev::driver holds (apart from a constant offset) the same > data as struct pci_dev::dev->driver. With the goal to remove struct >

Re: [PATCH v2 4/9] cxl/pci: Refactor cxl_pci_setup_regs

2021-09-28 Thread Dan Williams
On Thu, Sep 23, 2021 at 10:27 AM Ben Widawsky wrote: > > In preparation for moving parts of register mapping to cxl_core, the > cxl_pci driver is refactored to utilize a new helper to find register > blocks by type. > > cxl_pci scanned through all register blocks and mapping the ones that > the

Re: [PATCH v4 0/8] Implement generic cc_platform_has() helper function

2021-09-28 Thread Kuppuswamy, Sathyanarayanan
On 9/28/21 12:10 PM, Borislav Petkov wrote: From: Borislav Petkov Hi all, here's v4 of the cc_platform_has() patchset with feedback incorporated. I'm going to route this through tip if there are no objections. Intel CC support patch is not included in this series. You want me to address

Re: [PATCH] powerpc: fix unbalanced node refcount in check_kvm_guest()

2021-09-28 Thread Tyrel Datwyler
On 9/28/21 5:45 AM, Nathan Lynch wrote: > When check_kvm_guest() succeeds in looking up a /hypervisor OF node, it > returns without performing a matching put for the lookup, leaving the > node's reference count elevated. > > Add the necessary call to of_node_put(), rearranging the code slightly

[PATCH 6/8] x86/sev: Replace occurrences of sev_active() with cc_platform_has()

2021-09-28 Thread Borislav Petkov
From: Tom Lendacky Replace uses of sev_active() with the more generic cc_platform_has() using CC_ATTR_GUEST_MEM_ENCRYPT. If future support is added for other memory encryption technologies, the use of CC_ATTR_GUEST_MEM_ENCRYPT can be updated, as required. Signed-off-by: Tom Lendacky

[PATCH 7/8] x86/sev: Replace occurrences of sev_es_active() with cc_platform_has()

2021-09-28 Thread Borislav Petkov
From: Tom Lendacky Replace uses of sev_es_active() with the more generic cc_platform_has() using CC_ATTR_GUEST_STATE_ENCRYPT. If future support is added for other memory encyrption techonologies, the use of CC_ATTR_GUEST_STATE_ENCRYPT can be updated, as required. Signed-off-by: Tom Lendacky

[PATCH 5/8] x86/sme: Replace occurrences of sme_active() with cc_platform_has()

2021-09-28 Thread Borislav Petkov
From: Tom Lendacky Replace uses of sme_active() with the more generic cc_platform_has() using CC_ATTR_HOST_MEM_ENCRYPT. If future support is added for other memory encryption technologies, the use of CC_ATTR_HOST_MEM_ENCRYPT can be updated, as required. This also replaces two usages of

[PATCH 8/8] treewide: Replace the use of mem_encrypt_active() with cc_platform_has()

2021-09-28 Thread Borislav Petkov
From: Tom Lendacky Replace uses of mem_encrypt_active() with calls to cc_platform_has() with the CC_ATTR_MEM_ENCRYPT attribute. Remove the implementation of mem_encrypt_active() across all arches. For s390, since the default implementation of the cc_platform_has() matches the s390

Re: [PATCH v4 4/8] PCI: replace pci_dev::driver usage that gets the driver name

2021-09-28 Thread Uwe Kleine-König
Hello, On Tue, Sep 28, 2021 at 12:17:59PM -0500, Bjorn Helgaas wrote: > [+to Oliver, Russell for eeh_driver_name() question below] > > On Mon, Sep 27, 2021 at 10:43:22PM +0200, Uwe Kleine-König wrote: > > From: Uwe Kleine-König > > > > struct pci_dev::driver holds (apart from a constant

Re: [RFC PATCH 3/8] s390: add CPU field to struct thread_info

2021-09-28 Thread Ard Biesheuvel
On Tue, 14 Sept 2021 at 14:11, Ard Biesheuvel wrote: > > The CPU field will be moved back into thread_info even when > THREAD_INFO_IN_TASK is enabled, so add it back to s390's definition of > struct thread_info. > > Signed-off-by: Ard Biesheuvel > --- > arch/s390/include/asm/thread_info.h | 1 +

Re: [PATCH kernel] powerps/pseries/dma: Add support for 2M IOMMU page size

2021-09-28 Thread Leonardo Brás
Hello Alexey, On Tue, 2021-09-28 at 20:15 +1000, Alexey Kardashevskiy wrote: > The upcoming PAPR spec adds a 2M page size, bit 23 right after the 16G > page > size in the "ibm,query-pe-dma-window" call. > > This adds support for the new page size. Since the new page size is out > of sorted

Re: [PATCH v8 1/2] powerpc/pseries: Interface to represent PAPR firmware attributes

2021-09-28 Thread Pratik Sampat
On 28/09/21 7:28 pm, Greg KH wrote: On Tue, Sep 28, 2021 at 06:13:18PM +0530, Pratik Sampat wrote: Hello Greg, Thank you for your review. On 28/09/21 5:38 pm, Greg KH wrote: On Tue, Sep 28, 2021 at 05:21:01PM +0530, Pratik R. Sampat wrote: Adds a generic interface to represent the energy

Re: [PATCH v2 3/9] cxl/pci: Remove pci request/release regions

2021-09-28 Thread Dan Williams
On Thu, Sep 23, 2021 at 10:26 AM Ben Widawsky wrote: > > Quoting Dan, "... the request + release regions should probably just be > dropped. It's not like any of the register enumeration would collide > with someone else who already has the registers mapped. The collision > only comes when the

Re: [PATCH v2 7/9] cxl/pci: Use pci core's DVSEC functionality

2021-09-28 Thread Dan Williams
On Thu, Sep 23, 2021 at 10:27 AM Ben Widawsky wrote: > > Reduce maintenance burden of DVSEC query implementation by using the > centralized PCI core implementation. > > Signed-off-by: Ben Widawsky > --- > drivers/cxl/pci.c | 20 +--- > 1 file changed, 1 insertion(+), 19

Re: [PATCH v8 1/2] powerpc/pseries: Interface to represent PAPR firmware attributes

2021-09-28 Thread Greg KH
On Tue, Sep 28, 2021 at 06:13:18PM +0530, Pratik Sampat wrote: > Hello Greg, > > Thank you for your review. > > On 28/09/21 5:38 pm, Greg KH wrote: > > On Tue, Sep 28, 2021 at 05:21:01PM +0530, Pratik R. Sampat wrote: > > > Adds a generic interface to represent the energy and frequency related >

Re: [PATCH v2 2/9] cxl/pci: Remove dev_dbg for unknown register blocks

2021-09-28 Thread Dan Williams
On Thu, Sep 23, 2021 at 10:27 AM Ben Widawsky wrote: > > While interesting to driver developers, the dev_dbg message doesn't do > much except clutter up logs. This information should be attainable > through sysfs, and someday lspci like utilities. This change > additionally helps reduce the LOC

Re: [PATCH v2 5/9] cxl/pci: Make more use of cxl_register_map

2021-09-28 Thread Dan Williams
On Thu, Sep 23, 2021 at 10:27 AM Ben Widawsky wrote: > > The structure exists to pass around information about register mapping. > Using it more extensively cleans up many existing functions. I would have liked to have seen "add @base to cxl_register_map" and "use @map for @bar and @offset

Re: [PATCH v3 9/9] powerpc/mm: Use is_kernel_text() and is_kernel_inittext() helper

2021-09-28 Thread Christophe Leroy
Le 26/09/2021 à 09:20, Kefeng Wang a écrit : Use is_kernel_text() and is_kernel_inittext() helper to simplify code, also drop etext, _stext, _sinittext, _einittext declaration which already declared in section.h. Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc:

Re: [PATCH v4 0/8] Implement generic cc_platform_has() helper function

2021-09-28 Thread Borislav Petkov
On Tue, Sep 28, 2021 at 12:19:49PM -0700, Kuppuswamy, Sathyanarayanan wrote: > Intel CC support patch is not included in this series. You want me > to address the issue raised by Joerg before merging it? Did you not see my email to you today: https://lkml.kernel.org/r/yvl4zughfsh1q...@zn.tnic ?

Re: [RFC PATCH 7/8] riscv: rely on core code to keep thread_info::cpu updated

2021-09-28 Thread Palmer Dabbelt
On Tue, 14 Sep 2021 05:10:35 PDT (-0700), a...@kernel.org wrote: Now that the core code switched back to using thread_info::cpu to keep a task's CPU number, we no longer need to keep it in sync explicitly. So just drop the code that does this. Signed-off-by: Ard Biesheuvel ---

Re: [PATCH v3 9/9] powerpc/mm: Use is_kernel_text() and is_kernel_inittext() helper

2021-09-28 Thread Kefeng Wang
On 2021/9/29 1:51, Christophe Leroy wrote: Le 26/09/2021 à 09:20, Kefeng Wang a écrit : Use is_kernel_text() and is_kernel_inittext() helper to simplify code, also drop etext, _stext, _sinittext, _einittext declaration which already declared in section.h. Cc: Michael Ellerman Cc:

Re: [PATCH v4 0/8] Implement generic cc_platform_has() helper function

2021-09-28 Thread Kuppuswamy, Sathyanarayanan
On 9/28/21 1:31 PM, Borislav Petkov wrote: On Tue, Sep 28, 2021 at 12:19:49PM -0700, Kuppuswamy, Sathyanarayanan wrote: Intel CC support patch is not included in this series. You want me to address the issue raised by Joerg before merging it? Did you not see my email to you today:

Re: [PATCH v4 4/8] PCI: replace pci_dev::driver usage that gets the driver name

2021-09-28 Thread Simon Horman
On Mon, Sep 27, 2021 at 10:43:22PM +0200, Uwe Kleine-König wrote: > From: Uwe Kleine-König > > struct pci_dev::driver holds (apart from a constant offset) the same > data as struct pci_dev::dev->driver. With the goal to remove struct > pci_dev::driver to get rid of data duplication replace

Re: [PATCH v4 0/8] Implement generic cc_platform_has() helper function

2021-09-28 Thread Borislav Petkov
On Tue, Sep 28, 2021 at 02:01:57PM -0700, Kuppuswamy, Sathyanarayanan wrote: > Yes. But, since the check is related to TDX, I just want to confirm whether > you are fine with naming the function as intel_*(). Why is this such a big of a deal?! There's amd_cc_platform_has() and

Re: [PATCH v2 4/4] powerpc/pseries/cpuhp: remove obsolete comment from pseries_cpu_die

2021-09-28 Thread Daniel Henrique Barboza
On 9/27/21 17:19, Nathan Lynch wrote: This comment likely refers to the obsolete DLPAR workflow where some resource state transitions were driven more directly from user space utilities, but it also seems to contradict itself: "Change isolate state to Isolate [...]" is at odds with the

Re: [PATCH v4 0/8] Implement generic cc_platform_has() helper function

2021-09-28 Thread Borislav Petkov
On Tue, Sep 28, 2021 at 01:48:46PM -0700, Kuppuswamy, Sathyanarayanan wrote: > Just read it. If you want to use cpuid_has_tdx_guest() directly in > cc_platform_has(), then you want to rename intel_cc_platform_has() to > tdx_cc_platform_has()? Why? You simply do: if

[PATCH v2 1/2] powerpc/paravirt: vcpu_is_preempted() commentary

2021-09-28 Thread Nathan Lynch
Add comments more clearly documenting that this function determines whether hypervisor-level preemption of the VM has occurred. Signed-off-by: Nathan Lynch --- arch/powerpc/include/asm/paravirt.h | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git

Re: [PATCH v2 9/9] iommu/vt-d: Use pci core's DVSEC functionality

2021-09-28 Thread Lu Baolu
Hi Dan, On 9/29/21 1:54 AM, Dan Williams wrote: On Thu, Sep 23, 2021 at 10:27 AM Ben Widawsky wrote: Reduce maintenance burden of DVSEC query implementation by using the centralized PCI core implementation. Cc: io...@lists.linux-foundation.org Cc: David Woodhouse Cc: Lu Baolu

[PATCH v2 2/2] powerpc/paravirt: correct preempt debug splat in vcpu_is_preempted()

2021-09-28 Thread Nathan Lynch
vcpu_is_preempted() can be used outside of preempt-disabled critical sections, yielding warnings such as: BUG: using smp_processor_id() in preemptible [] code: systemd-udevd/185 caller is rwsem_spin_on_owner+0x1cc/0x2d0 CPU: 1 PID: 185 Comm: systemd-udevd Not tainted 5.15.0-rc2+ #33 Call

[PATCH v2 0/2] powerpc/paravirt: vcpu_is_preempted() tweaks

2021-09-28 Thread Nathan Lynch
Minor changes arising from discovering that this code throws warnings with DEBUG_PREEMPT kernels. Changes since v1: * Additional commentary to (1) distinguish hypervisor dispatch and preempt behavior from kernel scheduler preemption; and (2) more clearly justify the use of

Re: [PATCH v4 0/8] Implement generic cc_platform_has() helper function

2021-09-28 Thread Kuppuswamy, Sathyanarayanan
On 9/28/21 1:58 PM, Borislav Petkov wrote: On Tue, Sep 28, 2021 at 01:48:46PM -0700, Kuppuswamy, Sathyanarayanan wrote: Just read it. If you want to use cpuid_has_tdx_guest() directly in cc_platform_has(), then you want to rename intel_cc_platform_has() to tdx_cc_platform_has()? Why? You

Re: [PATCH v2 4/4] powerpc/pseries/cpuhp: remove obsolete comment from pseries_cpu_die

2021-09-28 Thread Michael Ellerman
Daniel Henrique Barboza writes: > On 9/27/21 17:19, Nathan Lynch wrote: >> This comment likely refers to the obsolete DLPAR workflow where some >> resource state transitions were driven more directly from user space >> utilities, but it also seems to contradict itself: "Change isolate state to >>

[PATCH v2 1/2] powerpc:85xx:Fix oops when mpc85xx_smp_guts_ids node cannot be found

2021-09-28 Thread Xiaoming Ni
When the field described in mpc85xx_smp_guts_ids[] is not configured in dtb, the mpc85xx_setup_pmc() does not assign a value to the "guts" variable. As a result, the oops is triggered when mpc85xx_freeze_time_base() is executed. Fixes:56f1ba280719 ("powerpc/mpc85xx: refactor the PM

[PATCH v2 2/2] powerpc:85xx: fix timebase sync issue when CONFIG_HOTPLUG_CPU=n

2021-09-28 Thread Xiaoming Ni
When CONFIG_SMP=y, timebase synchronization is required when the second kernel is started. arch/powerpc/kernel/smp.c: int __cpu_up(unsigned int cpu, struct task_struct *tidle) { ... if (smp_ops->give_timebase)

[PATCH v2 0/2] powerpc:85xx: fix timebase sync issue when CONFIG_HOTPLUG_CPU=n

2021-09-28 Thread Xiaoming Ni
When CONFIG_SMP=y, timebase synchronization is required for mpc8572 when the second kernel is started arch/powerpc/kernel/smp.c: int __cpu_up(unsigned int cpu, struct task_struct *tidle) { ... if (smp_ops->give_timebase)

Re: [PATCH v2 2/4] mm: Make generic arch_is_kernel_initmem_freed() do what it says

2021-09-28 Thread Andrew Morton
On Tue, 28 Sep 2021 09:15:35 +0200 Christophe Leroy wrote: > Commit 7a5da02de8d6 ("locking/lockdep: check for freed initmem in > static_obj()") added arch_is_kernel_initmem_freed() which is supposed > to report whether an object is part of already freed init memory. > > For the time being, the