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 X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7690EC433E0 for ; Wed, 10 Feb 2021 22:49:22 +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 0F45464E63 for ; Wed, 10 Feb 2021 22:49:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0F45464E63 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:39708 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9yIT-0006RP-6I for qemu-devel@archiver.kernel.org; Wed, 10 Feb 2021 17:49:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34614) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9y8r-0007Be-M8 for qemu-devel@nongnu.org; Wed, 10 Feb 2021 17:39:25 -0500 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]:39170) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l9y8o-0005Vq-Vn for qemu-devel@nongnu.org; Wed, 10 Feb 2021 17:39:25 -0500 Received: by mail-ej1-x62f.google.com with SMTP id p20so7006490ejb.6 for ; Wed, 10 Feb 2021 14:39:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=STrixqFRgVyXehg02W0+bymMaMD6F3+Iupunf7V2Lz4=; b=fRDePXRW//Q/u+ViZXNKlVMkOBtBEGvxryRXW1uU6y2DalP6dkzDMLk5XCCkKB7T15 yiMcJuzqyQ8lb8zxlFPhzf9S9fcXJ57bN/ejFT+SNbffFeu3f1Q2lsnpAEPGFewTqH5f pPdRZlcDcN3U5u2CIwWFcKB1uvoXMHhNKj9LPfZwmphTsVqXerV5GdFnA7ce56xqdIQU NjfS8TdMBVtTwTe0XyYvQDcW6XGVBTFXpb7hEsB+tlTiSNQUQbqGsIFXPQevn/de+/a0 k8L85U/U1h9cHorzrt0VJO7k+SA0t60A24XMa5T1aDLwzHoyH3atdn/JSraEWNd1ZUSr BjDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=STrixqFRgVyXehg02W0+bymMaMD6F3+Iupunf7V2Lz4=; b=Cn9/fDWjVAJc3H6Bb9iuIzQpFXPyn8QBOaSRbzobkoQI9XYhYnLOteL4SYAV/ZjcgD YCRirkw4QHxfAH0oIzy9pvMlPzVEXXKP7/AuwU1JTV26KpgQOfg1wA05v4UMKtU3jluu u3iPaAofaIHu7QLIbPcU30qjVybJepne6+uilR5Euh2ePl3mesN9PepiXOpw+ZeKncp3 o3xnmDDOUAErfKGGSJVkqBJSV47Bg7kHqIIQh268yUj9eFryrCdPxHEC0mwd9i6Pvvkg zcM8Zqfclbel6rOzD3GaCwvlNhUhFDWOxNIYvzvXkLu657t5xAstqSSIqoC4EcIkp/WK 7mvg== X-Gm-Message-State: AOAM531xw50E/FZCOrfXKv8PjjtWB60fU5ALHM69ar+rflJ+P/HIUXiW MnjM9ZTicjOZjkKA71PhAOocmtIP7iYrGcUIBkIEOw== X-Google-Smtp-Source: ABdhPJy1WI5y8zOVidSyOG+TnxCRDJ68gEZX8VB7eIRxQSzsNufYpfcHoZNR4GgnTbs8AwONvmHma1hKp+RRUlVSTSU= X-Received: by 2002:a17:906:1d51:: with SMTP id o17mr5216629ejh.85.1612996761210; Wed, 10 Feb 2021 14:39:21 -0800 (PST) MIME-Version: 1.0 References: <20210120224444.71840-1-agraf@csgraf.de> <20210120224444.71840-8-agraf@csgraf.de> <298dcf49-1a99-9406-275f-b05c8befd13b@csgraf.de> In-Reply-To: <298dcf49-1a99-9406-275f-b05c8befd13b@csgraf.de> From: Peter Maydell Date: Wed, 10 Feb 2021 22:39:09 +0000 Message-ID: Subject: Re: [PATCH v6 07/11] hvf: Add Apple Silicon support To: Alexander Graf Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=peter.maydell@linaro.org; helo=mail-ej1-x62f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action 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: , Cc: Eduardo Habkost , Richard Henderson , QEMU Developers , Cameron Esfahani , Roman Bolshakov , qemu-arm , Frank Yang , Paolo Bonzini , Peter Collingbourne Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Wed, 10 Feb 2021 at 22:21, Alexander Graf wrote: > > > On 28.01.21 16:52, Peter Maydell wrote: > > On Wed, 20 Jan 2021 at 22:44, Alexander Graf wrote: > >> + break; > >> + case EC_AA64_SMC: > >> + cpu_synchronize_state(cpu); > >> + if (arm_is_psci_call(arm_cpu, EXCP_SMC)) { > >> + arm_handle_psci_call(arm_cpu); > > Have you checked that all the PSCI code really can cope > > with being called from a non-TCG accelerator? (As an example > > the CPU_SUSPEND implementation calls the TCG wfi helper...) > > > I have not explicitly tried it, but I don't see why the TCG > implementation of wfi should in principle break with hvf. Because the TCG implementation of wfi is "set some state fields and then longjump out to the TCG exec_cpu code-execution loop", and hvf doesn't use that loop. > >> + } else { > >> + DPRINTF("unknown SMC! %016llx", env->xregs[0]); > >> + env->xregs[0] = -1; > > This should inject an UNDEF exception into the guest. (Compare > > the pre_smc helper in target/arm/op_helper.c for TCG.) > > > That would break Windows, which is one of the main use cases for hvf > support in QEMU. Why is Windows making bogus SMC calls ? thanks -- PMM