[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/5] libxencall: introduce variant of xencall2() returning long
- To: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Fri, 18 Jun 2021 14:46:44 +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=FFP/azzJ8RUG6I3mvukqgsz9SL0FK3W1+CM0M5NPNNs=; b=BNGG0/CN7bSD4G+Lkba6ccjqqBaMGkUUTlgBJp7dOqIFc2sXPxKUAvA+B/KBqDPAlB56R23Mn/G0aaabAYjGfZA3L8kYC97Gd1cOcRUoAufEoyDj6+eVdm3sZhHb6uAKZwDOKLYVkBWT9Ncu1/MYwanctYKYHvqBrloqudQJYsytpJLG8FBrakW2EBj+1l/BjjwYE4v26AkCMqIkr+MzDLbdVgI8LsqapkZcL65CCkIYjDVq/V7y3E/16OSrfuMIEz5/UsmktnTZxG1t7DTnXNPjA81KdVMnxUgiZPJ7z53tzn2VHuCRDaYswMtVW9xK9FdeOSkIAKuXEpMu6V6pGQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cM6NlDQilVAeu/Y/fOO2/dv4mDYq6xbfvCfCeEmqY2oINv0p16tsMxMtRaRCxejuJ+JIMnUx1JRl8QvoCnHfo/LerbOTN69fXcvgQGvkuTrp/+9MThPlXV0Tu3hSmxCcgo2/2+3q8ct6Ig43i8JJfi13hkFj1wv3TkHQb+/zgnTRxs+wgVBSyc0AA+7Ek4w9UHek7nldUrA2IEihUlztSRK++ARTwq8KDmRrsGkbbSdDhLdmsiJkyr4fKSRcLlkM8OtePVV6zVVAjlUa2XmMuwmxySZnkmLmcKaz3bhQ32A2cG/docfgrJKhY6sWTuMuCpSFrN9BOSx+PeMVgCyw/w==
- Authentication-results: esa2.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
- Delivery-date: Fri, 18 Jun 2021 13:46:58 +0000
- Ironport-hdrordr: A9a23:5KRhuazuORAjE/U5UkRkKrPxGOskLtp133Aq2lEZdPWaSL37qy nIpoVT6faUskdmZJhEo7q90ca7MBbhHPJOgbX5HI3SOjUO/VHIEGgA1/qH/9SfIVyKygc178 4JGMUTZ7PN5BpB/L7HCMzSKadG/DDtytHhuQ6x9QYPcShaL4xh9Q19AgaeHkAefng6ObMJUL q2wo5umH6MVUk6RPmaIF5tZZmym/T70LLMRVovOFoZxDK1rRWOgYSKYCSw71M/eBcK+64r9U zCnhD96r/mifu80RPHvlWjkah+qZ/A4f8GPtWFjuwSJynohhztW4h7Qb2FuypdmpDf1H8a1P zohDE9Is9093TdF1vF2ycFozOQqwrGkEWSsGOwsD/busr+Sys9C81dwaxkUjax0TtWgPhMlJ tR2WSXrpxWCg6Fuh/cyZznazFG/3DE1UbLq4Qo/jZiuE8lGfRsRdp1xjIoLL4QWCjw6I1PKp gQMOjMoPxcaFuAY3fFvmQH+q3fYkgO
- Ironport-sdr: zjYhc3/OKy9xSIK8rYMZ5Ce4pdO58Bf0e+6YDECEImotp/fEDQPvfxbKzYX8u/gWl1AYv74Hnc NgSQvblth5dVg1bknacRvmkCCZHhl/1GoR26dqiU3CSMU5bzq3VDRr9FaAvYlfJ7Veh4T/wqRt T46qQ1WOBcfIFYFXnFvEEqYznk2SRvxPFlIEMa1+iPxNRQtgxL4YRSE3+8Yukpn+SEO0WCk6eJ 6l9ax85g6RCelxRv/fQBdD9dDzZ2dn/cFCaQadtREfxpM7fcK3T+QEQTWfkqyqJmXJgxsGXJoZ jNg=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 18/06/2021 11:24, Jan Beulich wrote:
> Some hypercalls, memory-op in particular, can return values requiring
> more than 31 bits to represent. Hence the underlying layers need to make
> sure they won't truncate such values.
>
> While adding the new function to the map file, I noticed the stray
> xencall6 there. I'm taking the liberty to remove it at this occasion. If
> such a function would ever appear, it shouldn't lane in version 1.0.
s/lane/land/ ?
I'm tempted to suggest spitting this out into a separate change anyway.
I'm not sure of the implications on the ABI.
ABI-dumper appears not to have picked anything up, nor has readelf on
the object itself, so we're probably ok ABI wise.
That said, I would really have expected a compile/link error for a bad
symbol in a map file.
>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> ---
> I wasn't sure whether euqivalents for the other xencall<N>() should also
> be introduced, and hence went for the minimal solution first. Otoh there
> is also xencall0() which has no users ...
>
> --- a/tools/include/xencall.h
> +++ b/tools/include/xencall.h
> @@ -113,6 +113,10 @@ int xencall5(xencall_handle *xcall, unsi
> uint64_t arg1, uint64_t arg2, uint64_t arg3,
> uint64_t arg4, uint64_t arg5);
>
> +/* Variant(s) of the above, as needed, returning "long" instead of "int". */
> +long xencall2L(xencall_handle *xcall, unsigned int op,
If we're fixing ABIs, can we see about not truncate op on the way up?
> + uint64_t arg1, uint64_t arg2);
> +
> /*
> * Allocate and free memory which is suitable for use as a pointer
> * argument to a hypercall.
> --- a/tools/libs/call/core.c
> +++ b/tools/libs/call/core.c
> @@ -127,6 +127,17 @@ int xencall2(xencall_handle *xcall, unsi
> return osdep_hypercall(xcall, &call);
> }
>
> +long xencall2L(xencall_handle *xcall, unsigned int op,
> + uint64_t arg1, uint64_t arg2)
> +{
> + privcmd_hypercall_t call = {
> + .op = op,
> + .arg = { arg1, arg2 },
> + };
> +
> + return osdep_hypercall(xcall, &call);
(If we're not changing op), I take it there are no alias tricks we can
play to reuse the same implementation?
~Andrew
|