From: Salil Mehta <salil.mehta@huawei.com>
To: Oliver Upton <oliver.upton@linux.dev>
Cc: Marc Zyngier <maz@kernel.org>,
"kvmarm@lists.linux.dev" <kvmarm@lists.linux.dev>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
James Morse <james.morse@arm.com>,
"Suzuki K Poulose" <suzuki.poulose@arm.com>,
yuzenghui <yuzenghui@huawei.com>,
"Sean Christopherson" <seanjc@google.com>
Subject: RE: [PATCH v3 08/13] KVM: arm64: Add support for KVM_EXIT_HYPERCALL
Date: Thu, 18 May 2023 08:54:59 +0000 [thread overview]
Message-ID: <d04f46d250df46579d640f7e052283fb@huawei.com> (raw)
In-Reply-To: <ZGUfFn0jai9n4eSF@linux.dev>
Hi Oliver,
> From: Oliver Upton <oliver.upton@linux.dev>
> Sent: Wednesday, May 17, 2023 7:38 PM
> To: Salil Mehta <salil.mehta@huawei.com>
> Cc: Marc Zyngier <maz@kernel.org>; kvmarm@lists.linux.dev;
> kvm@vger.kernel.org; Paolo Bonzini <pbonzini@redhat.com>; James Morse
> <james.morse@arm.com>; Suzuki K Poulose <suzuki.poulose@arm.com>; yuzenghui
> <yuzenghui@huawei.com>; Sean Christopherson <seanjc@google.com>
> Subject: Re: [PATCH v3 08/13] KVM: arm64: Add support for
> KVM_EXIT_HYPERCALL
>
> Hi Salil,
>
> On Wed, May 17, 2023 at 06:00:18PM +0000, Salil Mehta wrote:
>
> [...]
>
> > > > Should we expose the ESR, or at least ESR_EL2.IL as an additional
> > > > flag?
> >
> >
> > I think we would need "Immediate value" of the ESR_EL2 register in the
> > user-space/VMM to be able to construct the syndrome value. I cannot see
> > where it is being sent?
>
> The immediate value is not exposed to userspace, although by definition
> the immediate value must be zero. The SMCCC spec requires all compliant
> calls to use an immediate of zero (DEN0028E 2.9).
Sure. I do understand this.
> Is there a legitimate use case for hypercalls with a nonzero immediate?
To be frank I was not sure of this either and therefore I thought it would
be safe to keep the handling in user-space/Qemu generic as it is now by
constructing a syndrome value depending upon immediate value and other
accompanying parameters from the KVM.
Also, I am not sure what it could break or what platforms it could break.
I think we need some Qemu folks to pitch-in and comment on this.
> They would no longer be considered SMCCC calls at that point, so they
> wouldn't work with the new UAPI.
True. So should we do this change now?
Thanks
Salil
next prev parent reply other threads:[~2023-05-18 9:14 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-04 15:40 [PATCH v3 00/13] KVM: arm64: Userspace SMCCC call filtering Oliver Upton
2023-04-04 15:40 ` [PATCH v3 01/13] KVM: x86: Redefine 'longmode' as a flag for KVM_EXIT_HYPERCALL Oliver Upton
2023-04-04 15:40 ` [PATCH v3 02/13] KVM: arm64: Add a helper to check if a VM has ran once Oliver Upton
2023-04-04 15:40 ` [PATCH v3 03/13] KVM: arm64: Add vm fd device attribute accessors Oliver Upton
2023-04-04 15:40 ` [PATCH v3 04/13] KVM: arm64: Rename SMC/HVC call handler to reflect reality Oliver Upton
2023-04-04 15:40 ` [PATCH v3 05/13] KVM: arm64: Start handling SMCs from EL1 Oliver Upton
2023-04-04 15:40 ` [PATCH v3 06/13] KVM: arm64: Refactor hvc filtering to support different actions Oliver Upton
2023-04-04 15:40 ` [PATCH v3 07/13] KVM: arm64: Use a maple tree to represent the SMCCC filter Oliver Upton
2023-04-04 15:40 ` [PATCH v3 08/13] KVM: arm64: Add support for KVM_EXIT_HYPERCALL Oliver Upton
2023-04-05 7:35 ` Marc Zyngier
2023-04-05 11:59 ` Marc Zyngier
2023-04-05 15:30 ` Oliver Upton
2023-05-17 18:00 ` Salil Mehta
2023-05-17 18:38 ` Oliver Upton
2023-05-18 8:06 ` Marc Zyngier
2023-05-18 9:08 ` Salil Mehta
2023-05-18 9:42 ` Marc Zyngier
2023-05-18 12:16 ` Salil Mehta
2023-05-18 8:54 ` Salil Mehta [this message]
2023-04-04 15:40 ` [PATCH v3 09/13] KVM: arm64: Introduce support for userspace SMCCC filtering Oliver Upton
2023-04-04 15:40 ` [PATCH v3 10/13] KVM: arm64: Return NOT_SUPPORTED to guest for unknown PSCI version Oliver Upton
2023-04-04 15:40 ` [PATCH v3 11/13] KVM: arm64: Let errors from SMCCC emulation to reach userspace Oliver Upton
2023-04-04 15:40 ` [PATCH v3 12/13] KVM: selftests: Add a helper for SMCCC calls with SMC instruction Oliver Upton
2023-04-04 15:40 ` [PATCH v3 13/13] KVM: selftests: Add test for SMCCC filter Oliver Upton
2023-04-05 18:45 ` [PATCH v3 00/13] KVM: arm64: Userspace SMCCC call filtering Marc Zyngier
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=d04f46d250df46579d640f7e052283fb@huawei.com \
--to=salil.mehta@huawei.com \
--cc=james.morse@arm.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=maz@kernel.org \
--cc=oliver.upton@linux.dev \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=suzuki.poulose@arm.com \
--cc=yuzenghui@huawei.com \
/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