Message ID | 1569338511-3572-1-git-send-email-guoheyi@huawei.com (mailing list archive) |
---|---|
Headers | show |
Series | Add SDEI support for arm64 | expand |
Patchew URL: https://patchew.org/QEMU/1569338511-3572-1-git-send-email-guoheyi@huawei.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash make docker-image-centos7 V=1 NETWORK=1 time make docker-test-quick@centos7 SHOW_ENV=1 J=14 NETWORK=1 === TEST SCRIPT END === libudev no default devices yes warning: Python 2 support is deprecated warning: Python 3 will be required for building future versions of QEMU cross containers no NOTE: guest cross-compilers enabled: cc --- LINK aarch64-softmmu/qemu-system-aarch64 hw/arm/virt-acpi-build.o: In function `virt_acpi_build': /tmp/qemu-test/src/hw/arm/virt-acpi-build.c:810: undefined reference to `sdei_enabled' collect2: error: ld returned 1 exit status make[1]: *** [qemu-system-aarch64] Error 1 make: *** [aarch64-softmmu/all] Error 2 Traceback (most recent call last): The full log is available at http://patchew.org/logs/1569338511-3572-1-git-send-email-guoheyi@huawei.com/testing.docker-quick@centos7/?type=message. --- Email generated automatically by Patchew [https://patchew.org/]. Please send your feedback to patchew-devel@redhat.com
Patchew URL: https://patchew.org/QEMU/1569338511-3572-1-git-send-email-guoheyi@huawei.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #! /bin/bash export ARCH=x86_64 make docker-image-fedora V=1 NETWORK=1 time make docker-test-mingw@fedora J=14 NETWORK=1 === TEST SCRIPT END === CC aarch64-softmmu/hw/arm/tosa.o CC aarch64-softmmu/hw/arm/z2.o In file included from /tmp/qemu-test/src/hw/arm/virt-acpi-build.c:35: /tmp/qemu-test/src/target/arm/sdei.h:26:10: fatal error: linux/kvm.h: No such file or directory #include <linux/kvm.h> ^~~~~~~~~~~~~ compilation terminated. The full log is available at http://patchew.org/logs/1569338511-3572-1-git-send-email-guoheyi@huawei.com/testing.docker-mingw@fedora/?type=message. --- Email generated automatically by Patchew [https://patchew.org/]. Please send your feedback to patchew-devel@redhat.com
On Tue, 24 Sep 2019 at 16:23, Heyi Guo <guoheyi@huawei.com> wrote: > > As promised, this is the first RFC patch set for arm64 SDEI support. Hi; for the benefit of possible reviewers who aren't familiar with every corner of the arm ecosystem, could you provide a summary of: * what is SDEI ? * what do KVM and QEMU want/need to do with it ? * what is this patchset trying to solve ? That would provide some useful context for trying to review the patchset. thanks -- PMM
On 2019/9/30 21:15, Peter Maydell wrote: > On Tue, 24 Sep 2019 at 16:23, Heyi Guo <guoheyi@huawei.com> wrote: >> As promised, this is the first RFC patch set for arm64 SDEI support. > Hi; for the benefit of possible reviewers who aren't familiar > with every corner of the arm ecosystem, could you provide a > summary of: > * what is SDEI ? SDEI is for ARM "Software Delegated Exception Interface". AS ARM64 doesn't have native non-maskable interrupt (NMI), we can rely on higher privileged software to change the pc of lower privileged software on certain events occur, to emulate NMI mechanism, and SDEI is the standard interfaces between the two levels of privileged software. It is based on SMC/HVC calls. In virtualization situation, guest OS is the lower privileged software and hypervisor is the higher one. Major interfaces provided by SDEI include: 1. interrupt bind: guest OS can request to bind an interrupt to an SDEI event. 2. register: guest OS can request to register a handler to an SDEI event, so hypervisor will change pc of guest to this handler when certain event occurs. 3. complete: guest OS notifies hypervisor that it has completed the event handling, so hypervisor will restore the context of guest when it is interrupted. > * what do KVM and QEMU want/need to do with it ? KVM is supposed to pass SMC/HVC calls to qemu, and qemu will serve the SDEI requests after parsing SMC/HVC calls. qemu also takes the responsibility to trigger the events. If an interrupt is requested to be bound to an event, qemu should not inject the interrupt to guest any more; instead, it should save the context of VCPU and change the PC to event handler which is registered by guest, and then return to guest. To make the conversion of interrupt to SDEI event transparent to other modules in qemu, we used qemu_irq and qemu_irq_intercept_in() to override the default irq handler with SDEI event trigger. I saw qemu_irq_intercept_in() should be only used in qemu MST, but it seemed fit to override interrupt injection with event trigger after guest requests to bind interrupt to SDEI event. > * what is this patchset trying to solve ? This patchset is trying to implement the whole SDEI framework in qemu with KVM enabled, including all SDEI v1.0 interfaces, as well as event trigger conduit from other qemu devices after interrupt binding. I will also provide the above context in the cover letter of v2 RFC. Thanks, Heyi > > That would provide some useful context for trying to > review the patchset. > > thanks > -- PMM > > . >