Message ID | 1654197833-25362-9-git-send-email-olekstysh@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DF6AFC43334 for <linux-arm-kernel@archiver.kernel.org>; Thu, 2 Jun 2022 19:27:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9uAOR/E2NtHQzozkOA0RrQZnWcqfBiBc/UAuh4VKor8=; b=rifXj5lr20K950 JIYF3u9YrQ8LqYBRdyF+Ak7kHv3V742xlg54w95MAFnNI4px8SxE6vuLkf465XILCkwORbi4qWyC5 1bqFKmL6S2XLIcM9nMS33C0YyKWXngOYmHwOh2sB18Qf9IoXRHxBAQs4gFbIBJjjoZhGS8B8KJ8hv s75oZX+bwfKApL7mST4eSeD/mVIOXwJY+l5jsFBmhjWmUFAK7L/httce4e4bfaZ9hODIpBtw1AYRt dZupOJRtA+VTHqfZphv+MqiCmaQO0U7muotP+92ZE4r6QxOFYbXZqvXXKAjsx6mEQiDm7efjYO88m s55dKJ77mUxcFR6I0mhQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwqSD-0044ja-2Q; Thu, 02 Jun 2022 19:25:57 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwqQk-00445g-Jc for linux-arm-kernel@lists.infradead.org; Thu, 02 Jun 2022 19:24:28 +0000 Received: by mail-ej1-x62d.google.com with SMTP id h23so739884ejj.12 for <linux-arm-kernel@lists.infradead.org>; Thu, 02 Jun 2022 12:24:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1vkkmAPV7KLk5lLiYTidlJE/79j9EHin+NPAEwFGGPw=; b=jmz6IGbzJezrRiTA2mBa10TijR6VR0Wsv+zWCJK861wll6nY+yQF0eqIKkBS5xRnY3 06uO1Xxv/f6WxMrF7ZyLzMMJpLL7T61a9BflqTJ5BPHI2FF2yaJJHfW/bvUVTWX/bfjV TROS8lfNzLEEAzJE9nYscufoMwjo6IO6XfMO3atpb5xGlgWq24wpMqelyhVadYrVknNw V4Dfqy8uPCBCPMqt8EIVIXfDHx1hVqeQ4NxiznFjv2NBcgYhlvr/UPQpIcO2wVH5JkM0 oetd2/yrhmoOzPa4PebgUEMktci6Q0lz4PC7beZD+tIq3arTBN3tTXxehvdl7SduyR5Q 8frg== 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; bh=1vkkmAPV7KLk5lLiYTidlJE/79j9EHin+NPAEwFGGPw=; b=ThfN5X0vKC8sxD8pVzUifYJFGWc+fDqMOARqBPUOHfRZtlHqMh9gJLnOwUOIvKqgZf GwHS2ZgLBKWfhSiDUVVCnW0XJawZ8xbinha2FI10IiqcZxfuGNl6GLwqvAByUp4kLyEF Q99Qw1+uY2ZQcCzVpwXUDk943GChOm/TfhVe6SMu6x70SCPxPPw15lS4mqR1ADIndzHP 0kntDEhHLLoqKAsYEtO8ifKCFXj8AM6oMqSc4lBdyZD/mSBYzd+JFzd2S+HKbjBifWPp mRm/czxpNalvZu+61MK2MJKBV+rVtkJ/3iv6JnH1KtBm2jdDZM2AAZd3pMC0Q4nIewGh PfmQ== X-Gm-Message-State: AOAM530vyuNzB7heqMSvO1rp7UGzKtfquha6iLkpn5EMm74FPFRMtvVm /Pa0NOCmCL0qiKV0VpOSVlU= X-Google-Smtp-Source: ABdhPJzV8VoTn9s996wPN+vTdvWiSQPgr/k13Tl/xR8W22maSDMF8OZr0DW6z0mMDrujt2w9yOf1MQ== X-Received: by 2002:a17:907:7f20:b0:6fe:f0c8:8e6f with SMTP id qf32-20020a1709077f2000b006fef0c88e6fmr5510662ejc.453.1654197865496; Thu, 02 Jun 2022 12:24:25 -0700 (PDT) Received: from otyshchenko.router ([212.22.223.21]) by smtp.gmail.com with ESMTPSA id eg13-20020a056402288d00b0042dce73168csm2938301edb.13.2022.06.02.12.24.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Jun 2022 12:24:25 -0700 (PDT) From: Oleksandr Tyshchenko <olekstysh@gmail.com> To: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>, Boris Ostrovsky <boris.ostrovsky@oracle.com>, Juergen Gross <jgross@suse.com>, Stefano Stabellini <sstabellini@kernel.org>, Julien Grall <julien@xen.org>, "Michael S. Tsirkin" <mst@redhat.com>, Christoph Hellwig <hch@infradead.org> Subject: [PATCH V4 8/8] arm/xen: Assign xen-grant DMA ops for xen-grant DMA devices Date: Thu, 2 Jun 2022 22:23:53 +0300 Message-Id: <1654197833-25362-9-git-send-email-olekstysh@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1654197833-25362-1-git-send-email-olekstysh@gmail.com> References: <1654197833-25362-1-git-send-email-olekstysh@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220602_122426_733376_BAB9933D X-CRM114-Status: GOOD ( 17.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
virtio: Solution to restrict memory access under Xen using xen-grant DMA-mapping layer
|
expand
|
diff --git a/include/xen/arm/xen-ops.h b/include/xen/arm/xen-ops.h index 288deb1..b0766a6 100644 --- a/include/xen/arm/xen-ops.h +++ b/include/xen/arm/xen-ops.h @@ -3,11 +3,14 @@ #define _ASM_ARM_XEN_OPS_H #include <xen/swiotlb-xen.h> +#include <xen/xen-ops.h> static inline void xen_setup_dma_ops(struct device *dev) { #ifdef CONFIG_XEN - if (xen_swiotlb_detect()) + if (xen_is_grant_dma_device(dev)) + xen_grant_setup_dma_ops(dev); + else if (xen_swiotlb_detect()) dev->dma_ops = &xen_swiotlb_dma_ops; #endif }