From nobody Tue Feb 10 03:44:40 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1592396975; cv=none; d=zohomail.com; s=zohoarc; b=HymUlgBVKy8YEzMD7FxOAtCntkA4aITH/mn0BZDtUGeaHiI+U2OGzFIqypj7v1hkjs8ppcJ7LarrM+JblU4u/kQmj7I1WfAvDt/DHx5UHlDIsE7UFCzCQytgv/C9w6Z7nR84bcn3IVoyokMqoeHeyj7dfnrO2GFLqUNRITs/lC8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592396975; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=YPFJFaMrpuHpn0jwnWZgZ+54i5WkkV9FY9G9bgKap2I=; b=BGFORt70NXYwLlvljBrJmMaGg/lhlB7Iul1AmBXNImCZy7UXIOPbXO+pIhdE6NcSndkczEbTBfbFh2CX5YxbO6fiiq63Ubu4hMzY8O93S5+1IRwkAhN5ZUxro/W/kgRffHTZyVtAPV2KXju4/nP9hKsC1IsaXEpvZriNIlNFnVA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 159239697591829.243784113371248; Wed, 17 Jun 2020 05:29:35 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jlXBx-00072O-UP; Wed, 17 Jun 2020 12:29:21 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jlXBw-00070F-Tk for xen-devel@lists.xenproject.org; Wed, 17 Jun 2020 12:29:20 +0000 Received: from us-smtp-1.mimecast.com (unknown [207.211.31.120]) by us1-rack-iad1.inumbo.com (Halon) with ESMTP id 28402c42-b096-11ea-8496-bc764e2007e4; Wed, 17 Jun 2020 12:29:15 +0000 (UTC) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-427-dhvMQHhgMGCBolP3iquecA-1; Wed, 17 Jun 2020 08:29:13 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C31421009625; Wed, 17 Jun 2020 12:29:11 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-67.ams2.redhat.com [10.36.112.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2CA177BA14; Wed, 17 Jun 2020 12:29:03 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id AC3581753C; Wed, 17 Jun 2020 14:29:01 +0200 (CEST) X-Inumbo-ID: 28402c42-b096-11ea-8496-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592396955; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YPFJFaMrpuHpn0jwnWZgZ+54i5WkkV9FY9G9bgKap2I=; b=ddlMiZ/4277tMrCbFJW8EiK5LL4Cuafv1OgLSBJYQcHRMArt9uNqiQLAfjk4en314a2xZk zWZ/0Cmt/G+FtnPoqSJJjCeC6WH4xZVqX4ZOnUuvTDYhclNucAFTC/LXJnWiuOVjKI0VSc IpBaddoxftIlPTW4tJPu5bvV9Ea1sjs= X-MC-Unique: dhvMQHhgMGCBolP3iquecA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 2/4] microvm: drop max-ram-below-4g support Date: Wed, 17 Jun 2020 14:28:59 +0200 Message-Id: <20200617122901.13327-3-kraxel@redhat.com> In-Reply-To: <20200617122901.13327-1-kraxel@redhat.com> References: <20200617122901.13327-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Eduardo Habkost , Sergio Lopez , "Michael S. Tsirkin" , Paul Durrant , Gerd Hoffmann , Marcel Apfelbaum , Paolo Bonzini , Anthony Perard , xen-devel@lists.xenproject.org, Richard Henderson Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Not useful for microvm and allows users to shoot themself into the foot (make ram + mmio overlap). Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Acked-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael S. Tsirkin Message-id: 20200529073957.8018-3-kraxel@redhat.com --- hw/i386/microvm.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c index 44f940813b07..5e931975a06d 100644 --- a/hw/i386/microvm.c +++ b/hw/i386/microvm.c @@ -173,25 +173,6 @@ static void microvm_memory_init(MicrovmMachineState *m= ms) ram_addr_t lowmem =3D 0xc0000000; /* 3G */ int i; =20 - /* - * Handle the machine opt max-ram-below-4g. It is basically doing - * min(qemu limit, user limit). - */ - if (!x86ms->max_ram_below_4g) { - x86ms->max_ram_below_4g =3D 4 * GiB; - } - if (lowmem > x86ms->max_ram_below_4g) { - lowmem =3D x86ms->max_ram_below_4g; - if (machine->ram_size - lowmem > lowmem && - lowmem & (1 * GiB - 1)) { - warn_report("There is possibly poor performance as the ram siz= e " - " (0x%" PRIx64 ") is more then twice the size of" - " max-ram-below-4g (%"PRIu64") and" - " max-ram-below-4g is not a multiple of 1G.", - (uint64_t)machine->ram_size, x86ms->max_ram_below_= 4g); - } - } - if (machine->ram_size > lowmem) { x86ms->above_4g_mem_size =3D machine->ram_size - lowmem; x86ms->below_4g_mem_size =3D lowmem; --=20 2.18.4