From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754950AbdERMjS (ORCPT ); Thu, 18 May 2017 08:39:18 -0400 Received: from foss.arm.com ([217.140.101.70]:59544 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754636AbdERMjQ (ORCPT ); Thu, 18 May 2017 08:39:16 -0400 Subject: Re: [PATCH] arm64: cpufeature: check translation granule size based on kernel config To: Leo Yan References: <1495102873-10858-1-git-send-email-leo.yan@linaro.org> <20170518113627.GC25294@leoy-ThinkPad-T440> Cc: Catalin Marinas , Will Deacon , Mark Rutland , Marc Zyngier , Ard Biesheuvel , James Morse , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Guodong Xu , Haojian Zhuang , Douglas Raillard From: Suzuki K Poulose Message-ID: <9db90634-6bb1-23e0-5cc8-19c02eceac04@arm.com> Date: Thu, 18 May 2017 13:39:12 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170518113627.GC25294@leoy-ThinkPad-T440> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/05/17 12:36, Leo Yan wrote: > Hi Suzuki, > > On Thu, May 18, 2017 at 11:39:01AM +0100, Suzuki K Poulose wrote: >> On 18/05/17 11:21, Leo Yan wrote: >>> In the big.LITTLE system with two clusters, one is CA53 cluster and >>> another is CA73 cluster. CA53 doesn't support 16KB memory translation >>> granule size (4.3.21 AArch64 Memory Model Feature Register 0, EL1; ARM >>> DDI 0500F), but CA73 supports this feature (4.3.27 AArch64 Memory Model >>> Feature Register 0, EL1; ARM 100048_0002_04_en). As result, the kernel >>> reports log for "Unexpected variation" as below. >>> >>> [ 0.182113] CPU features: SANITY CHECK: Unexpected variation in SYS_ID_AA64MMFR0_EL1. Boot CPU: 0x00000000001122, CPU4: 0x00000000101122 >> >>> >>> This patch is to change the checking CPU feature for memory translation >>> granule size based on kernel configuration. If kernel configuration has >>> selected to use one specific memory translation granule size, then we >>> will do strict sanity checking cross all CPUs. Otherwise we can skip to >>> check unused features for memory translation granule size if kernel >>> doesn't use it. >>> >> >> If we were to suppress the warning (more on that below), we could simply >> make this feature a NON_STRICT, since the unsupported CPUs won't boot >> with 16K to hit this sanity check. >> >> However, there is a problem with disabling this warning. If a VM starts >> using 16KB page size on a 4K/64K host, the VM could end up in unknown >> failures when it switches to an unsupported CPU (after it has booted). >> Of course the real fix lies in making the KVM exposing the safe value >> for granule support to the VCPUs (which is currently being worked on by >> Douglas in Cc). So, when we have that ready, we could make it NON_STRICT >> instead of this approach. > > Thanks for the info :) > > I will use below patch for production branch temporarily. You could Which production branch do you mean above ? Is it something in your intenral repository ? Suzuki