Hi Oliver, > From: Oliver Upton <oliver.upton@xxxxxxxxx> > Sent: Wednesday, May 17, 2023 7:38 PM > To: Salil Mehta <salil.mehta@xxxxxxxxxx> > Cc: Marc Zyngier <maz@xxxxxxxxxx>; kvmarm@xxxxxxxxxxxxxxx; > kvm@xxxxxxxxxxxxxxx; Paolo Bonzini <pbonzini@xxxxxxxxxx>; James Morse > <james.morse@xxxxxxx>; Suzuki K Poulose <suzuki.poulose@xxxxxxx>; yuzenghui > <yuzenghui@xxxxxxxxxx>; Sean Christopherson <seanjc@xxxxxxxxxx> > 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