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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 7B575C63777 for ; Thu, 26 Nov 2020 22:19:54 +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 CA6CC2145D for ; Thu, 26 Nov 2020 22:19:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CA6CC2145D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=csgraf.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:39952 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kiPcH-0002zi-62 for qemu-devel@archiver.kernel.org; Thu, 26 Nov 2020 17:19:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40924) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kiPa3-0001Jv-Jz; Thu, 26 Nov 2020 17:17:35 -0500 Received: from mail.csgraf.de ([188.138.100.120]:33806 helo=zulu616.server4you.de) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kiPa0-0006Vr-H8; Thu, 26 Nov 2020 17:17:35 -0500 Received: from Alexanders-Air.alex.local (ec2-3-122-114-9.eu-central-1.compute.amazonaws.com [3.122.114.9]) by csgraf.de (Postfix) with ESMTPSA id 180A8390015A; Thu, 26 Nov 2020 23:17:29 +0100 (CET) Subject: Re: [PATCH 8/8] hw/arm/virt: Disable highmem when on hypervisor.framework To: Peter Maydell References: <20201126213600.40654-1-agraf@csgraf.de> <20201126213600.40654-9-agraf@csgraf.de> From: Alexander Graf Message-ID: <54b287f7-5240-5e98-d5d8-581cccb14b82@csgraf.de> Date: Thu, 26 Nov 2020 23:17:28 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Received-SPF: pass client-ip=188.138.100.120; envelope-from=agraf@csgraf.de; helo=zulu616.server4you.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.001, 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.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 , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 26.11.20 22:54, Peter Maydell wrote: > On Thu, 26 Nov 2020 at 21:36, Alexander Graf wrote: >> The Apple M1 only supports up to 36 bits of physical address space. That >> means we can not fit the 64bit MMIO BAR region into our address space. >> >> To fix this, let's not expose a 64bit MMIO BAR region when running on >> Apple Silicon. >> >> I have not been able to find a way to enumerate that easily, so let's >> just assume we always have that little PA space on hypervisor.framework >> systems. > If you have direct access to the host ID_AA64MMFR0_EL1 you can look > at the PARange field; otherwise start a stunt VM and look at its > ID_AA64MMFR0_EL1.PARange (this is what we do for KVM to query various > things about the VM's capabilities/ID regs). When I tried, I couldn't fetch IID_AA64MMFR0_EL1 as sysreg via hvf. Are you suggesting that on boot, we start a tiny mini-VM to enumerate the PARange and set highmem based on it? That sounds like absolute overkill to me ... Alex