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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 10 Aug 2021 15:55:14 +0530
From:   Viresh Kumar <>
To:     Arnd Bergmann <>,
        Linus Walleij <>,
        Bartosz Golaszewski <>,
        "Enrico Weigelt, metux IT consult" <>,
        Jason Wang <>,
        "Michael S. Tsirkin" <>,
        Viresh Kumar <>
Cc:     Viresh Kumar <>,
        Vincent Guittot <>,
        Jean-Philippe Brucker <>,
        Bill Mills <>,
        Alex Bennée <>,
        Cornelia Huck <>,
        Geert Uytterhoeven <>,,,
        Thomas Gleixner <>,
        Marc Zyngier <>,,
Subject: [PATCH V5 0/2] gpio: Add virtio based driver


This adds Virtio GPIO driver based on the proposed specification [1].

The specification for basic GPIO operations is already reviewed by Linus and
Arnd, while the IRQ stuff is still under discussion and not finalized.

I am sharing the code, so everyone gets more clarity on how it will work
eventually in Linux.

I have tested this patchset with Qemu guest with help of the libgpiod utility.
I have also tested basic handling of interrupts on the guest side. It works as

The host side virtio-backend isn't ready yet and my tests only tested the flow
control between guest and host, but didn't play with real GPIO pins.  That will
be done once I have a working backend in place (WIP).

- Use ____cacheline_aligned for buffers.
- Proper locking in place, which avoids the use of work-item for processing
- Separate callbacks for enable/disable of irqs.
- The irq is disabled at the host only for enable/disable now, instead of
- mask/unmask only control the queuing of buffers now.
- Use handle_level_irq() instead of handle_fasteoi_irq().
- Other minor changes.

- Lots of changes, as the specification changed too much. Better forget
  everything we have done until now :)



Viresh Kumar (2):
  gpio: Add virtio-gpio driver
  gpio: virtio: Add IRQ support

 MAINTAINERS                      |   7 +
 drivers/gpio/Kconfig             |  10 +
 drivers/gpio/Makefile            |   1 +
 drivers/gpio/gpio-virtio.c       | 668 +++++++++++++++++++++++++++++++
 include/uapi/linux/virtio_gpio.h |  72 ++++
 5 files changed, 758 insertions(+)
 create mode 100644 drivers/gpio/gpio-virtio.c
 create mode 100644 include/uapi/linux/virtio_gpio.h


Powered by blists - more mailing lists