Message ID | 20210819171547.2879725-2-philmd@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=KbSj=NK=nongnu.org=qemu-devel-bounces+qemu-devel=archiver.kernel.org@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A94D3C4338F for <qemu-devel@archiver.kernel.org>; Thu, 19 Aug 2021 17:19:21 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (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 64D756108B for <qemu-devel@archiver.kernel.org>; Thu, 19 Aug 2021 17:19:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 64D756108B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:46544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org>) id 1mGlhI-0007Ns-KS for qemu-devel@archiver.kernel.org; Thu, 19 Aug 2021 13:19:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35830) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <philmd@redhat.com>) id 1mGle2-0002MG-Rc for qemu-devel@nongnu.org; Thu, 19 Aug 2021 13:16:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:49366) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <philmd@redhat.com>) id 1mGle1-0000jp-4o for qemu-devel@nongnu.org; Thu, 19 Aug 2021 13:15:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629393356; 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=iFdJgmZSFDi0T3tz5j4VdZ4mFoLbPu805prh7+ofjFQ=; b=innYlTYEtJ4zW0FRraaS0DCyI8f8q0V5qn21GGWJjzugVZbBJAeahjwbBFRc5OMFfu0wrD 8cpjOegj5te7uVAT3rYvYMLr327fpJ9wcya89kJvzCva4T66hOyjVivPLDhE3vil2X+WQ3 L/2yF/16T76tq2OrTz3u77G76VezfXw= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-261-oCLU2c7UM5ijvJm-4yBNzQ-1; Thu, 19 Aug 2021 13:15:55 -0400 X-MC-Unique: oCLU2c7UM5ijvJm-4yBNzQ-1 Received: by mail-wr1-f72.google.com with SMTP id z1-20020adfdf810000b0290154f7f8c412so1919916wrl.21 for <qemu-devel@nongnu.org>; Thu, 19 Aug 2021 10:15:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iFdJgmZSFDi0T3tz5j4VdZ4mFoLbPu805prh7+ofjFQ=; b=ZfndgGRn3RGEkGUtzo3TrOBLCMfBgj+dGFr96Dhj6JdJI0x87B4V6ipnT0uMdEVTAv EOJoqWOCONSuxwkyjaLWUuw2ltIU2EIYizhmCQeBp2SWUQQGz+BqlVkDZsMI+lbIbeZp EGetd6JsbWIgmAUpEbunP9dOKs0ElC/4Z63g+o2O07PfNhYrEkJkgi/rN1CjmDmTibRM oSoRfihJb6ngaOdJMR+KyJYI5+mU0VAE1aNI53wtBd6tblAilQOTBHVsLGMRtEZYwmS5 G2Hu1TpRH4AjACRNRZOIjWLFU3tTb+1DHgiRM7jB6tPqUB930B+C35gjg+HPanbwZWHq w+gg== X-Gm-Message-State: AOAM5314hS9uykFdMWJJpBtqH/u7OpBDmT+sIg3vM9qii2xfJtIajTIf 22JzDeXLakI6GfwX3S6SdpNCxXXSi7FwX9u7Oa7vEfDKOmm/2KtuTLwdcdBWn+6nLhQ57s3gwlG DEgm0l0E2NCx2kd1w5nTMHlRSkr4Qa3LGZOYrGTe3Ja2V7jP4kMOJa4JeWGBUxkLy X-Received: by 2002:a5d:5228:: with SMTP id i8mr5170475wra.391.1629393353733; Thu, 19 Aug 2021 10:15:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw21UpmnBmnx5p6noRHd2CHy1aSY69OdHAmHOK2vmdBbgqOMTNSGSOdNTXiMW7C3A5HvLZ7eA== X-Received: by 2002:a5d:5228:: with SMTP id i8mr5170452wra.391.1629393353542; Thu, 19 Aug 2021 10:15:53 -0700 (PDT) Received: from x1w.. (163.red-83-52-55.dynamicip.rima-tde.net. [83.52.55.163]) by smtp.gmail.com with ESMTPSA id p8sm7846501wme.22.2021.08.19.10.15.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Aug 2021 10:15:53 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@redhat.com> To: qemu-devel@nongnu.org Subject: [PATCH v2 1/3] hw/pci: Introduce pci_dma_memory_region() helper Date: Thu, 19 Aug 2021 19:15:45 +0200 Message-Id: <20210819171547.2879725-2-philmd@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210819171547.2879725-1-philmd@redhat.com> References: <20210819171547.2879725-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: 8bit Received-SPF: pass client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.7, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Peter Maydell <peter.maydell@linaro.org>, Eduardo Habkost <ehabkost@redhat.com>, Sergio Lopez <slp@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Gerd Hoffmann <kraxel@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@redhat.com> Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org> |
Series |
hw/usb: Always expect 'dma' link property to be set to simplify
|
expand
|
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index d0f4266e372..5860f42e400 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -786,6 +786,11 @@ static inline AddressSpace *pci_get_address_space(PCIDevice *dev) return &dev->bus_master_as; } +static inline MemoryRegion *pci_dma_memory_region(PCIDevice *dev) +{ + return &dev->bus_master_container_region; +} + /** * pci_dma_rw: Read from or write to an address space from PCI device. *
pci_get_address_space() returns an AddressSpace. In some cases we want a MemoryRegion. Add the pci_dma_memory_region() equivalent helper. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> --- include/hw/pci/pci.h | 5 +++++ 1 file changed, 5 insertions(+)