From nobody Fri Apr 19 09:33:04 2024 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=1568117075; cv=none; d=zoho.com; s=zohoarc; b=cq7ycIWr6hlLXHb7rDIniBbNNGBQ4HNTA/uyOflsrXzqbnWMf6IMz6Iz0lOGctE+tFa+YaU9bHBfRa1VcpJvXCgI9ryZ+oGbdF+Xrcz2BJDxnBkixBWRt2izsgWUuX+TjXJNfzJtqxLC61c+FlxxtzHvr3YU8PXHjizw5HVaE6c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568117075; 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=4bTuu5VONKDG5O3jY+57z0niaZiMyWrKdkGiTUukbjo=; b=O/9puZTx/Kd9GL/rJooZ7wfAFNycEjqWNpbTtqrEtW1weYCUPMAnHgCkQJlIHePmQaV+u+cTmrwgAxSntiFHHZTV59McDLO4E6gEB9Yznq1CU+c9oBprzcGHKe0DjUeJqkhx+qyl3c1r8K7JpO5NYfRCuaYwv2w8XidI1LS9KQU= 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 1568117075065959.0514248294946; Tue, 10 Sep 2019 05:04:35 -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 1i7erP-0007EX-D8; Tue, 10 Sep 2019 12:03:03 +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 1i7erO-0007EP-JO for xen-devel@lists.xenproject.org; Tue, 10 Sep 2019 12:03:02 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id efe4c87c-d3c2-11e9-ac1c-12813bfff9fa; Tue, 10 Sep 2019 12:03:01 +0000 (UTC) X-Inumbo-ID: efe4c87c-d3c2-11e9-ac1c-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1568116982; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=EXel1DzXDHB8JA/12GLSNoD1hJ7rYd/Sz0FRKXlOozE=; b=EP4N9pBJPz62SwMUat5KE+lUanyiY+LLNKk3hyc6kFxa/NZOFwJzftQD rPIQUpHWIxdxzqQHRzcgRpm0SrqQuknLERipj9kAOzPVb/gdrZNJCL11j dq70i8T9rzpBOgb+nW5LSACs/DmLivV6iD7Lw59yF6q4g3U38XBh+Wmz2 0=; Authentication-Results: esa2.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 (esa2.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=esa2.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="ian.jackson@eu.citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa2.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=esa2.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 (esa2.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=esa2.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: HxbNFOuUpy7cw8yefmRziJlU1fmLqfdGFcSfmZAIqI3adxIFvC4RKZfc0C6ISS8OOfsSYHPrjV GWcXKE6NHo4psvQ0w13kJenl6QRtw1kNUD5HYbWEZpu0LpKUNnKA9fqEhYFhkfl6fee0uh4kDd nOT3TVjlAbsjAyXVqx1UkY3cTc7kiezRyv+bxrVTUIYEr1nCe14pP5WVzNFbGiZBLKezlZ5k2n WdktjmRgg2vZe4KbIt3d/oUc9GmOo9UvTh+EbDkdp0FjssXp+3xUdaLzaXGNh7dnjRicIGaBru XAs= X-SBRS: 2.7 X-MesageID: 5365170 X-Ironport-Server: esa2.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="5365170" From: Ian Jackson To: Date: Tue, 10 Sep 2019 13:01:56 +0100 Message-ID: <20190910120207.10358-2-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 01/12] tools/ocaml: Add missing X86_EMU_VPCI 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: Andrew Cooper , Ian Jackson , Christian Lindig , Wei Liu , 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) This was missing from x86_arch_emulation_flags. Signed-off-by: Ian Jackson Acked-by: Christian Lindig --- tools/ocaml/libs/xc/xenctrl.ml | 1 + tools/ocaml/libs/xc/xenctrl.mli | 1 + 2 files changed, 2 insertions(+) diff --git a/tools/ocaml/libs/xc/xenctrl.ml b/tools/ocaml/libs/xc/xenctrl.ml index 35958b94d5..305625cb6c 100644 --- a/tools/ocaml/libs/xc/xenctrl.ml +++ b/tools/ocaml/libs/xc/xenctrl.ml @@ -46,6 +46,7 @@ type x86_arch_emulation_flags =3D | X86_EMU_IOMMU | X86_EMU_PIT | X86_EMU_USE_PIRQ + | X86_EMU_VPCI =20 type xen_x86_arch_domainconfig =3D { diff --git a/tools/ocaml/libs/xc/xenctrl.mli b/tools/ocaml/libs/xc/xenctrl.= mli index 6c4268d453..da93160ed3 100644 --- a/tools/ocaml/libs/xc/xenctrl.mli +++ b/tools/ocaml/libs/xc/xenctrl.mli @@ -40,6 +40,7 @@ type x86_arch_emulation_flags =3D | X86_EMU_IOMMU | X86_EMU_PIT | X86_EMU_USE_PIRQ + | X86_EMU_VPCI =20 type xen_x86_arch_domainconfig =3D { emulation_flags: x86_arch_emulation_flags list; --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Fri Apr 19 09:33:04 2024 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=1568117088; cv=none; d=zoho.com; s=zohoarc; b=nnYfnEsAHbfF7HIeNsNBlxM3ekyTNSuq95WdcHWHOjkyQwt4bv5wmQuNsGfWoPMbPHBJeRMyFkotG5eWs5eU9XnOcrLxHIHA1J0533gp74eg3u9SXHBzMJ5hQbJBQ7w6/8NBgLF5pZUC3gFdUt39wnbKBQLdXizzoQJdceCVKe4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568117088; 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=56lO5pGhMGL9AhX0EvLArWrObLtIhr0k6smZxdSwJjk=; b=VQGLoDAJy3UKMsgILPkDu9gfZUWzWWdegyq0YkZpuC9EzfQmNXK/C6iBXoHqyVqX7cgyIQuG5HSveFDibkI9/YNkN7yqeZ5i1YaRy2F9ukmXwxzLeAixDO34KH1jlC9uY9qXp0/I0lOih6FdV3hl9zOzyq9TuMspK9aEM7Z8gJA= 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 1568117088780725.5257112884502; Tue, 10 Sep 2019 05:04:48 -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 1i7erf-0007H4-NL; Tue, 10 Sep 2019 12:03:19 +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 1i7ere-0007Gu-4M for xen-devel@lists.xenproject.org; Tue, 10 Sep 2019 12:03:18 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id f90939b0-d3c2-11e9-ac1c-12813bfff9fa; Tue, 10 Sep 2019 12:03:17 +0000 (UTC) X-Inumbo-ID: f90939b0-d3c2-11e9-ac1c-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1568116997; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=brCSTwUkoGhVIkFqYux1Raelk3CM0eMyTZfT+OnsnSA=; b=Xhl5kWrWqN2H5XpZusdfCf+v1ozxuMyDEZcR13jOg0PlOsUatl8Tj9Gk uEeODUR+bWBHMVER4gv749W5777Rz7gYCvKuS/pb7BoByJBc/2YkiBq88 C8PLZqrORFigzkhQp/ZuBhObWtL0OWEPp7cUyDAr9zL3aV30DOyTR/9/C g=; Authentication-Results: esa5.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 (esa5.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=esa5.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="ian.jackson@eu.citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa5.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=esa5.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 (esa5.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=esa5.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: xWdLzGSdW2Z543kJdaVauR2R1zOUKcoT1zLg0iX2DL5yUF0FmH7nEcc4tXBcfiXMRz3YR6t7dU isILW4WWy5j3qAZTQq1QybMGkd9HFYyw59SK/WUuMe2rQjLUGM/WOe4c8pKQOZLwdrZXEYoQy3 thjkupTPAVC0r1kXNgtZhB1gKgzNCrJ6vQAdxcjyWo2JAT8Ee5Mmnhr4Kxdpuj7y/c2I5YksGe aEMfNkvRPz1wzjYBH1IP32+OsUCIn5rPWGUsYr8xoQquIlsg+wt/4Z66lwfS8MiaJFzivFzv5Y /NE= X-SBRS: 2.7 X-MesageID: 5555844 X-Ironport-Server: esa5.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="5555844" From: Ian Jackson To: Date: Tue, 10 Sep 2019 13:01:57 +0100 Message-ID: <20190910120207.10358-3-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 02/12] tools/ocaml: Add missing CAP_PV 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: Andrew Cooper , Ian Jackson , Christian Lindig , Wei Liu , 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 c/s f089fddd941 broke the Ocaml ABI by renumering XEN_SYSCTL_PHYSCAP_direct= io without adjusting the Ocaml physinfo_cap_flag enumeration. Fix this by inserting CAP_PV between CAP_HVM and CAP_DirectIO. Signed-off-by: Andrew Cooper Signed-off-by: Ian Jackson Acked-by: Christian Lindig --- tools/ocaml/libs/xc/xenctrl.ml | 1 + tools/ocaml/libs/xc/xenctrl.mli | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/ocaml/libs/xc/xenctrl.ml b/tools/ocaml/libs/xc/xenctrl.ml index 305625cb6c..097f39d5ce 100644 --- a/tools/ocaml/libs/xc/xenctrl.ml +++ b/tools/ocaml/libs/xc/xenctrl.ml @@ -100,6 +100,7 @@ type sched_control =3D =20 type physinfo_cap_flag =3D | CAP_HVM + | CAP_PV | CAP_DirectIO =20 type physinfo =3D diff --git a/tools/ocaml/libs/xc/xenctrl.mli b/tools/ocaml/libs/xc/xenctrl.= mli index da93160ed3..957c9fdc2e 100644 --- a/tools/ocaml/libs/xc/xenctrl.mli +++ b/tools/ocaml/libs/xc/xenctrl.mli @@ -83,7 +83,10 @@ type domaininfo =3D { arch_config : arch_domainconfig; } type sched_control =3D { weight : int; cap : int; } -type physinfo_cap_flag =3D CAP_HVM | CAP_DirectIO +type physinfo_cap_flag =3D + | CAP_HVM + | CAP_PV + | CAP_DirectIO type physinfo =3D { threads_per_core : int; cores_per_socket : int; --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Fri Apr 19 09:33:04 2024 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=1568117106; cv=none; d=zoho.com; s=zohoarc; b=TR5pEaK4nxO/3fuoyIGo91L/9zS2+gentIaJgvwS7dU2Iw77LFqH1pnme9UZ7pp9x5pHNBfonfePh+gudxNU6lc2wtocs3i24QUABKZGL/7h+gPdTKKXvujE6uqzdUBlh++ZcdGdaAfdc9kEP57LRyWWhPabeOWSRk7+RUnv/V8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568117106; 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=+HpdmbpWCDWk6UklGEMl1DwEUXcYISbRmlAaVhwdwq0=; b=YseNVTgVViROngXKS9eBOw/iNT+wMD6WEIK029BYq6G0ndvyTaF5anXT3ndZ0U9EYA882eraFHQkm4iKKXJV1kq8dfZGuc0u170jWw8Bw20iJjEPPnxcfXYNZQAXq+iDcIO6rmVvkj3IUk8NbHgKjEg7K4fpJzvQGTTPtGBhAz8= 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 1568117106946803.4535791524157; Tue, 10 Sep 2019 05:05:06 -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 1i7erv-0007JO-13; Tue, 10 Sep 2019 12:03:35 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i7ert-0007J8-Gz for xen-devel@lists.xenproject.org; Tue, 10 Sep 2019 12:03:33 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 023dd3c4-d3c3-11e9-b76c-bc764e2007e4; Tue, 10 Sep 2019 12:03:32 +0000 (UTC) X-Inumbo-ID: 023dd3c4-d3c3-11e9-b76c-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1568117012; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=GdG1GUx2C2bfbt3BcVZ15QeOPSMirqqexR8VrrfAw6s=; b=UXl1teE3YV5BEGlzGQH/t2mEkEaSGaTTFtUSbVXgtqO1R8DqQyb4uP5h 3ix/t4BuIDWxJo5ronz8xwhG6NLyEhXw/eRPs3gc94a9zjYENPd9vJ+ZP 7PbowH9YgTiSkJBPlqcoxEjN18mxwlC8spaYN6jNmQPuYremuLoI7+/Eh Y=; Authentication-Results: esa5.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 (esa5.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=esa5.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="ian.jackson@eu.citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa5.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=esa5.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 (esa5.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=esa5.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: RMCj5lAmd70QmpWWspQZOVhFKv3LcE/W1jMCyh/4rTAPEChXsZ4BJT4IV7h8whV+kVHLBmsI63 7tClAIlcZRK3OhZFZyuULQHbei8t3wVgTsVqIsLuFt13idMkoKFibOlOd5g9f5ax/b4hxIRgAJ w0QSH+Ibomu3KR45F0pV3VeY8Xbx3XJjzSWkZyZpgtD5u6hOJS3wez/Q2DItgHNrfJ3D9neoNc 1xbFTu7VYbmG4gEnmYujHtQXVdBFLoMAIulO2SDMobs0z5KlD6NnaQlCdSjN3QngFzEERA0mCw K1I= X-SBRS: 2.7 X-MesageID: 5555873 X-Ironport-Server: esa5.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="5555873" From: Ian Jackson To: Date: Tue, 10 Sep 2019 13:01:58 +0100 Message-ID: <20190910120207.10358-4-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 03/12] tools/ocaml: Introduce xenctrl ABI build-time checks 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 , Tim Deegan , Ian Jackson , Julien Grall , Andrew Cooper , 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) c/s f089fddd941 broke the Ocaml ABI by renumering XEN_SYSCTL_PHYSCAP_directio without adjusting the Ocaml physinfo_cap_flag enumeration. Add build machinery which will check the ABI correspondence. This will result in a compile time failure whenever constants get renumbered/added without a compatible adjustment to the Ocaml ABI. Signed-off-by: Andrew Cooper Signed-off-by: Ian Jackson Acked-by: Christian Lindig Acked-by: Jan Beulich --- .gitignore | 1 + tools/ocaml/libs/xc/Makefile | 5 +++ tools/ocaml/libs/xc/abi-check | 84 +++++++++++++++++++++++++++++++++= ++++ tools/ocaml/libs/xc/xenctrl_stubs.c | 69 +++++++++++++++++++++--------- xen/include/public/sysctl.h | 4 ++ 5 files changed, 143 insertions(+), 20 deletions(-) create mode 100755 tools/ocaml/libs/xc/abi-check diff --git a/.gitignore b/.gitignore index 3c947ac948..3ada0c4f0b 100644 --- a/.gitignore +++ b/.gitignore @@ -392,6 +392,7 @@ tools/ocaml/libs/xentoollog/_xtl_levels.* tools/ocaml/libs/xentoollog/xentoollog.ml tools/ocaml/libs/xentoollog/xentoollog.mli tools/ocaml/libs/xs/paths.ml +tools/ocaml/libs/xc/xenctrl_abi_check.h tools/ocaml/xenstored/_paths.h tools/ocaml/xenstored/oxenstored tools/ocaml/xenstored/oxenstored.conf diff --git a/tools/ocaml/libs/xc/Makefile b/tools/ocaml/libs/xc/Makefile index d24b0144d0..ac780627d2 100644 --- a/tools/ocaml/libs/xc/Makefile +++ b/tools/ocaml/libs/xc/Makefile @@ -31,4 +31,9 @@ install: $(LIBS) META uninstall: $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenctrl =20 +xenctrl_stubs.o: xenctrl_abi_check.h + +xenctrl_abi_check.h: abi-check xenctrl_stubs.c xenctrl.ml + $(PERL) -w $^ >$@.tmp && mv -f $@.tmp $@ + include $(TOPLEVEL)/Makefile.rules diff --git a/tools/ocaml/libs/xc/abi-check b/tools/ocaml/libs/xc/abi-check new file mode 100755 index 0000000000..c987cd8454 --- /dev/null +++ b/tools/ocaml/libs/xc/abi-check @@ -0,0 +1,84 @@ +#!/usr/bin/perl -w + +use strict; +use Data::Dumper; + +our %enums; + +@ARGV =3D=3D 2 or die; +our ($c, $o) =3D @ARGV; + +open STDIN, "<", $c or die $!; + +our $cline =3D -1; +our $ei; + +while (<>) { + if ($cline =3D=3D -1) { + if (m/c_bitmap_to_ocaml_list/) { + $cline =3D 0; + $ei =3D { }; + } + } else { + $cline++; + m{^\s+/\* \s+ ! \s+ (.*?) \s* \*/\s*$}x or die "$cline $_ ?"; + my @vals =3D split /\s+/, $1; + if ($cline =3D=3D 1 && !@vals) { + $cline =3D -1; + } elsif ($cline =3D=3D 1 && @vals =3D=3D 3) { + $ei->{$_} =3D shift @vals foreach qw(OType OPrefix Mangle); + } elsif ($cline =3D=3D 2 && @vals =3D=3D 3) { + $ei->{$_} =3D shift @vals foreach qw(CPrefix CFinal CFinalHow); + die if $enums{ $ei->{OType} }; + $enums{ $ei->{OType} } =3D $ei; + $cline =3D -1; + } else { + die "$_ ?"; + } + } +} + +sub expect ($$) { + printf "BUILD_BUG_ON( %-30s !=3D %-10s );\n", @_ or die $!; +} + +open STDIN, "<", $o or die $!; +my $cval; +$ei =3D undef; +my $bitnum =3D 0; +while (<>) { + if (!$ei) { + if (m{^type \s+ (\w+) \s* \=3D \s* $/}x && $enums{$1}) { + $ei =3D $enums{$1}; + $cval =3D ''; + $bitnum =3D 0; + } + } else { + if (m{^\s+ \| \s* $ei->{OPrefix} (\w+) \s*$}x) { + $cval =3D $1; + if ($ei->{Mangle} eq 'lc') { + $cval =3D lc $cval; + } elsif ($ei->{Mangle} eq 'none') { + } else { + die; + } + $cval =3D $ei->{CPrefix}.$cval; + expect($cval, "(1u << $bitnum)"); + $bitnum++; + } elsif (m/^\w|\{/) { + if ($ei->{CFinalHow} eq 'max') { + expect($ei->{CFinal}, "(1u << ".($bitnum-1).")"); + } elsif ($ei->{CFinalHow} eq 'all') { + expect($ei->{CFinal}, "(1u << $bitnum)-1u"); + } else { + die Dumper($ei)." ?"; + } + $ei =3D undef; + } elsif (!m{\S}) { + } else { + die "$_ ?"; + } + } +} + +close STDOUT or die $!; diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc/xenc= trl_stubs.c index 2e1b29ce33..352a6bd2d6 100644 --- a/tools/ocaml/libs/xc/xenctrl_stubs.c +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c @@ -32,6 +32,7 @@ =20 #define XC_WANT_COMPAT_MAP_FOREIGN_API #include +#include =20 #include "mmap_stubs.h" =20 @@ -119,6 +120,39 @@ static void domain_handle_of_uuid_string(xen_domain_ha= ndle_t h, #undef X } =20 +/* + * Various fields which are a bitmap in the C ABI are converted to lists of + * integers in the Ocaml ABI for more idiomatic handling. + */ +static value c_bitmap_to_ocaml_list + /* ! */ + /* + * All calls to this function must be in a form suitable + * for xenctrl_abi_check. The parsing there is ad-hoc. + */ + (unsigned int bitmap) +{ + CAMLparam0(); + CAMLlocal2(list, tmp); + +#include "xenctrl_abi_check.h" + + list =3D tmp =3D Val_emptylist; + + for ( unsigned int i =3D 0; bitmap; i++, bitmap >>=3D 1 ) + { + if ( !(bitmap & 1) ) + continue; + + tmp =3D caml_alloc_small(2, Tag_cons); + Field(tmp, 0) =3D Val_int(i); + Field(tmp, 1) =3D list; + list =3D tmp; + } + + CAMLreturn(list); +} + CAMLprim value stub_xc_domain_create(value xch, value config) { CAMLparam2(xch, config); @@ -315,16 +349,13 @@ static value alloc_domaininfo(xc_domaininfo_t * info) Store_field(result, 15, tmp); =20 #if defined(__i386__) || defined(__x86_64__) - /* emulation_flags: x86_arch_emulation_flags list; */ - tmp =3D emul_list =3D Val_emptylist; - for (i =3D 0; i < 10; i++) { - if ((info->arch_config.emulation_flags >> i) & 1) { - tmp =3D caml_alloc_small(2, Tag_cons); - Field(tmp, 0) =3D Val_int(i); - Field(tmp, 1) =3D emul_list; - emul_list =3D tmp; - } - } + /* + * 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 */ + (info->arch_config.emulation_flags); =20 /* xen_x86_arch_domainconfig */ x86_arch_config =3D caml_alloc_tuple(1); @@ -635,7 +666,7 @@ CAMLprim value stub_xc_send_debug_keys(value xch, value= keys) CAMLprim value stub_xc_physinfo(value xch) { CAMLparam1(xch); - CAMLlocal3(physinfo, cap_list, tmp); + CAMLlocal2(physinfo, cap_list); xc_physinfo_t c_physinfo; int r; =20 @@ -646,15 +677,13 @@ CAMLprim value stub_xc_physinfo(value xch) if (r) failwith_xc(_H(xch)); =20 - tmp =3D cap_list =3D Val_emptylist; - for (r =3D 0; r < 2; r++) { - if ((c_physinfo.capabilities >> r) & 1) { - tmp =3D caml_alloc_small(2, Tag_cons); - Field(tmp, 0) =3D Val_int(r); - Field(tmp, 1) =3D cap_list; - cap_list =3D tmp; - } - } + /* + * capabilities: physinfo_cap_flag list; + */ + cap_list =3D c_bitmap_to_ocaml_list + /* ! physinfo_cap_flag CAP_ lc */ + /* ! XEN_SYSCTL_PHYSCAP_ XEN_SYSCTL_PHYSCAP_MAX max */ + (c_physinfo.capabilities); =20 physinfo =3D caml_alloc_tuple(10); Store_field(physinfo, 0, Val_int(c_physinfo.threads_per_core)); diff --git a/xen/include/public/sysctl.h b/xen/include/public/sysctl.h index 36b3f8c429..5401f9c2fe 100644 --- a/xen/include/public/sysctl.h +++ b/xen/include/public/sysctl.h @@ -90,6 +90,10 @@ struct xen_sysctl_tbuf_op { /* The platform supports direct access to I/O devices with IOMMU. */ #define _XEN_SYSCTL_PHYSCAP_directio 2 #define XEN_SYSCTL_PHYSCAP_directio (1u<<_XEN_SYSCTL_PHYSCAP_directio) + +/* Max XEN_SYSCTL_PHYSCAP_* constant. Used for ABI checking. */ +#define XEN_SYSCTL_PHYSCAP_MAX XEN_SYSCTL_PHYSCAP_directio + struct xen_sysctl_physinfo { uint32_t threads_per_core; uint32_t cores_per_socket; --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Fri Apr 19 09:33:04 2024 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=1568117120; cv=none; d=zoho.com; s=zohoarc; b=VlYF1hBAgN9j7aqzpS4q4yTGINs/ngmntvPf7SVWE5oUqkMk8qkcr9R+VYX7NGg8oR2z8IiRFKo7h5rZcZXBm1shN8MuzfzLRbLcDmiBqn4d95jlk/9mYCKKyNY98zPoDfOP9cjPl12/kESoV7bcZq6DVFWozW90hgSQT4XTRQQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568117120; 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=qlx07m8EUGHiqPNK4fD2rvVj7xPpncRHvwmQha5VfXs=; b=IHxOMjSGMJXgDmu6SlUDmpEFgzHNE9lWAY/bHeNAXrgZw60EIcDGDvSe8YnBNPgIKeXSwboqEr1BCBdPKScz2VRyIy2i8qoeE2N2z+DSIJjqUC/qqCDItJLiLuFJUO3jeUPh3kAojRP6zcMcXQlGhWjuLaU2p6pUJNCODv3xL6g= 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 1568117119998814.6733438798252; Tue, 10 Sep 2019 05:05:19 -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 1i7esA-0007NY-CT; Tue, 10 Sep 2019 12:03: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 1i7es8-0007N9-N5 for xen-devel@lists.xenproject.org; Tue, 10 Sep 2019 12:03:48 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 0b554fd2-d3c3-11e9-ac1c-12813bfff9fa; Tue, 10 Sep 2019 12:03:47 +0000 (UTC) X-Inumbo-ID: 0b554fd2-d3c3-11e9-ac1c-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1568117028; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=nDH9H0EOC4JqqYAHcuZ2aZizo39n+sLwbxY8meJcGSM=; b=ON0vU1NwBbzmse1wOFFos8yS1zhtWHHZL67TXt1AN3P+bCrvutek63a/ YoptKyanxXq3H2aaxfCOlbuvBa68yAEdwLU84fPH1LQ/TONDiqnMXYP1a VZ5PW9bhjov0BTaEZ4AfRK/RYAxp8YXDwdIWLM/vT+CacOX0ameMs3wzO s=; Authentication-Results: esa3.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 (esa3.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=esa3.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="ian.jackson@eu.citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa3.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=esa3.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 (esa3.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=esa3.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: LvM1Zm8l3NtvGw0eMDqKGlw0jNMmpAHeTt33DjWUruJHwxAx5AG25OxnPFk9Hgq55ml0wu9puV T8klW0FdPxY2U0oI7Grzf0/Hn/GGCeTlnu8174vijQhWX+k1N/UYiqocd0cCY+jBsfDTyLkUXN iX18lZDJ5uIoEVvFPLUwH3J/2EixAq9wD27Da6CJa/zUr6hrAsO7gYm2nGwrOwvlJIEb8F+iOF 5eRkD+XzqvGFEhjcFPjsmYo//8GqnXgSQmCufnrJ1L1D+Oi1VpArdBqwg+ShtOyBeDMUpb34PB vRY= X-SBRS: 2.7 X-MesageID: 5370519 X-Ironport-Server: esa3.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="5370519" From: Ian Jackson To: Date: Tue, 10 Sep 2019 13:01:59 +0100 Message-ID: <20190910120207.10358-5-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 04/12] xen/domctl: Drop guest suffix from XEN_DOMCTL_CDF_hvm 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 , =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Tim Deegan , Julien Grall , Jan Beulich , Anthony PERARD , Volodymyr Babchuk , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= 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 Acked-by: Christian Lindig Acked-by: Jan Beulich Acked-by: Julien Grall --- tools/libxl/libxl_create.c | 2 +- tools/python/xen/lowlevel/xc/xc.c | 2 +- xen/arch/arm/domain.c | 2 +- xen/arch/arm/domain_build.c | 2 +- xen/arch/arm/setup.c | 2 +- xen/arch/x86/domain.c | 4 ++-- xen/arch/x86/setup.c | 2 +- xen/common/domain.c | 4 ++-- xen/include/public/domctl.h | 4 ++-- xen/include/xen/sched.h | 4 ++-- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index 03ce166f4f..79e010da72 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -557,7 +557,7 @@ int libxl__domain_make(libxl__gc *gc, libxl_domain_conf= ig *d_config, }; =20 if (info->type !=3D LIBXL_DOMAIN_TYPE_PV) { - create.flags |=3D XEN_DOMCTL_CDF_hvm_guest; + create.flags |=3D XEN_DOMCTL_CDF_hvm; create.flags |=3D libxl_defbool_val(info->hap) ? XEN_DOMCTL_CDF_hap : 0; create.flags |=3D diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/= xc/xc.c index 9d53c4cf37..26b9a0fb74 100644 --- a/tools/python/xen/lowlevel/xc/xc.c +++ b/tools/python/xen/lowlevel/xc/xc.c @@ -155,7 +155,7 @@ static PyObject *pyxc_domain_create(XcObject *self, } =20 #if defined (__i386) || defined(__x86_64__) - if ( config.flags & XEN_DOMCTL_CDF_hvm_guest ) + if ( config.flags & XEN_DOMCTL_CDF_hvm ) config.arch.emulation_flags =3D (XEN_X86_EMU_ALL & ~XEN_X86_EMU_VP= CI); #elif defined (__arm__) || defined(__aarch64__) config.arch.gic_version =3D XEN_DOMCTL_CONFIG_GIC_NATIVE; diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index 941bbff4fe..a9c4113c26 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -608,7 +608,7 @@ int arch_sanitise_domain_config(struct xen_domctl_creat= edomain *config) { unsigned int max_vcpus; =20 - if ( config->flags !=3D (XEN_DOMCTL_CDF_hvm_guest | XEN_DOMCTL_CDF_hap= ) ) + if ( config->flags !=3D (XEN_DOMCTL_CDF_hvm | XEN_DOMCTL_CDF_hap) ) { dprintk(XENLOG_INFO, "Unsupported configuration %#x\n", config->fl= ags); return -EINVAL; diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index e79d4e204f..a0fee1ef13 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -2070,7 +2070,7 @@ void __init create_domUs(void) struct xen_domctl_createdomain d_cfg =3D { .arch.gic_version =3D XEN_DOMCTL_CONFIG_GIC_NATIVE, .arch.nr_spis =3D 0, - .flags =3D XEN_DOMCTL_CDF_hvm_guest | XEN_DOMCTL_CDF_hap, + .flags =3D XEN_DOMCTL_CDF_hvm | XEN_DOMCTL_CDF_hap, .max_evtchn_port =3D -1, .max_grant_frames =3D 64, .max_maptrack_frames =3D 1024, diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index fa6c110b11..1b303bde34 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -797,7 +797,7 @@ void __init start_xen(unsigned long boot_phys_offset, struct bootmodule *xen_bootmodule; struct domain *dom0; struct xen_domctl_createdomain dom0_cfg =3D { - .flags =3D XEN_DOMCTL_CDF_hvm_guest | XEN_DOMCTL_CDF_hap, + .flags =3D XEN_DOMCTL_CDF_hvm | XEN_DOMCTL_CDF_hap, .max_evtchn_port =3D -1, .max_grant_frames =3D gnttab_dom0_frames(), .max_maptrack_frames =3D opt_max_maptrack_frames, diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index d538de8eae..4b0ad5e15d 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -442,7 +442,7 @@ void arch_vcpu_destroy(struct vcpu *v) =20 int arch_sanitise_domain_config(struct xen_domctl_createdomain *config) { - bool hvm =3D config->flags & XEN_DOMCTL_CDF_hvm_guest; + bool hvm =3D config->flags & XEN_DOMCTL_CDF_hvm; unsigned int max_vcpus; =20 if ( hvm ? !hvm_enabled : !IS_ENABLED(CONFIG_PV) ) @@ -473,7 +473,7 @@ int arch_sanitise_domain_config(struct xen_domctl_creat= edomain *config) return -EINVAL; } =20 - if ( !(config->flags & XEN_DOMCTL_CDF_hvm_guest) ) + if ( !(config->flags & XEN_DOMCTL_CDF_hvm) ) /* * It is only meaningful for XEN_DOMCTL_CDF_oos_off to be clear * for HVM guests. diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 5a88ef368f..27981adc0b 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -1723,7 +1723,7 @@ void __init noreturn __start_xen(unsigned long mbi_p) =20 if ( opt_dom0_pvh ) { - dom0_cfg.flags |=3D (XEN_DOMCTL_CDF_hvm_guest | + dom0_cfg.flags |=3D (XEN_DOMCTL_CDF_hvm | ((hvm_hap_supported() && !opt_dom0_shadow) ? XEN_DOMCTL_CDF_hap : 0)); =20 diff --git a/xen/common/domain.c b/xen/common/domain.c index e9d2c613e0..09917b2885 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -297,7 +297,7 @@ static void _domain_destroy(struct domain *d) =20 static int sanitise_domain_config(struct xen_domctl_createdomain *config) { - if ( config->flags & ~(XEN_DOMCTL_CDF_hvm_guest | + if ( config->flags & ~(XEN_DOMCTL_CDF_hvm | XEN_DOMCTL_CDF_hap | XEN_DOMCTL_CDF_s3_integrity | XEN_DOMCTL_CDF_oos_off | @@ -313,7 +313,7 @@ static int sanitise_domain_config(struct xen_domctl_cre= atedomain *config) return -EINVAL; } =20 - if ( !(config->flags & XEN_DOMCTL_CDF_hvm_guest) && + if ( !(config->flags & XEN_DOMCTL_CDF_hvm) && (config->flags & XEN_DOMCTL_CDF_hap) ) { dprintk(XENLOG_INFO, "HAP requested for non-HVM guest\n"); diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h index 72d5133cba..ff9265f765 100644 --- a/xen/include/public/domctl.h +++ b/xen/include/public/domctl.h @@ -50,8 +50,8 @@ struct xen_domctl_createdomain { uint32_t ssidref; xen_domain_handle_t handle; /* Is this an HVM guest (as opposed to a PV guest)? */ -#define _XEN_DOMCTL_CDF_hvm_guest 0 -#define XEN_DOMCTL_CDF_hvm_guest (1U<<_XEN_DOMCTL_CDF_hvm_guest) +#define _XEN_DOMCTL_CDF_hvm 0 +#define XEN_DOMCTL_CDF_hvm (1U<<_XEN_DOMCTL_CDF_hvm) /* Use hardware-assisted paging if available? */ #define _XEN_DOMCTL_CDF_hap 1 #define XEN_DOMCTL_CDF_hap (1U<<_XEN_DOMCTL_CDF_hap) diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index d2bbe03bd9..e3601c1935 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -912,7 +912,7 @@ void watchdog_domain_destroy(struct domain *d); static inline bool is_pv_domain(const struct domain *d) { return IS_ENABLED(CONFIG_PV) && - evaluate_nospec(!(d->options & XEN_DOMCTL_CDF_hvm_guest)); + evaluate_nospec(!(d->options & XEN_DOMCTL_CDF_hvm)); } =20 static inline bool is_pv_vcpu(const struct vcpu *v) @@ -944,7 +944,7 @@ static inline bool is_pv_64bit_vcpu(const struct vcpu *= v) static inline bool is_hvm_domain(const struct domain *d) { return IS_ENABLED(CONFIG_HVM) && - evaluate_nospec(d->options & XEN_DOMCTL_CDF_hvm_guest); + evaluate_nospec(d->options & XEN_DOMCTL_CDF_hvm); } =20 static inline bool is_hvm_vcpu(const struct vcpu *v) --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Fri Apr 19 09:33:04 2024 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=1568117136; cv=none; d=zoho.com; s=zohoarc; b=UdQ5opKed1nVMnX+0qcX7qyx55cC0a4pUfuFGxQdJyZhfh5ind3pWGoLLqZ/0weGfXYSih6y+RKESkKKDyYIvCdk8TNbW58HAuOGaEhe1Gl9tPsv14m0iAUgm3umQXmSY4TLj/OIkqrnpP3MD0JawgEZxE34am/SUuVbOSMWZ9w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568117136; 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=WQZTQofDsAw3+MVC7Uc6dJx8bPm8MoLViciFxsuEyEM=; b=IktBM4Y80CHCCNYIYcZHYrtj0r6LCVu6tmJtpiauNs8BIa8OOGBjQYoYjHxOvov2ONGUQP44DyRN9Y322lML3vcn4lEaigbJBnPAobGS11ruVYm3HAw3tDJHcBcYNPNe8Q12HZrZs2dAMJ9/cY3PKTGp+bcgx8nwcqAEu9gYFls= 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 1568117136852503.2998845634488; Tue, 10 Sep 2019 05:05:36 -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 1i7esT-0007Su-Tr; Tue, 10 Sep 2019 12:04:09 +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 1i7esS-0007Sb-QG for xen-devel@lists.xenproject.org; Tue, 10 Sep 2019 12:04:08 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 16aa7b6f-d3c3-11e9-ac1c-12813bfff9fa; Tue, 10 Sep 2019 12:04:07 +0000 (UTC) X-Inumbo-ID: 16aa7b6f-d3c3-11e9-ac1c-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1568117047; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=bSRcze2/xAPYtafYw9UG0/rO0XL6ABwnUfMOl7e3MGA=; b=biNK/QN7FurJLx/6n7ESy7EVtuLxzu6LCEdMqlnGWVOstqQiVCGlXNIh pEGizsH9Wu3H91a+pUWyDY+MW5PoMvDlp0LUX1ZAiGgktHo4DkMV7RuB6 leoWfwfRBfNn2I5N2DkgCTaKHLmUb1QGS1FSsGRnFjzJc2xqGKr14qXpk s=; Authentication-Results: esa3.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 (esa3.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=esa3.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="ian.jackson@eu.citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa3.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=esa3.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 (esa3.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=esa3.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: 9iPnHVN4wMgqeXdmmPCzRbQ154ssZF+Uvni1AUAWa6/03qOKUXGDzgxFQG9lv2aP2t8Z88TkQ5 IB9qu1so2t6y4JhZvpgnBIWFBFRdID/ajiUDrQAktuvxm8t0Z9iXy0M0b07CaFkAjfwpJXiIOy R997DiwmN97qK4gJXQr1BblWYqupzbc54p5PP1CTWnncboTMGnPodscE9reJVMtHMWL8AICD1M 5aVA1It2cb+8ZnSodzpVeUI/ec+W5/Keu30q9ZBVUWRIKYIo9dmiknCHYehxqCGbk3OzvVxOMY 3ow= X-SBRS: 2.7 X-MesageID: 5370543 X-Ironport-Server: esa3.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="5370543" From: Ian Jackson To: Date: Tue, 10 Sep 2019 13:02:00 +0100 Message-ID: <20190910120207.10358-6-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 05/12] tools/ocaml: abi-check: Add comments 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: Andrew Cooper , Ian Jackson , Christian Lindig , Wei Liu , 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) Provide interface documentation for this script. Explain why we check .ml not .mli. Signed-off-by: Andrew Cooper Signed-off-by: Ian Jackson Acked-by: Christian Lindig --- tools/ocaml/libs/xc/abi-check | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tools/ocaml/libs/xc/abi-check b/tools/ocaml/libs/xc/abi-check index c987cd8454..ccc35e79e9 100755 --- a/tools/ocaml/libs/xc/abi-check +++ b/tools/ocaml/libs/xc/abi-check @@ -5,6 +5,13 @@ use Data::Dumper; =20 our %enums; =20 +# Usage: abi-check C-file Ocaml-file +# Writes out a BUILD_BUG_ON() list to be included back into C. +# +# Ocaml-file should be the .ml file. The ocaml compiler will check +# that any declarations in a .mli correspond. We check the .ml +# rather than the .mli in case there are private types in future. + @ARGV =3D=3D 2 or die; our ($c, $o) =3D @ARGV; =20 @@ -13,6 +20,14 @@ open STDIN, "<", $c or die $!; our $cline =3D -1; our $ei; =20 +# Parse the C file looking for calls to: +# c_bitmap_to_ocaml_list() +# +# followed by anotations of the following form: +# /* ! OType OPrefix Mangle */ +# /* ! CPrefix CFinal CFinalHow */ +# +# The function definitions use /* ! */ which simply skips that instance. while (<>) { if ($cline =3D=3D -1) { if (m/c_bitmap_to_ocaml_list/) { --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Fri Apr 19 09:33:04 2024 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=1568117150; cv=none; d=zoho.com; s=zohoarc; b=RkfibGltHVcOtaksHK/n6Mlw57YM+DlBZHXIPXE/xWxe9bAuoXSddCW8U2yymJqwZU/t1Q1/gSutDTo7nfmAaKN3VEsxGxszBUnKa28UkYLtHv7HupcpYD+FlMZD5RQk+YJ+oM2ZIQonxW5naC6py6ta3/qgnUsW3hwG6XSa3tc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568117150; 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=b8LCC3f8g5WAgubfYLms0A8dj9JDmgFsJQxb8cSyIbw=; b=lpI9Jdt7v4ZBKkjY9znx6S21C9IytYT+2kCTc45u1q9CLP5ynVBClupj8ZwtoTw8ulxVyJzzQ0KH+OaCAQgakRP01NSQ1IE1ksPSqjzOl3Z3eFDIE9rpXPOItApZrPIyQ62J0POzjLLXj2r7cw73UZCUhdJjvcxtZ3oT7bWVfxo= 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 1568117150848915.2523875974082; Tue, 10 Sep 2019 05:05:50 -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 1i7esi-0007WZ-7l; Tue, 10 Sep 2019 12:04:24 +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 1i7esh-0007WA-62 for xen-devel@lists.xenproject.org; Tue, 10 Sep 2019 12:04:23 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 1fb6163d-d3c3-11e9-ac1c-12813bfff9fa; Tue, 10 Sep 2019 12:04:22 +0000 (UTC) X-Inumbo-ID: 1fb6163d-d3c3-11e9-ac1c-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1568117062; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=dcgFpQQZzlVp1i9Js2oXBFHAKxoLk1E6Q+Rz+K4CjKs=; b=Wqv93lzam67MWRh/c58xKEqITcvhKo3mSWeA4rkNpM7AWhcTHEvnwpTj F9RNHm4WPQ2oO7kLAe4nWd0tQbZSy57SB2KD7H6OO4adFxDr4tjBmCDq2 F+LuV51PiqU5zPQmEkIcLlJuTxsDAsF140eY4v7MzvtP3Bdvg4RzTrAdJ Q=; Authentication-Results: esa5.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 (esa5.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=esa5.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="ian.jackson@eu.citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa5.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=esa5.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 (esa5.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=esa5.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: gAyK/eVkDz7CMQK97CdQlC0vs25oYMMAXK9ST9aDVXBBMwAOafyYPSHhke6cTrKF3dbxcLS+Yp d8WwhMSybOtbfB/UWOJGuRygN9q5k3MtEKRB5moJuDehxGC/U/KdiSdWcjwu8pS9CzqvhEqzZM dYDSnexpy7JSg3hpVDT5e7C9jQVZZ1O+ZUMVQreGjEa7ovntNI94uKiOhCTQl6Fm11Sw2N3J/O YIOjaoVXKp1kHikammvPtIVsgXDAWqz4ANiyEJQtYJFaZbKDzslkua8tWJ9V6zcJHqqOu9WF/z r54= X-SBRS: 2.7 X-MesageID: 5555931 X-Ironport-Server: esa5.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="5555931" From: Ian Jackson To: Date: Tue, 10 Sep 2019 13:02:01 +0100 Message-ID: <20190910120207.10358-7-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 06/12] tools/ocaml: abi handling: Provide ocaml->C conversion/check 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: Andrew Cooper , Ian Jackson , Christian Lindig , Wei Liu , 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 No users of this yet so no overall change. Signed-off-by: Andrew Cooper Signed-off-by: Ian Jackson Acked-by: Christian Lindig --- tools/ocaml/libs/xc/abi-check | 3 ++- tools/ocaml/libs/xc/xenctrl_stubs.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/tools/ocaml/libs/xc/abi-check b/tools/ocaml/libs/xc/abi-check index ccc35e79e9..a470c05e0b 100755 --- a/tools/ocaml/libs/xc/abi-check +++ b/tools/ocaml/libs/xc/abi-check @@ -22,6 +22,7 @@ our $ei; =20 # Parse the C file looking for calls to: # c_bitmap_to_ocaml_list() +# ocaml_list_to_c_bitmap() # # followed by anotations of the following form: # /* ! OType OPrefix Mangle */ @@ -30,7 +31,7 @@ our $ei; # The function definitions use /* ! */ which simply skips that instance. while (<>) { if ($cline =3D=3D -1) { - if (m/c_bitmap_to_ocaml_list/) { + if (m/c_bitmap_to_ocaml_list|ocaml_list_to_c_bitmap/) { $cline =3D 0; $ei =3D { }; } diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc/xenc= trl_stubs.c index 352a6bd2d6..c74c2b43a0 100644 --- a/tools/ocaml/libs/xc/xenctrl_stubs.c +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c @@ -153,6 +153,21 @@ static value c_bitmap_to_ocaml_list CAMLreturn(list); } =20 +static unsigned int ocaml_list_to_c_bitmap(value l) + /* ! */ + /* + * All calls to this function must be in a form suitable + * for xenctrl_abi_check. The parsing there is ad-hoc. + */ +{ + unsigned int val; + + for ( ; l !=3D Val_none; l =3D Field(l, 1) ) + val |=3D 1u << Int_val(Field(l, 0)); + + return val; +} + CAMLprim value stub_xc_domain_create(value xch, value config) { CAMLparam2(xch, config); --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Fri Apr 19 09:33:04 2024 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=1568117179; cv=none; d=zoho.com; s=zohoarc; b=LBnWvlcwdKedAAyw89zt6P524SfwB7dj8z42Vwjk8BJJoNc1SMbbWmNi/NlC0QIJyc4QXkXx+hvk6Z6jIJFTHCxQZ4hu65NY0zmKWKOU94yAz4TFgzkAdsDAaG9M+KpmA+JnnVCI10fAHAjZoDrKPPAM2NS+Sa+eTCQ2VWA6L3A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568117179; 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=4Svjf6L6GUDZqS4kDoCUEO9QQskzhpSAhMkD7NTWx4E=; b=cdr+u0qSWQ2p68Im1zEm7dOpVRshD/n4r1Gq0zKpajYZs2cUax1Qy5uDSrWYX5i7RqsNEB2YLo2DuGuWwfybV2FH1KCVZunRRVx8+KTqUBQNZ5hv6BN8pGy+NKO1Q90E8BJ9j5O5zQIWu9lww+HPpw56Em+qBxEMzjz85eAtkmA= 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 1568117179983242.35511943574272; Tue, 10 Sep 2019 05:06:19 -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 1i7etB-0007fo-JL; Tue, 10 Sep 2019 12:04:53 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i7etA-0007fJ-3i for xen-devel@lists.xenproject.org; Tue, 10 Sep 2019 12:04:52 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 30ca2f80-d3c3-11e9-b76c-bc764e2007e4; Tue, 10 Sep 2019 12:04:50 +0000 (UTC) X-Inumbo-ID: 30ca2f80-d3c3-11e9-b76c-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1568117091; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=99TEzrvLZ+qtL7w7qzh8IxlvbVuaRJGhpkqcHUP0HD4=; b=UjCM3LoROgsAxKPOsUZ6xwZCpgci9/eWrChsmtXw8Ykd7FBWJtAOpWj3 0rYtRt/CnIYvoRPONm4pMF+i8YltfPJuLi8Den0+fvOoQNMqnCQj9yDa+ 8HkOm3dUwo7ohqLynlaMZV8y0hmONzQDTlbljzrB6hjhaMHyRtv7Wyz6T c=; Authentication-Results: esa3.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 (esa3.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=esa3.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="ian.jackson@eu.citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa3.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=esa3.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 (esa3.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=esa3.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: YIzsCNqF5oNg0qLavnYTYeHFSIYa+gqknBtIIG4cT8S7DZpN9D3GfUXwRoEHXbaOf0mNqYeUDd pKFwXc5WFg7oCAPRcrxzWZLGR1OvtuAMJYEFkF9BcgbLUu9rnDuRW9i/FjfLaI2wgHw15LFSgh IkCLnU15yKJZKk3CIXG63cIc5KiYNpV7M5Gscni3U6Pwx1sp2hdcue4mlBbWc81uhSOA0miuIp pvcrQtljRm9r3HcD8zFQkpy2RfiaDNi+AqBvlllYnt5XahMYLzEhcGJtP14226hMyxj2Rt6v/I Qmc= X-SBRS: 2.7 X-MesageID: 5370573 X-Ironport-Server: esa3.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="5370573" From: Ian Jackson To: Date: Tue, 10 Sep 2019 13:02:02 +0100 Message-ID: <20190910120207.10358-8-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 07/12] tools/ocaml: abi-check: Improve output and error messages 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: Andrew Cooper , Ian Jackson , Christian Lindig , Wei Liu , 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) In the generated C, add some comments saying where we found the ocaml type. This helps with debugging. (I considered emitting #line directives but decided this would be more confusing than helpful.) Improve two dies. Use better-named filehandles (perl prints thier names when it dies). Signed-off-by: Ian Jackson Acked-by: Christian Lindig --- tools/ocaml/libs/xc/abi-check | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/ocaml/libs/xc/abi-check b/tools/ocaml/libs/xc/abi-check index a470c05e0b..9450676429 100755 --- a/tools/ocaml/libs/xc/abi-check +++ b/tools/ocaml/libs/xc/abi-check @@ -15,7 +15,7 @@ our %enums; @ARGV =3D=3D 2 or die; our ($c, $o) =3D @ARGV; =20 -open STDIN, "<", $c or die $!; +open C_FILE, "<", $c or die $!; =20 our $cline =3D -1; our $ei; @@ -29,7 +29,7 @@ our $ei; # /* ! CPrefix CFinal CFinalHow */ # # The function definitions use /* ! */ which simply skips that instance. -while (<>) { +while () { if ($cline =3D=3D -1) { if (m/c_bitmap_to_ocaml_list|ocaml_list_to_c_bitmap/) { $cline =3D 0; @@ -37,7 +37,8 @@ while (<>) { } } else { $cline++; - m{^\s+/\* \s+ ! \s+ (.*?) \s* \*/\s*$}x or die "$cline $_ ?"; + m{^\s+/\* \s+ ! \s+ (.*?) \s* \*/\s*$}x or + die "at line $cline of annotation, did not expect $_ ?"; my @vals =3D split /\s+/, $1; if ($cline =3D=3D 1 && !@vals) { $cline =3D -1; @@ -45,7 +46,7 @@ while (<>) { $ei->{$_} =3D shift @vals foreach qw(OType OPrefix Mangle); } elsif ($cline =3D=3D 2 && @vals =3D=3D 3) { $ei->{$_} =3D shift @vals foreach qw(CPrefix CFinal CFinalHow); - die if $enums{ $ei->{OType} }; + die "redefining OType $ei->{OType}" if $enums{ $ei->{OType} }; $enums{ $ei->{OType} } =3D $ei; $cline =3D -1; } else { @@ -58,13 +59,14 @@ sub expect ($$) { printf "BUILD_BUG_ON( %-30s !=3D %-10s );\n", @_ or die $!; } =20 -open STDIN, "<", $o or die $!; +open OCAML_FILE, "<", $o or die $!; my $cval; $ei =3D undef; my $bitnum =3D 0; -while (<>) { +while () { if (!$ei) { if (m{^type \s+ (\w+) \s* \=3D \s* $/}x && $enums{$1}) { + print "// found ocaml type $1 at $o:$.\n" or die $!; $ei =3D $enums{$1}; $cval =3D ''; $bitnum =3D 0; --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Fri Apr 19 09:33:04 2024 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=1568117181; cv=none; d=zoho.com; s=zohoarc; b=bpC6fXNxojEgYHtGgYsf8dkAXj8b3TB+QSvF/FavGCUn6fBKEl5mffZQzWS8tYLEbiKyAYiKcxLkYdhrLKSVuqAQj4V8807QTTnhjYRre1NdKUSwrKHomWxiIxUE2zu1VN7aNgoymDiynjUe0PPsQT0fuWsqHpnMiaTVwuvTmlM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568117181; 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=IcqByV3LMCuwfCal7eI0YNlSYo3p7CrIo/y8jrluPRU=; b=Ast14/Fa/MOrzCWS7bwaVSGn+X018El9rSUvCKusUySrkkYVutLK/oXKXNXkJXxnWgTxSpME7G6u9GuEqM8Fc2UR88PLpjxuBEL8oj9JEna4oa7r7SJEGSCru9DPU4NlQPxfUlNVKrV6sAkHynNzk1/w/vEIkdEFuUEJ6nmMbQ8= 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 1568117181850343.77000281950643; Tue, 10 Sep 2019 05:06:21 -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 1i7etC-0007ga-VS; Tue, 10 Sep 2019 12:04:54 +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 1i7etB-0007fm-G4 for xen-devel@lists.xenproject.org; Tue, 10 Sep 2019 12:04:53 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 31652ca8-d3c3-11e9-ac1c-12813bfff9fa; Tue, 10 Sep 2019 12:04:52 +0000 (UTC) X-Inumbo-ID: 31652ca8-d3c3-11e9-ac1c-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1568117092; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=h/fM562KSuL0JIc6nYTX1M5txhX97wvqWpsaR1Idrg0=; b=gP+xzRSHAfMhl94LvD2l0H6tWMVPdgYfQ1odhFsd5nE1xFiK6RTsqrJe mm6qhjZwNmt8MxZz4WIOCVhZv1Cwpvr+ZA0pg1kX54I2cBys8xFLWHA2p f7KLlTQH+DWaK3kOTj5ZwivQlCyUgq7JlySLyeudA8Q+qGhSYy5B6Zc/k 0=; Authentication-Results: esa6.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 (esa6.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=esa6.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="ian.jackson@eu.citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa6.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=esa6.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 (esa6.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=esa6.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: zPN9RxdZYH9A8036UAd1ZldJJXJjq9gMiXm12pO1lYzBKMVTOaT1VXwL+Q35QLy0D0vw9UVJLe ZlzGiWSyvFzZEpSMrf14kQcTN3uhWtIgINUZxjlv6xGvdbUiurtBB2fLyKwC0GILYrbfLCvs6m x2UQ/oNAb9uiZGALvNdIVQlt5XEuJW7HpVLAUFg1Rsf/7GwqQOGW8e0h79vfbOzggvAiXt+27Z 12KBBxIJVM2W+Y2NwCq1ODXGFkAQXnCvDiz2CKQUfqZGEb1XG6g3I7uqgwuJM+1H9q3EC7WU+g 2Yk= X-SBRS: 2.7 X-MesageID: 5603664 X-Ironport-Server: esa6.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="5603664" From: Ian Jackson To: Date: Tue, 10 Sep 2019 13:02:03 +0100 Message-ID: <20190910120207.10358-9-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 08/12] tools/ocaml: abi-check: Cope with multiple conversions of same type 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: Andrew Cooper , Ian Jackson , Christian Lindig , Wei Liu , 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) Signed-off-by: Ian Jackson Acked-by: Christian Lindig --- tools/ocaml/libs/xc/abi-check | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/ocaml/libs/xc/abi-check b/tools/ocaml/libs/xc/abi-check index 9450676429..abcd6ce6f1 100755 --- a/tools/ocaml/libs/xc/abi-check +++ b/tools/ocaml/libs/xc/abi-check @@ -27,6 +27,8 @@ our $ei; # followed by anotations of the following form: # /* ! OType OPrefix Mangle */ # /* ! CPrefix CFinal CFinalHow */ +# or, for subsequent invocations for the same OType, just +# /* ! OType */ # # The function definitions use /* ! */ which simply skips that instance. while () { @@ -42,6 +44,9 @@ while () { my @vals =3D split /\s+/, $1; if ($cline =3D=3D 1 && !@vals) { $cline =3D -1; + } elsif ($cline =3D=3D 1 && @vals =3D=3D 1) { + my ($otype) =3D @vals; + die "reference to undefined OType $otype" unless $enums{$otype= }; } elsif ($cline =3D=3D 1 && @vals =3D=3D 3) { $ei->{$_} =3D shift @vals foreach qw(OType OPrefix Mangle); } elsif ($cline =3D=3D 2 && @vals =3D=3D 3) { --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Fri Apr 19 09:33:04 2024 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=1568117192; cv=none; d=zoho.com; s=zohoarc; b=T/sRxuEc5iw/v1qFoOcMXjHgorTLHY5ivaa9GsA7uUsbVSQK4n96tW7m9JQ7SdDQ7LZIFGHwbTL2ZyrH/hjt6udCmuWFHQc3nZDy+SrhNB/zu+2ZHPmFb0s30dpsHR5BJxBF3pNwqQ3btkF8bDZHP2hX74jZ9CVPTKQh8u/YIds= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568117192; 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=RF1CYvaiHL0ZsFcDWJa60aUMeLGCjLGsbXszfmiG6xo=; b=D0074gficL7wzDknR+4pUO0p6DJTONVfcoXAhWb8RUn1yIFMYhSx3qsoehb4cmfIEKnHWXfnVXOfVsx4aGvMn93doZnR+aW7Hw8p7s9fxjkx3WzXpHZrz2kxfPF+J0y1bUbAw2zpsEx/aseMuF4VbNVjHRHsiD8D+nljjsNTkFo= 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 1568117192888419.6017052345501; Tue, 10 Sep 2019 05:06:32 -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 1i7etN-0007lK-CR; Tue, 10 Sep 2019 12:05:05 +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 1i7etL-0007kg-JK for xen-devel@lists.xenproject.org; Tue, 10 Sep 2019 12:05:03 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 3815b160-d3c3-11e9-ac1c-12813bfff9fa; Tue, 10 Sep 2019 12:05:02 +0000 (UTC) X-Inumbo-ID: 3815b160-d3c3-11e9-ac1c-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1568117102; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=sPtNd27qcB6TMmp6yZqoE+yUHBVkWI0BjraPfYgwm9Y=; b=ewFXQ5BflwpdrWCY2JLkbhvlQF0SVXfmgm4+ySeEmDj0Yi5BOgKRehjB CF0zenie/BKVCrzIcuktUiW52qu5pgmf7u4u6nWghiqynyzCWZUMNHSt8 OkLEKT9y+mH8G1i9OQNVkiJ7xQrZ8AeWLbqwS64RI5wI/Gn5N87aADf60 I=; Authentication-Results: esa4.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 (esa4.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=esa4.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="ian.jackson@eu.citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa4.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=esa4.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 (esa4.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=esa4.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: TyB1f8yPNnwMDyIKpCYljaEKi8JgXtiPDgXCE3gOc/MX8iQte6alCZ0CoyRol+0AMv5eDzynFA OMJOVwKyQauOvjsVa5J56rkdsTUvKtwx9FYrG4QoKOQS6EJi4KoLY3oxkffNJ+MaCCWzLpxS4U qJMox5Sf9nrj2ZUwvzXg9/deFrk3plynDoAVMM3Pe2eZgpy941/J+ygBwJz0l+6eTHOnwdxzzu vsvFGN1iSvHiUWI8C4xUphyy6FxlPyom9JEo7FjgK6iEL9Rut2MbQDEKf5kdL+cbr/jqdH9FRX 6T8= X-SBRS: 2.7 X-MesageID: 5650090 X-Ironport-Server: esa4.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="5650090" From: Ian Jackson To: Date: Tue, 10 Sep 2019 13:02:04 +0100 Message-ID: <20190910120207.10358-10-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 09/12] tools/ocaml: Reformat domain_create_flag 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: Andrew Cooper , Ian Jackson , Christian Lindig , Wei Liu , 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 This will allow us to apply the abi checker soon. No functional change. Signed-off-by: Andrew Cooper Signed-off-by: Ian Jackson Acked-by: Christian Lindig --- tools/ocaml/libs/xc/xenctrl.ml | 4 +++- tools/ocaml/libs/xc/xenctrl.mli | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/ocaml/libs/xc/xenctrl.ml b/tools/ocaml/libs/xc/xenctrl.ml index 097f39d5ce..17174debb8 100644 --- a/tools/ocaml/libs/xc/xenctrl.ml +++ b/tools/ocaml/libs/xc/xenctrl.ml @@ -57,7 +57,9 @@ type arch_domainconfig =3D | ARM of xen_arm_arch_domainconfig | X86 of xen_x86_arch_domainconfig =20 -type domain_create_flag =3D CDF_HVM | CDF_HAP +type domain_create_flag =3D + | CDF_HVM + | CDF_HAP =20 type domctl_create_config =3D { diff --git a/tools/ocaml/libs/xc/xenctrl.mli b/tools/ocaml/libs/xc/xenctrl.= mli index 957c9fdc2e..228bc00a1c 100644 --- a/tools/ocaml/libs/xc/xenctrl.mli +++ b/tools/ocaml/libs/xc/xenctrl.mli @@ -50,7 +50,9 @@ type arch_domainconfig =3D | ARM of xen_arm_arch_domainconfig | X86 of xen_x86_arch_domainconfig =20 -type domain_create_flag =3D CDF_HVM | CDF_HAP +type domain_create_flag =3D + | CDF_HVM + | CDF_HAP =20 type domctl_create_config =3D { ssidref: int32; --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Fri Apr 19 09:33:04 2024 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=1568117211; cv=none; d=zoho.com; s=zohoarc; b=IK6VoFIyNP5Sy4ImEayjq1gJZU4zASxfCYumeuikgcKkcDpKlCMiunkJmtKO8vmhe6THN//tIm5iUCmSncA3QXI3vqN8MbVUlBCfvz440J9OYt5mSfgIgzq9k561CxXae1xmOWMzpKT1T66j1NdehPKGIb0uhWiCA62t5IgDOYg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568117211; 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=BlTUEFWSCvjUSUSv3D6Z56hHdnLqlAs1eMIaIslyuFQ=; b=ZdkvjDeLtrx0W42aPD8ZFwr9hw1GtqsCo0wuskkqvlJJ+o51ui7zJpuvQVmV2n5LzMe6+Y69ibLpeM9j6eekENxLWTOymq6U8c1JChLy9ufAkfXMSLraMHRvvzNsuZP28q6Fzd8XZVUOvcZXd7K8DmGbZ/+fw1m4QrkQ5RzAFrU= 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 1568117211072166.35386763816348; Tue, 10 Sep 2019 05:06:51 -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 1i7etb-0007rZ-NK; Tue, 10 Sep 2019 12:05:19 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i7eta-0007r7-HP for xen-devel@lists.xenproject.org; Tue, 10 Sep 2019 12:05:18 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 40f69a7e-d3c3-11e9-b76c-bc764e2007e4; Tue, 10 Sep 2019 12:05:17 +0000 (UTC) X-Inumbo-ID: 40f69a7e-d3c3-11e9-b76c-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1568117118; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=vkywOB2ALmY05LTCZ9whL88lySWzpu7NrDNLs1ESLMA=; b=Q3Hb/8q/Nus3mq5RYoCsefnuC5zAjJ9k0y6kBuUBmfW2jg7ThqrpuZ8o Hd5DvnsshXlno01r3ZMkoFHZgQoG7SChUWyDx0a0ylQWoU1PaY9UoFkZv WzSass53D9cGpl37sHEWxMGHq3V/ayT9YV+XHQ0ZvjExVEYq5u/a0iE8t Y=; Authentication-Results: esa3.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 (esa3.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=esa3.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="ian.jackson@eu.citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa3.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=esa3.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 (esa3.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=esa3.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: ZmfNl+92b5GJ7EwT0bR0c1qad+Qh6gPgrTQMTVvTMYwOLtk97EsuCIWNG2sxSzG/B/3bQzOGCq GZFkmBga6826CdX1nfljmaGvDb9dnLYZN6oRKQIpMjWSDIKM7KpLF+2p+lZek0iWWK8a8TPQPO 8eU2XRXWPyIziqcsNqfVdEcfowr0qi41sMa3SN4AsnJC8dEKJv8KdeJNTh5BU53pHHQh8eJGnr N36dphuKF9ElIxHMSS9J6begAhNgygYDvn+oooQHwK0zPDj2FuQVtgkZ0I2z3ozgX7s89ruhHO MoA= X-SBRS: 2.7 X-MesageID: 5370634 X-Ironport-Server: esa3.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="5370634" From: Ian Jackson To: Date: Tue, 10 Sep 2019 13:02:05 +0100 Message-ID: <20190910120207.10358-11-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 10/12] tools/ocaml: abi-check: Check properly. 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: Andrew Cooper , Ian Jackson , Christian Lindig , Wei Liu , 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) Fix a broken regexp which would mention `$/' when it ought to have mentioned `$'. The result would be that it would match lines like type some_ocaml_type =3D Thing | Other_Thing but ignore everything but the type name, giving wrong answers. Check that we check mentioned types. Otherwise if we fail to spot some suitable thing in the ocaml, we would just omit checking this type ! Signed-off-by: Ian Jackson Acked-by: Christian Lindig --- tools/ocaml/libs/xc/abi-check | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/ocaml/libs/xc/abi-check b/tools/ocaml/libs/xc/abi-check index abcd6ce6f1..d532f37271 100755 --- a/tools/ocaml/libs/xc/abi-check +++ b/tools/ocaml/libs/xc/abi-check @@ -47,6 +47,7 @@ while () { } elsif ($cline =3D=3D 1 && @vals =3D=3D 1) { my ($otype) =3D @vals; die "reference to undefined OType $otype" unless $enums{$otype= }; + $cline =3D -1; } elsif ($cline =3D=3D 1 && @vals =3D=3D 3) { $ei->{$_} =3D shift @vals foreach qw(OType OPrefix Mangle); } elsif ($cline =3D=3D 2 && @vals =3D=3D 3) { @@ -70,7 +71,7 @@ $ei =3D undef; my $bitnum =3D 0; while () { if (!$ei) { - if (m{^type \s+ (\w+) \s* \=3D \s* $/}x && $enums{$1}) { + if (m{^type \s+ (\w+) \s* \=3D \s* $}x && $enums{$1}) { print "// found ocaml type $1 at $o:$.\n" or die $!; $ei =3D $enums{$1}; $cval =3D ''; @@ -96,6 +97,7 @@ while () { } else { die Dumper($ei)." ?"; } + $ei->{Checked} =3D 1; $ei =3D undef; } elsif (!m{\S}) { } else { @@ -104,4 +106,9 @@ while () { } } =20 +foreach $ei (values %enums) { + next if $ei->{Checked}; + die "did not find ocaml type definition for $ei->{OType} in $o"; +} + close STDOUT or die $!; --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Fri Apr 19 09:33:04 2024 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=1568117225; cv=none; d=zoho.com; s=zohoarc; b=OxwThYFxdO4+GcGcexYoE4H3f6TkJtkRLa2dBmUxFOKWTiaCmTYZjNfGZUaC9tDSZ/RJ7uokXE1HGwMQOjo75QGjGs5gH8UZp7wICZZ7A7I4a12unHqcYj4Lc40ZQt90VZk4GXMpA/qKpsMkySqKl7QF//wMJdwfYrRiDqbcCm0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568117225; 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=cEPQWmWtTrMLu20XVvt1KldU/33UReX9dHHFHSe2PAQ=; b=eNn6DkIT9ehg/8pOle531QPLemhSAz0EeBPjgFujCrComjoIpxLXWDk8ZGSfG/JE17wGPEROu91xc2b+iRT9Vvg7AUdiRMiO2K1fb+j5aGJkte5XGPS+JRqApNYtnVtMzTqAGdgOdMWg+tBWcwh4cigvqRS4vqFYr/GRZ0kMbyU= 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 1568117225198314.53461109158843; Tue, 10 Sep 2019 05:07:05 -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 1i7etr-0007yt-6P; Tue, 10 Sep 2019 12:05:35 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i7etq-0007yI-31 for xen-devel@lists.xenproject.org; Tue, 10 Sep 2019 12:05:34 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 4a3fa81e-d3c3-11e9-978d-bc764e2007e4; Tue, 10 Sep 2019 12:05:33 +0000 (UTC) X-Inumbo-ID: 4a3fa81e-d3c3-11e9-978d-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1568117134; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=JP8zQH/ueueckFwcv4VyM8ankZ08G9Ql82KkHtcPmIY=; b=Ib16Vb24s7lqsWtBckAQoR2d5YNx6wHi5HYMQPCWiONRe3o63T5XPkkz clK20h8cKEc9/KZjoq60VrCYZJNiuqRPy7wdDj9gxBy0sk4vmIzEJIhzY cPfLereX4uG/VBrFeYJbyx0ZFDFd+dD5lm2Jbsm1Rcn6SPsM64vnoB83K o=; 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: SvTqoal1meX0cWQl8Xq4+ob1gESHOxkUvLb3dZHL+f1ycxtuVuiRj4x8SH19IDEvREyJjKadUV B4OqMDyYkBMflbWm9EPH0RKBrf19rlxtt7UKA2nlF2ISvsrT4VOG7c5GUtsEFjnmtFjui87Mvi C/Gj2iA6nIjR7vPG6saXVC1HSmYj9Lbh2FErou8gh2zXDU2iS+Wb8I21lAKnm174VelFzymrOD O5PYdQ5jdwdMJFtdFkLCOwchFM+BD/+WvL2d0xuYrFSCEK7aXUmvARxBKoxtpfIyCpaVbLxvOn 7Q0= X-SBRS: 2.7 X-MesageID: 5416598 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="5416598" From: Ian Jackson To: Date: Tue, 10 Sep 2019 13:02:06 +0100 Message-ID: <20190910120207.10358-12-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 11/12] tools/ocaml: tools/ocaml: Add missing CDF_* values 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: Andrew Cooper , Ian Jackson , Christian Lindig , Wei Liu , 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) Signed-off-by: Ian Jackson Acked-by: Christian Lindig --- tools/ocaml/libs/xc/xenctrl.ml | 3 +++ tools/ocaml/libs/xc/xenctrl.mli | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tools/ocaml/libs/xc/xenctrl.ml b/tools/ocaml/libs/xc/xenctrl.ml index 17174debb8..e544ef84da 100644 --- a/tools/ocaml/libs/xc/xenctrl.ml +++ b/tools/ocaml/libs/xc/xenctrl.ml @@ -60,6 +60,9 @@ type arch_domainconfig =3D type domain_create_flag =3D | CDF_HVM | CDF_HAP + | CDF_S3_INTEGRITY + | CDF_OOS_OFF + | CDF_XS_DOMAIN =20 type domctl_create_config =3D { diff --git a/tools/ocaml/libs/xc/xenctrl.mli b/tools/ocaml/libs/xc/xenctrl.= mli index 228bc00a1c..5a35000761 100644 --- a/tools/ocaml/libs/xc/xenctrl.mli +++ b/tools/ocaml/libs/xc/xenctrl.mli @@ -53,6 +53,9 @@ type arch_domainconfig =3D type domain_create_flag =3D | CDF_HVM | CDF_HAP + | CDF_S3_INTEGRITY + | CDF_OOS_OFF + | CDF_XS_DOMAIN =20 type domctl_create_config =3D { ssidref: int32; --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Fri Apr 19 09:33:04 2024 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: Christian Lindig 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