From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43843) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f8RW6-0003lc-Ly for qemu-devel@nongnu.org; Tue, 17 Apr 2018 10:23:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f8RW5-0004Qm-Aa for qemu-devel@nongnu.org; Tue, 17 Apr 2018 10:23:30 -0400 Date: Tue, 17 Apr 2018 10:23:18 -0400 From: Aaron Lindsay Message-ID: <20180417142318.GO24561@codeaurora.org> References: <1521232280-13089-1-git-send-email-alindsay@codeaurora.org> <1521232280-13089-16-git-send-email-alindsay@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v3 15/22] target/arm: Add ARM_FEATURE_V7VE for v7 Virtualization Extensions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-arm , Alistair Francis , Wei Huang , Peter Crosthwaite , QEMU Developers , Michael Spradling , Digant Desai On Apr 12 18:17, Peter Maydell wrote: > On 16 March 2018 at 20:31, Aaron Lindsay wrote: > > Signed-off-by: Aaron Lindsay > > --- > > target/arm/cpu.c | 3 +++ > > target/arm/cpu.h | 1 + > > 2 files changed, 4 insertions(+) > > > > diff --git a/target/arm/cpu.c b/target/arm/cpu.c > > index b0d032c..e544f1d 100644 > > --- a/target/arm/cpu.c > > +++ b/target/arm/cpu.c > > @@ -765,6 +765,7 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp) > > /* Some features automatically imply others: */ > > if (arm_feature(env, ARM_FEATURE_V8)) { > > set_feature(env, ARM_FEATURE_V7); > > + set_feature(env, ARM_FEATURE_V7VE); > > set_feature(env, ARM_FEATURE_ARM_DIV); > > set_feature(env, ARM_FEATURE_LPAE); > > } > > @@ -1481,6 +1482,7 @@ static void cortex_a7_initfn(Object *obj) > > > > cpu->dtb_compatible = "arm,cortex-a7"; > > set_feature(&cpu->env, ARM_FEATURE_V7); > > + set_feature(&cpu->env, ARM_FEATURE_V7VE); > > set_feature(&cpu->env, ARM_FEATURE_VFP4); > > set_feature(&cpu->env, ARM_FEATURE_NEON); > > set_feature(&cpu->env, ARM_FEATURE_THUMB2EE); > > @@ -1526,6 +1528,7 @@ static void cortex_a15_initfn(Object *obj) > > > > cpu->dtb_compatible = "arm,cortex-a15"; > > set_feature(&cpu->env, ARM_FEATURE_V7); > > + set_feature(&cpu->env, ARM_FEATURE_V7VE); > > set_feature(&cpu->env, ARM_FEATURE_VFP4); > > set_feature(&cpu->env, ARM_FEATURE_NEON); > > set_feature(&cpu->env, ARM_FEATURE_THUMB2EE); > > diff --git a/target/arm/cpu.h b/target/arm/cpu.h > > index fb2f983..cc1e2fb 100644 > > --- a/target/arm/cpu.h > > +++ b/target/arm/cpu.h > > @@ -1439,6 +1439,7 @@ enum arm_features { > > ARM_FEATURE_OMAPCP, /* OMAP specific CP15 ops handling. */ > > ARM_FEATURE_THUMB2EE, > > ARM_FEATURE_V7MP, /* v7 Multiprocessing Extensions */ > > + ARM_FEATURE_V7VE, /* v7 with Virtualization Extensions */ > > ARM_FEATURE_V4T, > > ARM_FEATURE_V5, > > ARM_FEATURE_STRONGARM, > > What's the difference between this and ARM_FEATURE_EL2 ? I use ARM_FEATURE_V7VE in a later patch to guard against implementing PMOVSSET on v7 machines which don't implement the virtualization extensions (http://lists.nongnu.org/archive/html/qemu-devel/2018-03/msg04917.html). I could use ARM_FEATURE_EL2, but declaring that v7 machines supported EL2 didn't feel right. I don't feel strongly one way or the other - how do you prefer to handle this? -Aaron -- Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.