From nobody Sat May 18 05:34:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1696618493; cv=none; d=zohomail.com; s=zohoarc; b=NffkDiLJhMlSn5AKjuCIsu7RTg15bbuOKr6R+E9WvzF6ktXtuuUl1KCkVLZFXAAueIxFf6drZsUWsa1F48F2ZTAksr3nXGDJNEpmPrs6YYDJ7P+qGwCfVbeiFKRy1opJNEYmotCxMETLkz9Yyd/d+XM1N6L/yhfkC3BkvL8preY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696618493; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=qrjZJ0AB7UfWe6qqM2sFl8a6ppqXTk0tXRccCOJFDOc=; b=kAO4GIE/qplO0td+U7MwUXMbov1sZybJi0xUFqo4mYx5DTqxtl/rvVAcMPZTAATcrORHH1Nn+gFHtBPEFKNUnW46ZVPzmim4cZOJ0HOMkCAuX9EkTTXgb/8xnGVvLDSMxGCqY4LlLneIdAGCyeKPnBC2UnyEr8IgcqvhQdPC0XY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1696618493855141.53777729644435; Fri, 6 Oct 2023 11:54:53 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.613803.954576 (Exim 4.92) (envelope-from ) id 1qopxt-0000am-RE; Fri, 06 Oct 2023 18:54:21 +0000 Received: by outflank-mailman (output) from mailman id 613803.954576; Fri, 06 Oct 2023 18:54:21 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qopxt-0000Zs-Lx; Fri, 06 Oct 2023 18:54:21 +0000 Received: by outflank-mailman (input) for mailman id 613803; Fri, 06 Oct 2023 18:54:20 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qopxs-0000VZ-Mk for xen-devel@lists.xenproject.org; Fri, 06 Oct 2023 18:54:20 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id c0d2ed51-6479-11ee-9b0d-b553b5be7939; Fri, 06 Oct 2023 20:54:18 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c0d2ed51-6479-11ee-9b0d-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1696618458; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2uX+SHBDUuq7urjzE6lLyQyHdoxcJfW0g6f2j1ELSfY=; b=Ari9gFR8upEq6vbnQ/O73bvai/CDX0qdF4odcCb9clakxuLwCRS6M8wA Co+4P9ag6bjilsZW+9nnQBci1FGONA0JCzgvJTttRwFpb2p1X5RUpOjhI BDxdStDmdbuLCJaBLiwS0XAEUZvle682iLqvz0MQay6a/MuFkcGUVh0Cx M=; X-CSE-ConnectionGUID: FvEREW8TSwKmhlQAgEn1mw== X-CSE-MsgGUID: U5FcZ4ZQTzquIYfDl+/Q/A== Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 125288252 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.159.70 X-Policy: $RELAYED X-ThreatScanner-Verdict: Negative IronPort-Data: A9a23:t0Lb0qk0J3uwuUk/Er/l0gPo5gxWJkRdPkR7XQ2eYbSJt1+Wr1Gzt xJLUG/Ua/eJZzShcth0PN+29B8DvsLQx4JjTAVt+CxnQiMWpZLJC+rCIxarNUt+DCFhoGFPt JxCN4aafKjYaleG+39B55C49SEUOZmgH+e6UKicfHkpGWeIcQ954Tp7gek1n4V0ttawBgKJq LvartbWfVSowFaYCEpNg064gE0p5K+aVA8w5ARkPqkT5AGGzhH5MbpETU2PByqgKmVrNrbSq 9brlNmR4m7f9hExPdKp+p6TnpoiG+O60aCm0xK6aoD66vRwjnVaPpUTbZLwXXx/mTSR9+2d/ f0W3XCGpaXFCYWX8AgVe0Ew/yiTpsSq8pefSZS0mZT7I0Er7xIAahihZa07FdRwxwp5PY1B3 dIGBQogUUC/vP2VxbK/c8Bjq8J6Kda+aevzulk4pd3YJfMvQJSFSKTW/95Imjw3g6iiH96HO ZBfM2A2Kk2dMlsQYj/7C7pn9AusrlD5fydVtxS+oq0v7nKI5AdwzKLsIJzefdniqcB9xxzF/ DKWpTmjav0cHOHC5zG3rkCVuv3WgALKVq4WV/qBsdc/1TV/wURMUUZLBDNXu8KRmkO4Ht5SN UEQ0i4vtrQpslymSMHnWB+1q2LCuQQTM/JyOeAn7ACGyoLP/h2UQGMDS1Zpc8c6vcU7QTgr0 F6hnN7zAzFr9rqPRhq16bO8vT60fy8PIgcqZzIATAYDy8nupsc0lB2nZtNiG668ipvyAyP9x xiDqSR4jLIW5eYr2qOh7Bb4ijSjjpHTS0g+4QC/Y46+xlonPsj/PdXusAWKq6kYRGqEcrWfl FYatvKz07AyNo6ukSyJecwCMbfw4unQZVUwnmVT84kdGyWFoiDyI90BsG8lfS+FIe5eJ2W0P BG7VRd5oc8LZST0N8ebdqrsU6wXIb7c+cMJvxw+RuJJZ4B4cgjP1ixnbk74M4vFyxN0z/9X1 Xt2a6+R4Zcm5UdPlmDeqx81i+ND+8zH7Tq7qWrH5xqmy6GCQ3WeVK0INlCDBshgsvLa/V6No o8HaZfbo/m6bAEZSnCImbP/0HhQdSRrbXwIg5M/mhG/zvpORzh6Vq65LUIJcI15haVF/tokD VnkMnK0PGHX3CWdQS3TMywLVV8adconxZ7NFXB2bAnANrlKSdrH0ZrzgLNtLed/pLEynKEsJ xTHEu3Zaslypv3802x1RfHAQEZKLXxHWSrm0/KZXQUC IronPort-HdrOrdr: A9a23:UmLlf6j6VeOu9hOiqxMB+QiFL3BQXugji2hC6mlwRA09TyX4ra +TdZEgviMc5wxhPE3I9ergBED4ewK+yXcX2+cs1NWZLWvbUQKTRekJgOffKlvbakjDH4VmtZ uIHZIOceHYPBxXitv7/Rn9M/tI+qj+zElwv5a48566d3ANV51d X-Talos-CUID: 9a23:XN2fKWDlafLbGKf6Ewd52XQ5JZAZSWL+yXfUGma3JGAwTaLAHA== X-Talos-MUID: 9a23:VHfJ8QmAUFwtrwjE2wHKdnpfaelj0ficMXwfiIgniseoMW83AnC02WE= X-IronPort-AV: E=Sophos;i="6.03,204,1694750400"; d="scan'208";a="125288252" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , George Dunlap , Jan Beulich , "Stefano Stabellini" , Wei Liu , Julien Grall , Michal Orzel , Henry Wang Subject: [PATCH for-4.18 v2 1/2] docs/spnix: Switch hypercall-abi.rst to named footnotes Date: Fri, 6 Oct 2023 19:54:01 +0100 Message-ID: <20231006185402.1098400-2-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231006185402.1098400-1-andrew.cooper3@citrix.com> References: <20231006185402.1098400-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1696618494361100001 Content-Type: text/plain; charset="utf-8" This will simplify inserting a new one in the middle. Signed-off-by: Andrew Cooper --- CC: George Dunlap CC: Jan Beulich CC: Stefano Stabellini CC: Wei Liu CC: Julien Grall CC: Michal Orzel CC: Henry Wang --- docs/guest-guide/x86/hypercall-abi.rst | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/guest-guide/x86/hypercall-abi.rst b/docs/guest-guide/x86/= hypercall-abi.rst index 14c48929d748..42a820386b68 100644 --- a/docs/guest-guide/x86/hypercall-abi.rst +++ b/docs/guest-guide/x86/hypercall-abi.rst @@ -6,7 +6,7 @@ Hypercall ABI Hypercalls are system calls to Xen. Two modes of guest operation are supported, and up to 6 individual parameters are supported. =20 -Hypercalls may only be issued by kernel-level software [1]_. +Hypercalls may only be issued by kernel-level software [#kern]_. =20 Registers --------- @@ -33,7 +33,7 @@ The registers used for hypercalls depends on the operatin= g mode of the guest. =20 32 and 64bit PV guests have an ABI fixed by their guest type. The ABI for= an HVM guest depends on whether the vCPU is operating in a 64bit segment or n= ot -[2]_. +[#mode]_. =20 =20 Parameters @@ -87,7 +87,7 @@ written by Xen, is mapped with executable permissions so = it may be used. Multiple hypercall pages may be created by the guest, if it wishes. =20 The stubs are arranged by hypercall index, and start on 32-byte boundaries. -To invoke a specific hypercall, ``call`` the relevant stub [3]_: +To invoke a specific hypercall, ``call`` the relevant stub [#iret]_: =20 .. code-block:: none =20 @@ -116,14 +116,14 @@ means. =20 .. rubric:: Footnotes =20 -.. [1] For HVM guests, ``HVMOP_guest_request_vm_event`` may be configured = to - be usable from userspace, but this behaviour is not default. +.. [#kern] For HVM guests, ``HVMOP_guest_request_vm_event`` may be configu= red + to be usable from userspace, but this behaviour is not default. =20 -.. [2] While it is possible to use compatibility mode segments in a 64bit - kernel, hypercalls issues from such a mode will be interpreted with= the - 32bit ABI. Such a setup is not expected in production scenarios. +.. [#mode] While it is possible to use compatibility mode segments in a 64= bit + kernel, hypercalls issues from such a mode will be interpreted with the + 32bit ABI. Such a setup is not expected in production scenarios. =20 -.. [3] ``HYPERCALL_iret`` is special. It is only implemented for PV guests - and takes all its parameters on the stack. This stub should be - ``jmp``'d to, rather than ``call``'d. HVM guests have this stub - implemented as ``ud2a`` to prevent accidental use. +.. [#iret] ``HYPERCALL_iret`` is special. It is only implemented for PV + guests and takes all its parameters on the stack. This stub should be + ``jmp``'d to, rather than ``call``'d. HVM guests have this stub + implemented as ``ud2a`` to prevent accidental use. --=20 2.30.2 From nobody Sat May 18 05:34:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1696618492; cv=none; d=zohomail.com; s=zohoarc; b=Zm5Ztfd09J4iDOgjQJuuuUktOMnkMBgCAfsCkVo1JFywFfDaQPewHDUScHeNDp1ZPoy3kHLkELhG12YovPKfqVtjCOI9Wtmpg4Gq3RSrW8GqUuvYKcgkzeJn83UUCWDSB/+QgkGqukDk3P5vfrNZtATMODuaxRl5qwIJx71dbD8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696618492; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=FFymC+H6OgUGClZU6+iEwytfILSsAsI+11ZYJYYdFKM=; b=BQtjF/YNe9QBa5x7F8Gr1Wl5A2WqCJdMD8VtumZaP55AhFPEEpcfe2b6FsVXIgMiJxy8dH8fmplPeL+aQ+ahcWIwLqKymIm6Fw6w5rVcW7bfHMfdjxh/Y0bKb0Zjs8oO10KDkMzVIoL9ckuR7z5OjWDS9NFQSoC8pZn0mAUtqHI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1696618492802371.1483901450331; Fri, 6 Oct 2023 11:54:52 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.613804.954590 (Exim 4.92) (envelope-from ) id 1qopxv-00010w-1p; Fri, 06 Oct 2023 18:54:23 +0000 Received: by outflank-mailman (output) from mailman id 613804.954590; Fri, 06 Oct 2023 18:54:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qopxu-00010p-VE; Fri, 06 Oct 2023 18:54:22 +0000 Received: by outflank-mailman (input) for mailman id 613804; Fri, 06 Oct 2023 18:54:22 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qopxu-0000VZ-9Q for xen-devel@lists.xenproject.org; Fri, 06 Oct 2023 18:54:22 +0000 Received: from esa5.hc3370-68.iphmx.com (esa5.hc3370-68.iphmx.com [216.71.155.168]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id c0a731e7-6479-11ee-9b0d-b553b5be7939; Fri, 06 Oct 2023 20:54:20 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c0a731e7-6479-11ee-9b0d-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1696618459; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=rMavS1NfaJw4CYhTkB8gR9Bg90slPE68f/jMV8qjH/E=; b=fP5t09zOqGeXvNjZD2sN+SrMkly/qN5lSFC00rFne7+HAxqkvPaM3qjh Mk/UXITM6GCkgqbyCNRUxeORo5t4/ST0e2fBYmKOaLqGOUtkpUh64wsG3 MveEhLLAkbNs0Gme8H/Feb3z5GW/DpqCPQGKdiP0ejE4WCorg12qi74JB M=; X-CSE-ConnectionGUID: zbM/wUseSAGyzS4rw3cmBQ== X-CSE-MsgGUID: S2+NhLujSDi0i7KMN1/qLg== Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 123474049 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.159.70 X-Policy: $RELAYED X-ThreatScanner-Verdict: Negative IronPort-Data: A9a23:EuqDNq1UxZnDtU0oDvbD5QRxkn2cJEfYwER7XKvMYLTBsI5bp2MBy TNJX2CDP/yDYmr9fYpzao+08UxQsZbdxoBlSQo9pC1hF35El5HIVI+TRqvS04F+DeWYFR46s J9OAjXkBJppJpMJjk71atANlVEliOfQAOK6UbaYUsxIbVcMYD87jh5+kPIOjIdtgNyoayuAo tq3qMDEULOf82cc3lk8teTb83uDgNyo4GlD5wRmO6gS1LPjvyJ94Kw3dPnZw0TQGuG4LsbiL 87fwbew+H/u/htFIrtJRZ6iLyXm6paLVeS/oiI+t5qK23CulQRrukoPD9IOaF8/ttm8t4sZJ OOhF3CHYVxB0qXkwIzxWvTDes10FfUuFLTveRBTvSEPpqFvnrSFL/hGVSkL0YMkFulfE2trs uMlMz02Rz+Sldnq2q3gQexGv5F2RCXrFNt3VnBIyDjYCbAtQIzZQrWM7thdtNsyrpkQR7CEP ZNfMGc+KkuYC/FMEg5/5JYWteGknHTgNRZfr0qYv/Ef6GnP1g1hlrPqNbI5f/TTH54JwRrA+ jOuE2LROUtZEty71Di+3nP0h7DsuAWiH5s2G+jtnhJtqALKnTFCYPEMbnOrrP/8hkOgVtZ3L 00P5jFovaU07FasTNT2Q1u/unHslhsdUNpZF6s98hOAzoLd5grfDW8BJhZjQtE7sM49RRQxy 0SE2djuAFRHq6aJQHiQ8rOVqzKaOiUPK2IGIygeQmMt/N3LsIw1yBXVQb5LErOxj9DzMSH9x XaNtidWr5Uei9QakZqy+1/viiip4JPOS2YICh7/Bzz/qFkjPcj8Ot3utgCzAet8wJixXFOk+ 2c5gMWlxc8fH6rRjjPWS+AnJeT8jxqaCwEwkWKDDrF4qWXzpi/zI9sJiN1tDB03aJtYJ1cFd GeW6VsIu8EJVJe/RfIvC79dHfjG2kQJ+T7NbvfRdtNIZdBbeQaM/EmCjmbLhDizziDAfUwlU Kp3kPpA7l5AU8yLNBLsG48gPUYDn0jSP1/7S5Hh1AiA2rGDfnOTQrptGALQP75kt/vV+V2Lr 4c32y62J/J3CbKWX8Uq2dRLcQBiwYYTWvgaVPC7hsbce1E7SQnN+tfawK87epwNokimvr6gw 51JYWcBkACXrSSedW23hoVLNOuHsWBX8ShqYkTB/D+AhxAeXGpYxP1PKcNnIOh2q7QLIDwdZ 6BtRvhsy89nElzvkwnxp7GkxGC+XHxHXT6zAhc= IronPort-HdrOrdr: A9a23:OvIHZKlLSynGIm2BwlZrRX4MkmzpDfLo3DAbv31ZSRFFG/Fw9/ rCoB17726QtN91YhsdcL+7V5VoLUmzyXcX2/hyAV7BZmnbUQKTRekP0WKL+Vbd8kbFh41gPM lbEpSXCLfLfCJHZcSR2njELz73quP3jJxBho3lvghQpRkBUdAF0+/gYDzranGfQmN9dP0EPa vZ3OVrjRy6d08aa8yqb0N1JNQq97Xw5fTbiQdtPW9f1DWz X-Talos-CUID: 9a23:M2BQCmDN0wiCWXv6Eztt0QkLJ9soSVTy3WXrf1WnUm1sYoTAHA== X-Talos-MUID: 9a23:DUhXTwkxHl9I5J0n9kcPdnpZboRO44CzCnshkM0H5OqhE3U3IhOS2WE= X-IronPort-AV: E=Sophos;i="6.03,204,1694750400"; d="scan'208";a="123474049" From: Andrew Cooper To: Xen-devel CC: Michal Orzel , Andrew Cooper , George Dunlap , "Jan Beulich" , Stefano Stabellini , "Wei Liu" , Julien Grall , Henry Wang Subject: [PATCH for-4.18 v2 2/2] x86: Clarify that only 5 hypercall parameters are supported Date: Fri, 6 Oct 2023 19:54:02 +0100 Message-ID: <20231006185402.1098400-3-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231006185402.1098400-1-andrew.cooper3@citrix.com> References: <20231006185402.1098400-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1696618494370100002 Content-Type: text/plain; charset="utf-8" From: Michal Orzel The x86 hypercall ABI really used to have 6-argument hypercalls. V4V, the downstream predecessor to Argo did take 6th args. However, the 6th arg being %ebp in the 32bit ABI makes it unusable in practice, because that's the frame pointer in builds with frame pointers enabled. Therefore Argo was altered to being a 5-arg hypercall when it was upstreamed. c/s 2f531c122e95 ("x86: limit number of hypercall parameters to 5") removed the ability for hypercalls to take 6 arguments. Update the documentation to match reality. Signed-off-by: Michal Orzel Signed-off-by: Andrew Cooper Reviewed-by: Jason Andryuk --- CC: George Dunlap CC: Jan Beulich CC: Stefano Stabellini CC: Wei Liu CC: Julien Grall CC: Michal Orzel CC: Henry Wang v2: * Extend with the historical context of how 6-arg hypercalls have come and= gone. --- docs/guest-guide/x86/hypercall-abi.rst | 15 +++++++++++---- xen/include/public/arch-x86/xen-x86_32.h | 2 +- xen/include/public/arch-x86/xen-x86_64.h | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/docs/guest-guide/x86/hypercall-abi.rst b/docs/guest-guide/x86/= hypercall-abi.rst index 42a820386b68..c7a11a76712f 100644 --- a/docs/guest-guide/x86/hypercall-abi.rst +++ b/docs/guest-guide/x86/hypercall-abi.rst @@ -4,7 +4,7 @@ Hypercall ABI =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 Hypercalls are system calls to Xen. Two modes of guest operation are -supported, and up to 6 individual parameters are supported. +supported, and up to 5 individual parameters are supported. =20 Hypercalls may only be issued by kernel-level software [#kern]_. =20 @@ -18,17 +18,17 @@ The registers used for hypercalls depends on the operat= ing mode of the guest. =20 * - ABI - Hypercall Index - - Parameters (1 - 6) + - Parameters (1 - 5) [#params]_ - Result =20 * - 64bit - RAX - - RDI RSI RDX R10 R8 R9 + - RDI RSI RDX R10 R8 - RAX =20 * - 32bit - EAX - - EBX ECX EDX ESI EDI EBP + - EBX ECX EDX ESI EDI - EAX =20 32 and 64bit PV guests have an ABI fixed by their guest type. The ABI for= an @@ -119,6 +119,13 @@ means. .. [#kern] For HVM guests, ``HVMOP_guest_request_vm_event`` may be configu= red to be usable from userspace, but this behaviour is not default. =20 +.. [#params] Xen's ABI used to declare support for 6 hypercall arguments, + using ``r9`` and ``ebp``. However, such an ABI clobbers the frame poin= ter + in the 32bit code and does interact nicely with guest-side debugging. = The + predecessor to ``HYPERCALL_argo_op`` was a 6-argument hypercall, but the + ABI was intentionally altered when Argo was upstreamed (Xen 4.13) to be= the + 5-argument hypercall it now is. + .. [#mode] While it is possible to use compatibility mode segments in a 64= bit kernel, hypercalls issues from such a mode will be interpreted with the 32bit ABI. Such a setup is not expected in production scenarios. diff --git a/xen/include/public/arch-x86/xen-x86_32.h b/xen/include/public/= arch-x86/xen-x86_32.h index 139438e83534..9e3bf06b121e 100644 --- a/xen/include/public/arch-x86/xen-x86_32.h +++ b/xen/include/public/arch-x86/xen-x86_32.h @@ -12,7 +12,7 @@ =20 /* * Hypercall interface: - * Input: %ebx, %ecx, %edx, %esi, %edi, %ebp (arguments 1-6) + * Input: %ebx, %ecx, %edx, %esi, %edi (arguments 1-5) * Output: %eax * Access is via hypercall page (set up by guest loader or via a Xen MSR): * call hypercall_page + hypercall-number * 32 diff --git a/xen/include/public/arch-x86/xen-x86_64.h b/xen/include/public/= arch-x86/xen-x86_64.h index 5d9035ed2230..43f6e3d22001 100644 --- a/xen/include/public/arch-x86/xen-x86_64.h +++ b/xen/include/public/arch-x86/xen-x86_64.h @@ -12,7 +12,7 @@ =20 /* * Hypercall interface: - * Input: %rdi, %rsi, %rdx, %r10, %r8, %r9 (arguments 1-6) + * Input: %rdi, %rsi, %rdx, %r10, %r8 (arguments 1-5) * Output: %rax * Access is via hypercall page (set up by guest loader or via a Xen MSR): * call hypercall_page + hypercall-number * 32 --=20 2.30.2