kvmarm.lists.cs.columbia.edu archive mirror
 help / color / mirror / Atom feed
From: Oliver Upton <oupton@google.com>
To: Gavin Shan <gshan@redhat.com>
Cc: maz@kernel.org, linux-kernel@vger.kernel.org, eauger@redhat.com,
	shan.gavin@gmail.com, Jonathan.Cameron@huawei.com,
	pbonzini@redhat.com, vkuznets@redhat.com, will@kernel.org,
	kvmarm@lists.cs.columbia.edu
Subject: Re: [PATCH v5 00/22] Support SDEI Virtualization
Date: Tue, 22 Mar 2022 18:13:09 +0000	[thread overview]
Message-ID: <YjoRteSXpPkDGqgp@google.com> (raw)
In-Reply-To: <20220322080710.51727-1-gshan@redhat.com>

On Tue, Mar 22, 2022 at 04:06:48PM +0800, 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:
> 
>    https://developer.arm.com/documentation/den0054/c
>    https://github.com/gwshan/linux    ("kvm/arm64_sdei")
>    https://github.com/gwshan/qemu     ("kvm/arm64_sdei")
> 
> For the design and migration needs, please refer to the document in
> PATCH[21/22] in this series. The series is organized as below:
> 
>   PATCH[01]    Introduces template for smccc_get_argx()
>   PATCH[02]    Adds SDEI virtualization infrastructure
>   PATCH[03-17] Supports various SDEI hypercalls and event handling
>   PATCH[18-20] Adds ioctl commands to support migration and configuration
>                and exports SDEI capability
>   PATCH[21]    Adds SDEI document 
>   PATCH[22]    Adds SDEI selftest case
> 
> Testing
> =======
> 
> [1] The selftest case included in this series works fine. The default SDEI
>     event, whose number is zero, can be registered, enabled, raised. The
>     SDEI event handler can be invoked.
> 
>     [host]# pwd
>     /home/gavin/sandbox/linux.main/tools/testing/selftests/kvm
>     [root@virtlab-arm01 kvm]# ./aarch64/sdei 
> 
>         NR_VCPUS: 2    SDEI Event: 0x00000000
> 
>     --- VERSION
>         Version:              1.1 (vendor: 0x4b564d)
>     --- FEATURES
>         Shared event slots:   0
>         Private event slots:  0
>         Relative mode:        No
>     --- PRIVATE_RESET
>     --- SHARED_RESET
>     --- PE_UNMASK
>     --- EVENT_GET_INFO
>         Type:                 Private
>         Priority:             Normal
>         Signaled:             Yes
>     --- EVENT_REGISTER
>     --- EVENT_ENABLE
>     --- EVENT_SIGNAL
>         Handled:              Yes
>         IRQ:                  No
>         Status:               Registered-Enabled-Running
>         PC/PSTATE:            000000000040232c 00000000600003c5
>         Regs:                 0000000000000000 0000000000000000
>                               0000000000000000 0000000000000000
>     --- PE_MASK
>     --- EVENT_DISABLE
>     --- EVENT_UNREGISTER
> 
>         Result: OK
> 
> [2] There are additional patches in the following repositories to create
>     procfs entries, allowing to inject SDEI event from host side. The
>     SDEI client in the guest side registers the SDEI default event, whose
>     number is zero. Also, the QEMU exports SDEI ACPI table and supports
>     migration for SDEI.
> 
>     https://github.com/gwshan/linux    ("kvm/arm64_sdei")
>     https://github.com/gwshan/qemu     ("kvm/arm64_sdei")
> 
>     [2.1] Start the guests and migrate the source VM to the destination
>           VM.
> 
>     [host]# /home/gavin/sandbox/qemu.main/build/qemu-system-aarch64       \
>             -accel kvm -machine virt,gic-version=host                     \
>             -cpu host -smp 6,sockets=2,cores=3,threads=1                  \
>             -m 1024M,slots=16,maxmem=64G                                  \
>                :                                                          \
>             -kernel /home/gavin/sandbox/linux.guest/arch/arm64/boot/Image \
>             -initrd /home/gavin/sandbox/images/rootfs.cpio.xz             \
>             -append earlycon=pl011,mmio,0x9000000                         \
>                :
> 
>     [host]# /home/gavin/sandbox/qemu.main/build/qemu-system-aarch64       \
>             -accel kvm -machine virt,gic-version=host                     \
>             -cpu host -smp 6,sockets=2,cores=3,threads=1                  \
>             -m 1024M,slots=16,maxmem=64G                                  \
>                :                                                          \
>             -kernel /home/gavin/sandbox/linux.guest/arch/arm64/boot/Image \
>             -initrd /home/gavin/sandbox/images/rootfs.cpio.xz             \
>             -append earlycon=pl011,mmio,0x9000000                         \
>             -incoming tcp:0:4444                                          \
>                :
> 
>     [2.2] Check kernel log on the source VM. The SDEI service is enabled
>           and the default SDEI event (0x0) is enabled.
> 
>      [guest-src]# dmesg | grep -i sdei
>      ACPI: SDEI 0x000000005BC80000 000024 \
>                 (v00 BOCHS  BXPC     00000001 BXPC 00000001)
>      sdei: SDEIv1.1 (0x4b564d) detected in firmware.
>      SDEI TEST: Version 1.1, Vendor 0x4b564d
>      sdei_init: SDEI event (0x0) registered
>      sdei_init: SDEI event (0x0) enabled
> 
>  
>      (qemu) migrate -d tcp:localhost:4444
> 
>     [2.3] Migrate the source VM to the destination VM. Inject SDEI event
>           to the destination VM. The event is raised and handled.
> 
>     (qemu) migrate -d tcp:localhost:4444
> 
>     [host]# echo 0 > /proc/kvm/kvm-5360/vcpu-1
> 
>     [guest-dst]#
>     =========== SDEI Event (CPU#1) ===========
>     Event: 0000000000000000  Parameter: 00000000dabfdabf
>     PC: ffff800008cbb554  PSTATE: 00000000604000c5  SP: ffff800009c7bde0
>     Regs:    00000000000016ee ffff00001ffd2e28 00000000000016ed 0000000000000001 
>              ffff800016c28000 0000000000000000 0000000000000000 0000000000000000 
>              0000000000000000 0000000000000000 0000000000000000 0000000000000000 
>              0000000000000000 0000000000000000 0000000000000000 0000000000000000 
>              0000000000000000 0000000000000000 0000000000000000 ffff800009399008 
>              ffff8000097d9af0 ffff8000097d99f8 ffff8000093a8db8 ffff8000097d9b18 
>              0000000000000000 0000000000000000 ffff000000339d00 0000000000000000 
>              0000000000000000 ffff800009c7bde0 ffff800008cbb5c4 
>     Context: 00000000000016ee ffff00001ffd2e28 00000000000016ed 0000000000000001 
>              ffff800016c28000 03ffffffffffffff 000000024325db59 ffff8000097de190 
>              ffff00000033a790 ffff800008cbb814 0000000000000a30 0000000000000000 
> 
> Changelog
> ========= 
> v5:

Next time can you include a link to the cover letter of the previous
patch set? It is extremely helpful for understanding the progress to
date and allows reviewers to see prior feedback.

--
Thanks,
Oliver
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

  parent reply	other threads:[~2022-03-22 18:13 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-22  8:06 [PATCH v5 00/22] Support SDEI Virtualization Gavin Shan
2022-03-22  8:06 ` [PATCH v5 01/22] KVM: arm64: Introduce template for inline functions Gavin Shan
2022-03-22 19:42   ` Oliver Upton
2022-03-23 12:16     ` Gavin Shan
2022-03-22  8:06 ` [PATCH v5 02/22] KVM: arm64: Add SDEI virtualization infrastructure Gavin Shan
2022-03-22 22:43   ` Oliver Upton
2022-03-23 12:40     ` Gavin Shan
2022-03-23 17:11   ` Oliver Upton
2022-03-24  6:54     ` Gavin Shan
2022-03-24  9:04       ` Oliver Upton
2022-03-25  6:07         ` Gavin Shan
2022-03-22  8:06 ` [PATCH v5 03/22] KVM: arm64: Support SDEI_VERSION hypercall Gavin Shan
2022-03-22 18:04   ` Oliver Upton
2022-03-23 12:46     ` Gavin Shan
2022-03-23 16:31       ` Oliver Upton
2022-03-24  4:07         ` Gavin Shan
2022-03-24  7:48           ` Oliver Upton
2022-03-25  6:11             ` Gavin Shan
2022-03-22  8:06 ` [PATCH v5 04/22] KVM: arm64: Support SDEI_EVENT_REGISTER hypercall Gavin Shan
2022-03-22  8:06 ` [PATCH v5 05/22] KVM: arm64: Support SDEI_EVENT_{ENABLE, DISABLE} hypercall Gavin Shan
2022-03-22  8:06 ` [PATCH v5 06/22] KVM: arm64: Support SDEI_EVENT_CONTEXT hypercall Gavin Shan
2022-03-22  8:06 ` [PATCH v5 07/22] KVM: arm64: Support SDEI_EVENT_UNREGISTER hypercall Gavin Shan
2022-03-22  8:06 ` [PATCH v5 08/22] KVM: arm64: Support SDEI_EVENT_STATUS hypercall Gavin Shan
2022-03-22  8:06 ` [PATCH v5 09/22] KVM: arm64: Support SDEI_EVENT_GET_INFO hypercall Gavin Shan
2022-03-22  8:06 ` [PATCH v5 10/22] KVM: arm64: Support SDEI_EVENT_ROUTING_SET hypercall Gavin Shan
2022-03-22  8:06 ` [PATCH v5 11/22] KVM: arm64: Support SDEI_PE_{MASK, UNMASK} hypercall Gavin Shan
2022-03-22  8:07 ` [PATCH v5 12/22] KVM: arm64: Support SDEI_{PRIVATE, SHARED}_RESET Gavin Shan
2022-03-22  8:07 ` [PATCH v5 13/22] KVM: arm64: Support SDEI_FEATURES hypercall Gavin Shan
2022-03-22  8:07 ` [PATCH v5 14/22] KVM: arm64: Support SDEI event injection, delivery and cancellation Gavin Shan
2022-03-22  8:07 ` [PATCH v5 15/22] KVM: arm64: Support SDEI_EVENT_SIGNAL hypercall Gavin Shan
2022-03-22 23:06   ` Oliver Upton
2022-03-23 12:52     ` Gavin Shan
2022-03-22  8:07 ` [PATCH v5 16/22] KVM: arm64: Support SDEI_EVENT_{COMPLETE, COMPLETE_AND_RESUME} hypercall Gavin Shan
2022-03-22  8:07 ` [PATCH v5 17/22] KVM: arm64: Support SDEI event notifier Gavin Shan
2022-03-22  8:07 ` [PATCH v5 18/22] KVM: arm64: Support SDEI ioctl commands on VM Gavin Shan
2022-03-23 17:28   ` Oliver Upton
2022-03-25  6:59     ` Gavin Shan
2022-03-25  7:35       ` Oliver Upton
2022-03-25 10:14         ` Gavin Shan
2022-03-22  8:07 ` [PATCH v5 19/22] KVM: arm64: Support SDEI ioctl commands on vCPU Gavin Shan
2022-03-23 17:55   ` Oliver Upton
2022-03-25  7:59     ` Gavin Shan
2022-03-25  8:37       ` Oliver Upton
2022-03-25 10:23         ` Gavin Shan
2022-03-22  8:07 ` [PATCH v5 20/22] KVM: arm64: Export SDEI capability Gavin Shan
2022-03-22  8:07 ` [PATCH v5 21/22] KVM: arm64: Add SDEI document Gavin Shan
2022-03-22  8:07 ` [PATCH v5 22/22] KVM: selftests: Add SDEI test case Gavin Shan
2022-03-22 18:13 ` Oliver Upton [this message]
2022-03-23 12:57   ` [PATCH v5 00/22] Support SDEI Virtualization Gavin Shan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YjoRteSXpPkDGqgp@google.com \
    --to=oupton@google.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=eauger@redhat.com \
    --cc=gshan@redhat.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=shan.gavin@gmail.com \
    --cc=vkuznets@redhat.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).