From nobody Mon Feb 9 21:21:53 2026 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=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1558138917; cv=none; d=zoho.com; s=zohoarc; b=Q6Jw0NhBekWjnHYdbUi3X7W0BIETwNGIpZ/bwlt5pg6u/U8JzD3iwA7HIO4bREYJKILms5kxtHUGb+GmH8kIw5G6/GMFgR6rTtT/gjhhuHluSV+hYG6AgWJVaOvt5QiP4yaKmUQTdbYSD0y/YzCFjR+NgFogG57x+na1iy8+BgQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558138917; 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=t4MLYhcRlayUbHFUUiAWL4Y9ZJyHUqJnTHmY5g36c70=; b=NopIC55ROqLZuebgM6svJh7zvXTpK1m9ckmGVmkLbjtdBC3cWuAHVq80Nx46IEOl1ioIp7+FgpTlhlvi60ZyhR8MkkjiA+jfc+cB+YbrSGaOzhiXheSghFE54TvQLauEvygAVzlelcQvabfLISGSvbGa8kUmlrVXPRP2LsXmFqg= 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=fail 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 1558138916782703.9299390415549; Fri, 17 May 2019 17:21:56 -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 ABE088553D; Fri, 17 May 2019 23:56:08 +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 62C2A53E1B; Fri, 17 May 2019 23:56:08 +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 4447F206D3; Fri, 17 May 2019 23:56:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x4HNu0bd014190 for ; Fri, 17 May 2019 19:56:00 -0400 Received: by smtp.corp.redhat.com (Postfix) id D387A60E3E; Fri, 17 May 2019 23:56:00 +0000 (UTC) Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B455F60BE0; Fri, 17 May 2019 23:55:58 +0000 (UTC) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D1C5BC04BD48; Fri, 17 May 2019 23:55:57 +0000 (UTC) Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 May 2019 16:55:54 -0700 Received: from llcarval-mobl1.amr.corp.intel.com ([10.3.52.66]) by fmsmga007.fm.intel.com with ESMTP; 17 May 2019 16:55:54 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 From: Larkins Carvalho To: libvir-list@redhat.com Date: Fri, 17 May 2019 16:55:49 -0700 Message-Id: <20190517235552.12256-5-larkins.l.carvalho@intel.com> In-Reply-To: <20190517235552.12256-1-larkins.l.carvalho@intel.com> References: <20190517235552.12256-1-larkins.l.carvalho@intel.com> MIME-Version: 1.0 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 216 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 17 May 2019 23:55:58 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 17 May 2019 23:55:58 +0000 (UTC) for IP:'192.55.52.88' DOMAIN:'mga01.intel.com' HELO:'mga01.intel.com' FROM:'larkins.l.carvalho@intel.com' RCPT:'' X-RedHat-Spam-Score: -5 (RCVD_IN_DNSWL_HI, SPF_HELO_NONE, SPF_PASS) 192.55.52.88 mga01.intel.com 192.55.52.88 mga01.intel.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.31 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: karimullah.mohammed@intel.com, larkins.l.carvalho@intel.com, pkrempa@redhat.com Subject: [libvirt] [PATCH 4/7] remote: implement the remote protocol for virNodeMKTMEInfo() 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.28]); Fri, 17 May 2019 23:56:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Add remote support for virNodeMKTMEInfo(). --- src/remote/remote_daemon_dispatch.c | 44 +++++++++++++++++++++++++++++ src/remote/remote_driver.c | 41 ++++++++++++++++++++++++++- src/remote/remote_protocol.x | 21 +++++++++++++- src/remote_protocol-structs | 12 ++++++++ 4 files changed, 116 insertions(+), 2 deletions(-) diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon= _dispatch.c index df28259042..78591791cc 100644 --- a/src/remote/remote_daemon_dispatch.c +++ b/src/remote/remote_daemon_dispatch.c @@ -5230,6 +5230,50 @@ remoteDispatchNodeGetSevInfo(virNetServerPtr server = ATTRIBUTE_UNUSED, } =20 =20 +static int +remoteDispatchNodeGetMktmeInfo(virNetServerPtr server ATTRIBUTE_UNUSED, + virNetServerClientPtr client ATTRIBUTE_UNUS= ED, + virNetMessagePtr msg ATTRIBUTE_UNUSED, + virNetMessageErrorPtr rerr, + remote_node_get_mktme_info_args *args, + remote_node_get_mktme_info_ret *ret) +{ + 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 (virNodeGetMKTMEInfo(priv->conn, ¶ms, &nparams, args->flags) < = 0) + goto cleanup; + + if (nparams > REMOTE_NODE_MKTME_INFO_MAX) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"= )); + goto cleanup; + } + + + if (virTypedParamsSerialize(params, nparams, + (virTypedParameterRemotePtr *)&ret->params.params_val, + &ret->params.params_len, + args->flags) < 0) + goto cleanup; + + rv =3D 0; + + cleanup: + if (rv < 0) + virNetMessageSaveError(rerr); + virTypedParamsFree(params, nparams); + return rv; +} + + static int remoteDispatchNodeGetMemoryParameters(virNetServerPtr server ATTRIBUTE_UNU= SED, virNetServerClientPtr client ATTRIBU= TE_UNUSED, diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 5c4dd41227..af2f7a8223 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -6825,6 +6825,44 @@ remoteNodeGetSEVInfo(virConnectPtr conn, } =20 =20 +static int +remoteNodeGetMKTMEInfo(virConnectPtr conn, + virTypedParameterPtr *params, + int *nparams, + unsigned int flags) +{ + int rv =3D -1; + remote_node_get_mktme_info_args args; + remote_node_get_mktme_info_ret ret; + struct private_data *priv =3D conn->privateData; + + remoteDriverLock(priv); + + args.flags =3D flags; + + memset(&ret, 0, sizeof(ret)); + if (call(conn, priv, 0, REMOTE_PROC_NODE_GET_MKTME_INFO, + (xdrproc_t)xdr_remote_node_get_mktme_info_args, (char *)&args, + (xdrproc_t)xdr_remote_node_get_mktme_info_ret, (char *)&ret) =3D= =3D -1) + goto done; + + if (virTypedParamsDeserialize((virTypedParameterRemotePtr)ret.params.p= arams_val, + ret.params.params_len, + REMOTE_NODE_MKTME_INFO_MAX, + params, + nparams) < 0) + goto cleanup; + + rv =3D 0; + + cleanup: + xdr_free((xdrproc_t)xdr_remote_node_get_mktme_info_ret, (char *)&ret); + done: + remoteDriverUnlock(priv); + return rv; +} + + static int remoteNodeGetCPUMap(virConnectPtr conn, unsigned char **cpumap, @@ -8516,7 +8554,8 @@ static virHypervisorDriver hypervisor_driver =3D { .connectCompareHypervisorCPU =3D remoteConnectCompareHypervisorCPU, /*= 4.4.0 */ .connectBaselineHypervisorCPU =3D remoteConnectBaselineHypervisorCPU, = /* 4.4.0 */ .nodeGetSEVInfo =3D remoteNodeGetSEVInfo, /* 4.5.0 */ - .domainGetLaunchSecurityInfo =3D remoteDomainGetLaunchSecurityInfo /* = 4.5.0 */ + .domainGetLaunchSecurityInfo =3D remoteDomainGetLaunchSecurityInfo, /*= 4.5.0 */ + .nodeGetMKTMEInfo =3D remoteNodeGetMKTMEInfo /* 5.3.0 */ }; =20 static virNetworkDriver network_driver =3D { diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index 11f44ee267..391e3be66f 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote/remote_protocol.x @@ -263,6 +263,9 @@ const REMOTE_NODE_SEV_INFO_MAX =3D 64; /* Upper limit on number of launch security information entries */ const REMOTE_DOMAIN_LAUNCH_SECURITY_INFO_PARAMS_MAX =3D 64; =20 +/* Upper limit on number of MKTME parameters */ +const REMOTE_NODE_MKTME_INFO_MAX =3D 64; + /* UUID. VIR_UUID_BUFLEN definition comes from libvirt.h */ typedef opaque remote_uuid[VIR_UUID_BUFLEN]; =20 @@ -3514,6 +3517,16 @@ struct remote_node_get_sev_info_ret { int nparams; }; =20 +struct remote_node_get_mktme_info_args { + int nparams; + unsigned int flags; +}; + +struct remote_node_get_mktme_info_ret { + remote_typed_param params; + int nparams; +}; + struct remote_domain_get_launch_security_info_args { remote_nonnull_domain dom; unsigned int flags; @@ -6342,5 +6355,11 @@ enum remote_procedure { * @generate: both * @acl: connect:read */ - REMOTE_PROC_CONNECT_GET_STORAGE_POOL_CAPABILITIES =3D 403 + REMOTE_PROC_CONNECT_GET_STORAGE_POOL_CAPABILITIES =3D 403, + + /** + * @generate: none + * @acl: connect:read + */ + REMOTE_PROC_NODE_GET_MKTME_INFO =3D 404 }; diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs index 768189c573..7a3489c004 100644 --- a/src/remote_protocol-structs +++ b/src/remote_protocol-structs @@ -2931,6 +2931,17 @@ struct remote_node_get_sev_info_ret { } params; int nparams; }; +struct remote_node_get_mktme_info_args { + int nparams; + u_int flags; +}; +struct remote_node_get_mktme_info_ret { + struct { + u_int params_len; + remote_typed_param * params_val; + } params; + int nparams; +}; struct remote_domain_get_launch_security_info_args { remote_nonnull_domain dom; u_int flags; @@ -3385,4 +3396,5 @@ enum remote_procedure { REMOTE_PROC_CONNECT_LIST_ALL_NWFILTER_BINDINGS =3D 401, REMOTE_PROC_DOMAIN_SET_IOTHREAD_PARAMS =3D 402, REMOTE_PROC_CONNECT_GET_STORAGE_POOL_CAPABILITIES =3D 403, + REMOTE_PROC_NODE_GET_MKTME_INFO =3D 404, }; --=20 2.21.0.windows.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list