Received: by 2002:adf:ef42:0:0:0:0:0 with SMTP id c2csp2937341wrp; Fri, 20 Sep 2019 15:00:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqwKlRIzJUlk8bwWwoX5mOOETKJCgZa+UrbOnyw0uiVKEK/EGtQCJOXjGnxSoU5T59vQ5vzu X-Received: by 2002:a17:906:c79a:: with SMTP id cw26mr20726163ejb.265.1569016801354; Fri, 20 Sep 2019 15:00:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569016801; cv=none; d=google.com; s=arc-20160816; b=zR+tI1xEx3DHFdWv+i3PEQWugUBg7d0ntERvfua6cN2RTrMWp7If+/tMsfDw83WQGs PdGv8vlK/ZrxnLyyN33d0cRiqqez9OOh2/Y0TbU3nAFjg8fUCoe1VKYfymYWQqaObBbt I+0XJQOIb0S8/oCg+nNA6jsRg9fdAtQlOFmn9TuoA4YXHoiThrLb1IK39eb5suxAo1ux kFqjWk4TFe4MsOUSggrtouyun0S/F2HL5reZvfHjPfIHQ0nh3KEG0tHYLHDF7ky2MhzU ocYJimEG+cvUtoIePKPGLQqbtvnynYdboWJMJr2Lq2f1NaU8AbtlsEh+Frr7JKAHlOAK 8tWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:openpgp:from:references:to:subject:dkim-signature; bh=Fl/f3/ggFALzae9KsX0yoWKHmaMvS7SHiXxmHzfRV2g=; b=VhhUpvaYS/YscofzCmBn/wJXv3GbZYfZuVxdR8SdZtKgwvgNa6qAE2yh8lJ5+jZ3Wq hy8DHnaCPQ2Yzq9NHBawyCCi2wne1XeIjRGeD2N+GLirfCnaGejqIcezuauBRev++EIs VwMortDALVgt91B3P9Yhk/YUbEVh5BY1kPj/nSbiLe3I0rgUI0j6VeGY1yZTSMZc3UQd RXxYRW3b7djCyG1e34vaLOinp1UFhdqoGA8L1oylInV4ltqFzYcsZC8M43sZN2fQVwPy rrBzRWtTZBpe7jQvV90339K6a0gSSJdZr4l27EswWZZdtdIL/2brMA5iCAORGimIzJ85 iVIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vDW+y7o+; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z16si2266547edb.420.2019.09.20.15.00.01 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Sep 2019 15:00:01 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vDW+y7o+; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:35664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBQwa-0003oK-Ei for alex.bennee@linaro.org; Fri, 20 Sep 2019 18:00:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55691) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBQwC-0003nm-GL for qemu-devel@nongnu.org; Fri, 20 Sep 2019 17:59:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iBQwB-0000nU-3x for qemu-devel@nongnu.org; Fri, 20 Sep 2019 17:59:36 -0400 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:37088) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iBQwA-0000nH-SN for qemu-devel@nongnu.org; Fri, 20 Sep 2019 17:59:35 -0400 Received: by mail-pl1-x641.google.com with SMTP id b10so3808872plr.4 for ; Fri, 20 Sep 2019 14:59:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:references:from:openpgp:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Fl/f3/ggFALzae9KsX0yoWKHmaMvS7SHiXxmHzfRV2g=; b=vDW+y7o+zX5Fz1FCK2oMXaFJWCbR6923xJDqoc0+TnBTiHo8q+kwtXLAGBOs6aka7X Ds5NdII/ESvYD0IzzZqovlRZ2qMDpTZ9AlVNNagNtkxsdiXjS9DZ4DHCy4l/fkMDFDBd 8CtUk76bXOHdPaK7lLyAqCZpmhemST7IUVqPA0GDK9LsO0ZTgSm9nUFr6aq6kLzR/t3P STkQN/ArmDNVt6B4ZR13t0HxvQL2ygw1iVHmam32wePD3XYh4aI2/5/VeClMJKqqNUQx UpUtsF33/fiMcj31arwUUkaYn2F8MBa9XJEt77vf7Q8XW5gveAUwQEjOtqF/eIKak3fA ajRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Fl/f3/ggFALzae9KsX0yoWKHmaMvS7SHiXxmHzfRV2g=; b=VoCI0/8z232NanLzKqRDIpiIX08Oz75VvIYXYieYXbfdVEJyxW3R2eoOiMR2wGFHMw hBGh2ajN5E0c9wOfdI1kdLswF4R8GE4bSWLr6vqIeG3LuYlCHGI6rOR6DNSMzhuyykBY 7MJT5eeZav18s++jC+ZefsJrP5Kf8SEMLAc1mWjfxNkKNiPrNfA83XIya92I7hMWy0PN 4uwnHlbocm/4HC5y1Wi5dMEjryggaYATS+5YweKITMi29dMeY37J8zYLCRgJ/mWfluuK ztoNTHYS2MPiNzUuSgTsVLJY32mZNruu7uyUEmm/zITmnEranHI46wbhDvcKCP60dJ5a q+RQ== X-Gm-Message-State: APjAAAUc05Em25S5HlWbfalAA21NVhWtFAa7USMS+pFv0qSclg0VDLx5 RcyOB2wUMm61qGdP+qSBxVRAQ0esHWM= X-Received: by 2002:a17:902:202:: with SMTP id 2mr18424853plc.96.1569016772774; Fri, 20 Sep 2019 14:59:32 -0700 (PDT) Received: from [192.168.1.11] (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id c10sm3478780pfo.49.2019.09.20.14.59.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Sep 2019 14:59:31 -0700 (PDT) Subject: Re: [PATCH] hw/arm/boot.c: Set NSACR.{CP11,CP10} for NS kernel boots To: Peter Maydell , qemu-arm@nongnu.org, qemu-devel@nongnu.org References: <20190920174039.3916-1-peter.maydell@linaro.org> From: Richard Henderson Openpgp: preference=signencrypt Message-ID: Date: Fri, 20 Sep 2019 14:59:29 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190920174039.3916-1-peter.maydell@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::641 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-devel" X-TUID: kbbqrIRjLU/N On 9/20/19 10:40 AM, Peter Maydell wrote: > If we're booting a Linux kernel directly into Non-Secure > state on a CPU which has Secure state, then make sure we > set the NSACR CP11 and CP10 bits, so that Non-Secure is allowed > to access the FPU. Otherwise an AArch32 kernel will UNDEF as > soon as it tries to use the FPU. > > It used to not matter that we didn't do this until commit > fc1120a7f5f2d4b6, where we implemented actually honouring > these NSACR bits. > > The problem only exists for CPUs where EL3 is AArch32; the > equivalent AArch64 trap bits are in CPTR_EL3 and are "0 to > not trap, 1 to trap", so the reset value of the register > permits NS access, unlike NSACR. > > Fixes: fc1120a7f5 > Fixes: https://bugs.launchpad.net/qemu/+bug/1844597 > Cc: qemu-stable@nongnu.org > Signed-off-by: Peter Maydell > --- Reviewed-by: Richard Henderson r~