From nobody Sun Feb 8 14:51:56 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1575933364; cv=none; d=zohomail.com; s=zohoarc; b=ee2NsAarERR/ikwEfpIpf5hLyZrlP3pTBvlzyYIyGEe/kAV+c8CBZHn1Zgn3Bdl5RJw9lS7DDIfTVNQc84O1XY44XKI5JXptMikI7vI94zD1Pj4BJtSv7A23a0wnJL/8+ZkpPn9bjFZQVek7PmUKj9bwGYhWkJSPcHDy4Cb2tzw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575933364; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=YSx0ixBuOHKvM7avhvKz0FE2nLQrdlOhqgkx4lqo/5w=; b=XImqVCMd+EQ0COwnFnmnLr0tfdPETeIFduIQItyAYeCKYeCL+brMSIAaVaSukIpYZs8EeBePA5YBpO+zWpYGw+2+0aacSkIZhNTRiKfPsZoe+tGJc14r+BKO0eFiowpOOwGDXa5av1tps1HW4Jn1ebvFJaxMMrvaTSmblJZXAos= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1575933364471324.6519630299331; Mon, 9 Dec 2019 15:16:04 -0800 (PST) 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-375-TCAh9hKLMHybPY6jjrXaXw-1; Mon, 09 Dec 2019 18:16:01 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2500B8024F5; Mon, 9 Dec 2019 23:15:56 +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 E20DB19C68; Mon, 9 Dec 2019 23:15:55 +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 5D40465D2B; Mon, 9 Dec 2019 23:15:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xB9NFr3A008303 for ; Mon, 9 Dec 2019 18:15:53 -0500 Received: by smtp.corp.redhat.com (Postfix) id 22A3D1006EAC; Mon, 9 Dec 2019 23:15:53 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1C8521006EB8 for ; Mon, 9 Dec 2019 23:15:51 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DCC2110163DC for ; Mon, 9 Dec 2019 23:15:50 +0000 (UTC) Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-141-3mOdLlDoPpqJMcThkvGJ4A-1; Mon, 09 Dec 2019 18:15:47 -0500 Received: by mail-qk1-f193.google.com with SMTP id x1so14718278qkl.12; Mon, 09 Dec 2019 15:15:47 -0800 (PST) Received: from rekt.ibmuc.com ([2804:431:c7c6:fe5:8243:c780:f073:3beb]) by smtp.gmail.com with ESMTPSA id e130sm352436qkb.72.2019.12.09.15.15.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2019 15:15:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575933363; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=YSx0ixBuOHKvM7avhvKz0FE2nLQrdlOhqgkx4lqo/5w=; b=AJqNxb3QOjjTrKJ+GFGlzpXkWGDSm0Xi3NZYAeWFUzsV4SetAxjTsIMlG1WEVLa+epf+U3 uqOeW50I+BCcW0BsepysM5xjEDTjncCRk2zNq0OEwN/I+ecwRPetGEG8561ekltF1COvEO 17+IvxONpG5+fVcV66yx5fgP9y4wm6c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Rop8xWDOzkiE/FV+BeG3/d5TIPl6uzdCEPAB4XqFrCk=; b=AlHvnZc913hRZYil4KQo+BbYkx43dWeozaV5gMm0Cb74uXr9zktsOg84IfECZMqjff biWP8RVoWR2eXAfxjAZwkAFogcpDWfcv+y69NYkC7kgj7/bVtVOBhe9RbxM7QvHwy+uC OuQBeAQv/yGu6GkUUuXNqzc5ecD7DIQr7e+XROnQgf7pg+j3VbvhKQ7pmlNeIGlZ3BJz l6zS47n8gS0L5F8kYDgAs3UHN63+CrHSboDO1P6hbGA1qVOeE/VoGsqwdfWitLDNeg+R XrEl5nR2xA9TRfgolnaR0Ri/23PDcWdyw8K5Eb6yRnNWIWBVrZ1lSLqfVi1iS2rW9wX8 BsQQ== X-Gm-Message-State: APjAAAX9bLWnhA/Ng3J4M4oZhSKFoUf0Jnu8ska57aXwwOflhFFLKvtr v/XdpEyuTei+lfoeQksV+OMMDI5Yx0Y= X-Google-Smtp-Source: APXvYqxvUEYZ181a74/q6C8pXVG8+3axj+z8fglIT6u+yqNZNEndhaZigdYLm1D0MDHVOrpHnuJ9rg== X-Received: by 2002:ae9:e304:: with SMTP id v4mr29549663qkf.399.1575933346726; Mon, 09 Dec 2019 15:15:46 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 9 Dec 2019 20:15:07 -0300 Message-Id: <20191209231531.2423222-3-danielhb413@gmail.com> In-Reply-To: <20191209231531.2423222-1-danielhb413@gmail.com> References: <20191209231531.2423222-1-danielhb413@gmail.com> MIME-Version: 1.0 X-MC-Unique: 3mOdLlDoPpqJMcThkvGJ4A-1 X-MC-Unique: TCAh9hKLMHybPY6jjrXaXw-1 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id xB9NFr3A008303 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza , crobinso@redhat.com Subject: [libvirt] [PATCH v1 02/26] qemu_command.c: move mem.nosharepages validation to qemu_domain.c 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: , 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-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Move QEMU_CAPS_MEM_MERGE validation from qemuBuildMachineCommandLine() to qemuDomainDefValidateMemory(). Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_command.c | 10 +--------- src/qemu/qemu_domain.c | 7 +++++++ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 12a9d47f44..a56f324af2 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7120,16 +7120,8 @@ qemuBuildMachineCommandLine(virCommandPtr cmd, cfg->dumpGuestCore ? "on" : "off"); } =20 - if (def->mem.nosharepages) { - if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MEM_MERGE)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("disable shared memory is not available " - "with this QEMU binary")); - return -1; - } - + if (def->mem.nosharepages) virBufferAddLit(&buf, ",mem-merge=3Doff"); - } =20 if (def->keywrap && !qemuAppendKeyWrapMachineParms(&buf, qemuCaps, def->keywrap)) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index e25b439a39..d78c5904ff 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -5049,6 +5049,13 @@ qemuDomainDefValidateMemory(const virDomainDef *def, return -1; } =20 + if (mem->nosharepages && !virQEMUCapsGet(qemuCaps, QEMU_CAPS_MEM_MERGE= )) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("disable shared memory is not available " + "with this QEMU binary")); + return -1; + } + return 0; } =20 --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list