From nobody Fri May 3 17:43:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1561479722; cv=none; d=zoho.com; s=zohoarc; b=UyPOxf6NEUe7R8o2ZDdgUjJMAOTP/LKmnPqj83H+z9cG5fT3afRPhQ/iF6OaLQMQxN6Q9U28uMmbSVx2rBGhQauwt6A8zA9lc5FQN5RX0tvWxLxdVBE07LvxDQZH0mW4vG2rNKzMrz9MOdB0DRWTr4/uVp7IiUtHylD1ptf8BIg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561479722; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=QNv7AZER+jVGRWp0yeOTFWzcxc43jNDKI3zBItlIxuQ=; b=TP2lPn2e58d94Oru0GX+c5dgMjyLuKtxhaIjacvuwHIHinPw9Uz+mXbcYciagZFHlr7qwMClIKgoQNmHZQWnE1EKtPPC7SizLQEVHzgJ5bu25YzDkSZ6OxeUjGe1kZoDW28zo2AKcXG6VMZddiG0b4endH3tMW94dvx6r7X9aQM= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 156147972265062.83079120382354; Tue, 25 Jun 2019 09:22:02 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5F36F8CB56; Tue, 25 Jun 2019 16:21:30 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 24A0319936; Tue, 25 Jun 2019 16:21:19 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E93CB206D4; Tue, 25 Jun 2019 16:21:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5PGGbUc025826 for ; Tue, 25 Jun 2019 12:16:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9C8321001B04; Tue, 25 Jun 2019 16:16:37 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id BAAAB1001281; Tue, 25 Jun 2019 16:16:33 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 25 Jun 2019 12:16:29 -0400 Message-Id: <20190625161629.302-1-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: libvir-list@redhat.com, ehabkost@redhat.com, dgilbert@redhat.com Subject: [libvirt] [PATCH v2] deprecate -mem-path fallback to anonymous RAM X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 25 Jun 2019 16:21:56 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Fallback might affect guest or worse whole host performance or functionality if backing file were used to share guest RAM with another process. Patch deprecates fallback so that we could remove it in future and ensure that QEMU will provide expected behavior and fail if it can't use user provided backing file. Signed-off-by: Igor Mammedov Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Markus Armbruster --- v2: * improve text language (Markus Armbruster ) numa.c | 6 ++++-- qemu-deprecated.texi | 9 +++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/numa.c b/numa.c index 91a29138a2..c15e53e92d 100644 --- a/numa.c +++ b/numa.c @@ -494,8 +494,10 @@ static void allocate_system_memory_nonnuma(MemoryRegio= n *mr, Object *owner, if (mem_prealloc) { exit(1); } - error_report("falling back to regular RAM allocation."); - + warn_report("falling back to regular RAM allocation"); + error_printf("This is deprecated. Make sure that -mem-path " + " specified path has sufficient resources to allo= cate" + " -m specified RAM amount or QEMU will fail to st= art"); /* Legacy behavior: if allocation failed, fall back to * regular RAM allocation. */ diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index 2fe9b72121..1b7f3b10dc 100644 --- a/qemu-deprecated.texi +++ b/qemu-deprecated.texi @@ -112,6 +112,15 @@ QEMU using implicit generic or board specific splittin= g rule. Use @option{memdev} with @var{memory-backend-ram} backend or @option{mem} = (if it's supported by used machine type) to define mapping explictly instead. =20 +@subsection -mem-path fallback to RAM (since 4.1) +Currently if guest RAM allocation from file pointed by @option{mem-path} +fails, QEMU falls back to allocating from RAM, which might result +in unpredictable behavior since the backing file specified by the user +is ignored. In the future, users will be responsible for making sure +the backing storage specified with @option{-mem-path} can actually provide +the guest RAM configured with @option{-m} and fail to start up if RAM allo= cation +is unsuccessful. + @section QEMU Machine Protocol (QMP) commands =20 @subsection block-dirty-bitmap-add "autoload" parameter (since 2.12.0) --=20 2.18.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list