lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cdadf700-921b-7c61-210d-7aad355a3871@intel.com>
Date:   Tue, 29 Jun 2021 11:03:42 +0800
From:   Jie Deng <jie.deng@...el.com>
To:     Arnd Bergmann <arnd@...db.de>, Wolfram Sang <wsa@...nel.org>,
        Linux I2C <linux-i2c@...r.kernel.org>,
        virtualization@...ts.linux-foundation.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "Michael S. Tsirkin" <mst@...hat.com>,
        Jason Wang <jasowang@...hat.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        conghui.chen@...el.com, kblaiech@...lanox.com,
        jarkko.nikula@...ux.intel.com,
        Sergey Semin <Sergey.Semin@...kalelectronics.ru>,
        Mike Rapoport <rppt@...nel.org>, loic.poulain@...aro.org,
        Tali Perry <tali.perry1@...il.com>,
        Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        yu1.wang@...el.com, shuo.a.liu@...el.com,
        Viresh Kumar <viresh.kumar@...aro.org>,
        Stefan Hajnoczi <stefanha@...hat.com>,
        Paolo Bonzini <pbonzini@...hat.com>
Subject: Re: [PATCH v10] i2c: virtio: add a virtio i2c frontend driver

On 2021/6/28 17:01, Arnd Bergmann wrote:

> On Mon, Jun 28, 2021 at 10:39 AM Wolfram Sang <wsa@...nel.org> wrote:
>> sorry for the long delay. I am not familiar with VFIO, so I had to dive
>> into the topic a little first. I am still not seeing through it
>> completely, so I have very high-level questions first.
> You probably know this already, but just in case for clarification
> these are two different things:
>
> VFIO: kernel feature to make raw (usually PCI) devices available
>             to user space drivers and virtual machines from a kernel
>             running on bare metal.
>
> virtio: transport protocol for implementing arbitrary paravirtualized
>            drivers in (usually) a virtual machine guest without giving the
>            guest access to hardware registers.
>
Thanks Arnd for clarification.

Let me add some more:


The native model is as follows: a specific native I2C driver operates a 
specific hardware.

A specific native I2C driver  <--> A specific hardware


The virtio paravirtualized model is something like:

virtio-i2c <--> virtio I2C interfaces <--> virtio-backend <--> Real hardware

virtio-i2c: is this driver, the frontend driver.

virtio I2C interfaces: which are described in the specification.

https://raw.githubusercontent.com/oasis-tcs/virtio-spec/master/virtio-i2c.tex.

     I had tried to mirror Linux I2C interfaces (like "i2c_msg") into 
virtio I2C interface directly. But

     when I was doing upstream for this specification, I understood the 
virtio TC had the design philosophy

     "VIRTIO devices are not specific to Linux so the specs design 
should avoid the limitations of the

     current Linux driver behavior." So we redefined a minimum virtio 
I2C interfaces to make a working POC.

     and we may extend it in the future according to the need.

virtio-backend: the backend driver communicate with virtio-i2c by 
following virtio I2C interfaces specs.

      The are already two backend drivers developed by Viresh, one in 
QEMU, another in rust-vmm.

      1. vhost-user: 
https://lore.kernel.org/qemu-devel/cover.1617278395.git.viresh.kumar@linaro.org/t/#m3b5044bad9769b170f505e63bd081eb27cef8db2

      2. rust-vmm I2C backend: 
https://github.com/rust-vmm/vhost-device/pull/1


Regards,

Jie







Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ