From patchwork Tue Sep 22 18:24:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 11792957 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DC8CB6CB for ; Tue, 22 Sep 2020 18:26:41 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AC1A6239D2 for ; Tue, 22 Sep 2020 18:26:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="cfjkELq5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AC1A6239D2 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kKmyo-0008Vj-DE; Tue, 22 Sep 2020 18:25:30 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kKmyn-0008V0-BZ for xen-devel@lists.xenproject.org; Tue, 22 Sep 2020 18:25:29 +0000 X-Inumbo-ID: 9f7a1f4a-4c4b-44a5-ab12-d566d463e613 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9f7a1f4a-4c4b-44a5-ab12-d566d463e613; Tue, 22 Sep 2020 18:25:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1600799129; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QzVikzTXIrENnpKWbynQkJyOfWkh2lkxwYpfijKtf/0=; b=cfjkELq5Zs9EdqDmWRjmYe2SNkMvVWFebo+RwWbto6CccjvHexeo1bTr oo5I7Y4fVMFSwNvFdcxbiF5dviTQmfSvuMGI0zy9TCvS1OgRkVUwhN35L sFFu1AiedZw7DepUxzDwE/ajRGb6lWjT2dWBz0KKZ8zi35drH0KSztbZo 8=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: ox9Ky0uJZEa6RYONNB1dq0u6kg1zwZNt18Av1jD72N6oKG/HKDzpiS+q5FifRsFQzp+Y9+gB2B ygZIbhM0Ewo6WGqcimUaPBgcm96whm1DxbR/Q734qaKJSgf9BpjIjVRXMxoMIpYdnXjBHTnlY4 wct78+xVFlGg7pDfp9tAIFgx7nTZ6mcFPg2eERqFt4Qt/duSHB+Q6Xj1yGxtEjGUXspB51J9u9 AHM21dRrJAt6U3gXfMberzhBKwl08OcLehxKq21h+XacFmqpcp4Kssl8NRNicr4JqdM5Zsooxk VAw= X-SBRS: 2.7 X-MesageID: 27631635 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.77,291,1596513600"; d="scan'208";a="27631635" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , George Dunlap , Ian Jackson , Jan Beulich , Stefano Stabellini , Wei Liu , Julien Grall , Paul Durrant , =?utf-8?q?Micha?= =?utf-8?q?=C5=82_Leszczy=C5=84ski?= , Hubert Jasudowicz , Tamas K Lengyel Subject: [PATCH v2 06/11] xen/memory: Clarify the XENMEM_acquire_resource ABI description Date: Tue, 22 Sep 2020 19:24:39 +0100 Message-ID: <20200922182444.12350-7-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200922182444.12350-1-andrew.cooper3@citrix.com> References: <20200922182444.12350-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" This is how similar operations already operate, compatible with the sole implementation (in Linux), and explicitly gives us some flexibility. Signed-off-by: Andrew Cooper Reviewed-by: Paul Durrant --- CC: George Dunlap CC: Ian Jackson CC: Jan Beulich CC: Stefano Stabellini CC: Wei Liu CC: Julien Grall CC: Paul Durrant CC: Michał Leszczyński CC: Hubert Jasudowicz CC: Tamas K Lengyel --- xen/include/public/memory.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xen/include/public/memory.h b/xen/include/public/memory.h index d7eb34f167..c4c47a0b38 100644 --- a/xen/include/public/memory.h +++ b/xen/include/public/memory.h @@ -642,6 +642,7 @@ struct xen_mem_acquire_resource { * IN/OUT * * As an IN parameter number of frames of the resource to be mapped. + * This value may be updated during the course of the operation. * * When frame_list is NULL and nr_frames is 0, this is interpreted as a * request for the size of the resource, which shall be returned in the @@ -656,7 +657,8 @@ struct xen_mem_acquire_resource { uint32_t pad; /* * IN - the index of the initial frame to be mapped. This parameter - * is ignored if nr_frames is 0. + * is ignored if nr_frames is 0. This value may be updated + * during the course of the operation. */ uint64_t frame; @@ -672,7 +674,8 @@ struct xen_mem_acquire_resource { * If -EIO is returned then the frame_list has only been * partially mapped and it is up to the caller to unmap all * the GFNs. - * This parameter may be NULL if nr_frames is 0. + * This parameter may be NULL if nr_frames is 0. This + * value may be updated during the course of the operation. */ XEN_GUEST_HANDLE(xen_pfn_t) frame_list; };