From nobody Wed May 14 15:56:09 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1522678813316691.7881710998016; Mon, 2 Apr 2018 07:20:13 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 52F686345; Mon, 2 Apr 2018 14:20:11 +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 2D01260637; Mon, 2 Apr 2018 14:20:11 +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 EAE004CAAA; Mon, 2 Apr 2018 14:20:10 +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 w32EK7WE024314 for ; Mon, 2 Apr 2018 10:20:07 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8CB715D78C; Mon, 2 Apr 2018 14:20:07 +0000 (UTC) Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B17E75D6B7; Mon, 2 Apr 2018 14:20:00 +0000 (UTC) Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0087.outbound.protection.outlook.com [104.47.32.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 75C23883BE; Mon, 2 Apr 2018 14:19:59 +0000 (UTC) Received: from wsp141597wss.amd.com (165.204.78.1) by BY2PR12MB0145.namprd12.prod.outlook.com (2a01:111:e400:585a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.631.10; Mon, 2 Apr 2018 14:19:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=7xTrS09FwHkPpFFZAR5L77tac8TUEZkLfvBMl7/N9vM=; b=fq0bHhL0KxT1jqlUa5lcgJis1EyGYXCakE3SOiaEL+tnb50i0d3pv8uY8ML2E/I8VnFYwX4wJXNZuaVxSL014nIpZC2YEStq9IjpsnuQPJK8Uvw+3RCkJotuDaq4AIheRLL8rdKtvSgwPshH+QZKTXMn2WnDwjEPRbHFEOg8On4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; From: Brijesh Singh To: libvir-list@redhat.com Date: Mon, 2 Apr 2018 09:18:53 -0500 Message-Id: <20180402141856.4596-8-brijesh.singh@amd.com> In-Reply-To: <20180402141856.4596-1-brijesh.singh@amd.com> References: <20180402141856.4596-1-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: SN4PR0501CA0001.namprd05.prod.outlook.com (2603:10b6:803:40::14) To BY2PR12MB0145.namprd12.prod.outlook.com (2a01:111:e400:585a::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: e82ae4bb-1c9e-4c22-d87c-08d598a4cd4a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:BY2PR12MB0145; X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0145; 3:+HrWNanLZdcQaWl1gngHHevsmYOXOM5LMgnTydlJJkFVWpAQKpqnGFC0MOM/Xo4V6qjsidMrNLOD5VNXlQOYyfKxxU7T7Lj/YhcLPh/1L1ZOidXDkcHOK0dReuJJQA+2YaFg01lEFkKRQe2NrAUFtZA9IDZcW3hgg8Zy/69D5SnvMIKaikhGtXHyamaVfdNgHCJkyt5bOdf1DLFD5dwDQ+xfWN/PSbeVi0BgvRDypyoyUWcBK6ZBS6TgrCN/nMRc; 25:uma2LIRonPH9suyPVZyj/zigeNgBkczyLdNVbpAVvMaycrSZm7DdA4W8ee8v/Ab2YFutzKFMu6uIeQLHa76wIpRlWMphUM/F0gGPfsKiPNOOTe0SWt3pK1JKfiTNiUwRkw/2s/e9elq0r2peKN9JM9DKyyYv1lESBI7bWoAz31sy4oSn9SeKuRKVhke7iicHzTqusW0a9cH6ph5OAArgbxrfR+zXaUbNChHNPBO1ZJSIv3JglB58nZPItaedG7vzXzCcf6V1/p3n6HRDKkIQS7hmseiyKw8hu2TTcmSkfPKBr01QaEe269SsEUZO/D53lqb65enJ+HczLgf9PgPKuw==; 31:36RSreyUGPC7a9OF7y75l21+oU/5w6+5G5xTuwSf4HsCS6jtukK1WeImCgIA267LGeU1nqOkeGrKgP5XsjdyWYWqR0rzfJyFXVKZV6s7kw3LF6yVHfY9h0vDCthxIyztROd1NNeTNAk65UN8ZHStNONlE/sMbsJLOqONW57inMsAK+AF6QQ+snWo6CizDx2KgF3Y0WVUeTSFsMTTkxrS04k+05hH5u3NrK7sRD12kX0= X-MS-TrafficTypeDiagnostic: BY2PR12MB0145: X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0145; 20:a4K2uXkwrnL+4JTSAAnmBJlRqP9Ae/xHodxekdOm7gTT/dsRO+j3AbbdMkV8KJKFxrodJAcFlYU1FLte10uY3+ES8nw+oxzdnVszoJ13jIByXo+Ef+wJJNpnV7BzJOf/pLQJ+13kcUthJRSUy7ZV20YZhuVIWLGSeOkk6xLzpwsHHF8k956UzQ1rd1Ou81Ia6geBRC4uve99RnnvP3XCB30BzJO0EqYLbZcuVHoOTEYDOSsDeZ8mRdZxD8CcpfqOYc1/CP4mVgf7/+fY93RTDIjf+r82vxt4xN8mHgGxuOxYwm18JYTgmcAuO5CTTGlurx9Jcg8+dnScdUicWJNgMMaRhbIW42pUSKmVaBfhAalBRUc2P1rbn/K8NNcuEa/PYkL198sOOj12TkPW/zTPa/8U1qZBRKvl7W3viYffkYr9KAXYrZjMsSTL70Y0X7mYjPjQwvU3bPVX8uGkz6b1+ezkdMMIURBOqoNgHUJ1z3sm4IIZxj/cTRuYO7WMaDaj; 4:KxIIHGP+L6GpfqTDTCysziX0g6175xkE7I2ts1OCM0YHSbF5ZFTxyKVVesTm7NRFQcvao41TxDRZYWbWJn0tn0kcFbumpDlHgfmq/74sn10jW0E8N5+E0qsiiOexi/+D8nB/4ojF+KPHUoxTPNAzd1pMlqNY+o56+FxKl1rbK9+rQKBzkw1aI9Ng/ZTDJPhIpTG1GM3E5m/RYA/u7IsLhZX/NbaKbxFY17sgyNHkEB0qQgGJFjZ3wHAcOGe9ByClOGi5bt9vN/00MHcv+BpaKfmTBD+8xyk7t2Qgj3c5+v9iKECm/vzJdannk4DPvfRaZMbcMd3TzJzSJC30+zuJNkbemEVtgNAkb7w2uHymOYaQlHvqkMmqPHoLynfmnKCQ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(158342451672863)(192374486261705)(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231221)(944501327)(52105095)(6055026)(6041310)(20161123564045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011); SRVR:BY2PR12MB0145; BCL:0; PCL:0; RULEID:; SRVR:BY2PR12MB0145; X-Forefront-PRVS: 0630013541 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(366004)(346002)(376002)(39860400002)(39380400002)(199004)(189003)(25786009)(956004)(486005)(6916009)(48376002)(36756003)(81166006)(50226002)(186003)(97736004)(54906003)(16586007)(316002)(478600001)(26005)(1076002)(8676002)(6486002)(2351001)(50466002)(8936002)(16526019)(106356001)(15650500001)(47776003)(66066001)(53936002)(4326008)(81156014)(2616005)(2361001)(486005)(476003)(7736002)(51416003)(446003)(53416004)(59450400001)(6116002)(11346002)(5660300001)(68736007)(86362001)(76176011)(105586002)(7696005)(2906002)(52116002)(305945005)(3846002)(386003); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR12MB0145; H:wsp141597wss.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; 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; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR12MB0145; 23:PJwu0PCG2QKdKFigtt/LE4pIHJyq9Fa4rXvnbDhAQ?= =?us-ascii?Q?AMphG4VjSvxSWEvPjHvH4UEA8VCi8uRNiZnsADMYB6sW4H83ckEuNb297QIZ?= =?us-ascii?Q?jH3Cx97I1Qw9yT+ccT5LTBAUQWUYXisNoJF9rhPi0q9kv55fItI0KGK0QVKk?= =?us-ascii?Q?fTjQPxXS/01sewA2TmOHPyz0qxFyZYaZwU9TBIqB5Xh2r5Il9bbSgxN3rfzT?= =?us-ascii?Q?Ulx5CeA2rGZnkU3Q05zSxyEp8fwFLl5Ixy6DMPS5zj18I1QSyoOI3FBJRh1i?= =?us-ascii?Q?oKZQhAycQ3VWOhaDvSyincpe/xwmee/6Qv5fM6mraiR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eTL5D8msWe2Bo4jOBEk18q2Bm05/YxKKPMuEU2/OjU6VGW6Tww4UkLxYpuBkjgDw/DgYQLTdaDsDVeqfmHuRmilDcvsk4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0145; 7:ZHHsgODtVXExGDLJuX7E7ErbCuAMKrznH+SaOHTlsBJfMfuYGhe7QhQ8UAK/moxjFyflmCdBfgTJflwwRSyEhjgdtICbuy65kUABAVSPb1nfUWOG/WSKD2cgw8mRo3Z38LDsB3NtxPPXmwRWbR0bo2DgzzoFKKZBeWiawFeMyK6zQJuLPZMgTvu6lQfIN2YpkJRzr7wGCt5bq3PDzaHvQvukIcsoNeBi0+ErhpV3HR00cIsb7jhoGKiNZ7M2KBYo; 20:655jz9QmJi8MJZAZZyyXl5gzgPyCOIAUvFBxZM30drVa9UppZgbIJXIGRUYhvBZHDp1zt/M6MRuS69jBUoqPllNHE1B4D6S9R/YzxT3JqXFlq9aAMuhlAo9436xiUmdP06MPl1gBYDKTUfv6mLNqolXKnJB+b6fWzOox5WTXyNTbL31y+nvOkhJkZhnaknQZyadZDpk7uXd7zIrvkrkdTIWeJGu+TI3OVg64JDWMv42Z8PxvHxyf2YoMuyQBKD8T X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Apr 2018 14:19:52.2054 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e82ae4bb-1c9e-4c22-d87c-08d598a4cd4a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR12MB0145 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 02 Apr 2018 14:19:59 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 02 Apr 2018 14:19:59 +0000 (UTC) for IP:'104.47.32.87' DOMAIN:'mail-sn1nam01on0087.outbound.protection.outlook.com' HELO:'NAM01-SN1-obe.outbound.protection.outlook.com' FROM:'brijesh.singh@amd.com' RCPT:'' X-RedHat-Spam-Score: -0.011 (DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS) 104.47.32.87 mail-sn1nam01on0087.outbound.protection.outlook.com 104.47.32.87 mail-sn1nam01on0087.outbound.protection.outlook.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.26 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Tom Lendacky , Peter Krempa , Jon Grimm , Andrea Bolognani , Brijesh Singh , Borislav Petkov Subject: [libvirt] [PATCH v5 07/10] remote: implement the remote protocol for launch security 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 02 Apr 2018 14:20:11 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add remote support for launch security info. Signed-off-by: Brijesh Singh --- src/remote/remote_daemon_dispatch.c | 47 +++++++++++++++++++++++++++++++++= ++++ src/remote/remote_driver.c | 42 ++++++++++++++++++++++++++++++++- src/remote/remote_protocol.x | 20 +++++++++++++++- src/remote_protocol-structs | 11 +++++++++ 4 files changed, 118 insertions(+), 2 deletions(-) diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon= _dispatch.c index 121d114..0959604 100644 --- a/src/remote/remote_daemon_dispatch.c +++ b/src/remote/remote_daemon_dispatch.c @@ -3088,6 +3088,53 @@ remoteDispatchNodeGetMemoryStats(virNetServerPtr ser= ver ATTRIBUTE_UNUSED, } =20 static int +remoteDispatchDomainGetLaunchSecurityInfo(virNetServerPtr server ATTRIBUTE= _UNUSED, + virNetServerClientPtr client ATT= RIBUTE_UNUSED, + virNetMessagePtr msg ATTRIBUTE_U= NUSED, + virNetMessageErrorPtr rerr, + remote_domain_get_launch_securit= y_info_args *args, + remote_domain_get_launch_securit= y_info_ret *ret) +{ + virDomainPtr dom =3D NULL; + virTypedParameterPtr params =3D NULL; + int nparams =3D 0; + int rv =3D -1; + struct daemonClientPrivate *priv =3D + virNetServerClientGetPrivateData(client); + + if (!priv->conn) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not ope= n")); + goto cleanup; + } + + if (!(dom =3D get_nonnull_domain(priv->conn, args->dom))) + goto cleanup; + + if (virDomainGetLaunchSecurityInfo(dom, ¶ms, &nparams, args->flags= ) < 0) + goto cleanup; + + if (nparams > REMOTE_DOMAIN_LAUNCH_SECURITY_INFO_PARAMS_MAX) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"= )); + goto cleanup; + } + + if (virTypedParamsSerialize(params, nparams, + (virTypedParameterRemotePtr *) &ret->param= s.params_val, + &ret->params.params_len, + args->flags) < 0) + goto cleanup; + + rv =3D 0; + + cleanup: + if (rv < 0) + virNetMessageSaveError(rerr); + virTypedParamsFree(params, nparams); + virObjectUnref(dom); + return rv; +} + +static int remoteDispatchDomainGetPerfEvents(virNetServerPtr server ATTRIBUTE_UNUSED, virNetServerClientPtr client ATTRIBUTE_U= NUSED, virNetMessagePtr msg ATTRIBUTE_UNUSED, diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 325ef3f..b52faa1 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -1948,6 +1948,45 @@ remoteDomainGetNumaParameters(virDomainPtr domain, } =20 static int +remoteDomainGetLaunchSecurityInfo(virDomainPtr domain, + virTypedParameterPtr *params, + int *nparams, + unsigned int flags) +{ + int rv =3D -1; + remote_domain_get_launch_security_info_args args; + remote_domain_get_launch_security_info_ret ret; + struct private_data *priv =3D domain->conn->privateData; + + remoteDriverLock(priv); + + make_nonnull_domain(&args.dom, domain); + args.flags =3D flags; + + memset(&ret, 0, sizeof(ret)); + if (call(domain->conn, priv, 0, REMOTE_PROC_DOMAIN_GET_LAUNCH_SECURITY= _INFO, + (xdrproc_t) xdr_remote_domain_get_launch_security_info_args, = (char *) &args, + (xdrproc_t) xdr_remote_domain_get_launch_security_info_ret, (= char *) &ret) =3D=3D -1) + goto done; + + if (virTypedParamsDeserialize((virTypedParameterRemotePtr) ret.params.= params_val, + ret.params.params_len, + REMOTE_DOMAIN_LAUNCH_SECURITY_INFO_PARAM= S_MAX, + params, + nparams) < 0) + goto cleanup; + + rv =3D 0; + + cleanup: + xdr_free((xdrproc_t) xdr_remote_domain_get_launch_security_info_ret, + (char *) &ret); + done: + remoteDriverUnlock(priv); + return rv; +} + +static int remoteDomainGetPerfEvents(virDomainPtr domain, virTypedParameterPtr *params, int *nparams, @@ -8430,7 +8469,8 @@ static virHypervisorDriver hypervisor_driver =3D { .domainSetGuestVcpus =3D remoteDomainSetGuestVcpus, /* 2.0.0 */ .domainSetVcpu =3D remoteDomainSetVcpu, /* 3.1.0 */ .domainSetBlockThreshold =3D remoteDomainSetBlockThreshold, /* 3.2.0 */ - .domainSetLifecycleAction =3D remoteDomainSetLifecycleAction /* 3.9.0 = */ + .domainSetLifecycleAction =3D remoteDomainSetLifecycleAction, /* 3.9.0= */ + .domainGetLaunchSecurityInfo =3D remoteDomainGetLaunchSecurityInfo /* = 4.2.0 */ }; =20 static virNetworkDriver network_driver =3D { diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index 9dbd497..4c0144c 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote/remote_protocol.x @@ -253,6 +253,9 @@ const REMOTE_DOMAIN_IP_ADDR_MAX =3D 2048; /* Upper limit on number of guest vcpu information entries */ const REMOTE_DOMAIN_GUEST_VCPU_PARAMS_MAX =3D 64; =20 +/* Upper limit on number of launch security information entries */ +const REMOTE_DOMAIN_LAUNCH_SECURITY_INFO_PARAMS_MAX =3D 64; + /* UUID. VIR_UUID_BUFLEN definition comes from libvirt.h */ typedef opaque remote_uuid[VIR_UUID_BUFLEN]; =20 @@ -3448,6 +3451,15 @@ struct remote_domain_set_lifecycle_action_args { unsigned int flags; }; =20 +struct remote_domain_get_launch_security_info_args { + remote_nonnull_domain dom; + unsigned int flags; +}; + +struct remote_domain_get_launch_security_info_ret { + remote_typed_param params; +}; + /*----- Protocol. -----*/ =20 /* Define the program number, protocol version and procedure numbers here.= */ @@ -6135,5 +6147,11 @@ enum remote_procedure { * @priority: high * @acl: storage_pool:getattr */ - REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_TARGET_PATH =3D 391 + REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_TARGET_PATH =3D 391, + + /** + * @generate: none + * @acl: domain:read + */ + REMOTE_PROC_DOMAIN_GET_LAUNCH_SECURITY_INFO =3D 392 }; diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs index f45aba2..8f19d98 100644 --- a/src/remote_protocol-structs +++ b/src/remote_protocol-structs @@ -2877,6 +2877,16 @@ struct remote_domain_set_lifecycle_action_args { u_int action; u_int flags; }; +struct remote_domain_get_launch_security_info_args { + remote_nonnull_domain dom; + u_int flags; +}; +struct remote_domain_get_launch_security_info_ret { + struct { + u_int params_len; + remote_typed_param * params_val; + } params; +}; enum remote_procedure { REMOTE_PROC_CONNECT_OPEN =3D 1, REMOTE_PROC_CONNECT_CLOSE =3D 2, @@ -3269,4 +3279,5 @@ enum remote_procedure { REMOTE_PROC_DOMAIN_MANAGED_SAVE_DEFINE_XML =3D 389, REMOTE_PROC_DOMAIN_SET_LIFECYCLE_ACTION =3D 390, REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_TARGET_PATH =3D 391, + REMOTE_PROC_DOMAIN_GET_LAUNCH_SECURITY_INFO =3D 392, }; --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list