xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <jbeulich@suse.com>, Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>, WeiLiu <wl@xen.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Tim Deegan <tim@xen.org>, Julien Grall <julien.grall@arm.com>,
	Christian Lindig <christian.lindig@citrix.com>,
	DavidScott <dave@recoil.org>,
	xen-devel@lists.xenproject.org
Subject: Re: [Xen-devel] [PATCH v3 03/12] tools/ocaml: Introduce xenctrl ABI build-time checks
Date: Tue, 10 Sep 2019 13:18:01 +0100	[thread overview]
Message-ID: <58062903-5365-cf8d-90f9-fb33a55dc42f@citrix.com> (raw)
In-Reply-To: <60334e88-15ba-40fc-8199-ebc555a91623@suse.com>

On 10/09/2019 13:17, Jan Beulich wrote:
> On 10.09.2019 14:01, Ian Jackson wrote:
>> 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 <andrew.cooper3@citrix.com>
>> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
>> Acked-by: Christian Lindig <christian.lindig@citrix.com>
> Just in case you want an extra ack for the tiny sysctl.h addition:
> Acked-by: Jan Beulich <jbeulich@suse.com>
>
>> --- 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
> I don't particularly like such "max" values put in (public) headers
> (as they require constant updating), but I can't see a good
> alternative either.

This is the best I could come up with.  At least it is in a
tools-restricted header.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2019-09-10 12:18 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-10 12:01 [Xen-devel] [PATCH v3 00/12] ocaml abi fixes Ian Jackson
2019-09-10 12:01 ` [Xen-devel] [PATCH v3 01/12] tools/ocaml: Add missing X86_EMU_VPCI Ian Jackson
2019-09-10 12:01 ` [Xen-devel] [PATCH v3 02/12] tools/ocaml: Add missing CAP_PV Ian Jackson
2019-09-10 12:01 ` [Xen-devel] [PATCH v3 03/12] tools/ocaml: Introduce xenctrl ABI build-time checks Ian Jackson
2019-09-10 12:17   ` Jan Beulich
2019-09-10 12:18     ` Andrew Cooper [this message]
2019-09-10 12:01 ` [Xen-devel] [PATCH v3 04/12] xen/domctl: Drop guest suffix from XEN_DOMCTL_CDF_hvm Ian Jackson
2019-09-10 12:20   ` Andrew Cooper
2019-09-10 12:41     ` Ian Jackson
2019-09-10 13:44     ` Julien Grall
2019-09-10 13:32   ` Jan Beulich
2019-09-10 12:02 ` [Xen-devel] [PATCH v3 05/12] tools/ocaml: abi-check: Add comments Ian Jackson
2019-09-10 12:02 ` [Xen-devel] [PATCH v3 06/12] tools/ocaml: abi handling: Provide ocaml->C conversion/check Ian Jackson
2019-09-10 12:22   ` Andrew Cooper
2019-09-10 12:50     ` Ian Jackson
2019-09-10 12:02 ` [Xen-devel] [PATCH v3 07/12] tools/ocaml: abi-check: Improve output and error messages Ian Jackson
2019-09-10 12:02 ` [Xen-devel] [PATCH v3 08/12] tools/ocaml: abi-check: Cope with multiple conversions of same type Ian Jackson
2019-09-10 12:02 ` [Xen-devel] [PATCH v3 09/12] tools/ocaml: Reformat domain_create_flag Ian Jackson
2019-09-10 12:02 ` [Xen-devel] [PATCH v3 10/12] tools/ocaml: abi-check: Check properly Ian Jackson
2019-09-10 12:02 ` [Xen-devel] [PATCH v3 11/12] tools/ocaml: tools/ocaml: Add missing CDF_* values Ian Jackson
2019-09-10 12:02 ` [Xen-devel] [PATCH v3 12/12] tools/ocaml: abi: Use formal conversion and check in more places Ian Jackson
2019-09-10 12:18   ` Jan Beulich
2019-09-10 13:24 ` [Xen-devel] [PATCH v3 00/12] ocaml abi fixes Ian Jackson
2019-09-10 13:27   ` Christian Lindig
2019-09-10 13:45   ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=58062903-5365-cf8d-90f9-fb33a55dc42f@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=christian.lindig@citrix.com \
    --cc=dave@recoil.org \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien.grall@arm.com \
    --cc=konrad.wilk@oracle.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).