From nobody Mon Feb 9 09:53:02 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1568117238; cv=none; d=zoho.com; s=zohoarc; b=WHaLhspz+4P+1SquVJcY15a45YSrhU0sljbIRtPOvoITpAUviBsi0NdJqPq3tUSPsVKz7rh08nGrm840+qQj7tG5R684Ozuo3ySDGC/qiHS8j5xieen6vvozAcf5105dIE6Vf38F0Lu1lCF+jj20eLHE2kQVTpUEC4kL26jFKDM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568117238; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=x8AuL7U9IqOpGL1YiPq3mYoTUAOBEaDnmCSP1CWteHo=; b=UACmZ/eC1A+cBZzorBIYzrvvqrB48gabWbmsNAZOjMUHR2eIwWMyrkuJwP3F0U1lOhLWAr5qgx7Vc4P4o/kYMY51/IkkNxq9yCz1fcg1kNPVzKZFDVjrht4EknWEvKcKkEzW8mrpJ18Z07G0PVvvBthWWU7NxdmrIxHZsoGdULA= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1568117238663791.2440717791444; Tue, 10 Sep 2019 05:07:18 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i7eu6-000863-Hk; Tue, 10 Sep 2019 12:05:50 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i7eu5-00085M-FM for xen-devel@lists.xenproject.org; Tue, 10 Sep 2019 12:05:49 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 535ee89c-d3c3-11e9-ac1c-12813bfff9fa; Tue, 10 Sep 2019 12:05:48 +0000 (UTC) X-Inumbo-ID: 535ee89c-d3c3-11e9-ac1c-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1568117149; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=rKnYMoKY7w/4NbliXgQsOoX+l5golCVhUfDZx7rVU7w=; b=MX3nfTvOE/cN0tXierN8kpbGcBBUwb/o4TrR12OGZSta2CgE5uw6IY7G h2SGWateBw9u+BHyMtApWNJtpc7skGcPsk19g/icLRGP8Cn73tmyJvrhn aGkh1Nl+eQdsH9TUKYDe1lDkRhN8QgVJnm097ILgFUBwZhxY3iskak+Ys I=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=ian.jackson@eu.citrix.com; spf=Pass smtp.mailfrom=Ian.Jackson@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa1.hc3370-68.iphmx.com: no sender authenticity information available from domain of ian.jackson@eu.citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa1.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="ian.jackson@eu.citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa1.hc3370-68.iphmx.com: domain of Ian.Jackson@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa1.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="Ian.Jackson@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ~all" Received-SPF: None (esa1.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa1.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: 5woO6jq4kaWw3sX4eOtb/CXWF//juZIbfcKS2UCRyFPifs7OEIu755JIJRecNMuVKxnGu2ABF3 kBtMYWY57868WUBOHXh94uamgNAblnUGzqf+796jJsg90RuCYpgCSPwmta9qCrbIXJh6JsQrKY RoNYmeX2nOGupk40zVfPcQvD/H9wCZfE1epLe/UPuv30JDzqlyEZz2mxOQrz8aeEKYqDsF93PY /5RoCyMb8KM0YkS/RA5voyUOgsYG/ZEd56EfT3Qel++8FGV8WdGIrtHvJw/9Fqtj7/D0WG6MmD SCU= X-SBRS: 2.7 X-MesageID: 5416615 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.64,489,1559534400"; d="scan'208";a="5416615" From: Ian Jackson To: Date: Tue, 10 Sep 2019 13:02:07 +0100 Message-ID: <20190910120207.10358-13-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190910120207.10358-1-ian.jackson@eu.citrix.com> References: <20190910120207.10358-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v3 12/12] tools/ocaml: abi: Use formal conversion and check in more places X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , Julien Grall , Christian Lindig , Jan Beulich , David Scott Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Andrew Cooper Signed-off-by: Andrew Cooper Signed-off-by: Ian Jackson Acked-by: Jan Beulich --- tools/ocaml/libs/xc/xenctrl_stubs.c | 15 +++++++++------ xen/include/public/domctl.h | 4 ++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc/xenc= trl_stubs.c index c74c2b43a0..f86ecc7b7e 100644 --- a/tools/ocaml/libs/xc/xenctrl_stubs.c +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c @@ -195,8 +195,10 @@ CAMLprim value stub_xc_domain_create(value xch, value = config) =20 domain_handle_of_uuid_string(cfg.handle, String_val(VAL_HANDLE)); =20 - for ( l =3D VAL_FLAGS; l !=3D Val_none; l =3D Field(l, 1) ) - cfg.flags |=3D 1u << Int_val(Field(l, 0)); + cfg.flags =3D ocaml_list_to_c_bitmap + /* ! domain_create_flag CDF_ lc */ + /* ! XEN_DOMCTL_CDF_ XEN_DOMCTL_CDF_MAX max */ + (VAL_FLAGS); =20 arch_domconfig =3D Field(VAL_ARCH, 0); switch ( Tag_val(VAL_ARCH) ) @@ -211,8 +213,10 @@ CAMLprim value stub_xc_domain_create(value xch, value = config) /* Mnemonics for the named fields inside xen_x86_arch_domainconfig= */ #define VAL_EMUL_FLAGS Field(arch_domconfig, 0) =20 - for ( l =3D VAL_EMUL_FLAGS; l !=3D Val_none; l =3D Field(l, 1) ) - cfg.arch.emulation_flags |=3D 1u << Int_val(Field(l, 0)); + cfg.arch.emulation_flags =3D ocaml_list_to_c_bitmap + /* ! x86_arch_emulation_flags X86_EMU_ none */ + /* ! XEN_X86_EMU_ XEN_X86_EMU_ALL all */ + (VAL_EMUL_FLAGS); =20 #undef VAL_EMUL_FLAGS =20 @@ -368,8 +372,7 @@ static value alloc_domaininfo(xc_domaininfo_t * info) * emulation_flags: x86_arch_emulation_flags list; */ emul_list =3D c_bitmap_to_ocaml_list - /* ! x86_arch_emulation_flags X86_EMU_ none */ - /* ! XEN_X86_EMU_ XEN_X86_EMU_ALL all */ + /* ! x86_arch_emulation_flags */ (info->arch_config.emulation_flags); =20 /* xen_x86_arch_domainconfig */ diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h index ff9265f765..77f546cbb8 100644 --- a/xen/include/public/domctl.h +++ b/xen/include/public/domctl.h @@ -64,6 +64,10 @@ struct xen_domctl_createdomain { /* Is this a xenstore domain? */ #define _XEN_DOMCTL_CDF_xs_domain 4 #define XEN_DOMCTL_CDF_xs_domain (1U<<_XEN_DOMCTL_CDF_xs_domain) + +/* Max XEN_DOMCTL_CDF_* constant. Used for ABI checking. */ +#define XEN_DOMCTL_CDF_MAX XEN_DOMCTL_CDF_xs_domain + uint32_t flags; =20 /* --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel