From nobody Mon Feb 9 10:12:18 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1640951359; cv=none; d=zohomail.com; s=zohoarc; b=ITlv6I3IyLwKAxDHnCZjYyFibwPi12VadxIXLPEXqyyvlrNi6siqGS0bMUgs5xeD2Xx9Ck6lH6hSXztMrjaknZ+pY9CR/w2nP5JIc8LnhR6hgaR5uxkAakDC4NRPNIRBXmgythqA7usAd05c4lQDSWPs1i+ZRuyzTIuXz/tIEjk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640951359; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=/KXeNIFUnY1pUcNuTPWkGRZ5r1qlFjH4izW6QJgPWUg=; b=W5jqxKotrfsb5tK28FQzIOwpXGoAdjiiRTyNBsP2Lk2E+wm2bHvzbAPeDs6ZLT2NLrmeuUcXvH6HSyPu1CKwashMwRKj1rsSgP7Wki2dwZjIvhIum2cwBL/rIRkTgV+yc/BocFKoeiS9gbFmNYBf1zm9dIqNPkcnOuJ8jJhLBG4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1640951359655156.7229375111092; Fri, 31 Dec 2021 03:49:19 -0800 (PST) Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-374-mdSQH9PZNv24HBlU61ytow-1; Fri, 31 Dec 2021 06:49:18 -0500 Received: by mail-wr1-f70.google.com with SMTP id l9-20020adfa389000000b001a23bd1c661so7467105wrb.6 for ; Fri, 31 Dec 2021 03:49:17 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (26.red-83-50-86.dynamicip.rima-tde.net. [83.50.86.26]) by smtp.gmail.com with ESMTPSA id p21sm27122889wmq.20.2021.12.31.03.49.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Dec 2021 03:49:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640951359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/KXeNIFUnY1pUcNuTPWkGRZ5r1qlFjH4izW6QJgPWUg=; b=Wjpc7D1sLGhLo6b2hgwVi+9y+C6EMYuNRqreOynpirAWxh90XCNEv8BniMnBZHf/4gphwJ 9OmdpO+t1P5y82lKj9J3o6rm2ap7LBXJ0Za4rNbZ3yAMaVylCI6fftwNbwIBi25HzFq39u OHHJ1caUqUzQ6DrManqh6T9us0Xnzec= X-MC-Unique: mdSQH9PZNv24HBlU61ytow-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/KXeNIFUnY1pUcNuTPWkGRZ5r1qlFjH4izW6QJgPWUg=; b=hzW4v7fr3xT7kbibjCXqdF0w1ED0v/8YFvDNVnMUhecq0eGM/xnZnJhK3u3WkMJ+MX ywRd+QDQgKuwbkDtCZqDQ5jEty0CPrWcANXX1O4Jx4sFUXJy/N1ooALDZUxFn1GMcWzF D8lM2Qm/ZuP4cWdPYsOS9hHGz5N0O8a0sxFxODP6mxeIgE3zGt7/2DOjfwKigxA1cl+8 Dhkrxw2KtaDo7RKylJf3iy5xJGsukQq0y1xwEz9AXh8b5J7Dman0IpSzifbvvMRXGlSI jb4L+/KFLKRmoeD1CNpp8u+6fdb/BIcMzOzBz/UkJiHUYVU/zGirxHyGTnXSdNLFNbrr gO1A== X-Gm-Message-State: AOAM530jIZbFMaOZm/bH9Pjtz2xItQr63qqoAqyUibECyMDgUvnjLI3R MVFKKCZoxMUk+8RQzgdEyMsGOT2SYubcdNC8xb0wFZkQ+vz91pFGhMDs99RlxRCmQPjqViD2khX yvUJ6mgnsy8FUJg== X-Received: by 2002:a05:6000:1085:: with SMTP id y5mr29841577wrw.696.1640951356742; Fri, 31 Dec 2021 03:49:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJ0MH1adbramq6Rx/LSJHzXDf5WIu2+OFf7IbTHinEeLWq3jsFk+YmaSZE0hFzSmOw/pqLlA== X-Received: by 2002:a05:6000:1085:: with SMTP id y5mr29841565wrw.696.1640951356595; Fri, 31 Dec 2021 03:49:16 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Marcel Apfelbaum , Gerd Hoffmann , David Hildenbrand , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini , "Michael S. Tsirkin" , Peter Xu Subject: [PATCH 3/8] hw/pci: Document pci_dma_map() Date: Fri, 31 Dec 2021 12:48:56 +0100 Message-Id: <20211231114901.976937-4-philmd@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211231114901.976937-1-philmd@redhat.com> References: <20211231114901.976937-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640951361300000001 Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/pci/pci.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index 5b36334a28a..f0d707efb8c 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -876,6 +876,18 @@ PCI_DMA_DEFINE_LDST(q_be, q_be, 64); =20 #undef PCI_DMA_DEFINE_LDST =20 +/** + * pci_dma_map: Map a physical memory region into a device PCI address spa= ce. + * + * May map a subset of the requested range, given by and returned in @plen. + * May return %NULL and set *@plen to zero(0), if resources needed to perf= orm + * the mapping are exhausted. + * + * @dev: #PCIDevice to be accessed + * @addr: address within that device's address space + * @plen: pointer to length of buffer; updated on return + * @dir: indicates the transfer direction + */ static inline void *pci_dma_map(PCIDevice *dev, dma_addr_t addr, dma_addr_t *plen, DMADirection dir) { --=20 2.33.1