Re: IMA truncate

2014-05-06 Thread Javier González
running some performance tests to calculate the overhead of attacking an operation here, so I don’t have data yet. Best, -/-- Javier González IT University of Copenhagen Rued Langgaards Vej 7, 2300 København S, Danmark Office: 4D23 http

[RFC PATCH 1/3] Add generic TrustZone driver

2014-11-28 Thread Javier González
From: Javier Gonzalez jav...@javigon.com This commit introduces a generic TrustZone driver to the Linux Kernel. Since there is no place to add drivers related to secure processors, a new subsystem for secure hardware in general (drivers/sechw) is also introduced. Today, TrustZone solutions are

[RFC PATCH 0/3] Generic TrustZone Driver in Linux Kernel

2014-11-28 Thread Javier González
Hi all, This set of patches is a first iteration to introduce a generic TrustZone driver to the Linux Kernel. Since there is no place to add drivers related to secure processors, a new subsystem for secure hardware in general (drivers/sechw) is also introduced. TPM is a good candidate to me moved

[RFC PATCH 2/3] Open Virtualization driver

2014-11-28 Thread Javier González
From: Javier Gonzalez jav...@javigon.com Sierraware's Open Virtualization driver. It allows to communicate to Open Virtualization's TEE to execute sensitive tasks in the secure world. This patch is based on SierraWare's Open Virtualization kernel driver and header files. This code is not

Re: [RFC PATCH 1/3] Add generic TrustZone driver

2014-11-28 Thread Javier González
Hi, On 28 Nov 2014, at 20:15, Greg KH gre...@linuxfoundation.org wrote: On Fri, Nov 28, 2014 at 04:03:34PM +0100, Javier González wrote: From: Javier Gonzalez jav...@javigon.com Any reason you sent this twice? My mistake, sorry. And your code is full of FIXMEs, which implies that you

Re: [RFC PATCH 1/3] Add generic TrustZone driver

2014-11-28 Thread Javier González
Hi, On 28 Nov 2014, at 23:16, Greg KH gre...@linuxfoundation.org wrote: On Fri, Nov 28, 2014 at 10:09:55PM +0100, Javier González wrote: Thanks for your comments. I hope that you find the time to look deeper in the code. With my workload, I don't have time to look at anything that people

Re: [RFC PATCH 0/3] Generic TrustZone Driver in Linux Kernel

2014-11-30 Thread Javier González
Jason, On 29 Nov 2014, at 19:18, Jason Cooper ja...@lakedaemon.net wrote: Javier, On Fri, Nov 28, 2014 at 04:03:33PM +0100, Javier González wrote: Hi all, This set of patches is a first iteration to introduce a generic TrustZone driver to the Linux Kernel. Since there is no place to add

Re: [RFC PATCH 2/2] tee: add OP-TEE driver

2015-04-19 Thread Javier González
On 18 Apr 2015, at 21:01, Arnd Bergmann a...@arndb.de wrote: On Saturday 18 April 2015 20:49:03 Greg Kroah-Hartman wrote: On Sat, Apr 18, 2015 at 11:36:53AM +0200, Javier González wrote: Hi, A: No. Q: Should I include quotations after my reply? http://daringfireball.net/2007/07/on_top

Re: [RFC PATCH 2/2] tee: add OP-TEE driver

2015-04-20 Thread Javier González
On 19 Apr 2015, at 21:47, Arnd Bergmann a...@arndb.de wrote: On Sunday 19 April 2015 13:17:20 Javier González wrote: Only providing user space support would defeat one of the main purposes of the driver. We could better organize the patches and divide them into user space support

Re: [PATCH 5/5 v2] nvme: LightNVM support

2015-04-16 Thread Javier González
Hi, On 16 Apr 2015, at 16:55, Keith Busch keith.bu...@intel.com wrote: On Wed, 15 Apr 2015, Matias Bjørling wrote: @@ -2316,7 +2686,9 @@ static int nvme_dev_add(struct nvme_dev *dev) struct nvme_id_ctrl *ctrl; void *mem; dma_addr_t dma_addr; -int shift =

Re: [RFC PATCH 2/2] tee: add OP-TEE driver

2015-04-18 Thread Javier González
Hi, We have discussed and implemented an in-kernel interface for the driver. However, we need to agree on that interface with the kernel submodules that can be interested in using it (e.g., IMA, keyring). We though it was easier to have a framework in place before taking this space. This makes

Re: [PATCH V3 2/2] tee: add OP-TEE driver

2015-05-20 Thread Javier González
Hi, Just for completeness, On 20 May 2015, at 14:16, Jens Wiklander jens.wiklan...@linaro.org wrote: Hi, On Mon, May 18, 2015 at 02:18:50PM +0100, Mark Rutland wrote: Hi, On Fri, May 15, 2015 at 07:34:27AM +0100, Jens Wiklander wrote: […] I'm also very concerned that the

[PATCH 2/2] lightnvm: manage open and closed blocks separately

2016-01-07 Thread Javier González
) consecutively, we introduce lockless get_/put_block primitives so that the open and close list locks and future common logic is handled within the nvm_lun lock. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 14 +++ drivers/lightnvm/gennvm.

[PATCH 1/2] lightnvm: let rrpc block know its rrpc lun

2016-01-07 Thread Javier González
Currently a rrpc block only points to the nvm_lun it belongs to. Maintaining a reference to the rrpc lun allows to manage rrpc specific behavior between an rrpc block and rrpc lun. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/rrpc.c | 1 + drivers/lightnvm/rrpc

[PATCH] lightnvm: manage open and closed blocks separately

2016-01-07 Thread Javier González
) consecutively, we introduce lockless get_/put_block primitives so that the open and close list locks and future common logic is handled within the nvm_lun lock. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 14 +++ drivers/lightnvm/gennvm.

Re: [PATCH v10 0/4] generic TEE subsystem

2016-06-06 Thread Javier González
Hi, > On 01 Jun 2016, at 14:41, Jens Wiklander wrote: > > [TL;DR; This patch set needs more review, if you're using OP-TEE please > help reviewing.] > > This patch set introduces a generic TEE subsystem. The TEE subsystem will > contain drivers for various TEE

Re: [PATCH v10 2/4] tee: generic TEE subsystem

2016-06-06 Thread Javier González
iver" by among others > Jean-michel DELORME<jean-michel.delo...@st.com> and > Emmanuel MICHEL <emmanuel.mic...@st.com> > * "Generic TrustZone Driver" by Javier González <jav...@javigon.com> > > Acked-by: Andreas Dannenberg <dannenb...@ti.com> &

Re: [PATCH v10 2/4] tee: generic TEE subsystem

2016-06-06 Thread Javier González
iver" by among others > Jean-michel DELORME<jean-michel.delo...@st.com> and > Emmanuel MICHEL <emmanuel.mic...@st.com> > * "Generic TrustZone Driver" by Javier González <jav...@javigon.com> > > Acked-by: Andreas Dannenberg <dannenb...@ti.com> &

Re: [PATCH v10 2/4] tee: generic TEE subsystem

2016-06-06 Thread Javier González
iver" by among others > Jean-michel DELORME<jean-michel.delo...@st.com> and > Emmanuel MICHEL <emmanuel.mic...@st.com> > * "Generic TrustZone Driver" by Javier González <jav...@javigon.com> > > Acked-by: Andreas Dannenberg <dannenb...@ti.com> &

Re: [PATCH v10 3/4] tee: add OP-TEE driver

2016-06-06 Thread Javier González
> > On 01 Jun 2016, at 14:41, Jens Wiklander wrote: > > Adds a OP-TEE driver which also can be compiled as a loadable module. > > * Targets ARM and ARM64 > * Supports using reserved memory from OP-TEE as shared memory > * Probes OP-TEE version using SMCs > * Accepts

Re: [RFC 2/4] lightnvm: add write buffering for rrpc

2016-02-07 Thread Javier González
Hi Matias, Thanks for the quick reply and revision. I’ll add the changes and merge the other patches for the next version. I have a couple of remarks inline. > On 05 Feb 2016, at 15:52, Matias Bjørling <m...@lightnvm.io> wrote: > > On 02/04/2016 02:08 PM, Javier González

[PATCH] lightnvm: calc right rblk when having several luns

2016-02-10 Thread Javier González
When getting a new block from the media manager, calculate the right rblk, considering that the pool of flash blocks has been divided among the different luns exposed by the underlying device. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/rrpc.c | 2 +- d

[RFC 1/4] lightnvm: precalculate controller write boundaries

2016-02-04 Thread Javier González
to simplify calculations, and avoid repeating them in a per-I/O basis, this patch pre-calculates write granurality values as part of the device characteristics in the bring up. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/rrpc.c | 4 drivers/lightnvm/rrpc

[RFC 0/4] lightnvm: add write buffering to rrpc

2016-02-04 Thread Javier González
feedback on the architecture, design and implementation are more than welcome. Thanks, Javier [1] https://github.com/OpenChannelSSD/qemu-nvme Javier González (4): lightnvm: precalculate controller write boundaries lightnvm: add write buffering for rrpc lightnvm: read from rrpc write buffer

[RFC 4/4] lightnvm: add debug info for rrpc target

2016-02-04 Thread Javier González
Add a target to print its debug information when lightnvm debug information is printed trough configure_debug. In rrpc, we add statistics on inflight reads and writes, as well as submitted and synced writes. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c

[RFC 2/4] lightnvm: add write buffering for rrpc

2016-02-04 Thread Javier González
to, for example, only flush at the maximum supported (64 pages in nvme). Apart from enabling the use of rrpc in real hardware, this buffering strategy will be used for recovery; if a block becomes bad, a new block can be allocated to persist valid data. Signed-off-by: Javier González <

[RFC 3/4] lightnvm: read from rrpc write buffer if possible

2016-02-04 Thread Javier González
in the bio, a new bio is submitted to the media to retrieve the necessary pages. The original bio is updated accordingly. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/rrpc.c | 451 --- include/linux/lightnvm.h | 1 + 2 fi

[PATCH] lightnvm: use lun block id when using several LUNs

2016-02-11 Thread Javier González
In rrpc, some calculations using block ids assume only one LUN being used. This is a problem when an Open-Channel SSD with multiple LUNs is used. This patch modifies this calculations. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/rrpc.c | 5 +++-- drivers/li

[PATCH 1/2] lightnvm: warn if irqs are disabled in lock laddr

2016-02-01 Thread Javier González
Add a warning if irqs are disabled when locking a new address in rrpc. The typical path to a new request does not disable irqs, but this is not guaranteed in the future. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/rrpc.h | 2 ++ 1 file changed, 2 insertions(+)

[PATCH 2/2] lightnvm: fix request intersection locking in rrpc

2016-02-01 Thread Javier González
one address at the time - is running. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/rrpc.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/lightnvm/rrpc.h b/drivers/lightnvm/rrpc.h index c27283a..3989d65 100644 --- a/drivers/li

[PATCH] lightnvm: invalidate addresses on multipage fail

2016-02-01 Thread Javier González
because when a mapping fails something bad has happened already. Still, invalidating pages in the failed bio will help GC. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/rrpc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/lightnvm/rrpc.c b/drivers/li

Re: [PATCH] lightnvm: invalidate addresses on multipage fail

2016-02-03 Thread Javier González
> > On 03 Feb 2016, at 09:10, Matias Bjørling <m...@lightnvm.io> wrote: > > On 02/01/2016 02:10 PM, Javier González wrote: >> If a page mapping fails when mapping several pages in a single write bio >> request, make sure that already mapped pages are invalidated.

[PATCH] lightnvm: update closed list out of interrupt context

2016-01-25 Thread Javier González
context. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/rrpc.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c index d8c7595..e2710da 100644 --- a/drivers/lightnvm/rrpc.c

[PATCH] lightnvm: generalize rrpc ppa calculations

2016-02-17 Thread Javier González
/qemu-nvme Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/rrpc.c | 45 - drivers/lightnvm/rrpc.h | 9 + 2 files changed, 37 insertions(+), 17 deletions(-) diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/

[PATCH] lightnvm: do not reserve lun on l2p loading

2016-02-17 Thread Javier González
c87ea75 Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/gennvm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/lightnvm/gennvm.c b/drivers/lightnvm/gennvm.c index b97801c..42c1c2a 100644 --- a/drivers/lightnvm/gennvm.c +++ b/drivers/lightnvm/ge

Re: [PATCH v4 1/2] lightnvm: add non-continuous lun target creation support

2016-02-18 Thread Javier González
> On 16 Feb 2016, at 12:28, Wenwei Tao wrote: > > When create a target, we specify the begin lunid and > the end lunid, and get the corresponding continuous > luns from media manager, if one of the luns is not free, > we failed to create the target, even if the device's >

[PATCH V2] lightnvm: generalize rrpc ppa calculations

2016-02-18 Thread Javier González
From: Javier González <j...@lightnvm.io> In rrpc, some calculations assume a certain configuration (e.g., 1 LUN, 1 sector per page). The reason behind this was that we have used a simple configuration in QEMU to test core features generally in LightNVM, and concretely in rrpc. This patch r

Re: [PATCH v4 1/2] lightnvm: add non-continuous lun target creation support

2016-03-21 Thread Javier González
Hi Wenwei, > On 19 Mar 2016, at 13:52, Wenwei Tao wrote: > > Hi Javier > > Thanks for the comment. > I've been busy recently, so this letter is kind of late, hope you don't mind. > I use the qemu-nvme you mentioned and configure the nvme device driver > follow the

[PATCH] lightnvm: do not load L2P table if not supported

2016-03-02 Thread Javier González
implementing the full host-based mode, do not assume that the L2P table must be loaded on the generic media manager; check device properties loaded on the identify command instead. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/gennvm.c | 3 +++ 1 file changed, 3 inse

[PATCH] lightnvm: do not assume sequential lun alloc.

2016-04-29 Thread Javier González
manner to, for example, take advantage of devide parallelism. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/rrpc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c index ffcfee6..48862ead

[PATCH 1/3] lightnvm: do not free unused metadata on rrpc

2016-04-27 Thread Javier González
rrpc does not save any metadata on a given request. Thus, do not attempt to free the metadata dma region. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/rrpc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c

[PATCH 2/3] lightnvm: enable metadata to be sent to device

2016-04-27 Thread Javier González
-by: Javier González <jav...@cnexlabs.com> --- drivers/nvme/host/lightnvm.c | 1 + include/linux/lightnvm.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c index b1a0d8b..92da28d 100644 --- a/drivers/nvm

[PATCH 3/3] lightnvm: rename dma helper functions

2016-04-27 Thread Javier González
Until now, the dma pool have been exclusively used to allocate the ppa list being sent to the device. In pblk (upcoming), we use these pools to allocate metadata too. Thus, we generalize the names of some variables on the dma helper functions to make the code more readable. Signed-off-by: Javier

Re: [PATCH 3/3] lightnvm: rename dma helper functions

2016-04-27 Thread Javier González
>> if (dev->ops->max_phys_sect > 1) { >> -dev->ppalist_pool = dev->ops->create_dma_pool(dev, "ppalist"); >> -if (!dev->ppalist_pool) { >> +dev->dma_page_pool = dev->ops->create_dma_pool(dev, "ppalist"); > > rename to dmapool or something similar? > >> +if

[PATCH 2/2] lightnvm: enable metadata to be sent to device

2016-04-26 Thread Javier González
-by: Javier González <jav...@cnexlabs.com> --- drivers/nvme/host/lightnvm.c | 1 + include/linux/lightnvm.h | 8 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c index 4956de3..7886c2c 100644 --- a/driver

[PATCH] lightnvm: introduce ADDR_PADDED to signal padding

2016-04-26 Thread Javier González
When REQ_FUA or REQ_FLUSH are sent from the block layer, a target might need to pad some sectors in order to meet device constrains. ADDR_PADDED allows to signal that such sector has been padded. It can be used to mark both lbas and ppas. Signed-off-by: Javier González <jav...@cnexlabs.

[PATCH 1/2] lightnvm: free metadata dma on rrpc when needed

2016-04-26 Thread Javier González
rrpc has assumed that medatada is always sent as a dma buffer to the device. When this is not true, do not attempt to free a non-allocated dma region. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/rrpc.c | 8 +--- 1 file changed, 5 insertions(+), 3 del

[PATCH] lightnvm: rename dma helper functions (UPS)

2016-04-28 Thread Javier González
Until now, the dma pool have been exclusively used to allocate the ppa list being sent to the device. In pblk (upcoming), we use these pools to allocate metadata too. Thus, we generalize the names of some variables on the dma helper functions to make the code more readable. Signed-off-by: Javier

[PATCH] lightnvm: clear reserved bit on generic addr

2016-05-11 Thread Javier González
When an address is converted from device to generic mode, the reserved bit needs to be cleared in order to signal that the address points to a flash block, not to a cacheline on the write buffer. Signed-off-by: Javier González <jav...@cnexlabs.com> --- include/linux/lightnvm.h | 3 +++

Re: [PATCH 1/4] lightnvm: add sync and close block I/O types

2016-05-05 Thread Javier González
> On 05 May 2016, at 11:21, Matias Bjørling <m...@lightnvm.io> wrote: > > On 05/04/2016 05:31 PM, Javier González wrote: >> Within a target, I/O requests stem from different paths, which might vary >> in terms of the data structures being allocated, context, et

Re: [PATCH 4/4] lightnvm: Precalculate max/min sectors per req.

2016-05-05 Thread Javier González
> On 05 May 2016, at 11:54, Matias Bjørling <m...@lightnvm.io> wrote: > >> On 05/04/2016 05:31 PM, Javier González wrote: >> Add two precalculated values to nvm_rq: (i) maximum number of sectors >> per general request; and (ii) minimum number of sectors per write

[PATCH 3/4] lightnvm: eliminate redundant variable

2016-05-04 Thread Javier González
Eliminate redundant variable that has been superseded by the new variables emerging from the Open-Channel SSD spec. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/rrpc.c | 2 +- include/linux/lightnvm.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-)

[PATCH 4/4] lightnvm: Precalculate max/min sectors per req.

2016-05-04 Thread Javier González
Add two precalculated values to nvm_rq: (i) maximum number of sectors per general request; and (ii) minimum number of sectors per write request. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 3 +++ include/linux/lightnvm.h | 4 +++- 2 files chan

[PATCH 2/4] lightnvm: rename nr_pages to nr_ppas on nvm_rq

2016-05-04 Thread Javier González
The number of ppas contained on a request is not necessarily the number of pages that it maps to neither on the target nor on the device side. In order to avoid confusion, rename nr_pages to nr_ppas since it is what the variable actually contains. Signed-off-by: Javier González <

[PATCH 1/4] lightnvm: add sync and close block I/O types

2016-05-04 Thread Javier González
indicates that the I/O is synchronous; and (ii) NVM_IOTYPE_CLOSE_BLK, which indicates that the I/O closes the block to which all the ppas on the request belong to. Signed-off-by: Javier González <jav...@cnexlabs.com> --- include/linux/lightnvm.h | 2 ++ 1 file changed, 2 insertions(+) diff

[PATCH] lightnvm: expose mark_blk through core

2016-05-10 Thread Javier González
Expose mark_blk through the core LightNVM operations to hid the media manager, as we do for the rest of the block operations. This is necessary for targets to mark a growing bad block as bad before returning it to the media manager. Signed-off-by: Javier González <jav...@cnexlabs.

Re: [PATCH] lightnvm: pass dma address to hardware rather than pointer

2016-05-03 Thread Javier González
> > On 03 May 2016, at 17:22, Arnd Bergmann wrote: > > A recent change to lightnvm added code to pass a kernel pointer > to the hardware, which gcc complained about: > > drivers/nvme/host/lightnvm.c: In function 'nvme_nvm_rqtocmd': > drivers/nvme/host/lightnvm.c:472:32: error:

[PATCH 3/3] lightnvm: Add CRC read error

2017-01-26 Thread Javier González
Let the host differentiate between a read error and a CRC check error on the device side. Signed-off-by: Javier González <jav...@cnexlabs.com> --- include/linux/lightnvm.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h index 1

[PATCH 2/3] lightnvm: allow targets to use sysfs

2017-01-26 Thread Javier González
, the kboject has not been created yet. This patch adds a target function to let targets initialize their own kboject as a child of the disk kobject. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 9 + include/linux/lightnvm.h | 5 + 2 files chang

[PATCH] lightnvm: free properly on target creation error

2017-01-26 Thread Javier González
Fix a memory leak when target creation fails. More specifically, free the entire device structure given to the target (tgt_dev). Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/li

[PATCH 1/3] lightnvm: submit erases using the I/O path

2017-01-26 Thread Javier González
. Also, adapt rrpc to use the new erase path. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 29 drivers/lightnvm/rrpc.c | 64 ++-- drivers/nvme/host/lightnvm.

[PATCH 1/3] lightnvm: submit erases using the I/O path

2017-02-24 Thread Javier González
it internally. Also, adapt rrpc to use the new erase path. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/lightnvm/core.c | 54 +++- drivers/lightnvm/rrpc.c | 3 +-- drive

[PATCH 2/3] lightnvm: rename scrambler controller hint

2017-02-24 Thread Javier González
According to the OCSSD 1.2 specification, the 0x200 hint enables the media scrambler for the read/write opcode, providing that the controller has been correctly configured by the firmware. Rename the macro to represent this meaning. Signed-off-by: Javier González <jav...@cnexlabs.com> Sign

[PATCH 3/3] lightnvm: free reverse device map

2017-02-24 Thread Javier González
Free the reverse mapping table correctly on target tear down Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c index c

[RFC PATCH v2] lightnvm: pblk

2017-02-25 Thread Javier González
interface to query pblk's operation and statistics. * Implement a user - GC I/O rate-limiter * Various bug fixes Javier González (1): lightnvm: physical block device (pblk) target Documentation/lightnvm/pblk.txt | 21 + drivers/lightnvm/Kconfig | 18 + drivers/lightnvm/Makefile

[PATCH 3/7] lightnvm: manage block list on LUN owner

2016-10-27 Thread Javier González
, since LUNs are managed strictly by the target, there is no need for the media manager to reserve GC blocks. As a FTL, rrpc owns exclusively its LUNs. Therefore, adapt rrpc to use the new management interface. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c

[PATCH 2/7] lightnvm: do not decide on device blocks

2016-10-27 Thread Javier González
Device blocks should be marked by the device and considered as bad blocks by the media manager. Thus, do not make assumptions on which blocks are going to be used by the device. In doing so we might lose valid blocks from the free list. Signed-off-by: Javier González <jav...@cnexlabs.

[PATCH 1/7] lightnvm: enable to send hint to erase command

2016-10-27 Thread Javier González
Erases might be subject to host hints. An example is multi-plane programming to erase blocks in parallel. Enable targets to specify this hints. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 9 ++--- drivers/lightnvm/gennvm.c| 5 ++--- d

[PATCH 6/7] lightnvm: add ECC error codes

2016-10-27 Thread Javier González
Add ECC error codes to enable the appropriate handling in the target. Signed-off-by: Javier González <jav...@cnexlabs.com> --- include/linux/lightnvm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h index e3ccaff..33643ae

[PATCH 4/7] lightnvm: drop reserve and release LUN callbacks

2016-10-27 Thread Javier González
which target exclusively owns each target and can therefore allocate and free all the necessary structures before initializing the target. Not exclusively owned LUNs belong to the media manager in any case. Adapt rrpc to not use the reserve_lun/release_lun callback functions. Signed-off-by: Javier

[PATCH 7/7] lightnvm: rrpc: split bios of size > 256kb

2016-10-27 Thread Javier González
rrpc cannot handle bios of size > 256kb due to NVME's 64 bit completion bitmap. If a larger bio comes, split it explicitly. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/rrpc.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/lightnvm/rrpc.c

[PATCH 5/7] lightnvm: export set bad block table

2016-10-27 Thread Javier González
block management to rrpc. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 27 +++ drivers/lightnvm/gennvm.c | 25 + drivers/lightnvm/rrpc.c | 34 +- drivers/lightnvm/sysblk.

[PATCH 2/7] lightnvm: do not decide on device blocks

2016-10-27 Thread Javier González
Device blocks should be marked by the device and considered as bad blocks by the media manager. Thus, do not make assumptions on which blocks are going to be used by the device. In doing so we might lose valid blocks from the free list. Signed-off-by: Javier González <jav...@cnexlabs.

[PATCH 3/7] lightnvm: manage block list on LUN owner

2016-10-27 Thread Javier González
From: Javier González <jav...@javigon.com> LUNs can be exclusively owned by a target through the media manager's reserve_lun function. In this case, the target should implement its own provisioning and manage internally the free/used/bad block list. This patch introduces a LUN mana

[PATCH 6/7] lightnvm: add ECC error codes

2016-10-27 Thread Javier González
Add ECC error codes to enable the appropriate handling in the target. Signed-off-by: Javier González <jav...@cnexlabs.com> --- include/linux/lightnvm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h index e3ccaff..33643ae

[PATCH 7/7] lightnvm: rrpc: split bios of size > 256kb

2016-10-27 Thread Javier González
rrpc cannot handle bios of size > 256kb due to NVMe using a 64 bit bitmap to signal I/O completion. If a larger bio comes, split it explicitly. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/rrpc.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

[PATCH 0/7] LightNVM patchset V2

2016-10-27 Thread Javier González
V2: Rebase patches on Matias' for-next Javier González (7): lightnvm: enable to send hint to erase command lightnvm: do not decide on device blocks lightnvm: manage block list on LUN owner lightnvm: drop reserve and release LUN callbacks lightnvm: export set bad block table lightnvm

[PATCH 1/7] lightnvm: enable to send hint to erase command

2016-10-27 Thread Javier González
Erases might be subject to host hints. An example is multi-plane programming to erase blocks in parallel. Enable targets to specify this hints. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 9 ++--- drivers/lightnvm/gennvm.c| 5 ++--- d

[PATCH 5/7] lightnvm: export set bad block table

2016-10-27 Thread Javier González
block management to rrpc. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 27 +++ drivers/lightnvm/gennvm.c | 25 + drivers/lightnvm/rrpc.c | 34 +- drivers/lightnvm/sysblk.

[PATCH 4/7] lightnvm: drop reserve and release LUN callbacks

2016-10-27 Thread Javier González
From: Javier González <jav...@javigon.com> On target initialization, targets use callbacks to the media manager to configure the LUNs they use. In order to simplify the flow, drop this callbacks and manage everything internally on the media manager. By making use of the newly introdu

Re: [PATCH 0/8] lightnvm: simplify media manager V2

2016-11-23 Thread Javier González
> On 23 Nov 2016, at 13.06, Matias Bjørling <m...@lightnvm.io> wrote: > > On 11/21/2016 01:10 PM, Javier González wrote: >> V2: >> - Fix 2 bad memory free on error rrpc init error handling. Reported by >>kbuild. >> >> This patchset simplifies

[PATCH 16/20] lightnvm: eliminate nvm_block abstraction on mm

2016-11-18 Thread Javier González
the nvm_block abstraction and moves block management to the target logic. The rrpc target is transformed. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 10 +- drivers/lightnvm/gennvm.c | 205 +--- drivers/lightnvm/

[PATCH 17/20] lightnvm: eliminate nvm_lun abstraction in mm

2016-11-18 Thread Javier González
the path for a partition manager to sit directly underneath LightNVM targets. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 14 +- drivers/lightnvm/gennvm.c| 336 ++- drivers/lightnvm/gennvm.h

[PATCH 20/20] lightnvm: use target nvm on target-specific ops.

2016-11-18 Thread Javier González
On target-specific operations pass on nvm_tgt_dev instead of the generic nvm device. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 15 ++- drivers/lightnvm/rrpc.c | 14 +++--- drivers/lightnvm/rrpc.h | 2 +- include/linux/ligh

[PATCH 15/20] lightnvm: remove debug lun statistics from gennvm

2016-11-18 Thread Javier González
Since LUNs are managed internally on targets, the media manager has no access to the free LUN lists. Thus, debug functions that show LUN information on the device should not be implemented on the media manager, but rather on the target in itself. Signed-off-by: Javier González <

[PATCH 18/20] lightnvm: introduce helpers for generic ops in rrpc

2016-11-18 Thread Javier González
Avoid calling media manager and device-specific operations directly from rrpc. Create helper functions on lightnvm's core instead. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 22 ++ drivers/lightnvm/gennvm.c | 2 -- drivers/li

[PATCH 02/20] lightnvm: do not protect block 0

2016-11-18 Thread Javier González
From: Javier González <j...@lightnvm.io> Device blocks should be marked by the device and considered as bad blocks by the media manager. Thus, do not make assumptions on which blocks are going to be used by the device. In doing so we might lose valid blocks from the free list. Sign

[PATCH 01/20] lightnvm: enable to send hint to erase command

2016-11-18 Thread Javier González
From: Javier González <j...@lightnvm.io> Erases might be subject to host hints. An example is multi-plane programming to erase blocks in parallel. Enable targets to specify this hints. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <m

[PATCH 03/20] lightnvm: export set bad block table

2016-11-18 Thread Javier González
From: Javier González <j...@lightnvm.io> Bad blocks should be managed by block owners. This would be either targets for data blocks or sysblk for system blocks. In order to support this, export two functions: One to mark a block as an specific type (e.g., bad block) and another to update t

[PATCH 07/20] lightnvm: cleanup unused target operations

2016-11-18 Thread Javier González
Cleanup definition leftovers from old gennvm interface Signed-off-by: Javier González <jav...@cnexlabs.com> --- include/linux/lightnvm.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h index 6b26a32..e598308 100644 --- a/include

[PATCH 06/20] lightnvm: remove sysfs configuration interface

2016-11-18 Thread Javier González
LightNVM used to be managed and configured through sysfs. Since the introduction of management ioctls this interface is redundant and outdated. Get rid of it. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c

[PATCH 19/20] lightnvm: introduce max_phys_sects helper function

2016-11-18 Thread Javier González
Target devices do not have access to the device driver operations. Introduce a helper function that exposes the max. number of physical sectors supported by the underlying device. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 8 include

[PATCH 14/20] lightnvm: remove get_lun operation on gennvm

2016-11-18 Thread Javier González
Since LUNs are managed internally on the target, there is no need for the media manager to implement a get_lun operation. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/gennvm.c | 13 + drivers/lightnvm/rrpc.c | 23 +++ include

[PATCH 00/20] lightnvm: simplify media manager

2016-11-18 Thread Javier González
. Patches apply to you for-4.10/core Javier González (20): lightnvm: enable to send hint to erase command lightnvm: do not protect block 0 lightnvm: export set bad block table lightnvm: add ECC error codes lightnvm: rrpc: split bios of size > 256kb lightnvm: remove sysfs configurat

[PATCH 05/20] lightnvm: rrpc: split bios of size > 256kb

2016-11-18 Thread Javier González
From: Javier González <j...@lightnvm.io> rrpc cannot handle bios of size > 256kb due to NVMe using a 64 bit bitmap to signal I/O completion. If a larger bio comes, split it explicitly. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling &l

[PATCH 13/20] lightnvm: move block provisioning to targets

2016-11-18 Thread Javier González
from the media manager. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 95 ++--- drivers/lightnvm/gennvm.c| 145 +++- drivers/lightnvm/rrpc.c | 196 --- d

[PATCH 11/20] lightnvm: remove gen_lun abstraction

2016-11-18 Thread Javier González
and operations. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/gennvm.c | 85 +++ drivers/lightnvm/gennvm.h | 16 + include/linux/lightnvm.h | 10 ++ 3 files changed, 53 insertions(+), 58 deletions(-) diff

[PATCH 09/20] lightnvm: remove unnecessary variables in rrpc

2016-11-18 Thread Javier González
Before vectored I/Os were supported on rrpc, the physical address was stored as part of the nvm_rqd request. This variable become obsolete when the ppa_list was introduced. Cleanup this variable. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/rrpc.c | 6 -- d

[PATCH 08/20] lightnvm: make address conversion functions global

2016-11-18 Thread Javier González
manager in order to do target mapping translations when targets are divided on different physical partitions. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/rrpc.c | 30 -- include/linux/lightnvm.h | 30 ++ 2

[PATCH 04/20] lightnvm: add ECC error codes

2016-11-18 Thread Javier González
From: Javier González <j...@lightnvm.io> Add ECC error codes to enable the appropriate handling in the target. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <m...@bjorling.me> --- include/linux/lightnvm.h | 2 ++ 1 file changed, 2 inserti

  1   2   3   4   5   6   7   8   9   10   >