Show a cover letter.

GET /api/covers/817663/?format=api
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 817663,
    "url": "http://patchwork.ozlabs.org/api/covers/817663/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/devicetree-bindings/cover/20170922182614.27885-1-james.morse@arm.com/",
    "project": {
        "id": 37,
        "url": "http://patchwork.ozlabs.org/api/projects/37/?format=api",
        "name": "Devicetree Bindings",
        "link_name": "devicetree-bindings",
        "list_id": "devicetree.vger.kernel.org",
        "list_email": "devicetree@vger.kernel.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170922182614.27885-1-james.morse@arm.com>",
    "list_archive_url": null,
    "date": "2017-09-22T18:26:01",
    "name": "[v3,00/13] arm64/firmware: Software Delegated Exception Interface",
    "submitter": {
        "id": 66575,
        "url": "http://patchwork.ozlabs.org/api/people/66575/?format=api",
        "name": "James Morse",
        "email": "james.morse@arm.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/devicetree-bindings/cover/20170922182614.27885-1-james.morse@arm.com/mbox/",
    "series": [
        {
            "id": 4687,
            "url": "http://patchwork.ozlabs.org/api/series/4687/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/devicetree-bindings/list/?series=4687",
            "date": "2017-09-22T18:26:01",
            "name": "arm64/firmware: Software Delegated Exception Interface",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/4687/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/covers/817663/comments/",
    "headers": {
        "Return-Path": "<devicetree-owner@vger.kernel.org>",
        "X-Original-To": "incoming-dt@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming-dt@bilbo.ozlabs.org",
        "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)",
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xzMRM3dyDz9t38\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tSat, 23 Sep 2017 04:27:58 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751894AbdIVS14 (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tFri, 22 Sep 2017 14:27:56 -0400",
            "from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:60036 \"EHLO\n\tfoss.arm.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1751795AbdIVS1y (ORCPT <rfc822;devicetree@vger.kernel.org>);\n\tFri, 22 Sep 2017 14:27:54 -0400",
            "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249])\n\tby usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CBDD41529;\n\tFri, 22 Sep 2017 11:27:53 -0700 (PDT)",
            "from melchizedek.cambridge.arm.com (melchizedek.cambridge.arm.com\n\t[10.1.207.55])\n\tby usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id\n\tD98F83F58C; Fri, 22 Sep 2017 11:27:51 -0700 (PDT)"
        ],
        "From": "James Morse <james.morse@arm.com>",
        "To": "linux-arm-kernel@lists.infradead.org",
        "Cc": "kvmarm@lists.cs.columbia.edu, devicetree@vger.kernel.org,\n\tWill Deacon <will.deacon@arm.com>,\n\tCatalin Marinas <catalin.marinas@arm.com>,\n\tMark Rutland <mark.rutland@arm.com>, Rob Herring <robh+dt@kernel.org>,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tChristoffer Dall <christoffer.dall@linaro.org>,\n\tLorenzo Pieralisi <lorenzo.pieralisi@arm.com>, Loc Ho <lho@apm.com>",
        "Subject": "[PATCH v3 00/13] arm64/firmware: Software Delegated Exception\n\tInterface",
        "Date": "Fri, 22 Sep 2017 19:26:01 +0100",
        "Message-Id": "<20170922182614.27885-1-james.morse@arm.com>",
        "X-Mailer": "git-send-email 2.13.3",
        "Sender": "devicetree-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<devicetree.vger.kernel.org>",
        "X-Mailing-List": "devicetree@vger.kernel.org"
    },
    "content": "Hello!\n\nThe Software Delegated Exception Interface (SDEI) is an ARM specification\nfor registering callbacks from the platform firmware into the OS.\nThis is intended to be used to implement firmware-first RAS notifications,\nbut also supports vendor-defined events and binding IRQs as events.\n\nThe document is here:\nhttp://infocenter.arm.com/help/topic/com.arm.doc.den0054a/ARM_DEN0054A_Software_Delegated_Exception_Interface.pdf\n\nI anticpate once reviewed this series will go via the arm-soc tree, as the\nbulk of the code is under /drivers/firmware/.\n\nThe major change in v3 is due to VMAP stacks. We can't trust sp when we take\nan event, so need our own SDEI stack. Events can nest, so we need two. Private\nevents can be delivered per-cpu, so we need two per-cpu SDEI stacks.\n\nThe APCICA support for the SDEI table is now in mainline, so this series has\ngrown the detection code for non-DT systems. The APEI/GHES wire-up is still\nbeing held back as APEI's ghes_proc() isn't (yet) safe for multiple sources\nof NMI.\n\nExposing the HVC range through KVM to user-space is gone, this will be\nre-incarnated as something that better fits KVMs architecture emulation,\nas opposed to assuming all-the-world's-SMC-CC.\n\n\nThis series (juggles some registers with KVM+VHE, then) adds a DT binding to\ntrigger probing of the interface and support for the SDEI API.\n\nSDEI runs between adjacent exception levels, so events will always be delivered\nto EL2 if firmware is at EL3. For VHE hosts we run the SDEI event handler\nbehind KVM's back with all exceptions masked. Once the handler has done its\nwork we return to the appropriate vbar+irq entry. This allows KVM to\nworld-switch and deliver any signals sent by the handler to Qemu/kvmtool. We\ndo the same thing if we interrupt host EL0. If we interrupted code with\ninterrupts masked, we use a different API call to return to the interrupted\ncontext.\n\nWhat about non-VHE KVM? If you don't have VHE support and boot at EL2, the\nkernel drops to EL1. This driver will print an error message then give up. This\nis because events would still be delivered to EL2 hitting either KVM, or the\nhyp-stub. Supporting this is complicated, but because the main use-case is\nRAS, and ARM v8.2's RAS extensions imply v8.1's Virtual Host Extensions, we\ncan assume all platforms with SDEI will support VHE too. (I have some ideas\non how to support non-VHE).\n\nRunning the event handler behind VHE-KVM's back has some side effects: The\nevent handler will blindly use any registers that are shared between the host\nand guest. The two that I think matter are TPIDR_EL1, and the debug state. The\nguest may have set MDSCR_EL1 so debug exceptions must remain masked. The\nguest's TPIDR_EL1 will be used by the event handler if it accesses per-cpu\nvariables. This needs fixing. The first part of this series juggles KVMs use\nof TPIDR_EL2 so that we share it with the host on VHE systems. An equivalent\nchange for 32bit is (still) on my todo list. (the alternative to this is to\nhave a parody world switch in the SDEI event handler, but this would mean\nspecial casing interrupted guests, and be an ABI link to KVM.)\n\nIs this another begins-with-S RAS mechanism for arm64? Yes.\nWhy? Any notification delivered as an exception will overwrite the exception\nregisters. This is fatal for the running thread if it happens during entry.S's\nkernel_enter or kernel_exit. Instead of adding masking and routing controls,\nevents are delivered to a registered address at a fixed exception level and\ndon't change the exception registers when delivered.\n\nThis series can be retrieved from:\ngit://linux-arm.org/linux-jm.git -b sdei/v3/base\n\nQuestions and contradictions welcome!\n\nThanks,\n\nJames\n\n[Changes since previous versions are noted on each patch]\n\n\nJames Morse (13):\n  KVM: arm64: Store vcpu on the stack during __guest_enter()\n  KVM: arm/arm64: Convert kvm_host_cpu_state to a static per-cpu\n    allocation\n  KVM: arm64: Change hyp_panic()s dependency on tpidr_el2\n  arm64: alternatives: use tpidr_el2 on VHE hosts\n  KVM: arm64: Stop save/restoring host tpidr_el1 on VHE\n  Docs: dt: add devicetree binding for describing arm64 SDEI firmware\n  firmware: arm_sdei: Add driver for Software Delegated Exceptions\n  arm64: Add vmap_stack header file\n  arm64: kernel: Add arch-specific SDEI entry code and CPU masking\n  firmware: arm_sdei: Add support for CPU and system power states\n  firmware: arm_sdei: add support for CPU private events\n  arm64: acpi: Remove __init from acpi_psci_use_hvc() for use by SDEI\n  firmware: arm_sdei: Discover SDEI support via ACPI\n\n .../devicetree/bindings/arm/firmware/sdei.txt      |   42 +\n arch/arm64/Kconfig                                 |    2 +-\n arch/arm64/include/asm/assembler.h                 |    8 +\n arch/arm64/include/asm/kvm_host.h                  |    2 +\n arch/arm64/include/asm/percpu.h                    |   11 +-\n arch/arm64/include/asm/processor.h                 |    1 +\n arch/arm64/include/asm/sdei.h                      |   63 ++\n arch/arm64/include/asm/stacktrace.h                |    3 +\n arch/arm64/include/asm/vmap_stack.h                |   41 +\n arch/arm64/kernel/Makefile                         |    1 +\n arch/arm64/kernel/acpi.c                           |    2 +-\n arch/arm64/kernel/asm-offsets.c                    |    5 +\n arch/arm64/kernel/cpufeature.c                     |   23 +\n arch/arm64/kernel/irq.c                            |   13 +-\n arch/arm64/kernel/sdei-entry.S                     |  122 +++\n arch/arm64/kernel/sdei.c                           |  235 +++++\n arch/arm64/kernel/smp.c                            |   11 +-\n arch/arm64/kvm/hyp-init.S                          |    4 +\n arch/arm64/kvm/hyp/entry.S                         |   10 +-\n arch/arm64/kvm/hyp/hyp-entry.S                     |   18 +-\n arch/arm64/kvm/hyp/switch.c                        |   25 +-\n arch/arm64/kvm/hyp/sysreg-sr.c                     |   16 +-\n arch/arm64/mm/proc.S                               |    8 +\n drivers/firmware/Kconfig                           |    8 +\n drivers/firmware/Makefile                          |    1 +\n drivers/firmware/arm_sdei.c                        | 1096 ++++++++++++++++++++\n include/linux/cpuhotplug.h                         |    1 +\n include/linux/psci.h                               |    3 +-\n include/linux/sdei.h                               |  105 ++\n include/uapi/linux/sdei.h                          |   91 ++\n virt/kvm/arm/arm.c                                 |   18 +-\n 31 files changed, 1931 insertions(+), 58 deletions(-)\n create mode 100644 Documentation/devicetree/bindings/arm/firmware/sdei.txt\n create mode 100644 arch/arm64/include/asm/sdei.h\n create mode 100644 arch/arm64/include/asm/vmap_stack.h\n create mode 100644 arch/arm64/kernel/sdei-entry.S\n create mode 100644 arch/arm64/kernel/sdei.c\n create mode 100644 drivers/firmware/arm_sdei.c\n create mode 100644 include/linux/sdei.h\n create mode 100644 include/uapi/linux/sdei.h"
}