Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp926421ybp; Fri, 11 Oct 2019 06:34:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqxXHRyWzCG1+T8TT9/LQekvK93jcS9bYNTNmvVp/fpF7/N1TZqAa4pGNeLzaHqwgBotsXId X-Received: by 2002:aa7:c2d7:: with SMTP id m23mr13664156edp.206.1570800882337; Fri, 11 Oct 2019 06:34:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570800882; cv=none; d=google.com; s=arc-20160816; b=VHRT1PklbvSf3EI4x9Yi70zopdFFw1L48SY6syEt2yv23pDmtpU4/EtpEERhr7jhmZ N37pIZN5mHRANSvkKlrm5YV5wXLH+g1SyGYlmqf4Ico8ImZMPvV5IkyZRsmzCsflP3LF +fWaMVyQIFitEwTKBowOeIGP0me9YVLmBRnC1No9OyaSK/BRgimoGc2vLjXQbXUKU1KO maC8n7bd9q6O+SN+u1mf8vJ5FUyCKJ/Mij/VyeiDfgRYMc8aP8bwe0baiujnU0o5FebC Q4jyHaMTz4SQTxRpQKo9a2ghs8cHQsAnhBH5AiPT6hJes0s0yCUFjsVK4WbiJA1yiHMT SsPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=WdhnUlM+M0+IM/irA21bP8AxNEY+BXp/mpD92KRY390=; b=cER6B92Y4EC2dxjVcvGRHonwN5BUdVVnoQiQFx6KpgYSwZ7Idhz3HUJkzlFYDU2Zr1 aUzFt/mcLHRV9LJvXrDd3EHN++64/jr1jslzOZrfrYf/gDzpJet4A5GRmYGrWHWmPePX mmR/0VSC1Ip5OCTUjVb6lRAUu6MmIwCX2xkhvlFfUJUuBFp1P8voIE4YRFM399B6IPFz 7IdOerNt/d8Taf9cylm/gVJo5ReAzVq8hoqD1uJQtqJ5IJvGEmjAT6kyptPgs7/v9bWo bbRldMHOmsEh7gq+X90gIV5eVomOlcdKwOG/7a+PRBY2XsVmMHJGHw/ru+Ljq/ebEZTo z0jQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p39si5989798eda.416.2019.10.11.06.34.17; Fri, 11 Oct 2019 06:34:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728253AbfJKNdt (ORCPT + 99 others); Fri, 11 Oct 2019 09:33:49 -0400 Received: from inca-roads.misterjones.org ([213.251.177.50]:46759 "EHLO inca-roads.misterjones.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727709AbfJKNds (ORCPT ); Fri, 11 Oct 2019 09:33:48 -0400 Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why) by cheepnis.misterjones.org with esmtpsa (TLSv1.2:AES256-GCM-SHA384:256) (Exim 4.80) (envelope-from ) id 1iIv3A-000788-Pa; Fri, 11 Oct 2019 15:33:44 +0200 Date: Fri, 11 Oct 2019 14:33:43 +0100 From: Marc Zyngier To: Mark Rutland Cc: Sai Prakash Ranjan , rnayak@codeaurora.org, suzuki.poulose@arm.com, catalin.marinas@arm.com, linux-kernel@vger.kernel.org, jeremy.linton@arm.com, bjorn.andersson@linaro.org, linux-arm-msm@vger.kernel.org, andrew.murray@arm.com, will@kernel.org, Dave.Martin@arm.com, linux-arm-kernel@lists.infradead.org Subject: Re: Relax CPU features sanity checking on heterogeneous architectures Message-ID: <20191011143343.541da66c@why> In-Reply-To: <20191011105010.GA29364@lakrids.cambridge.arm.com> References: <20191011105010.GA29364@lakrids.cambridge.arm.com> Organization: Approximate X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: mark.rutland@arm.com, saiprakash.ranjan@codeaurora.org, rnayak@codeaurora.org, suzuki.poulose@arm.com, catalin.marinas@arm.com, linux-kernel@vger.kernel.org, jeremy.linton@arm.com, bjorn.andersson@linaro.org, linux-arm-msm@vger.kernel.org, andrew.murray@arm.com, will@kernel.org, Dave.Martin@arm.com, linux-arm-kernel@lists.infradead.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on cheepnis.misterjones.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 11 Oct 2019 11:50:11 +0100 Mark Rutland wrote: > Hi, > > On Fri, Oct 11, 2019 at 11:19:00AM +0530, Sai Prakash Ranjan wrote: > > On latest QCOM SoCs like SM8150 and SC7180 with big.LITTLE arch, below > > warnings are observed during bootup of big cpu cores. > > For reference, which CPUs are in those SoCs? > > > SM8150: > > > > [ 0.271177] CPU features: SANITY CHECK: Unexpected variation in > > SYS_ID_AA64PFR0_EL1. Boot CPU: 0x00000011112222, CPU4: 0x00000011111112 > > The differing fields are EL3, EL2, and EL1: the boot CPU supports > AArch64 and AArch32 at those exception levels, while the secondary only > supports AArch64. > > Do we handle this variation in KVM? We do, at least at vcpu creation time (see kvm_reset_vcpu). But if one of the !AArch32 CPU comes in late in the game (after we've started a guest), all bets are off (we'll schedule the 32bit guest on that CPU, enter the guest, immediately take an Illegal Exception Return, and return to userspace with KVM_EXIT_FAIL_ENTRY). Not sure we could do better, given the HW. My preference would be to fail these CPUs if they aren't present at boot time. M. -- Jazz is not dead. It just smells funny...