From nobody Tue Nov 26 22:10:49 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=1564481648; cv=none; d=zoho.com; s=zohoarc; b=YtQioVoo3Bv5BdEN64BFjgNIQiM2RZrwDSNGjoUyYtQR2OlgXIDzHyqM7m30UhR+EOPMEBCEoZUagnej25GDgOdKNIYtzfpLzJ9QFi/jW+yu96+MUJ2jN9Y2KPOBaDW+lqfsbaXVN3xjEfiKfqoqAu3zZSHWnHGrjg32mga98Tk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564481648; 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:ARC-Authentication-Results; bh=57mSGH85jAJrBALzXGtBKXXFGqcYdh7trmp/Y10AVCk=; b=L7VpKXDPSbOrwHig6p1YmoqbPV126ozT9YSOfoKh7dQ+qiW5DgAJXKxa0vaUdQqT2bb/RfR28B311vKaLBibO1Hja5afhxUDj/bYMz7hxBnfIVp0fF0XADUIq6jlialCbCVFgqweePKp1GqQA2RkVCVrzA4mTPgyiu+NbRa5nq0= 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 156448164852436.218007689586784; Tue, 30 Jul 2019 03:14:08 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 9F86430BD1C4; Tue, 30 Jul 2019 10:14:06 +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 7A1EA5D6C8; Tue, 30 Jul 2019 10:14:06 +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 383463CBB; Tue, 30 Jul 2019 10:14:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6UAE0Q8002133 for ; Tue, 30 Jul 2019 06:14:00 -0400 Received: by smtp.corp.redhat.com (Postfix) id 446CE5C205; Tue, 30 Jul 2019 10:14:00 +0000 (UTC) Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3FED75C1B4 for ; Tue, 30 Jul 2019 10:14:00 +0000 (UTC) Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 117F885550 for ; Tue, 30 Jul 2019 10:14:00 +0000 (UTC) Received: by mail-wr1-f70.google.com with SMTP id l24so31625312wrb.0 for ; Tue, 30 Jul 2019 03:14:00 -0700 (PDT) Received: from vitty.brq.redhat.com (ip-89-176-127-93.net.upcbroadband.cz. [89.176.127.93]) by smtp.gmail.com with ESMTPSA id o7sm34844155wru.58.2019.07.30.03.13.57 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 30 Jul 2019 03:13:57 -0700 (PDT) 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=1ht49gbAUDR5YasG7a4ChubpsbcV0QQby03Ixarun90=; b=n0TC4kHg0l+5jzez2abguC4vcG0GCWzZGxDlZWnZ0QWmDFx/zzbFaaTzLevcUUaO1x DKjXop5odPW86shhqrnCRWcig92mfXefxr7dIWMBE2LAVluRl9w3kT5/HmLIau4gos5Z 5opUQlP+AFmtExuBp+Kn9k/5azfPvmwl5eQw7lrftNsPq9qfGGUde8xO2AcfVe+UIGwm +WvfwLxcfL5hFrubNjJ2O3Xe68mimMnVRN3rlsFz8sg8ye6gIzm56PKZY9h0SsCuJ8hq wdLvCVyM0f6Msc0KiwsRrKWyNA4mZ/lxDA9qCxhbaoDavEn8WxIZijtSbNN9+mnsYD9D IyHg== X-Gm-Message-State: APjAAAXykFcQuBP5nJgWedqCNuwezuJFZrjM1PvywGPfKCpnHXrMPBcF pmdNYtw0WUIXE9Ak/o3tKElgSrevk5+pAQFvhqFT/P+mussHhVOakhtFDS9GoyMPO/EnTxNk1uc lqyL/YuZ4bJleUmo2EpE= X-Received: by 2002:adf:cf0d:: with SMTP id o13mr81968467wrj.291.1564481638596; Tue, 30 Jul 2019 03:13:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqwx4VhoUXIbcy07tTG6IE+6jIWvOVTQ6FExeIpaxiDyenVezIkgN9N01CVKAjPETSYdY1Kyow== X-Received: by 2002:adf:cf0d:: with SMTP id o13mr81968446wrj.291.1564481638372; Tue, 30 Jul 2019 03:13:58 -0700 (PDT) From: Vitaly Kuznetsov To: libvir-list@redhat.com Date: Tue, 30 Jul 2019 12:13:45 +0200 Message-Id: <20190730101348.4055-6-vkuznets@redhat.com> In-Reply-To: <20190730101348.4055-1-vkuznets@redhat.com> References: <20190730101348.4055-1-vkuznets@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?J=C3=A1n=20Tomko?= , Nikolay Shirokovskiy Subject: [libvirt] [PATCH v2 5/8] conf: change the way how Hyper-V features are printed out 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 30 Jul 2019 10:14:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Current code doesn't allow us to add sub-features as we always print the closing '/>'. As a preparatory change to implementing 'direct' sub-feature for 'stimer' feature switch to printing closing tag individually. No functional change. Signed-off-by: Vitaly Kuznetsov --- src/conf/domain_conf.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 441eb1a5a2..0871f21494 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -28073,19 +28073,24 @@ virDomainDefFormatFeatures(virBufferPtr buf, case VIR_DOMAIN_HYPERV_TLBFLUSH: case VIR_DOMAIN_HYPERV_IPI: case VIR_DOMAIN_HYPERV_EVMCS: + virBufferAddLit(&childBuf, "/>\n"); break; =20 case VIR_DOMAIN_HYPERV_SPINLOCKS: - if (def->hyperv_features[j] !=3D VIR_TRISTATE_SWITCH_O= N) + if (def->hyperv_features[j] !=3D VIR_TRISTATE_SWITCH_O= N) { + virBufferAddLit(&childBuf, "/>\n"); break; - virBufferAsprintf(&childBuf, " retries=3D'%d'", + } + virBufferAsprintf(&childBuf, " retries=3D'%d'/>\n", def->hyperv_spinlocks); break; =20 case VIR_DOMAIN_HYPERV_VENDOR_ID: - if (def->hyperv_features[j] !=3D VIR_TRISTATE_SWITCH_O= N) + if (def->hyperv_features[j] !=3D VIR_TRISTATE_SWITCH_O= N) { + virBufferAddLit(&childBuf, "/>\n"); break; - virBufferEscapeString(&childBuf, " value=3D'%s'", + } + virBufferEscapeString(&childBuf, " value=3D'%s'/>\n", def->hyperv_vendor_id); break; =20 @@ -28093,8 +28098,6 @@ virDomainDefFormatFeatures(virBufferPtr buf, case VIR_DOMAIN_HYPERV_LAST: break; } - - virBufferAddLit(&childBuf, "/>\n"); } virBufferAdjustIndent(&childBuf, -2); virBufferAddLit(&childBuf, "\n"); --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list