From nobody Sun Feb 8 12:58:39 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1691571066; cv=none; d=zohomail.com; s=zohoarc; b=SoW6yUV2uPluqXgoAvAsJuKz+RLzSS+Ej3NdOp5JIVQSxGROHXNPdqdxIO2wfc3b5EzkliZr29SJj+fBJNn0OHgN0yTshx4Bcx6ZgmpiEQSXs1s7qft+0S27fJFVG6uqKPvtjzgSvctUhhqT39nDpayI5vsF0ylTeoXNYehs754= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1691571066; 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=IH/58m8U04AJv8QUGqcVg6e4ujvUyaDHNHfqA56LEOw=; b=akfyj8ztXNEQ2UJNSoB/gZlzAWFsy/qE45yMIx32LDr8koakdjvmPAFqgemCThmHFWer3i0afdRy79nnj9Ic0MxSIVLrGrM2mbXbn4P1rxflAbydLY4Q9zG1NtKlavtuajYiG403AWYtKs/wyfmXLTKeVS3KIayGad1p/EXh9ns= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=reject dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1691571066182465.4721344541267; Wed, 9 Aug 2023 01:51:06 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-687-OY_ty4O8MDSKVnyLqFOcuA-1; Wed, 09 Aug 2023 04:50:02 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A0C3385CBFA; Wed, 9 Aug 2023 08:49:58 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 86B67492B0F; Wed, 9 Aug 2023 08:49:58 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9F9B51946A4E; Wed, 9 Aug 2023 08:49:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id B8EE21946A40 for ; Wed, 9 Aug 2023 08:49:56 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id A9B4E2026D68; Wed, 9 Aug 2023 08:49:56 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A1EDA2026D4B for ; Wed, 9 Aug 2023 08:49:56 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7819E1875845 for ; Wed, 9 Aug 2023 08:49:56 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-222-e8VxSGgmNxCIy8vi214RbA-1; Wed, 09 Aug 2023 04:49:54 -0400 Received: from pps.filterd (m0356517.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3798fwRu003047 for ; Wed, 9 Aug 2023 08:49:53 GMT Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3sc7gxg60f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 09 Aug 2023 08:49:53 +0000 Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3797VGGH000403 for ; Wed, 9 Aug 2023 08:49:52 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3sa28kpeue-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 09 Aug 2023 08:49:51 +0000 Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3798nmAN17695368 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 9 Aug 2023 08:49:48 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CC4F42004E; Wed, 9 Aug 2023 08:49:48 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id ACADF2004B; Wed, 9 Aug 2023 08:49:48 +0000 (GMT) Received: from fiuczyvm.. (unknown [9.152.222.239]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 9 Aug 2023 08:49:48 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1691571065; 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=IH/58m8U04AJv8QUGqcVg6e4ujvUyaDHNHfqA56LEOw=; b=aOMDDu7HubIHub6oyC73PirxHzcw68NiSMkC0dPaqFEPg6LFO7nkTQJ9MW9kzjfA8Eu5rL g8lhFFT9NGCybh50cVD09uZDNmkw1Mx5s/Q6J/RZzsS3ql1gMneDiLSa0UR/Ja1lhxYo/L Ojp7txyd0WUPPteSrPOCKg2E76lImDs= X-MC-Unique: OY_ty4O8MDSKVnyLqFOcuA-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: e8VxSGgmNxCIy8vi214RbA-1 From: Boris Fiuczynski To: libvir-list@redhat.com Subject: [PATCH 5/5] conf: Ensure migratability if enabled is 'optional' Date: Wed, 9 Aug 2023 10:49:47 +0200 Message-ID: <20230809084947.13584-6-fiuczy@linux.ibm.com> In-Reply-To: <20230809084947.13584-1-fiuczy@linux.ibm.com> References: <20230809084947.13584-1-fiuczy@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: neQsYA24O0ouMHW6rHES3lOL6Soy0kMq X-Proofpoint-GUID: neQsYA24O0ouMHW6rHES3lOL6Soy0kMq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-09_06,2023-08-08_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=919 lowpriorityscore=0 clxscore=1015 priorityscore=1501 mlxscore=0 adultscore=0 bulkscore=0 spamscore=0 impostorscore=0 suspectscore=0 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2308090075 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mihajlov@linux.ibm.com, mhartmay@linux.ibm.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: linux.ibm.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1691571068348100001 Content-Type: text/plain; charset="utf-8"; x-default="true" If 'optional' is set on enabled and a migratable domain XML is requested the 'optional' value is removed. Signed-off-by: Boris Fiuczynski --- src/conf/domain_conf.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 7191e37a6c..6f451a9bfe 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -27019,7 +27019,8 @@ virDomainFeatureTCGFormat(virBuffer *buf, =20 static int virDomainDefFormatFeatures(virBuffer *buf, - virDomainDef *def) + virDomainDef *def, + bool migratable) { g_auto(virBuffer) childBuf =3D VIR_BUFFER_INIT_CHILD(buf); size_t i; @@ -27357,6 +27358,9 @@ virDomainDefFormatFeatures(virBuffer *buf, break; =20 case VIR_DOMAIN_FEATURE_ASYNC_TEARDOWN: + if (migratable && def->features[i] =3D=3D VIR_QUADSTATE_OPTION= _OPTIONAL) + break; + if (def->features[i] !=3D VIR_QUADSTATE_OPTION_ABSENT) virBufferAsprintf(&childBuf, "\n", virQuadstateOptionTypeToString(def->feat= ures[i])); @@ -27649,7 +27653,7 @@ virDomainDefFormatInternalSetRootName(virDomainDef = *def, virBufferAddLit(buf, "\n"); } =20 - if (virDomainDefFormatFeatures(buf, def) < 0) + if (virDomainDefFormatFeatures(buf, def, migratable) < 0) return -1; =20 if (virCPUDefFormatBufFull(buf, def->cpu, def->numa) < 0) --=20 2.41.0