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=-4.0 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 4EB8FC433F5 for ; Wed, 8 Sep 2021 09:16:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2A51B61166 for ; Wed, 8 Sep 2021 09:16:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351324AbhIHJR6 (ORCPT ); Wed, 8 Sep 2021 05:17:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:59012 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245487AbhIHJR6 (ORCPT ); Wed, 8 Sep 2021 05:17:58 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9C50961158; Wed, 8 Sep 2021 09:16:50 +0000 (UTC) Received: from 82-132-223-170.dab.02.net ([82.132.223.170] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mNthI-009YGr-J9; Wed, 08 Sep 2021 10:16:48 +0100 Date: Wed, 08 Sep 2021 10:16:47 +0100 Message-ID: <877dfrctq8.wl-maz@kernel.org> From: Marc Zyngier To: Peter Maydell Cc: QEMU Developers , Andrew Jones , Eric Auger , kvmarm , kvm-devel , Android Kernel Team Subject: Re: [PATCH 3/3] docs/system/arm/virt: Fix documentation for the 'highmem' option In-Reply-To: References: <20210822144441.1290891-1-maz@kernel.org> <20210822144441.1290891-4-maz@kernel.org> <87bl54cnx5.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 82.132.223.170 X-SA-Exim-Rcpt-To: peter.maydell@linaro.org, qemu-devel@nongnu.org, drjones@redhat.com, eric.auger@redhat.com, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Tue, 07 Sep 2021 19:25:23 +0100, Peter Maydell wrote: > > On Tue, 7 Sept 2021 at 18:10, Marc Zyngier wrote: > > > > Hi Peter, > > > > On Tue, 07 Sep 2021 13:51:13 +0100, > > Peter Maydell wrote: > > > > > > On Sun, 22 Aug 2021 at 15:45, Marc Zyngier wrote: > > > > > > > > The documentation for the 'highmem' option indicates that it controls > > > > the placement of both devices and RAM. The actual behaviour of QEMU > > > > seems to be that RAM is allowed to go beyond the 4GiB limit, and > > > > that only devices are constraint by this option. > > > > > > > > Align the documentation with the actual behaviour. > > > > > > I think it would be better to align the behaviour with the documentation. > > > > > > The intent of 'highmem' is to allow a configuration for use with guests > > > that can't address more than 32 bits (originally, 32-bit guests without > > > LPAE support compiled in). It seems like a bug that we allow the user > > > to specify more RAM than will fit into that 32-bit range. We should > > > instead make QEMU exit with an error if the user tries to specify > > > both highmem=off and a memory size that's too big to fit. > > > > I'm happy to address this if you are OK with the change in user > > visible behaviour. > > > > However, I am still struggling with my original goal, which is to > > allow QEMU to create a usable KVM_based VM on systems with a small IPA > > space (36 bits on the system I have). What would an acceptable way to > > convey this to the code that deals with the virt memory map so that it > > falls back to something that actually works? > > Hmm, so at the moment we can either do "fits in 32 bits" or > "assumes at least 40 bits" but not 36 ? Exactly. I have the gut feeling that we need a 'gpa_bits' option that would limit the guest physical range and generalise highmem. High IO ranges would simply not be available if the GPA range isn't big enough. M. -- Without deviation from the norm, progress is not possible. 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=-4.0 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 1693AC433EF for ; Wed, 8 Sep 2021 09:16:56 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 88862610C9 for ; Wed, 8 Sep 2021 09:16:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 88862610C9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 2513149FB7; Wed, 8 Sep 2021 05:16:55 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aaI47d4zTxUE; Wed, 8 Sep 2021 05:16:53 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id EDA6D4A2E5; Wed, 8 Sep 2021 05:16:53 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id B2C2949FE6 for ; Wed, 8 Sep 2021 05:16:52 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZrzB4rMI5yl1 for ; Wed, 8 Sep 2021 05:16:51 -0400 (EDT) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id A347649FB7 for ; Wed, 8 Sep 2021 05:16:51 -0400 (EDT) Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9C50961158; Wed, 8 Sep 2021 09:16:50 +0000 (UTC) Received: from 82-132-223-170.dab.02.net ([82.132.223.170] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mNthI-009YGr-J9; Wed, 08 Sep 2021 10:16:48 +0100 Date: Wed, 08 Sep 2021 10:16:47 +0100 Message-ID: <877dfrctq8.wl-maz@kernel.org> From: Marc Zyngier To: Peter Maydell Subject: Re: [PATCH 3/3] docs/system/arm/virt: Fix documentation for the 'highmem' option In-Reply-To: References: <20210822144441.1290891-1-maz@kernel.org> <20210822144441.1290891-4-maz@kernel.org> <87bl54cnx5.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 82.132.223.170 X-SA-Exim-Rcpt-To: peter.maydell@linaro.org, qemu-devel@nongnu.org, drjones@redhat.com, eric.auger@redhat.com, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Cc: kvm-devel , QEMU Developers , Android Kernel Team , kvmarm X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Tue, 07 Sep 2021 19:25:23 +0100, Peter Maydell wrote: > > On Tue, 7 Sept 2021 at 18:10, Marc Zyngier wrote: > > > > Hi Peter, > > > > On Tue, 07 Sep 2021 13:51:13 +0100, > > Peter Maydell wrote: > > > > > > On Sun, 22 Aug 2021 at 15:45, Marc Zyngier wrote: > > > > > > > > The documentation for the 'highmem' option indicates that it controls > > > > the placement of both devices and RAM. The actual behaviour of QEMU > > > > seems to be that RAM is allowed to go beyond the 4GiB limit, and > > > > that only devices are constraint by this option. > > > > > > > > Align the documentation with the actual behaviour. > > > > > > I think it would be better to align the behaviour with the documentation. > > > > > > The intent of 'highmem' is to allow a configuration for use with guests > > > that can't address more than 32 bits (originally, 32-bit guests without > > > LPAE support compiled in). It seems like a bug that we allow the user > > > to specify more RAM than will fit into that 32-bit range. We should > > > instead make QEMU exit with an error if the user tries to specify > > > both highmem=off and a memory size that's too big to fit. > > > > I'm happy to address this if you are OK with the change in user > > visible behaviour. > > > > However, I am still struggling with my original goal, which is to > > allow QEMU to create a usable KVM_based VM on systems with a small IPA > > space (36 bits on the system I have). What would an acceptable way to > > convey this to the code that deals with the virt memory map so that it > > falls back to something that actually works? > > Hmm, so at the moment we can either do "fits in 32 bits" or > "assumes at least 40 bits" but not 36 ? Exactly. I have the gut feeling that we need a 'gpa_bits' option that would limit the guest physical range and generalise highmem. High IO ranges would simply not be available if the GPA range isn't big enough. M. -- Without deviation from the norm, progress is not possible. _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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=-4.0 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 0498AC433F5 for ; Wed, 8 Sep 2021 09:18:46 +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 C11CF61168 for ; Wed, 8 Sep 2021 09:18:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C11CF61168 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:58588 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNtj8-0007aN-G5 for qemu-devel@archiver.kernel.org; Wed, 08 Sep 2021 05:18:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNthO-0005fG-At for qemu-devel@nongnu.org; Wed, 08 Sep 2021 05:16:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:45552) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNthM-0004Zj-3P for qemu-devel@nongnu.org; Wed, 08 Sep 2021 05:16:53 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9C50961158; Wed, 8 Sep 2021 09:16:50 +0000 (UTC) Received: from 82-132-223-170.dab.02.net ([82.132.223.170] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mNthI-009YGr-J9; Wed, 08 Sep 2021 10:16:48 +0100 Date: Wed, 08 Sep 2021 10:16:47 +0100 Message-ID: <877dfrctq8.wl-maz@kernel.org> From: Marc Zyngier To: Peter Maydell Subject: Re: [PATCH 3/3] docs/system/arm/virt: Fix documentation for the 'highmem' option In-Reply-To: References: <20210822144441.1290891-1-maz@kernel.org> <20210822144441.1290891-4-maz@kernel.org> <87bl54cnx5.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 82.132.223.170 X-SA-Exim-Rcpt-To: peter.maydell@linaro.org, qemu-devel@nongnu.org, drjones@redhat.com, eric.auger@redhat.com, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Received-SPF: pass client-ip=198.145.29.99; envelope-from=maz@kernel.org; helo=mail.kernel.org X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, 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: Andrew Jones , kvm-devel , QEMU Developers , Eric Auger , Android Kernel Team , kvmarm Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Tue, 07 Sep 2021 19:25:23 +0100, Peter Maydell wrote: > > On Tue, 7 Sept 2021 at 18:10, Marc Zyngier wrote: > > > > Hi Peter, > > > > On Tue, 07 Sep 2021 13:51:13 +0100, > > Peter Maydell wrote: > > > > > > On Sun, 22 Aug 2021 at 15:45, Marc Zyngier wrote: > > > > > > > > The documentation for the 'highmem' option indicates that it controls > > > > the placement of both devices and RAM. The actual behaviour of QEMU > > > > seems to be that RAM is allowed to go beyond the 4GiB limit, and > > > > that only devices are constraint by this option. > > > > > > > > Align the documentation with the actual behaviour. > > > > > > I think it would be better to align the behaviour with the documentation. > > > > > > The intent of 'highmem' is to allow a configuration for use with guests > > > that can't address more than 32 bits (originally, 32-bit guests without > > > LPAE support compiled in). It seems like a bug that we allow the user > > > to specify more RAM than will fit into that 32-bit range. We should > > > instead make QEMU exit with an error if the user tries to specify > > > both highmem=off and a memory size that's too big to fit. > > > > I'm happy to address this if you are OK with the change in user > > visible behaviour. > > > > However, I am still struggling with my original goal, which is to > > allow QEMU to create a usable KVM_based VM on systems with a small IPA > > space (36 bits on the system I have). What would an acceptable way to > > convey this to the code that deals with the virt memory map so that it > > falls back to something that actually works? > > Hmm, so at the moment we can either do "fits in 32 bits" or > "assumes at least 40 bits" but not 36 ? Exactly. I have the gut feeling that we need a 'gpa_bits' option that would limit the guest physical range and generalise highmem. High IO ranges would simply not be available if the GPA range isn't big enough. M. -- Without deviation from the norm, progress is not possible.