From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35267) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xbrdm-0001A2-W2 for qemu-devel@nongnu.org; Wed, 08 Oct 2014 09:51:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xbrdd-0005wB-Tt for qemu-devel@nongnu.org; Wed, 08 Oct 2014 09:50:54 -0400 Received: from smtp.codeaurora.org ([198.145.11.231]:52914) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xbrdd-0005w4-J4 for qemu-devel@nongnu.org; Wed, 08 Oct 2014 09:50:45 -0400 Message-ID: <54354131.6040103@codeaurora.org> Date: Wed, 08 Oct 2014 09:50:41 -0400 From: Christopher Covington MIME-Version: 1.0 References: <1397730846-7576-1-git-send-email-peter.maydell@linaro.org> <1397730846-7576-13-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1397730846-7576-13-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL 12/51] target-arm: A64: Implement DC ZVA List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org Hi Peter, On 04/17/2014 06:33 AM, Peter Maydell wrote: > Implement the DC ZVA instruction, which clears a block of memory. > The fast path obtains a pointer to the underlying RAM via the TCG TLB > data structure so we can do a direct memset(), with fallback to a > simple byte-store loop in the slow path. > diff --git a/target-arm/helper.c b/target-arm/helper.c > index 62f7fd3..2ffc588 100644 > --- a/target-arm/helper.c > +++ b/target-arm/helper.c > +static uint64_t aa64_dczid_read(CPUARMState *env, const ARMCPRegInfo *ri) > +{ > + ARMCPU *cpu = arm_env_get_cpu(env); > + int dzp_bit = 1 << 4; > + > + /* DZP indicates whether DC ZVA access is allowed */ > + if (aa64_zva_access(env, NULL) != CP_ACCESS_OK) { I believe this logic for the Data Zero Prohibited field is inverted, causing eglibc to use STP rather than DC ZVA for __memset. > + dzp_bit = 0; > + } > + return cpu->dcz_blocksize | dzp_bit; > +} Thanks, Christopher -- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation.