From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD6B417FC for ; Thu, 18 May 2023 08:06:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F7A9C433EF; Thu, 18 May 2023 08:06:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684397191; bh=ukx0kR6wVUdBLLkQ5cmS/keY/vGVx91Dm6ZPJJOPhpQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ZxRkmPHDoLnQsX5qXKgkNlZ5SoWn08jKauwPaf4MpcJz35g8dzr+qSzwlg91frT+B fUVp9Xn7+lwcLjLLc4YAAv8Z2Aj9/ATLnYqvCfsg74OfCh6XXGjrQ1mLLbZLVQ+IK/ 7cDuDQK9CkDL061INn0ljrc11hfw/uzVEcgdayO8hc/Ywr8wH/lY49U51+BInUfHGO pnR0y+yrMG+qV9VnRYQfbwleYSV5V/75uZIPB4XAeI9p6wEKAiyJVa9AWl3sZDVLtK C3k4bDynI3+kY1wPGycGd8ZdRLxAhJgusOJvx0nal+NysV1+1gCFHdMoYmRVH93VZB JFq6/N9x+NpWw== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pzYeb-00G50K-43; Thu, 18 May 2023 09:06:29 +0100 Date: Thu, 18 May 2023 09:06:28 +0100 Message-ID: <86ilcqkqrf.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton Cc: Salil Mehta , "kvmarm@lists.linux.dev" , "kvm@vger.kernel.org" , Paolo Bonzini , James Morse , Suzuki K Poulose , yuzenghui , Sean Christopherson Subject: Re: [PATCH v3 08/13] KVM: arm64: Add support for KVM_EXIT_HYPERCALL In-Reply-To: References: <20230404154050.2270077-1-oliver.upton@linux.dev> <20230404154050.2270077-9-oliver.upton@linux.dev> <87o7o26aty.wl-maz@kernel.org> <86pm8iv8tj.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: oliver.upton@linux.dev, salil.mehta@huawei.com, kvmarm@lists.linux.dev, kvm@vger.kernel.org, pbonzini@redhat.com, james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, seanjc@google.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Wed, 17 May 2023 19:38:14 +0100, Oliver Upton wrote: > > 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). > > Is there a legitimate use case for hypercalls with a nonzero immediate? > They would no longer be considered SMCCC calls at that point, so they > wouldn't work with the new UAPI. I agree. The use of non-zero immediate has long been deprecated. I guess we should actually reject non-zero immediate for HVC just like we do for SMC. If there is an actual need for a non-zero immediate to be propagated to userspace (want to emulate Xen's infamous 'HVC #0xEA1'?), then this should be an extension to the current API. Thanks, M. -- Without deviation from the norm, progress is not possible.