[PATCH v6 13/20] cxl: sysfs support for guests

2016-03-04 Thread Frederic Barrat
From: Christophe Lombard Filter out a few adapter parameters which don't make sense in a guest. Document the changes. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Reviewed-by: Manoj Kumar --- Documentation/ABI/testing/sysfs-class-cxl

[PATCH v6 14/20] cxl: Support to flash a new image on the adapter from a guest

2016-03-04 Thread Frederic Barrat
flashing is successful, an rtas call is made to update the device tree with the new properties values for the adapter and the AFU(s) Add a new char device for the adapter, so that the flash tool can access the card, even if there is no valid AFU on it. Co-authored-by: Frederic Barrat Signed-off-by

[PATCH v6 12/20] cxl: Add guest-specific code

2016-03-04 Thread Frederic Barrat
ID assigned by the cxl driver from the process element ID visible to the user applications. In bare-metal, the 2 IDs match. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Reviewed-by: Manoj Kumar Acked-by: Ian Munsie --- drivers/misc/cxl

[PATCH v6 10/20] cxl: New hcalls to support cxl adapters

2016-03-04 Thread Frederic Barrat
r image to the coherent platform facility, and for validating the entire image after the download. H_CONTROL_CA_FACILITY Allow the partition to manipulate or query certain coherent platform facility behaviors. Co-authored-by: Frederic Barrat Sig

[PATCH v6 09/20] powerpc: New possible return value from hcall

2016-03-04 Thread Frederic Barrat
From: Christophe Lombard The hcalls introduced for cxl use a possible new value: H_STATE (invalid state). Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Reviewed-by: Manoj Kumar Acked-by: Ian Munsie --- arch/powerpc/include/asm/hvcall.h

[PATCH v6 07/20] cxl: Update cxl_irq() prototype

2016-03-04 Thread Frederic Barrat
The context parameter when calling cxl_irq() should be strongly typed. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Reviewed-by: Manoj Kumar Acked-by: Ian Munsie --- drivers/misc/cxl/cxl.h | 2 +- drivers/misc/cxl/irq.c | 3 +-- 2 files

[PATCH v6 06/20] cxl: Isolate a few bare-metal-specific calls

2016-03-04 Thread Frederic Barrat
A few functions are mostly common between bare-metal and guest and just need minor tuning. To avoid crowding the backend API, introduce a few 'if' based on the CPU being in HV mode. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard R

[PATCH v6 08/20] cxl: IRQ allocation for guests

2016-03-04 Thread Frederic Barrat
/deleting the context. Only the handler is different. Rework the code so that the range 0 is treated like the other ranges. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Reviewed-by: Manoj Kumar Acked-by: Ian Munsie --- drivers/misc/cxl/irq.c | 78

[PATCH v6 05/20] cxl: Rename some bare-metal specific functions

2016-03-04 Thread Frederic Barrat
Rename a few functions, changing the 'cxl_' prefix to either 'cxl_pci_' or 'cxl_native_', to make clear that the implementation is bare-metal specific. Those functions will have an equivalent implementation for a guest in a later patch. Co-authored-by: Christophe Lo

[PATCH v6 04/20] cxl: Introduce implementation-specific API

2016-03-04 Thread Frederic Barrat
-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Reviewed-by: Manoj Kumar Acked-by: Ian Munsie --- drivers/misc/cxl/api.c | 8 +-- drivers/misc/cxl/context.c | 4 +- drivers/misc/cxl/cxl.h | 53 +++--- drivers/misc/cxl/fault.c | 6 +- drivers/misc/cxl/file.c

[PATCH v6 03/20] cxl: Define process problem state area at attach time only

2016-03-04 Thread Frederic Barrat
state area. Remove calls to cxl_assign_psn_space during init. The function is already called on the attach paths. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Reviewed-by: Manoj Kumar Acked-by: Ian Munsie --- drivers/misc/cxl/api.c

[PATCH v6 01/20] cxl: Move common code away from bare-metal-specific files

2016-03-04 Thread Frederic Barrat
From: Christophe Lombard Move around some functions which will be accessed from the bare-metal and guest environments. Code in native.c and pci.c is meant to be bare-metal specific. Other files contain code which may be shared with guests. Co-authored-by: Frederic Barrat Signed-off-by

[PATCH v6 00/20] cxl: Add support for powerVM guest

2016-03-04 Thread Frederic Barrat
This series adds support for a cxl card in a powerVM guest. It requires firmware FW840 and an activation code for cxl (CAPI). Note that pHyp only claims support for cxlflash, and not generic support for FPGA CAPI accelerators. cxlflash uses the (slightly modified) Nallatech card, so the memcopy AF

[PATCH v6 02/20] cxl: Move bare-metal specific code to specialized files

2016-03-04 Thread Frederic Barrat
me p2 registers not needed from a guest and the PCI interface. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Reviewed-by: Manoj Kumar Acked-by: Ian Munsie --- drivers/misc/cxl/cxl.h| 24 + drivers/misc/cxl/irq.c

Re: [PATCH] cxl: Add cxl_read_adapter_vpd() to the kernel API

2016-03-04 Thread Frederic Barrat
ication to cxlflash (and remove the now obsolete cxl_get_phys_dev() kernel API, as discussed in this thread with Mikey). So no more dependencies. It will be part of the powerVM patchset v6 Fred Le 19/01/2016 18:14, Frederic Barrat a écrit : Introduce a new API to read the VPD of the adapte

Re: [PATCH] cxl: Ignore probes for virtual afu pci devices

2016-03-02 Thread Frederic Barrat
vsec, when cxl probe is unable to find necessary vsec entries in device pci config space. The error message logged are of the form : cxl-pci 0004:00:00.0: ABORTING: CXL VSEC not found! cxl-pci 0004:00:00.0: cxl_init_adapter failed: -19 Cc: Ian Munsie Cc: Frederic Barrat Signed-off-by: Vaibhav

Re: [PATCH v5 15/18] cxl: Parse device tree and create cxl device(s) at boot

2016-02-25 Thread Frederic Barrat
Le 24/02/2016 21:15, Manoj Kumar a écrit : On 2/23/2016 10:21 AM, Frederic Barrat wrote: +module_init(cxl_base_init); Is this a remnant from when there were two modules? Do you really need two module_init() calls (can't one be called from the other)? What is the tear-down portion of

Re: [PATCH v5 14/18] cxl: Support to flash a new image on the adapter from a guest

2016-02-25 Thread Frederic Barrat
Le 24/02/2016 21:03, Manoj Kumar a écrit : From: Christophe Lombard +#define CXL_DEV_MINORS 13 /* 1 control + 4 AFUs * 3 (dedicated/master/shared) */ Where does this limit of 4 AFUs come from? Is this related to CXL_MAX_SLICES? Should this be a computed value, in case the number of AFUs/

[PATCH] cxl: Fix PSL timebase synchronization detection

2016-02-24 Thread Frederic Barrat
to use the proper timebase-to-time conversion. Signed-off-by: Frederic Barrat Cc: # 4.3+ --- drivers/misc/cxl/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c index 4c1903f..0c6c17a1 100644 --- a/drivers/misc/cxl/pci.c +++ b

[PATCH v5 14/18] cxl: Support to flash a new image on the adapter from a guest

2016-02-23 Thread Frederic Barrat
flashing is successful, an rtas call is made to update the device tree with the new properties values for the adapter and the AFU(s) Add a new char device for the adapter, so that the flash tool can access the card, even if there is no valid AFU on it. Co-authored-by: Frederic Barrat Signed-off-by

[PATCH v5 16/18] cxl: Support the cxl kernel API from a guest

2016-02-23 Thread Frederic Barrat
: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/api.c| 63 ++- drivers/misc/cxl/cxl.h| 6 +- drivers/misc/cxl/guest.c | 26 drivers/misc/cxl/native.c | 50 +++ drivers/misc/cxl/pci.c

[PATCH v5 11/18] cxl: Separate bare-metal fields in adapter and AFU data structures

2016-02-23 Thread Frederic Barrat
From: Christophe Lombard Introduce sub-structures containing the bare-metal specific fields in the structures describing the adapter (struct cxl) and AFU (struct cxl_afu). Update all their references. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe

[PATCH v5 18/18] cxl: Add tracepoints around the cxl hcall

2016-02-23 Thread Frederic Barrat
From: Christophe Lombard To ease debugging, add a few tracepoints around the cxl hcalls. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Acked-by: Ian Munsie --- drivers/misc/cxl/hcalls.c | 9 +++ drivers/misc/cxl/trace.h | 193

[PATCH v5 17/18] cxl: Adapter failure handling

2016-02-23 Thread Frederic Barrat
found to be disabled, detach all existing contexts from it before issuing a AFU reset to re-enable it. Before detaching contexts, notify any kernel driver through the EEH callbacks of the AFU pci device. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe

[PATCH v5 10/18] cxl: New hcalls to support cxl adapters

2016-02-23 Thread Frederic Barrat
r image to the coherent platform facility, and for validating the entire image after the download. H_CONTROL_CA_FACILITY Allow the partition to manipulate or query certain coherent platform facility behaviors. Co-authored-by: Frederic Barrat Sig

[PATCH v5 13/18] cxl: sysfs support for guests

2016-02-23 Thread Frederic Barrat
From: Christophe Lombard Filter out a few adapter parameters which don't make sense in a guest. Document the changes. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- Documentation/ABI/testing/sysfs-class-cxl | 8 +++ drivers/mis

[PATCH v5 15/18] cxl: Parse device tree and create cxl device(s) at boot

2016-02-23 Thread Frederic Barrat
Add new entry point to scan the device tree at boot in a guest, looking for cxl devices. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Acked-by: Ian Munsie --- drivers/misc/cxl/base.c | 25 + 1 file changed, 25

[PATCH v5 09/18] cxl: New possible return value from hcall

2016-02-23 Thread Frederic Barrat
From: Christophe Lombard The hcalls introduced for cxl use a possible new value: H_STATE (invalid state). Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Acked-by: Ian Munsie --- arch/powerpc/include/asm/hvcall.h | 1 + 1 file changed, 1

[PATCH v5 01/18] cxl: Move common code away from bare-metal-specific files

2016-02-23 Thread Frederic Barrat
From: Christophe Lombard Move around some functions which will be accessed from the bare-metal and guest environments. Code in native.c and pci.c is meant to be bare-metal specific. Other files contain code which may be shared with guests. Co-authored-by: Frederic Barrat Signed-off-by

[PATCH v5 07/18] cxl: Update cxl_irq() prototype

2016-02-23 Thread Frederic Barrat
The context parameter when calling cxl_irq() should be strongly typed. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Acked-by: Ian Munsie --- drivers/misc/cxl/cxl.h | 2 +- drivers/misc/cxl/irq.c | 3 +-- 2 files changed, 2 insertions

[PATCH v5 12/18] cxl: Add guest-specific code

2016-02-23 Thread Frederic Barrat
ID assigned by the cxl driver from the process element ID visible to the user applications. In bare-metal, the 2 IDs match. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/Makefile | 1 + drivers/misc/cxl/api.c | 2

[PATCH v5 06/18] cxl: Isolate a few bare-metal-specific calls

2016-02-23 Thread Frederic Barrat
A few functions are mostly common between bare-metal and guest and just need minor tuning. To avoid crowding the backend API, introduce a few 'if' based on the CPU being in HV mode. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard

[PATCH v5 08/18] cxl: IRQ allocation for guests

2016-02-23 Thread Frederic Barrat
/deleting the context. Only the handler is different. Rework the code so that the range 0 is treated like the other ranges. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/irq.c | 78

[PATCH v5 04/18] cxl: Introduce implementation-specific API

2016-02-23 Thread Frederic Barrat
-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Acked-by: Ian Munsie --- drivers/misc/cxl/api.c | 8 +-- drivers/misc/cxl/context.c | 4 +- drivers/misc/cxl/cxl.h | 53 +++--- drivers/misc/cxl/fault.c | 6 +- drivers/misc/cxl/file.c| 15 ++--- drivers

[PATCH v5 05/18] cxl: Rename some bare-metal specific functions

2016-02-23 Thread Frederic Barrat
Rename a few functions, changing the 'cxl_' prefix to either 'cxl_pci_' or 'cxl_native_', to make clear that the implementation is bare-metal specific. Those functions will have an equivalent implementation for a guest in a later patch. Co-authored-by: Christophe Lo

[PATCH v5 03/18] cxl: Define process problem state area at attach time only

2016-02-23 Thread Frederic Barrat
state area. Remove calls to cxl_assign_psn_space during init. The function is already called on the attach paths. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/api.c | 11 ++- 1 file changed, 2 insertions(+), 9 dele

[PATCH v5 02/18] cxl: Move bare-metal specific code to specialized files

2016-02-23 Thread Frederic Barrat
me p2 registers not needed from a guest and the PCI interface. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Acked-by: Ian Munsie --- drivers/misc/cxl/cxl.h| 24 + drivers/misc/cxl/irq.c

[PATCH v5 00/18] cxl: Add support for powerVM guest​

2016-02-23 Thread Frederic Barrat
This series adds support for a cxl card in a powerVM guest. It requires firmware FW840 and an activation code for cxl (CAPI). Note that pHyp only claims support for cxlflash, and not generic support for FPGA CAPI accelerators. cxlflash uses the (slightly modified) Nallatech card, so the memcopy AF

Re: Fwd: [PATCH v4 10/18] cxl: New hcalls to support CAPI adapters

2016-02-22 Thread Frederic Barrat
+ +/** + * cxl_h_validate_adapter_image - Validate the base image in the coherent + *platoform facility. platoform->platform Irreverent to the Socratic amongst us. Hope we didn't hurt your feelings :-D Fred ___

Re: Fwd: [PATCH v4 02/18] cxl: Move bare-metal specific code to specialized files

2016-02-22 Thread Frederic Barrat
Le 21/02/2016 22:44, Manoj Kumar a écrit : Code specific to bare-metal is meant to be in native.c or pci.c only. It's basically anything which touches the capi p1 registers, I thought we were going to avoid using the CAPI term externally. Please update if submitting a v4 of this patch series.

Re: Fwd: [PATCH v4 12/18] cxl: Add guest-specific code

2016-02-22 Thread Frederic Barrat
2016 22:39:05 +0100 From: Frederic Barrat To: imun...@au1.ibm.com, michael.neul...@au1.ibm.com, m...@ellerman.id.au, linuxppc-dev@lists.ozlabs.org From: Christophe Lombard The new of.c file contains code to parse the device tree to find out about CAPI adapters and AFUs. guest.c implement

Re: Fwd: [PATCH v4 11/18] cxl: Separate bare-metal fields in adapter and AFU data structures

2016-02-22 Thread Frederic Barrat
Manoj, Point taken. Those constants are all defined in the architecture document (CAIA). We should probably use more macros there. However, since those were not introduced by this patch, I'll put it in my todo list for the future, but don't intend to address it in this patchset. Fred Le 2

Re: Fwd: [PATCH v4 08/18] cxl: IRQ allocation for guests

2016-02-22 Thread Frederic Barrat
Le 21/02/2016 23:30, Manoj Kumar a écrit : Subject: [PATCH v4 08/18] cxl: IRQ allocation for guests Date: Tue, 16 Feb 2016 22:39:01 +0100 From: Frederic Barrat To: imun...@au1.ibm.com, michael.neul...@au1.ibm.com, m...@ellerman.id.au, linuxppc-dev@lists.ozlabs.org The PSL interrupt is not

[PATCH v4 18/18] cxl: Add tracepoints around the CAPI hcall

2016-02-16 Thread Frederic Barrat
From: Christophe Lombard To ease debugging, add a few tracepoints around the CAPI hcalls. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Acked-by: Ian Munsie --- drivers/misc/cxl/hcalls.c | 9 +++ drivers/misc/cxl/trace.h | 193

[PATCH v4 17/18] cxl: Adapter failure handling

2016-02-16 Thread Frederic Barrat
found to be disabled, detach all existing contexts from it before issuing a AFU reset to re-enable it. Before detaching contexts, notify any kernel driver through the EEH callbacks of the AFU pci device. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe

[PATCH v4 14/18] cxl: Support to flash a new image on the adapter from a guest

2016-02-16 Thread Frederic Barrat
flashing is successful, an rtas call is made to update the device tree with the new properties values for the adapter and the AFU(s) Add a new char device for the adapter, so that the flash tool can access the card, even if there is no valid AFU on it. Co-authored-by: Frederic Barrat Signed-off-by

[PATCH v4 15/18] cxl: Parse device tree and create CAPI device(s) at boot

2016-02-16 Thread Frederic Barrat
Add new entry point to scan the device tree at boot in a guest, looking for CAPI devices. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Acked-by: Ian Munsie --- drivers/misc/cxl/base.c | 25 + 1 file changed, 25

[PATCH v4 16/18] cxl: Support the cxl kernel API from a guest

2016-02-16 Thread Frederic Barrat
: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/api.c| 63 ++- drivers/misc/cxl/cxl.h| 6 +- drivers/misc/cxl/guest.c | 26 drivers/misc/cxl/native.c | 50 +++ drivers/misc/cxl/pci.c

[PATCH v4 13/18] cxl: sysfs support for guests

2016-02-16 Thread Frederic Barrat
From: Christophe Lombard Filter out a few adapter parameters which don't make sense in a guest. Document the changes. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- Documentation/ABI/testing/sysfs-class-cxl | 8 +++ drivers/mis

[PATCH v4 12/18] cxl: Add guest-specific code

2016-02-16 Thread Frederic Barrat
ID assigned by the cxl driver from the process element ID visible to the user applications. In bare-metal, the 2 IDs match. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/Makefile | 1 + drivers/misc/cxl/api.c | 2

[PATCH v4 11/18] cxl: Separate bare-metal fields in adapter and AFU data structures

2016-02-16 Thread Frederic Barrat
From: Christophe Lombard Introduce sub-structures containing the bare-metal specific fields in the structures describing the adapter (struct cxl) and AFU (struct cxl_afu). Update all their references. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe

[PATCH v4 10/18] cxl: New hcalls to support CAPI adapters

2016-02-16 Thread Frederic Barrat
r image to the coherent platform facility, and for validating the entire image after the download. H_CONTROL_CA_FACILITY Allow the partition to manipulate or query certain coherent platform facility behaviors. Co-authored-by: Frederic Barrat Sig

[PATCH v4 09/18] cxl: New possible return value from hcall

2016-02-16 Thread Frederic Barrat
From: Christophe Lombard The hcalls introduced for CAPI use a possible new value: H_STATE (invalid state). Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Acked-by: Ian Munsie --- arch/powerpc/include/asm/hvcall.h | 1 + 1 file changed, 1

[PATCH v4 08/18] cxl: IRQ allocation for guests

2016-02-16 Thread Frederic Barrat
is different. Rework the code so that the range 0 is treated like the other ranges. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/irq.c | 78 +- 1 file changed, 64

[PATCH v4 06/18] cxl: Isolate a few bare-metal-specific calls

2016-02-16 Thread Frederic Barrat
A few functions are mostly common between bare-metal and guest and just need minor tuning. To avoid crowding the backend API, introduce a few 'if' based on the CPU being in HV mode. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard

[PATCH v4 07/18] cxl: Update cxl_irq() prototype

2016-02-16 Thread Frederic Barrat
The context parameter when calling cxl_irq() should be strongly typed. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Acked-by: Ian Munsie --- drivers/misc/cxl/cxl.h | 2 +- drivers/misc/cxl/irq.c | 3 +-- 2 files changed, 2 insertions

[PATCH v4 04/18] cxl: Introduce implementation-specific API

2016-02-16 Thread Frederic Barrat
-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Acked-by: Ian Munsie --- drivers/misc/cxl/api.c | 8 +-- drivers/misc/cxl/context.c | 4 +- drivers/misc/cxl/cxl.h | 53 +++--- drivers/misc/cxl/fault.c | 6 +- drivers/misc/cxl/file.c| 15 ++--- drivers

[PATCH v4 05/18] cxl: Rename some bare-metal specific functions

2016-02-16 Thread Frederic Barrat
Rename a few functions, changing the 'cxl_' prefix to either 'cxl_pci_' or 'cxl_native_', to make clear that the implementation is bare-metal specific. Those functions will have an equivalent implementation for a guest in a later patch. Co-authored-by: Christophe Lo

[PATCH v4 01/18] cxl: Move common code away from bare-metal-specific files

2016-02-16 Thread Frederic Barrat
From: Christophe Lombard Move around some functions which will be accessed from the bare-metal and guest environments. Code in native.c and pci.c is meant to be bare-metal specific. Other files contain code which may be shared with guests. Co-authored-by: Frederic Barrat Signed-off-by

[PATCH v4 03/18] cxl: Define process problem state area at attach time only

2016-02-16 Thread Frederic Barrat
state area. Remove calls to cxl_assign_psn_space during init. The function is already called on the attach paths. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/api.c | 11 ++- 1 file changed, 2 insertions(+), 9 dele

[PATCH v4 02/18] cxl: Move bare-metal specific code to specialized files

2016-02-16 Thread Frederic Barrat
me p2 registers not needed from a guest and the PCI interface. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard Acked-by: Ian Munsie --- drivers/misc/cxl/cxl.h| 24 + drivers/misc/cxl/irq.c

[PATCH v4 00/18] cxl: Add support for powerVM guest​

2016-02-16 Thread Frederic Barrat
patchset on 4.5-rc1 Frederic Barrat (18): cxl: Move common code away from bare-metal-specific files cxl: Move bare-metal specific code to specialized files cxl: Define process problem state area at attach time only cxl: Introduce implementation-specific API cxl: Rename some bare-metal speci

Re: [PATCH v3 03/18] cxl: Define process problem state area at attach time only

2016-02-11 Thread Frederic Barrat
Le 10/02/2016 07:32, Ian Munsie a écrit : It might be a reasonable idea to make cxl_psa_map fail outright if it is called on a context that has not been attached yet like we do in the user api, but I trust kernel devs to get this right more than userspace so I'm not too worried :) The net ef

Re: [PATCH v3 13/18] cxl: sysfs support for guests

2016-02-09 Thread Frederic Barrat
Le 08/02/2016 04:02, Stewart Smith a écrit : Frederic Barrat writes: --- a/Documentation/ABI/testing/sysfs-class-cxl +++ b/Documentation/ABI/testing/sysfs-class-cxl @@ -183,7 +183,7 @@ Description:read only Identifies the revision level of the PSL. Users

[PATCH v3 18/18] cxl: Add tracepoints around the CAPI hcall

2016-02-06 Thread Frederic Barrat
From: Christophe Lombard To ease debugging, add a few tracepoints around the CAPI hcalls. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/hcalls.c | 9 +++ drivers/misc/cxl/trace.h | 193

[PATCH v3 16/18] cxl: Support the cxl kernel API from a guest

2016-02-06 Thread Frederic Barrat
: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/api.c| 63 ++- drivers/misc/cxl/cxl.h| 6 +- drivers/misc/cxl/guest.c | 26 drivers/misc/cxl/native.c | 50 +++ drivers/misc/cxl/pci.c

[PATCH v3 17/18] cxl: Adapter failure handling

2016-02-06 Thread Frederic Barrat
found to be disabled, detach all existing contexts from it before issuing a AFU reset to re-enable it. Before detaching contexts, notify any kernel driver through the EEH callbacks of the AFU pci device. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe

[PATCH v3 15/18] cxl: Parse device tree and create CAPI device(s) at boot

2016-02-06 Thread Frederic Barrat
Add new entry point to scan the device tree at boot in a guest, looking for CAPI devices. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/base.c | 25 + 1 file changed, 25 insertions(+) diff

[PATCH v3 14/18] cxl: Support to flash a new image on the adapter from a guest

2016-02-06 Thread Frederic Barrat
flashing is successful, an rtas call is made to update the device tree with the new properties values for the adapter and the AFU(s) Add a new char device for the adapter, so that the flash tool can access the card, even if there is no valid AFU on it. Co-authored-by: Frederic Barrat Signed-off-by

[PATCH v3 12/18] cxl: Add guest-specific code

2016-02-06 Thread Frederic Barrat
ID assigned by the cxl driver from the process element ID visible to the user applications. In bare-metal, the 2 IDs match. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/Makefile | 1 + drivers/misc/cxl/api.c | 2

[PATCH v3 13/18] cxl: sysfs support for guests

2016-02-06 Thread Frederic Barrat
From: Christophe Lombard Filter out a few adapter parameters which don't make sense in a guest. Document the changes. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- Documentation/ABI/testing/sysfs-class-cxl | 8 +++ drivers/mis

[PATCH v3 11/18] cxl: Separate bare-metal fields in adapter and AFU data structures

2016-02-06 Thread Frederic Barrat
From: Christophe Lombard Introduce sub-structures containing the bare-metal specific fields in the structures describing the adapter (struct cxl) and AFU (struct cxl_afu). Update all their references. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe

[PATCH v3 10/18] cxl: New hcalls to support CAPI adapters

2016-02-06 Thread Frederic Barrat
r image to the coherent platform facility, and for validating the entire image after the download. H_CONTROL_CA_FACILITY Allow the partition to manipulate or query certain coherent platform facility behaviors. Co-authored-by: Frederic Barrat Sig

[PATCH v3 09/18] cxl: New possible return value from hcall

2016-02-06 Thread Frederic Barrat
From: Christophe Lombard The hcalls introduced for CAPI use a possible new value: H_STATE (invalid state). Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- arch/powerpc/include/asm/hvcall.h | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH v3 07/18] cxl: Update cxl_irq() prototype

2016-02-06 Thread Frederic Barrat
The context parameter when calling cxl_irq() should be strongly typed. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/cxl.h | 2 +- drivers/misc/cxl/irq.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff

[PATCH v3 08/18] cxl: IRQ allocation for guests

2016-02-06 Thread Frederic Barrat
is different. Rework the code so that the range 0 is treated like the other ranges. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/irq.c | 69 -- 1 file changed, 55

[PATCH v3 05/18] cxl: Rename some bare-metal specific functions

2016-02-06 Thread Frederic Barrat
Rename a few functions, mostly prefixed by 'cxl_', to make clear that the implementation is 'bare-metal' specific. Those functions will have an equivalent implementation for a guest in a later patch. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signe

[PATCH v3 06/18] cxl: Isolate a few bare-metal-specific calls

2016-02-06 Thread Frederic Barrat
A few functions are mostly common between bare-metal and guest and just need minor tuning. To avoid crowding the backend API, introduce a few 'if' based on the CPU being in HV mode. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --

[PATCH v3 04/18] cxl: Introduce implementation-specific API

2016-02-06 Thread Frederic Barrat
-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/api.c | 10 ++-- drivers/misc/cxl/context.c | 4 +- drivers/misc/cxl/cxl.h | 53 +++--- drivers/misc/cxl/fault.c | 6 +- drivers/misc/cxl/file.c| 15 ++--- drivers/misc/cxl/irq.c

[PATCH v3 03/18] cxl: Define process problem state area at attach time only

2016-02-06 Thread Frederic Barrat
area. Remove calls to cxl_assign_psn_space during init. The function is already called on the attach paths. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/api.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers

[PATCH v3 02/18] cxl: Move bare-metal specific code to specialized files

2016-02-06 Thread Frederic Barrat
me p2 registers not needed from a guest and the PCI interface. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/cxl.h| 24 + drivers/misc/cxl/irq.c| 205 +-- drivers/misc/cxl/m

[PATCH v3 01/18] cxl: Move common code away from bare-metal-specific files

2016-02-06 Thread Frederic Barrat
From: Christophe Lombard Move around some functions which will be accessed from the bare-metal and guest environments. Code in native.c and pci.c is meant to be bare-metal specific. Other files contain code which may be shared with guests. Co-authored-by: Frederic Barrat Signed-off-by

[PATCH v3 00/18] cxl: Add support for powerVM guest​

2016-02-06 Thread Frederic Barrat
s around CAPI hcalls for debugging v1->v2: (v1 was privately reviewed) - integrate comments from Michael Neuling and Ian Munsie - add another patch to the series: adapter failure handling - base patchset on 4.5-rc1 Frederic Barrat (18): cxl: Move common code away from bare-metal-specific f

[PATCH v2 15/16] cxl: Support the cxl kernel API from a guest

2016-01-30 Thread Frederic Barrat
-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/api.c| 63 ++- drivers/misc/cxl/cxl.h| 6 +- drivers/misc/cxl/guest.c | 26 drivers/misc/cxl/native.c | 50 +++ drivers/misc

[PATCH v2 14/16] cxl: Parse device tree and create CAPI device(s) at boot

2016-01-30 Thread Frederic Barrat
Add new entry point to scan the device tree at boot in a guest, looking for CAPI devices. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/base.c | 25 + 1 file changed, 25 insertions(+) diff

[PATCH v2 16/16] cxl: Adapter failure handling

2016-01-30 Thread Frederic Barrat
found to be disabled, detach all existing contexts from it before issuing a AFU reset to re-enable it. Before detaching contexts, notify any kernel driver through the EEH callbacks of the AFU pci device. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe

[PATCH v2 13/16] cxl: Support to flash a new image on the adapter from a guest

2016-01-30 Thread Frederic Barrat
flashing is successful, an rtas call is made to update the device tree with the new properties values for the adapter and the AFU(s) Add a new char device for the adapter, so that the flash tool can access the card, even if there is no valid AFU on it. Co-authored-by: Frederic Barrat Signed-off-by

[PATCH v2 11/16] cxl: Add guest-specific code

2016-01-30 Thread Frederic Barrat
ID assigned by the cxl driver from the process element ID visible to the user applications. In bare-metal, the 2 IDs match. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/Makefile | 1 + drivers/misc/cxl/api.c | 2

[PATCH v2 12/16] cxl: sysfs support for guests

2016-01-30 Thread Frederic Barrat
From: Christophe Lombard Filter out a few adapter parameters which don't make sense in a guest. Document the changes. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- Documentation/ABI/testing/sysfs-class-cxl | 8 +++ drivers/mis

[PATCH v2 10/16] cxl: Separate bare-metal fields in adapter and AFU data structures

2016-01-30 Thread Frederic Barrat
From: Christophe Lombard Introduce sub-structures containing the bare-metal specific fields in the structures describing the adapter (struct cxl) and AFU (struct cxl_afu). Update all their references. Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe

[PATCH v2 09/16] cxl: New hcalls to support CAPI adapters

2016-01-30 Thread Frederic Barrat
r image to the coherent platform facility, and for validating the entire image after the download. H_CONTROL_CA_FACILITY Allow the partition to manipulate or query certain coherent platform facility behaviors. Co-authored-by: Frederic Barrat Sig

[PATCH v2 08/16] cxl: New possible return value from hcall

2016-01-30 Thread Frederic Barrat
From: Christophe Lombard The hcalls introduced for CAPI use a possible new value: H_STATE (invalid state). Co-authored-by: Frederic Barrat Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- arch/powerpc/include/asm/hvcall.h | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH v2 06/16] cxl: Update cxl_irq() prototype

2016-01-30 Thread Frederic Barrat
The context parameter when calling cxl_irq() should be strongly typed. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/cxl.h | 2 +- drivers/misc/cxl/irq.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff

[PATCH v2 07/16] cxl: IRQ allocation for guests

2016-01-30 Thread Frederic Barrat
is different. Rework the code so that the range 0 is treated like the other ranges. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/irq.c | 69 -- 1 file changed, 55

[PATCH v2 04/16] cxl: Rename some bare-metal specific functions

2016-01-30 Thread Frederic Barrat
Rename a few functions, mostly prefixed by 'cxl_', to make clear that the implementation is 'bare-metal' specific. Those functions will have an equivalent implementation for a guest in a later patch. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signe

[PATCH v2 05/16] cxl: Isolate a few bare-metal-specific calls

2016-01-30 Thread Frederic Barrat
A few functions are mostly common between bare-metal and guest and just need minor tuning. To avoid crowding the backend API, introduce a few 'if' based on the CPU being in HV mode. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --

[PATCH v2 03/16] cxl: Introduce implementation-specific API

2016-01-30 Thread Frederic Barrat
: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/api.c | 10 ++-- drivers/misc/cxl/context.c | 4 +- drivers/misc/cxl/cxl.h | 53 +++--- drivers/misc/cxl/fault.c | 6 +- drivers/misc/cxl/file.c| 15 ++--- drivers/misc/cxl/irq.c | 19

[PATCH v2 01/16] cxl: Move common code away from bare-metal-specific files

2016-01-30 Thread Frederic Barrat
From: Christophe Lombard Move around some functions which will be accessed from the bare-metal and guest environments. Code in native.c and pci.c is meant to be bare-metal specific. Other files contain code which may be shared with guests. Co-authored-by: Frederic Barrat Signed-off-by

[PATCH v2 00/16] cxl: Add support for powerVM guest

2016-01-30 Thread Frederic Barrat
kernel API, flash of the adapter and failure handling Changelog: v1->v2: (v1 was privately reviewed) - integrate comments from Michael Neuling and Ian Munsie - add another patch to the series: adapter failure handling - base patchset on 4.5-rc1 Frederic Barrat (16): cxl: Move common code a

[PATCH v2 02/16] cxl: Move bare-metal specific code to specialized files

2016-01-30 Thread Frederic Barrat
me p2 registers not needed from a guest and the PCI interface. Co-authored-by: Christophe Lombard Signed-off-by: Frederic Barrat Signed-off-by: Christophe Lombard --- drivers/misc/cxl/cxl.h| 24 + drivers/misc/cxl/irq.c| 205 +-- drivers/misc/cxl/m

<    2   3   4   5   6   7   8   >