[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH for-4.15 v2] xen/dmop: Strip __XEN_TOOLS__ header guard from public API


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Thu, 11 Mar 2021 16:18:25 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=x7YUYrmdrRgeguyBY9JGjIqs+8LZL7I2/XLMJjbfXG4=; b=B6eOk5VCy+gxSviRINAC/bOa7lUAAQz7/lLjXCseCitfCEgLlu38NipMqjcK+NI65XbQa5sUKV3LygoWBm/0S54MCFEdbqBIIuKV9ODYkcQXkHX+7NpVmY982ziI6KnrKYnlFJLh0blqtktvblwz7FnOb32g2d9jF35JzH3q931QzmZbe+dzpZGOQaInOcUPELx2PuK6KXmkixdn1ezzcc1XbNrw1EyFOm+jI++1pQGizHLGXj2DQcEvpP9QOMgQIVXX8LLq4ROjy4FlyiDacEEaqDOL7HWNgsX756zddfHzIIM1KE4sK84TGUkpN8We/BxolPjgWfhU4TEmPQjTHw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QIBAlC5AyDUV/soVo9JZCNMft3oj+hrRUMAeaOM5V6vXGGNc2Zg6aENdmzpUcxrOkaEcD3APpWtr4p/oF9kR41FGcN6lJacZ3Tb0JSMLLYmd1fhk1LQFNCjXMVKmyt8bVZ3GAx1mYPimtodEEQIyQ5zqGipkR8gfPHlaLnNUCeT2DdxJeh3owY0rEc8SOeNjRd+yLTO5ySE5gJyMi6AlQlJ7AU9iJA+xnzFfgN8ar8JE1+G/Ta5KEBOPmQwa7l3Ozan2LbA6I0GLFtPcbCF3Qg+qWUoDx6l7kJLTWpH9to2gJ9+kZ2cM91hGrjKuwMV/ELa9nXecSJhLtsaV131qiQ==
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, "Paul Durrant" <paul@xxxxxxx>
  • Delivery-date: Thu, 11 Mar 2021 16:18:59 +0000
  • Ironport-hdrordr: A9a23:mlvOoKCaPoVdmv/lHegDtMeALOonbusQ8zAX/mhLY1h8btGYm8 eynP4SyB/zj3IrVGs9nM2bUZPvfVr1zrQwxYUKJ7+tUE3duGWuJJx/9oeK+VLdMgXE3Kpm2a 9kGpITNPTZEUV6gcHm4AOxDtYnx529/Lq1gPrFpk0McShBQchbnmNEIyycFVB7QxQDIJI/Go aV6MYvnUvfRV08aMOnCn4ZG9XZr9rQm578JTIADRgr6A6B5AnYl4LSOR6ewxsYTndz0a4vmF K17zDRy4eCl7WAyhHa33LO9Jg+orrc4/ZKGcDksLlvFhzCkQCtDb4RPYGqnDdwm+237UZvrd +kmWZcA+1Wy1f8Ol64ugHs3Q6I6kdd11bHxUWDiXXu5ezVLQhKc/Zpvo5SfhvH50dIhrgVu8 gnrgHp1esiMTr6kCvw/NTOXR1x/3DExkYKquIPk2dZFbIXdb45l/1twGpuDJwCECjmgbpXad VGMce03ocyTXqndXzD+kFgzNuwN05DZCuucwwpv8yY1CVuh3Zpz0cU79x3pAZxyLsND7ZD/O jKKaJuifVnSdIXd7t0AKM7TdKwEXGle2ODDEuiZXDcUI0XMXPErJD6pJ0z+eGRYZQNiL8/go 7IXl90vXM7EnieSPGm7dluyFTgUW+9VTPixoV1/J5ioIDxQ7LtLGmqVE0uu9HImYRcP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I6c0jB3NItdicUYkRYpQktpWiQHOnhRfXbTm qbHQisPb32rivUhS/D/wAAHGOL8FgqDSlk2PjFva5P4m99j8SbSCZQVTak41ghsbZKUUPtmety BIJEvXOLguNlIk628j3x5xQ6MXLh3oPM8NegCqdAgOrBj+xTfLYDEwjyBAZdmTPdhvFBKfFrE/ JzkzjOVeKHJ+8qaAs8Bm58f8AaVvdW8TdXFa0LvOep64tkY2s9N4Lcbr9bHV4E7kOMTLWk7puV kUY=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 11/03/2021 14:44, Jan Beulich wrote:
> On 11.03.2021 14:43, Andrew Cooper wrote:
>> On 11/03/2021 13:28, Jan Beulich wrote:
>>> On 11.03.2021 14:00, Andrew Cooper wrote:
>>>> However, having laid things out in this way today, it occurs to me that
>>>> we should consider further cleanup as well.
>>>>
>>>> I do agree that code wanting to use the libxendevicemodel.h API almost
>>>> certainly don't want/need the dmop ABI.  (i.e. an individual consumer
>>>> will want one, or the other, but almost certainly not both together).
>>>>
>>>> Should libxendevicemodel.h really be including dm_op.h?
>>> I was indeed wondering.
>>>
>>>>   AFAICT, it is
>>>> only the ioserverid_t typedef which is API shared between the two
>>>> contexts, and we can trivially typedef that locally.
>>> Hmm, a local typedef isn't nice - there should be one central point.
>>> Granted there's no risk for this to change in anywhere halfway
>>> foreseeable future, but still. Also neither C89 nor C99 allow a
>>> typedef to be repeated - in those versions we'd then rely on an
>>> extension.
>> I wonder if we're depending on that extension elsewhere.  As far as the
>> stable libraries go, we are dependent on a Linux or BSD environment
>> currently.
> Right, but we'd like the headers to be consumable by any environment.
>
>> Alternatively we can drop the typedef and use uint16_t instead without
>> breaking things in practice.  (As long as we make the change in 4.15 and
>> we lose the wiggle room afforded us by the entire interface being behind
>> __XEN_TOOLS__ previously).
>>
>> Thoughts?  I can't think of any ifdefary which would help, and swapping
>> to uint16_t would reduce the use of an improperly namespaced identifier.
> I'm not outright against, but this might inspire people to use
> uint16_t elsewhere too, when they should use the typedef. How
> about a transient #define (suitably commented)?

Having actually experimented, it is more complicated.


/local/xen.git/tools/libs/devicemodel/../../../tools/include/xendevicemodel.h:283:45:
error: array type has incomplete element type ‘struct
xen_dm_op_modified_memory_extent’
     struct xen_dm_op_modified_memory_extent extents[], uint32_t nr);

so the dm_op include is necessary to use the libxendevicemodel API.

Also hvmmem_type_t and evtchn_port_t get used.

~Andrew




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.