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=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 B87F8C433F5 for ; Thu, 16 Sep 2021 17:49:30 +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 50B7660F50 for ; Thu, 16 Sep 2021 17:49:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 50B7660F50 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]:48068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQvVp-0008RA-D9 for qemu-devel@archiver.kernel.org; Thu, 16 Sep 2021 13:49:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44284) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQvTo-0006tw-7t; Thu, 16 Sep 2021 13:47:24 -0400 Received: from mail.csgraf.de ([85.25.223.15]:51466 helo=zulu616.server4you.de) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQvTY-0000kv-3x; Thu, 16 Sep 2021 13:47:22 -0400 Received: from MacBook-Air.alex.local (dynamic-077-009-016-098.77.9.pool.telefonica.de [77.9.16.98]) by csgraf.de (Postfix) with ESMTPSA id 63E5860805C8; Thu, 16 Sep 2021 19:47:04 +0200 (CEST) Subject: Re: [PATCH v11 06/10] hvf: arm: Implement -cpu host To: Peter Maydell References: <20210915181049.27597-1-agraf@csgraf.de> <20210915181049.27597-7-agraf@csgraf.de> <8e219cb0-8b65-faf8-f636-5c1d24471f84@csgraf.de> From: Alexander Graf Message-ID: Date: Thu, 16 Sep 2021 19:47:03 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Received-SPF: pass client-ip=85.25.223.15; envelope-from=agraf@csgraf.de; helo=zulu616.server4you.de X-Spam_score_int: -33 X-Spam_score: -3.4 X-Spam_bar: --- X-Spam_report: (-3.4 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-1.488, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=ham 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 , Sergio Lopez , Peter Collingbourne , Richard Henderson , QEMU Developers , Cameron Esfahani , Roman Bolshakov , qemu-arm , Frank Yang , Paolo Bonzini , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , Ard Biesheuvel Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 16.09.21 17:55, Peter Maydell wrote: > On Thu, 16 Sept 2021 at 16:30, Alexander Graf wrote: >> >> On 16.09.21 14:24, Peter Maydell wrote: >>> On Wed, 15 Sept 2021 at 19:10, Alexander Graf wrote: >>>> Now that we have working system register sync, we push more target CPU >>>> properties into the virtual machine. That might be useful in some >>>> situations, but is not the typical case that users want. >>>> >>>> So let's add a -cpu host option that allows them to explicitly pass all >>>> CPU capabilities of their host CPU into the guest. >>>> >>>> Signed-off-by: Alexander Graf >>>> Acked-by: Roman Bolshakov >>>> Reviewed-by: Sergio Lopez >>>> >>>> + /* >>>> + * A scratch vCPU returns SCTLR 0, so let's fill our default with the M1 >>>> + * boot SCTLR from https://github.com/AsahiLinux/m1n1/issues/97 > Side note: SCTLR_EL1 is a 64-bit register, do you have anything that > prints the full 64-bits to confirm that [63:32] are indeed all 0? Yes, m1n1 prints the full 64bit value: https://github.com/AsahiLinux/m1n1/blob/main/src/memory.c#L459 That said, I'm not sure we really have to model the guest's reset SCTLR in EL1 to be identical to the host's reset SCTLR in EL2. I think it's a great start, but as long as there is no spec that indicates what SCTLR should be in EL1, we can make our own rules IMHO. Alex