From nobody Mon Feb 9 17:07:21 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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 (zoho.com: domain of redhat.com designates 207.211.31.81 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=1573543720; cv=none; d=zoho.com; s=zohoarc; b=I4vYi7DSVd+EAehNcirkYxPozwQlucdtrkXBROMx6L1XP94iQ0kGjGR4Z9TTnBT5xsTI0YQnpHE6l3cmxYjjTvr/qN9ovq52CJNMlpQ7XfeI+ZiDDm246mvhycnKxJNsXATgeHKhD2d4tBeAKUvngtYjObZcVcoBDyQZznqvjLk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573543720; h=Content-Type:Content-Transfer-Encoding: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=hT4qeQBAZTYjFLKpKA0THGyz3PO1JSHhj5mORul8gvQ=; b=g6EyAVMl26NkUNaL4azwtCx7nG1hBf948uR5zNBF+vb3jnfQ95HhJoAspQkdkZzm3ppvQZkZMAdCRreMf3xsQMFCQgI8ppW181JNNMkal0UIcR2zA+pdqRfhXIgzE9BdAT06kISByhpFDIIb9+QQyFpebMhrXk/5fbCoqNFnU8M= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1573543720530844.8925774417421; Mon, 11 Nov 2019 23:28:40 -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-419-Pyg_07_uN-ux4nqOf8VR5A-1; Tue, 12 Nov 2019 02:28:37 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0E769DB67; Tue, 12 Nov 2019 07:28:30 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D62CD1B41F; Tue, 12 Nov 2019 07:28:29 +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 8AC3618089CF; Tue, 12 Nov 2019 07:28:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAC7Rvm0011385 for ; Tue, 12 Nov 2019 02:27:57 -0500 Received: by smtp.corp.redhat.com (Postfix) id 4E6EF62671; Tue, 12 Nov 2019 07:27:57 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id CDB05627DF for ; Tue, 12 Nov 2019 07:27:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573543719; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=hT4qeQBAZTYjFLKpKA0THGyz3PO1JSHhj5mORul8gvQ=; b=TARBfHF+/jEl6B26JJcXswojiuutmv4ULoZJJuU7DKhQJydq5hLSU5ijG7S8STm41nMyB8 Pa3csYb8hP7luoDDzJRRBLqypkaKTUIXRRuZO1OLQ1JsAY8HJPQq+EBAwGwfzbVI88l0LZ tIlk8NQJiHIZQtXINRea97RVA7tE0yU= From: Peter Krempa To: libvir-list@redhat.com Date: Tue, 12 Nov 2019 08:27:44 +0100 Message-Id: <56df1ddf38651bc8283919ce3946941af7b45658.1573543601.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 07/10] conf: domain: Split up formatting of and 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.79 on 10.5.11.14 X-MC-Unique: Pyg_07_uN-ux4nqOf8VR5A-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3e81140430..0e774889a2 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -27985,6 +27985,17 @@ virDomainMemtuneFormat(virBufferPtr buf, virXMLFormatElement(buf, "memtune", NULL, &childBuf); + ret =3D 0; + return ret; +} + + +static void +virDomainMemorybackingFormat(virBufferPtr buf, + const virDomainMemtune *mem) +{ + g_auto(virBuffer) childBuf =3D VIR_BUFFER_INITIALIZER; + virBufferSetChildIndent(&childBuf, buf); if (mem->nhugepages) @@ -28006,9 +28017,6 @@ virDomainMemtuneFormat(virBufferPtr buf, virBufferAddLit(&childBuf, "\n"); virXMLFormatElement(buf, "memoryBacking", NULL, &childBuf); - - ret =3D 0; - return ret; } @@ -28484,6 +28492,8 @@ virDomainDefFormatInternalSetRootName(virDomainDefP= tr def, if (virDomainMemtuneFormat(buf, &def->mem) < 0) goto error; + virDomainMemorybackingFormat(buf, &def->mem); + if (virDomainCpuDefFormat(buf, def) < 0) goto error; --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list