From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05D10C433F5 for ; Mon, 15 Nov 2021 11:39:45 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9ADBC6108F for ; Mon, 15 Nov 2021 11:39:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9ADBC6108F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=csgraf.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:35996 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmaKt-0002it-L6 for qemu-devel@archiver.kernel.org; Mon, 15 Nov 2021 06:39:43 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35996) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmaK9-0001s7-0h; Mon, 15 Nov 2021 06:38:57 -0500 Received: from mail.csgraf.de ([85.25.223.15]:39676 helo=zulu616.server4you.de) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmaK4-0002AB-9o; Mon, 15 Nov 2021 06:38:56 -0500 Received: from [10.95.147.162] (ec2-3-122-114-9.eu-central-1.compute.amazonaws.com [3.122.114.9]) by csgraf.de (Postfix) with ESMTPSA id F1DF36080381; Mon, 15 Nov 2021 12:38:41 +0100 (CET) Message-ID: <67c00a6a-e50a-3ea6-ef1d-98494fdbd729@csgraf.de> Date: Mon, 15 Nov 2021 12:38:40 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: [PATCH] arm: Don't remove EL3 exposure for SMC conduit To: Peter Maydell References: <8639608F-1685-48B8-B965-255D30B213F8@csgraf.de> From: Alexander Graf In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=85.25.223.15; envelope-from=agraf@csgraf.de; helo=zulu616.server4you.de X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-2.278, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?Q?Alex_Benn=c3=a9e?= , qemu-arm@nongnu.org, Richard Henderson , qemu-devel@nongnu.org, Andrei Warkentin Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 15.11.21 11:46, Peter Maydell wrote: > On Sun, 14 Nov 2021 at 17:41, Alexander Graf wrote: >> >> >>> Am 14.11.2021 um 18:20 schrieb Peter Maydell : >>> This is tricky, because we use the cpu->isar values to determine whether >>> we should be emulating things. So this change means we now create an >>> inconsistent CPU which in some ways claims to have EL3 (the ISAR ID >>> bits say so) and in some ways does not (the ARM_FEATURE_EL3 flag is >>> unset), and depending on which of the two "do we have EL3?" methods >>> any bit of the TCG code is using will give different results... >> Do you think it would be sufficient to go through all readers of the isar bits and guard them behind an ARM_FEATURE_EL3 check in addition? I'll be happy to do so then! :) > That would be a big reverse-course on a design choice we made that > the preference is to look at the ID registers and phase out the > use of ARM_FEATURE bits where possible. I'm open to alternatives. As it stands, we're lying to the guest because we tell it "SMC is not available" but ask it to call SMC for PSCI, which is bad too. Alex