public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: Heyi Guo <guoheyi@huawei•com>
To: <linux-arm-kernel@lists•infradead.org>,
	<kvmarm@lists•cs.columbia.edu>, <linux-kernel@vger•kernel.org>,
	<kvm@vger•kernel.org>, <qemu-arm@nongnu•org>
Cc: Mark Rutland <mark.rutland@arm•com>,
	Peter Maydell <peter.maydell@linaro•org>,
	Marc Zyngier <marc.zyngier@arm•com>,
	James Morse <james.morse@arm•com>, Heyi Guo <guoheyi@huawei•com>,
	wanghaibin.wang@huawei•com, Dave Martin <Dave.Martin@arm•com>
Subject: [RFC PATCH 0/2] Add virtual SDEI support for arm64
Date: Tue, 24 Sep 2019 23:20:52 +0800	[thread overview]
Message-ID: <1569338454-26202-1-git-send-email-guoheyi@huawei.com> (raw)

As promised, this is the first RFC patch set for arm64 virtual SDEI
support.

New kvm capability KVM_CAP_FORWARD_HYPERCALL is added to probe if kvm
supports forwarding hypercalls, and the capability should be enabled
explicitly. PSCI can be set as exception for backward compatibility.

We reuse the existing term "hypercall" for SMC/HVC, as well as the
hypercall structure in kvm_run to exchange arguments and return
values. The definition on arm64 is as below:

exit_reason: KVM_EXIT_HYPERCALL

Input:
  nr: the immediate value of SMC/HVC calls; not really used today.
  args[6]: x0..x5 (This is not fully conform with SMCCC which requires
           x6 as argument as well, but use space can use GET_ONE_REG
           ioctl for such rare case).

Return:
  args[0..3]: x0..x3 as defined in SMCCC. We need to extract
              args[0..3] and write them to x0..x3 when hypercall exit
              returns.

And there is a corresponding patch set for qemu.

Please give your comments and suggestions.

Thanks,
HG

Cc: Peter Maydell <peter.maydell@linaro•org>
Cc: Dave Martin <Dave.Martin@arm•com>
Cc: Marc Zyngier <marc.zyngier@arm•com>
Cc: Mark Rutland <mark.rutland@arm•com>
Cc: James Morse <james.morse@arm•com>

Heyi Guo (2):
  kvm/arm: add capability to forward hypercall to user space
  kvm/arm64: expose hypercall_forwarding capability

 arch/arm/include/asm/kvm_host.h   |  5 +++++
 arch/arm64/include/asm/kvm_host.h |  5 +++++
 arch/arm64/kvm/reset.c            | 25 +++++++++++++++++++++++++
 include/kvm/arm_psci.h            |  1 +
 include/uapi/linux/kvm.h          |  3 +++
 virt/kvm/arm/arm.c                |  2 ++
 virt/kvm/arm/psci.c               | 30 ++++++++++++++++++++++++++++--
 7 files changed, 69 insertions(+), 2 deletions(-)

-- 
1.8.3.1


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

             reply	other threads:[~2019-09-24 15:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-24 15:20 Heyi Guo [this message]
2019-09-24 15:20 ` [RFC PATCH 1/2] kvm/arm: add capability to forward hypercall to user space Heyi Guo
2019-10-01 17:19   ` James Morse
2019-10-09 12:33     ` Guoheyi
2019-10-21 16:42       ` James Morse
2019-10-31 13:07         ` Guoheyi
2019-09-24 15:20 ` [RFC PATCH 2/2] kvm/arm64: expose hypercall_forwarding capability Heyi Guo
2019-10-01 17:19   ` James Morse

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=1569338454-26202-1-git-send-email-guoheyi@huawei.com \
    --to=guoheyi@huawei$(echo .)com \
    --cc=Dave.Martin@arm$(echo .)com \
    --cc=james.morse@arm$(echo .)com \
    --cc=kvm@vger$(echo .)kernel.org \
    --cc=kvmarm@lists$(echo .)cs.columbia.edu \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=marc.zyngier@arm$(echo .)com \
    --cc=mark.rutland@arm$(echo .)com \
    --cc=peter.maydell@linaro$(echo .)org \
    --cc=qemu-arm@nongnu$(echo .)org \
    --cc=wanghaibin.wang@huawei$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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