linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/7] firmware: arm_scmi: Add virtio transport
@ 2020-09-18 16:23 Peter Hilber
  2020-09-18 16:46 ` [RFC PATCH 1/7] firmware: arm_scmi, smccc, mailbox: Make shmem based transports optional Peter Hilber
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Peter Hilber @ 2020-09-18 16:23 UTC (permalink / raw)
  To: linux-arm-kernel, devicetree, virtualization, virtio-dev
  Cc: Rob Herring, linux-kernel, sudeep.holla, souvik.chakravarty,
	alex.bennee, jean-philippe, igor.skalkin, mikhail.golubev,
	anton.yakovlev, Peter Hilber, Jason Wang, Jassi Brar,
	Lorenzo Pieralisi, Mark Rutland, Michael S. Tsirkin

This series implements an SCMI virtio driver according to the virtio
SCMI device spec patch v5 [1], after simple preparatory changes to the
existing arm-scmi driver.

The virtio transport differs in some respects from the existing
shared-memory based SCMI transports.

Message timeouts can be a problem if the virtio device (SCMI platform)
does not have real-time properties. I set a high message rx timeout
value which should work for non real-time virtio devices as well. There
are other timeouts for delayed response and polling which were not
addressed yet. Delayed responses are not really needed since, with the
virtio transport, message responses may be transmitted out of order.
Polling doesn't make sense at least for virtio devices without real-time
behavior, in my understanding.

There are some known issues which will be resolved before removing the
RFC tag:

- Further work is needed on the scmi_xfer management. Unlike shmem based
  transports, the virtio transport is actually exchanging messages with
  the SCMI agent through the scmi_xfer tx and rx buffers. In case of a
  message rx timeout, the arm-scmi driver could try to re-use the
  scmi_xfer, while that might still be used by the virtio device. I
  think part of the scmi_xfers_info bookkeeping could be optionally
  outsourced to the transport to remediate this.

- After arm-scmi driver probe failure, or after remove, the scmi-virtio
  driver may still try to process and forward message responses from the
  virtio device.

- We must be sure that the virtio transport option (such as virtio over
  MMIO) is available when the virtio SCMI device is probed.

The series is based on for-next/scmi [2], on top of

commit 66d90f6ecee7 ("firmware: arm_scmi: Enable building as a single module")

The series was actually tested with a v5.4 based kernel, with the Base
protocol and Sensor management protocol. The virtio SCMI device used was
a proprietary implementation by OpenSynergy. Delayed responses were not
tested.

Any comments are very welcome.

[1] https://lists.oasis-open.org/archives/virtio-comment/202005/msg00096.html
[2] https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git


Igor Skalkin (7):
  firmware: arm_scmi, smccc, mailbox: Make shmem based transports
    optional
  firmware: arm_scmi: Document that max_msg is a per channel type limit
  firmware: arm_scmi: Add op to override max message #
  firmware: arm_scmi: Add per message transport data
  firmware: arm_scmi: Add xfer_init_buffers transport op
  dt-bindings: arm: Add virtio transport for SCMI
  firmware: arm_scmi: Add virtio transport

 .../devicetree/bindings/arm/arm,scmi.txt      |  38 +-
 MAINTAINERS                                   |   1 +
 drivers/firmware/Kconfig                      |  19 +-
 drivers/firmware/arm_scmi/Makefile            |   3 +-
 drivers/firmware/arm_scmi/common.h            |  31 +-
 drivers/firmware/arm_scmi/driver.c            |  83 +++-
 drivers/firmware/arm_scmi/virtio.c            | 470 ++++++++++++++++++
 drivers/firmware/smccc/Kconfig                |   1 +
 drivers/mailbox/Kconfig                       |   1 +
 include/uapi/linux/virtio_ids.h               |   1 +
 include/uapi/linux/virtio_scmi.h              |  41 ++
 11 files changed, 664 insertions(+), 25 deletions(-)
 create mode 100644 drivers/firmware/arm_scmi/virtio.c
 create mode 100644 include/uapi/linux/virtio_scmi.h


base-commit: 66d90f6ecee755e9c19a119c9255e80091165498
-- 
2.25.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-10-02  8:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-18 16:23 [RFC PATCH 0/7] firmware: arm_scmi: Add virtio transport Peter Hilber
2020-09-18 16:46 ` [RFC PATCH 1/7] firmware: arm_scmi, smccc, mailbox: Make shmem based transports optional Peter Hilber
2020-09-18 16:52 ` [RFC PATCH 2/7] firmware: arm_scmi: Document that max_msg is a per channel type limit Peter Hilber
2020-09-18 16:53 ` [RFC PATCH 3/7] firmware: arm_scmi: Add op to override max message # Peter Hilber
2020-09-18 16:54 ` [RFC PATCH 4/7] firmware: arm_scmi: Add per message transport data Peter Hilber
2020-09-18 16:55 ` [RFC PATCH 5/7] firmware: arm_scmi: Add xfer_init_buffers transport op Peter Hilber
2020-09-18 16:55 ` [RFC PATCH 6/7] dt-bindings: arm: Add virtio transport for SCMI Peter Hilber
2020-09-23 20:54   ` Rob Herring
2020-10-02  8:18     ` Peter Hilber
2020-09-18 16:56 ` [RFC PATCH 7/7] firmware: arm_scmi: Add virtio transport Peter Hilber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).