linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 00/14] Drivers for gunyah hypervisor
@ 2022-09-28 19:56 Elliot Berman
  2022-09-28 19:56 ` [PATCH v4 01/14] docs: gunyah: Introduce Gunyah Hypervisor Elliot Berman
                   ` (13 more replies)
  0 siblings, 14 replies; 51+ messages in thread
From: Elliot Berman @ 2022-09-28 19:56 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Elliot Berman, Murali Nalajala, Trilok Soni, Srivatsa Vaddagiri,
	Carl van Schaik, Andy Gross, Dmitry Baryshkov, Jassi Brar,
	linux-arm-kernel, Mark Rutland, Lorenzo Pieralisi, Sudeep Holla,
	Marc Zyngier, Rob Herring, Krzysztof Kozlowski, Jonathan Corbet,
	Will Deacon, Catalin Marinas, Arnd Bergmann, Greg Kroah-Hartman,
	devicetree, linux-doc, linux-arm-msm, linux-kernel

Gunyah is a Type-1 hypervisor independent of any
high-level OS kernel, and runs in a higher CPU privilege level. It does
not depend on any lower-privileged OS kernel/code for its core
functionality. This increases its security and can support a much smaller
trusted computing base than a Type-2 hypervisor.

Gunyah is an open source hypervisor. The source repo is available at
https://github.com/quic/gunyah-hypervisor.

The diagram below shows the architecture.

::

         VM A                    VM B
     +-----+ +-----+  | +-----+ +-----+ +-----+
     |     | |     |  | |     | |     | |     |
 EL0 | APP | | APP |  | | APP | | APP | | APP |
     |     | |     |  | |     | |     | |     |
     +-----+ +-----+  | +-----+ +-----+ +-----+
 ---------------------|-------------------------
     +--------------+ | +----------------------+
     |              | | |                      |
 EL1 | Linux Kernel | | |Linux kernel/Other OS |   ...
     |              | | |                      |
     +--------------+ | +----------------------+
 --------hvc/smc------|------hvc/smc------------
     +----------------------------------------+
     |                                        |
 EL2 |            Gunyah Hypervisor           |
     |                                        |
     +----------------------------------------+

Gunyah provides these following features.

- Threads and Scheduling: The scheduler schedules virtual CPUs (VCPUs) on
physical CPUs and enables time-sharing of the CPUs.
- Memory Management: Gunyah tracks memory ownership and use of all memory
under its control. Memory partitioning between VMs is a fundamental
security feature.
- Interrupt Virtualization: All interrupts are handled in the hypervisor
and routed to the assigned VM.
- Inter-VM Communication: There are several different mechanisms provided
for communicating between VMs.
- Device Virtualization: Para-virtualization of devices is supported using
inter-VM communication. Low level system features and devices such as
interrupt controllers are supported with emulation where required.

This series adds the basic framework for detecting that Linux is running
under Gunyah as a virtual machine, communication with the Gunyah Resource
Manager, and a tty driver to demonstrate end-to-end use case of communicating
with RM. Presently, the TTY driver is only capable of behaving as a loopback
device: data sent to ttyGH0 shows up in ttyGH1 and vice versa. More Gunyah
consoles can be exposed as Linux learns about other VMs running in Gunyah.
In a future series, I'll introduce a Gunyah VM loader which can load and run
VMs. This loader will follow the design philosophy of the /dev/kvm.

Changes in v4:
 - Tidied up documentation throughout based on questions/feedback received
 - Switched message queue implementation to use mailboxes
 - Renamed "gunyah_device" as "gunyah_resource"

Changes in v3: https://lore.kernel.org/all/20220811214107.1074343-1-quic_eberman@quicinc.com/
 - /Maintained/Supported/ in MAINTAINERS
 - Tidied up documentation throughout based on questions/feedback received
 - Moved hypercalls into arch/arm64/gunyah/; following hyper-v's implementation
 - Drop opaque typedefs
 - Move sysfs nodes under /sys/hypervisor/gunyah/
 - Moved Gunyah console driver to drivers/tty/
 - Reworked gunyah_device design to drop the Gunyah bus.

Changes in v2: https://lore.kernel.org/all/20220801211240.597859-1-quic_eberman@quicinc.com/
 - DT bindings clean up
 - Switch hypercalls to follow SMCCC 

v1: https://lore.kernel.org/all/20220223233729.1571114-1-quic_eberman@quicinc.com/

Elliot Berman (14):
  docs: gunyah: Introduce Gunyah Hypervisor
  dt-bindings: Add binding for gunyah hypervisor
  gunyah: Common types and error codes for Gunyah hypercalls
  arm64: smccc: Include alternative-macros.h
  virt: gunyah: Add hypercalls to identify Gunyah
  virt: gunyah: Add sysfs nodes
  mailbox: Allow direct registration to a channel
  virt: gunyah: msgq: Add hypercalls to send and receive messages
  mailbox: Add Gunyah message queue mailbox
  gunyah: sysfs: Add node to describe supported features
  gunyah: rsc_mgr: Add resource manager RPC core
  gunyah: rsc_mgr: Add RPC for console services
  gunyah: rsc_mgr: Add auxiliary devices for console
  tty: gunyah: Add tty console driver for RM Console Services

 .../ABI/testing/sysfs-hypervisor-gunyah       |  30 +
 .../bindings/firmware/gunyah-hypervisor.yaml  |  87 +++
 Documentation/virt/gunyah/index.rst           | 114 ++++
 Documentation/virt/gunyah/message-queue.rst   |  52 ++
 Documentation/virt/index.rst                  |   1 +
 MAINTAINERS                                   |  15 +
 arch/arm64/Kbuild                             |   1 +
 arch/arm64/gunyah/Makefile                    |   2 +
 arch/arm64/gunyah/hypercall.c                 | 104 +++
 drivers/mailbox/Kconfig                       |  10 +
 drivers/mailbox/Makefile                      |   2 +
 drivers/mailbox/gunyah-msgq.c                 | 232 +++++++
 drivers/mailbox/mailbox.c                     |  96 ++-
 drivers/tty/Kconfig                           |   8 +
 drivers/tty/Makefile                          |   1 +
 drivers/tty/gunyah_tty.c                      | 409 ++++++++++++
 drivers/virt/Kconfig                          |   2 +
 drivers/virt/Makefile                         |   1 +
 drivers/virt/gunyah/Kconfig                   |  30 +
 drivers/virt/gunyah/Makefile                  |   5 +
 drivers/virt/gunyah/rsc_mgr.c                 | 629 ++++++++++++++++++
 drivers/virt/gunyah/rsc_mgr.h                 |  56 ++
 drivers/virt/gunyah/rsc_mgr_rpc.c             | 151 +++++
 drivers/virt/gunyah/sysfs.c                   |  86 +++
 include/asm-generic/gunyah.h                  | 115 ++++
 include/linux/arm-smccc.h                     |   1 +
 include/linux/gunyah.h                        |  67 ++
 include/linux/gunyah_rsc_mgr.h                |  42 ++
 include/linux/mailbox_client.h                |   1 +
 29 files changed, 2322 insertions(+), 28 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-hypervisor-gunyah
 create mode 100644 Documentation/devicetree/bindings/firmware/gunyah-hypervisor.yaml
 create mode 100644 Documentation/virt/gunyah/index.rst
 create mode 100644 Documentation/virt/gunyah/message-queue.rst
 create mode 100644 arch/arm64/gunyah/Makefile
 create mode 100644 arch/arm64/gunyah/hypercall.c
 create mode 100644 drivers/mailbox/gunyah-msgq.c
 create mode 100644 drivers/tty/gunyah_tty.c
 create mode 100644 drivers/virt/gunyah/Kconfig
 create mode 100644 drivers/virt/gunyah/Makefile
 create mode 100644 drivers/virt/gunyah/rsc_mgr.c
 create mode 100644 drivers/virt/gunyah/rsc_mgr.h
 create mode 100644 drivers/virt/gunyah/rsc_mgr_rpc.c
 create mode 100644 drivers/virt/gunyah/sysfs.c
 create mode 100644 include/asm-generic/gunyah.h
 create mode 100644 include/linux/gunyah.h
 create mode 100644 include/linux/gunyah_rsc_mgr.h


base-commit: f76349cf41451c5c42a99f18a9163377e4b364ff
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-11-01  0:38 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-28 19:56 [PATCH v4 00/14] Drivers for gunyah hypervisor Elliot Berman
2022-09-28 19:56 ` [PATCH v4 01/14] docs: gunyah: Introduce Gunyah Hypervisor Elliot Berman
2022-09-29  3:43   ` Bagas Sanjaya
2022-09-29  4:02     ` Elliot Berman
2022-09-28 19:56 ` [PATCH v4 02/14] dt-bindings: Add binding for gunyah hypervisor Elliot Berman
2022-09-28 19:56 ` [PATCH v4 03/14] gunyah: Common types and error codes for Gunyah hypercalls Elliot Berman
2022-09-28 19:56 ` [PATCH v4 04/14] arm64: smccc: Include alternative-macros.h Elliot Berman
2022-09-28 19:56 ` [PATCH v4 05/14] virt: gunyah: Add hypercalls to identify Gunyah Elliot Berman
2022-09-28 19:56 ` [PATCH v4 06/14] virt: gunyah: Add sysfs nodes Elliot Berman
2022-09-30 12:09   ` Greg Kroah-Hartman
2022-10-04 23:50     ` Elliot Berman
2022-10-05  6:23       ` Greg Kroah-Hartman
2022-09-28 19:56 ` [PATCH v4 07/14] mailbox: Allow direct registration to a channel Elliot Berman
2022-09-28 19:56 ` [PATCH v4 08/14] virt: gunyah: msgq: Add hypercalls to send and receive messages Elliot Berman
2022-09-28 19:56 ` [PATCH v4 09/14] mailbox: Add Gunyah message queue mailbox Elliot Berman
2022-09-29 16:59   ` Bjorn Andersson
2022-09-29 17:37     ` Jassi Brar
2022-09-28 19:56 ` [PATCH v4 10/14] gunyah: sysfs: Add node to describe supported features Elliot Berman
2022-09-29  7:36   ` Joe Perches
2022-09-29 20:47     ` Elliot Berman
2022-10-02 23:30     ` Jeff Johnson
2022-10-02 23:58       ` Joe Perches
2022-09-30 12:06   ` Greg Kroah-Hartman
2022-10-04 23:53     ` Elliot Berman
2022-09-28 19:56 ` [PATCH v4 11/14] gunyah: rsc_mgr: Add resource manager RPC core Elliot Berman
2022-09-28 19:56 ` [PATCH v4 12/14] gunyah: rsc_mgr: Add RPC for console services Elliot Berman
2022-09-30 12:22   ` Greg Kroah-Hartman
2022-10-03  1:46     ` new checkpatch flexible array test ? (was Re: [PATCH v4 12/14] gunyah: rsc_mgr: Add RPC for console services) Joe Perches
2022-10-03  5:29       ` Greg Kroah-Hartman
2022-10-03  5:38         ` Joe Perches
2022-10-31 18:23           ` Gustavo A. R. Silva
2022-09-28 19:56 ` [PATCH v4 13/14] gunyah: rsc_mgr: Add auxiliary devices for console Elliot Berman
2022-09-30 12:19   ` Greg Kroah-Hartman
2022-10-04 23:49     ` Elliot Berman
2022-10-05  6:21       ` Greg Kroah-Hartman
2022-10-05 21:47         ` Elliot Berman
2022-10-06  6:28           ` Greg Kroah-Hartman
2022-09-28 19:56 ` [PATCH v4 14/14] tty: gunyah: Add tty console driver for RM Console Services Elliot Berman
2022-09-30 12:17   ` Greg Kroah-Hartman
2022-10-07  5:59     ` Elliot Berman
2022-10-07  7:40       ` Greg Kroah-Hartman
2022-10-09 20:59         ` Elliot Berman
2022-10-10 20:23           ` Greg Kroah-Hartman
2022-10-10 20:58             ` Elliot Berman
2022-10-11  6:22               ` Greg Kroah-Hartman
2022-10-11 22:04                 ` Elliot Berman
2022-10-12  6:53                   ` Greg Kroah-Hartman
2022-10-08  7:41     ` Zhou Furong
2022-10-08  9:52       ` Greg Kroah-Hartman
2022-10-03  7:01   ` Jiri Slaby
2022-10-10 18:06     ` Elliot Berman

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).