Re: [PATCH v6 00/18] Support SDEI Virtualization

From: Gavin Shan
Date: Sun Apr 03 2022 - 11:47:39 EST

On 4/3/22 11:38 PM, Gavin Shan wrote:
This series intends to virtualize Software Delegated Exception Interface
(SDEI), which is defined by DEN0054C (v1.1). It allows the hypervisor to
deliver NMI-alike SDEI event to guest and it's needed by Async PF to
deliver page-not-present notification from hypervisor to guest. The code
and the required qemu changes can be found from: ("kvm/arm64_sdei") ("kvm/arm64_sdei")

The design is quite strightforward by following the specification. The
(SDEI) events are classified into the shared and private ones according
to their scope. The shared event is system or VM scoped, but the private
event is vcpu scoped. This implementation doesn't support the shared
event because all the needed events are private. Besides, the migration
isn't supported by implementation and it's something to be supported
in future.

There are several objects (data structures) introduced to help on the
event registration, enablement, disablement, unregistration, reset,
delivery and handling.

* kvm_sdei_exposed_event
The event which are defined and exposed by KVM. The event can't
be registered until it's exposed. Besides, all the information
in this event can't be changed after it's exposed.
* kvm_sdei_event
The events are created based on the exposed events. Their states
are changed when hypercalls are received or they are delivered
to guest for handling.
* kvm_sdei_vcpu_context
The vcpu context helps to handle events. The interrupted context
is saved before the event handler is executed, and restored after
the event handler is to finish.
* kvm_sdei_vcpu
Place holder for all objects for one particular VCPU.

The patches are organized as below:

PATCH[01-02] Preparatory work to extend smccc_get_argx() and refactor
hypercall routing mechanism
PATCH[03] Adds SDEI virtualization infrastructure
PATCH[04-16] Supports various SDEI hypercalls and event handling
PATCH[17] Exposes SDEI capability
PATCH[18] Adds SDEI selftest case
The previous revisions can be found:


I'm explicitly copying Oliver, James, Mark and Shannon to avoid resending this series.
It seems they have been skipped even I explicitly copied them by 'git send-email --cc=<email-addr>'.