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

Re: [PATCH v2 6/6] libxc: make xc_domain_maximum_gpfn() endianness-agnostic


  • To: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Tue, 22 Jun 2021 19:33:50 +0100
  • 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=ByaQcM/oTyhAHtsKoD/+5z7Z8WiwSvG41oOTw0CkyDY=; b=bxfE9EoRxEoe6lIp5QlNWiDLLFXVGYWRbPlDRxF2IJFrED/xAdqku6NJqIMqdVEsTC0wJzmLSXZFGOtjGtAn3r4PTISzGJF6TMogRjB5SYAi97RSldbmTzxynv6xFJiXjjLLCyJ6xkNTK2cc4sba+vqe84730DMtiEYpFjX4yOKxjNRQMrr5ml2Dl0YEL1v4UoPAx2SxK5kgCTMqq0PiZo/3JChcBkMyoqVH5xQclUckmo8nG6GqqeKzOJA2ijNqTPB2DZ6uPbCXY3jygpsHBZAUHD2Nqco6CRXbunDJsPE/ed/w405sVZfRLXzDVBjszXflVwXu5MD3RIqVb6uSWg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Jn9dmYYkO7jARu+a4Rq6V7903IH7FhXivDuHk8p1vbK4PRLhFmvDeHHKRD7kf87R7lb+HC7cFTKR56qAz/BiEFfrX+cLhpSKE4K5vLoCBNY6mEGm9/YwUQzbXhKk9niBaiSN8Lyyns2yjyhX+bMqaGw4BmejiJJuy6o39F10oTaZ7Yj2xi2iAdpMcHf3SlA5ANP+FnGWcBGcWC5X2dO8qiwpUZJf9h8W7yEH4yR507m8gnSgBuwlF/tBOLROIiL5TnW5MZoD8nVHo6V1otA/6RGuhF4+3BR3BsZFLEmDF+poAqEgDaj91RnKxq9XQMA75d+SXpbBe5KTvweCK5dVQg==
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Tue, 22 Jun 2021 18:34:29 +0000
  • Ironport-hdrordr: A9a23:JLQyKqxeiw8YKKbl75oKKrPwSb1zdoMgy1knxilNoH1uA6+lfq +V9sjzuSWYtN9zYhEdcLK7VpVoKEm0nfVICO8qUYtKNzOGhILHFu5f0bc=
  • Ironport-sdr: j5SJrXeJznnNPYhhwAlkUtgo5J+WR4WqqhCNqJtnckj/eLUV+8SXFF+Z46o0OuqQkBdXdyeSK7 9AO5fqN1sDyg9JJcaaR3nuWBZCksGxT8CKPwlD0M/yKsrURP8a3V4rwOAdtLuzk8ZHKqPBOagZ swmluLvf0qrOpxzWvmnKZ2WQ1TZlmWl2HLjyWnsTTLwHpvDyFLuAAJLveeVbFBKhTz+Obi9Nm9 GQOAa2oyFZjrvwkApt+auXeZCpgK4sm6EU0wcCroxW9lg9y966GeBaJheRQn9GnnaYZ6t5oAOd G3s=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 22/06/2021 16:20, Jan Beulich wrote:
> libxc generally uses uint32_t to represent domain IDs. This is fine as
> long as addresses of such variables aren't taken, to then pass into
> hypercalls: To the hypervisor, a domain ID is a 16-bit value. Introduce
> a wrapper struct to deal with the issue. (On architectures with
> arguments passed in registers, an intermediate variable would have been
> created by the compiler already anyway, just one of the wrong type.)
>
> The public interface change is both source and binary compatible for
> the architectures we currently support.
>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> Acked-by: Ian Jackson <iwj@xxxxxxxxxxxxxx>

Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

> ---
> v2: Introduce wrapper struct in public interface.
> ---
> Together with the comment change I was half tempted to also rename the
> sub-function identifier to XENMEM_maximum_gfn. But I then decided this
> would go too far here.

We ought to fix it, but that could be a followup, or could be when this
interface disappears in ABIv2.

~Andrew




 


Rackspace

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