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,URIBL_BLOCKED,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 3A539C64E7B for ; Mon, 30 Nov 2020 02:55:24 +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 B57E820757 for ; Mon, 30 Nov 2020 02:55:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B57E820757 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]:50100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjZLW-0002ys-Qm for qemu-devel@archiver.kernel.org; Sun, 29 Nov 2020 21:55:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36972) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjZ7J-00082o-Gr; Sun, 29 Nov 2020 21:40:41 -0500 Received: from mail.csgraf.de ([188.138.100.120]:33918 helo=zulu616.server4you.de) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjZ7H-0006JJ-Cp; Sun, 29 Nov 2020 21:40:41 -0500 Received: from Alexanders-Mac-mini.local (ec2-3-122-114-9.eu-central-1.compute.amazonaws.com [3.122.114.9]) by csgraf.de (Postfix) with UTF8SMTPSA id 2E83839001C1; Mon, 30 Nov 2020 03:40:33 +0100 (CET) Subject: Re: [PATCH 8/8] hw/arm/virt: Disable highmem when on hypervisor.framework To: Peter Maydell , Eduardo Habkost References: <20201126215017.41156-1-agraf@csgraf.de> <20201126215017.41156-9-agraf@csgraf.de> <20201126221405.GT2271382@habkost.net> <20201127162633.GY2271382@habkost.net> From: Alexander Graf Message-ID: Date: Mon, 30 Nov 2020 03:40:32 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Thunderbird/84.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: Richard Henderson , QEMU Developers , Cameron Esfahani , Roman Bolshakov , qemu-arm , Claudio Fontana , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 27.11.20 17:47, Peter Maydell wrote: > On Fri, 27 Nov 2020 at 16:38, Peter Maydell wrote: >> Having looked a bit more closely at some of the relevant target/arm >> code, I think the best approach is going to be that in virt.c >> we just check the PARange ID register field (probably via >> a convenience function that does the conversion of that to >> a nice number-of-bits return value; we might even have one >> already). > Ha, in fact we're already doing something quite close to this, > though instead of saying "decide whether to use highmem based > on the CPU's PA range" we go for "report error to user if PA > range is insufficient" and let the user pick some command line > options that disable highmem if they want: > > if (aarch64 && vms->highmem) { > int requested_pa_size = 64 - clz64(vms->highest_gpa); > int pamax = arm_pamax(ARM_CPU(first_cpu)); > > if (pamax < requested_pa_size) { > error_report("VCPU supports less PA bits (%d) than " > "requested by the memory map (%d)", > pamax, requested_pa_size); > exit(1); > } > } Turns out I can sync aa64mfr0 just fine as well. So I'll just do that and remove this patch. Alex