public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Boris Brezillon <bbrezillon@kernel.org>
To: "Marcin Krzemiński" <mar.krzeminski@gmail.com>
Cc: Richard Weinberger <richard@nod.at>,
	linux-mtd@lists.infradead.org,
	Miquel Raynal <miquel.raynal@bootlin.com>
Subject: Re: VIRTIO iface in mtd
Date: Mon, 21 Jan 2019 19:46:22 +0100	[thread overview]
Message-ID: <20190121194622.67648c3a@bbrezillon> (raw)
In-Reply-To: <69812b45-6dc4-f11f-f87e-4cf9a099cf50@gmail.com>

On Mon, 21 Jan 2019 19:14:35 +0100
Marcin Krzemiński <mar.krzeminski@gmail.com> wrote:

> >> As Boris suggested and additional channel to modify Qemus behavior from
> >> guest (eg. inserting ECC errors)?  
> > Actually, I was expecting to insert bitflips, erase/program errors,
> > badblock, ... on the host side. The side channel would allow us to
> > inform the guest about those errors.  
> I am proposing guest to allow inserting errors in the given moment of time.
>  From the other side this can be done in a different way. We could skip this
> topic at the moment/

Agreed.

> > Anyway, this is already an advanced feature, and I think we should
> > start small: emulate NOR/NAND devices without any way to emulate
> > bitflips or erase/program errors. Once we have that in place, we can
> > start adding fancy features on top.  
> That is exactly what I wanted to propose. Simple kernel driver and Qemu 
> implementation.
> Can you tell me which MTD driver would be the best starting point?

Not sure an MTD driver can help. The MTD interface is pretty
straightforward and the most complicated part is probably the virtio
aspect. For a NAND device, you'll have to populate ->_read_oob(),
->_write_oob(), ->_erase(), ->block_isreserved(), ->block_isbad(),
->_block_markbad(), ->erasesize, ->writesize, ->writebufsize, ->type,
->flags (see [1]).

[1]https://elixir.bootlin.com/linux/v5.0-rc3/source/drivers/mtd/nand/raw/nand_base.c



> 
> Thanks,
> Marcin
> >
> > Regards,
> >
> > Boris  
> 


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

      reply	other threads:[~2019-01-21 18:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-17 20:16 VIRTIO iface in mtd Marcin Krzemiński
2019-01-17 20:46 ` Boris Brezillon
2019-01-18 20:03   ` Marcin Krzemiński
2019-01-18 20:44     ` Boris Brezillon
2019-01-18 21:25       ` Richard Weinberger
2019-01-20 19:49         ` Marcin Krzemiński
2019-01-21  8:07           ` Boris Brezillon
2019-01-21 18:14             ` Marcin Krzemiński
2019-01-21 18:46               ` Boris Brezillon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190121194622.67648c3a@bbrezillon \
    --to=bbrezillon@kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mar.krzeminski@gmail.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox