Re: VIRTIO iface in mtd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 21 Jan 2019 19:14:35 +0100
Marcin Krzemiński <mar.krzeminski@xxxxxxxxx> 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/




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux