Re: Generic IOMMU pooled allocator

2015-03-22 Thread Arnd Bergmann
On Sunday 22 March 2015, Benjamin Herrenschmidt wrote: > On Sun, 2015-03-22 at 18:07 -0400, Sowmini Varadhan wrote: > > On (03/23/15 09:02), Benjamin Herrenschmidt wrote: > > > > How does this relate to the ARM implementation? There is currently > > > > an effort going on to make that one shared wi

Re: [PATCH v3 2/2] drivers/vfio: Support EEH error injection

2015-03-22 Thread Gavin Shan
On Mon, Mar 23, 2015 at 04:10:20PM +1100, David Gibson wrote: >On Mon, Mar 23, 2015 at 04:03:59PM +1100, Gavin Shan wrote: >> On Mon, Mar 23, 2015 at 02:43:03PM +1100, David Gibson wrote: >> >On Mon, Mar 23, 2015 at 12:56:36PM +1100, Gavin Shan wrote: >> >> On Mon, Mar 23, 2015 at 12:39:45PM +1100,

Re: [PATCH v3 2/2] drivers/vfio: Support EEH error injection

2015-03-22 Thread David Gibson
On Mon, Mar 23, 2015 at 04:03:59PM +1100, Gavin Shan wrote: > On Mon, Mar 23, 2015 at 02:43:03PM +1100, David Gibson wrote: > >On Mon, Mar 23, 2015 at 12:56:36PM +1100, Gavin Shan wrote: > >> On Mon, Mar 23, 2015 at 12:39:45PM +1100, David Gibson wrote: > >> >On Sat, Mar 21, 2015 at 06:58:45AM +110

Re: [PATCH v3 2/2] drivers/vfio: Support EEH error injection

2015-03-22 Thread Gavin Shan
On Mon, Mar 23, 2015 at 02:43:03PM +1100, David Gibson wrote: >On Mon, Mar 23, 2015 at 12:56:36PM +1100, Gavin Shan wrote: >> On Mon, Mar 23, 2015 at 12:39:45PM +1100, David Gibson wrote: >> >On Sat, Mar 21, 2015 at 06:58:45AM +1100, Gavin Shan wrote: >> >> The patch adds one more EEH sub-command (

Re: [PATCH v3 1/2] PCI: One more parameter to pci_set_pcie_reset_state()

2015-03-22 Thread Gavin Shan
On Sun, Mar 22, 2015 at 10:06:01PM -0600, Alex Williamson wrote: >On Mon, 2015-03-23 at 14:56 +1100, Gavin Shan wrote: >> On Sun, Mar 22, 2015 at 09:34:33PM -0600, Alex Williamson wrote: >> >On Mon, 2015-03-23 at 14:02 +1100, Gavin Shan wrote: >> >> The patch adds one more parameter ("probe") to pc

Re: drivers/of: Add empty ranges quirk for PA-Semi

2015-03-22 Thread Benjamin Herrenschmidt
On Mon, 2015-03-23 at 14:50 +1100, Michael Ellerman wrote: > On Mon, 2015-23-03 at 03:16:38 UTC, Benjamin Herrenschmidt wrote: > > The "sdc" node is missing the ranges property, it needs to be treated > > as having an empty one otherwise translation fails for its children. > > > > Tested-by: Steve

Re: [PATCH v3 1/2] PCI: One more parameter to pci_set_pcie_reset_state()

2015-03-22 Thread Alex Williamson
On Mon, 2015-03-23 at 14:56 +1100, Gavin Shan wrote: > On Sun, Mar 22, 2015 at 09:34:33PM -0600, Alex Williamson wrote: > >On Mon, 2015-03-23 at 14:02 +1100, Gavin Shan wrote: > >> The patch adds one more parameter ("probe") to pci_set_pcie_reset_state(), > >> which allows to check if one particula

Re: [PATCH v3 1/2] PCI: One more parameter to pci_set_pcie_reset_state()

2015-03-22 Thread Gavin Shan
On Sun, Mar 22, 2015 at 09:34:33PM -0600, Alex Williamson wrote: >On Mon, 2015-03-23 at 14:02 +1100, Gavin Shan wrote: >> The patch adds one more parameter ("probe") to pci_set_pcie_reset_state(), >> which allows to check if one particular PCI device can be resetted by the >> function. The function

Re: drivers/of: Add empty ranges quirk for PA-Semi

2015-03-22 Thread Michael Ellerman
On Mon, 2015-23-03 at 03:16:38 UTC, Benjamin Herrenschmidt wrote: > The "sdc" node is missing the ranges property, it needs to be treated > as having an empty one otherwise translation fails for its children. > > Tested-by: Steven Rostedt > Signed-off-by: Benjamin Herrenschmidt Fixes: 746c9e9f9

Re: [PATCH v3 2/2] drivers/vfio: Support EEH error injection

2015-03-22 Thread David Gibson
On Mon, Mar 23, 2015 at 12:56:36PM +1100, Gavin Shan wrote: > On Mon, Mar 23, 2015 at 12:39:45PM +1100, David Gibson wrote: > >On Sat, Mar 21, 2015 at 06:58:45AM +1100, Gavin Shan wrote: > >> The patch adds one more EEH sub-command (VFIO_EEH_PE_INJECT_ERR) > >> to inject the specified EEH error, wh

Re: [PATCH v3 1/2] PCI: One more parameter to pci_set_pcie_reset_state()

2015-03-22 Thread Alex Williamson
On Mon, 2015-03-23 at 14:02 +1100, Gavin Shan wrote: > The patch adds one more parameter ("probe") to pci_set_pcie_reset_state(), > which allows to check if one particular PCI device can be resetted by the > function. The function will be reused to support PCI device specific methods > maintained i

Re: [RESEND PATCH] For machine check occurring while in guest, KVM layer tries recovery

2015-03-22 Thread Paul Mackerras
On Tue, Mar 17, 2015 at 02:57:48PM +0530, Mahesh J Salgaonkar wrote: > From: Mahesh Salgaonkar > > and deliver MCE to guest if recovery is failed. For recovered errors > we just go back to normal functioning of guest. But there are cases > where we may hit MCE in guest with MSR(RI=0), which means

[PATCH] drivers/of: Add empty ranges quirk for PA-Semi

2015-03-22 Thread Benjamin Herrenschmidt
The "sdc" node is missing the ranges property, it needs to be treated as having an empty one otherwise translation fails for its children. Tested-by: Steven Rostedt Signed-off-by: Benjamin Herrenschmidt --- drivers/of/address.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-)

Re: [PATCH v2] powerpc/book3s: Fix the MCE code to use CONFIG_KVM_BOOK3S_64_HANDLER

2015-03-22 Thread Paul Mackerras
On Tue, Mar 17, 2015 at 04:14:41PM +0530, Mahesh J Salgaonkar wrote: > From: Mahesh Salgaonkar > > commit id 2ba9f0d has changed CONFIG_KVM_BOOK3S_64_HV to tristate to allow > HV/PR bits to be built as modules. But the MCE code still depends on > CONFIG_KVM_BOOK3S_64_HV which is wrong. When user

Re: [v5,1/4] powerpc/nvram: move generic code for nvram and pstore

2015-03-22 Thread Michael Ellerman
On Thu, 2015-05-02 at 19:36:04 UTC, Hari Bathini wrote: > With minor checks, we can move most of the code for nvram > under pseries to a common place to be re-used by other > powerpc platforms like powernv. This patch moves such > common code to arch/powerpc/kernel/nvram_64.c file. > > Signed-off-

[PATCH v3 2/2] PCI: Apply warm reset to specific devices

2015-03-22 Thread Gavin Shan
Currently, VFIO infrastructure depends on pci_reset_function() to ensure the PCI device in clean state when passing to guest, or being returned back to host. However, the function doesn't work (or well) on some PCI devices on PowerPC platforms, which potentially brings pending traffic over the boun

[PATCH v3 1/2] PCI: One more parameter to pci_set_pcie_reset_state()

2015-03-22 Thread Gavin Shan
The patch adds one more parameter ("probe") to pci_set_pcie_reset_state(), which allows to check if one particular PCI device can be resetted by the function. The function will be reused to support PCI device specific methods maintained in pci_dev_reset_methods[] in subsequent patch. Cc: Brian Kin

Re: [PATCH v3 2/2] drivers/vfio: Support EEH error injection

2015-03-22 Thread Gavin Shan
On Mon, Mar 23, 2015 at 12:39:45PM +1100, David Gibson wrote: >On Sat, Mar 21, 2015 at 06:58:45AM +1100, Gavin Shan wrote: >> The patch adds one more EEH sub-command (VFIO_EEH_PE_INJECT_ERR) >> to inject the specified EEH error, which is represented by >> (struct vfio_eeh_pe_err), to the indicated

Re: [PATCH v3 2/2] drivers/vfio: Support EEH error injection

2015-03-22 Thread David Gibson
On Sat, Mar 21, 2015 at 06:58:45AM +1100, Gavin Shan wrote: > The patch adds one more EEH sub-command (VFIO_EEH_PE_INJECT_ERR) > to inject the specified EEH error, which is represented by > (struct vfio_eeh_pe_err), to the indicated PE for testing purpose. > > Signed-off-by: Gavin Shan Reviewed-

Re: [PATCH v3 1/2] powerpc/eeh: Introduce eeh_pe_inject_err()

2015-03-22 Thread David Gibson
On Sat, Mar 21, 2015 at 06:58:44AM +1100, Gavin Shan wrote: > The patch defines PCI error types and functions in eeh.h and > exports function eeh_pe_inject_err(), which will be called by > VFIO driver to inject the specified PCI error to the indicated > PE for testing purpose. > > Signed-off-by: G

Re: [REGRESSION in 3.18][PPC] PA Semi fails to boot after: of/base: Fix PowerPC address parsing hack

2015-03-22 Thread Michael Ellerman
On Mon, 2015-03-09 at 17:33 -0700, Olof Johansson wrote: > On Mon, Mar 9, 2015 at 5:28 PM, Michael Ellerman wrote: > > On Sat, 2015-03-07 at 15:02 +1100, Benjamin Herrenschmidt wrote: > >> On Fri, 2015-03-06 at 15:50 -0800, Olof Johansson wrote: > >> > On Fri, Mar 6, 2015 at 2:56 PM, Benjamin Herr

Re: [PATCH v5 RFC 0/3] Generic IOMMU pooled allocator

2015-03-22 Thread Benjamin Herrenschmidt
On Sun, 2015-03-22 at 15:22 -0400, Sowmini Varadhan wrote: > Follows up on the feedback in the thread at > http://www.spinics.net/lists/sparclinux/msg13493.html > > - removed ->cookie_to_index and ->demap indirection from the iommu_tbl_ops > The caller needs to call these functions as needed,

Re: Generic IOMMU pooled allocator

2015-03-22 Thread Benjamin Herrenschmidt
On Sun, 2015-03-22 at 18:07 -0400, Sowmini Varadhan wrote: > On (03/23/15 09:02), Benjamin Herrenschmidt wrote: > > > How does this relate to the ARM implementation? There is currently > > > an effort going on to make that one shared with ARM64 and possibly > > > x86. Has anyone looked at both the

Re: Generic IOMMU pooled allocator

2015-03-22 Thread Sowmini Varadhan
On (03/23/15 09:02), Benjamin Herrenschmidt wrote: > > How does this relate to the ARM implementation? There is currently > > an effort going on to make that one shared with ARM64 and possibly > > x86. Has anyone looked at both the PowerPC and ARM ways of doing the > > allocation to see if we could

Re: Generic IOMMU pooled allocator

2015-03-22 Thread Benjamin Herrenschmidt
On Sun, 2015-03-22 at 20:36 +0100, Arnd Bergmann wrote: > How does this relate to the ARM implementation? There is currently > an effort going on to make that one shared with ARM64 and possibly > x86. Has anyone looked at both the PowerPC and ARM ways of doing the > allocation to see if we could p

Re: Generic IOMMU pooled allocator

2015-03-22 Thread Arnd Bergmann
On Thursday 19 March 2015, David Miller wrote: > PowerPC folks, we're trying to kill the locking contention in our > IOMMU allocators and noticed that you guys have a nice solution to > this in your IOMMU code. > > Sowmini put together a patch series that tries to extract out the > generic parts o

Re: Generic IOMMU pooled allocator

2015-03-22 Thread Sowmini Varadhan
Turned out that I was able to iterate over it, and remove both the ->cookie_to_index and the ->demap indirection from iommu_tbl_ops. That leaves only the odd iommu_flushall() hook, I'm trying to find the history behind that (needed for sun4u platforms, afaik, and not sure if there are other ways t

[PATCH v5 RFC 3/3] sparc: Make LDC use common iommu poll management functions

2015-03-22 Thread Sowmini Varadhan
Note that this conversion is only being done to consolidate the code and ensure that the common code provides the sufficient abstraction. It is not expected to result in any noticeable performance improvement, as there is typically one ldc_iommu per vnet_port, and each one has 8k entries, with a ty

[PATCH v5 RFC 1/3] sparc: Break up monolithic iommu table/lock into finer graularity pools and lock

2015-03-22 Thread Sowmini Varadhan
Investigation of multithreaded iperf experiments on an ethernet interface show the iommu->lock as the hottest lock identified by lockstat, with something of the order of 21M contentions out of 27M acquisitions, and an average wait time of 26 us for the lock. This is not efficient. A more scalable

[PATCH v5 RFC 2/3] sparc: Make sparc64 use scalable lib/iommu-common.c functions

2015-03-22 Thread Sowmini Varadhan
In iperf experiments running linux as the Tx side (TCP client) with 10 threads results in a severe performance drop when TSO is disabled, indicating a weakness in the software that can be avoided by using the scalable IOMMU arena DMA allocation. Baseline numbers before this patch: with default

[PATCH v5 RFC 0/3] Generic IOMMU pooled allocator

2015-03-22 Thread Sowmini Varadhan
Follows up on the feedback in the thread at http://www.spinics.net/lists/sparclinux/msg13493.html - removed ->cookie_to_index and ->demap indirection from the iommu_tbl_ops The caller needs to call these functions as needed, before invoking the generic arena allocator functions. - added the

ADDR_COMPAT_LAYOUT breaks PTRACE_SEIZE

2015-03-22 Thread Andreas Schwab
On ppc64, a process running with the ADDR_COMPAT_LAYOUT personality causes ptrace(PTRACE_SEIZE) to hang in the kernel, unkillable. #include #include #include #include #include #include int main (void) { pid_t child; personality (ADDR_COMPAT_LAYOUT); child = fork (); if (child == 0)