Message ID | 1653944417-17168-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 84CCAC433F5 for <linux-arm-kernel@archiver.kernel.org>; Mon, 30 May 2022 21:03:23 +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=gM8fHbAGqHJ9jPaKMTCDeWXW9Ovhg23WVfJwy9k9E1s=; b=2yXDXyFu+bGi6O vwHXY/QJfuAIfoHIqTdf54UfCiL7NQrRGon9bR+bqUiroKfWhHwtDbHmiJ3VvhY3kBcMoRZA13jtt 91Y61gr2iNcNpvyf5sY0eeRf4IBtJSZLiYnoYBIg7IVi76kuXYx7G2JA2CeMkrpzAGPbf9J5AT1oF ZqI5M+7Tq+6ZheV90qasr4Uhxc0L2nCmYkrUhK7Fx/4Z+6TC1TmpKvazMcNR6t6RPcNtVhRzwKltt ukKNQvu4vAnzbMbj9/YNXwOxy7d4JMTr3uabp+AGfgd1BLXcUe8DOrNdc1GZejMAoPXHwyFZPcbAl TwVRQwOlC08My7cJJNRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvmWk-008JQr-9f; Mon, 30 May 2022 21:02:14 +0000 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvmVB-008Ily-0m for linux-arm-kernel@lists.infradead.org; Mon, 30 May 2022 21:00:38 +0000 Received: by mail-lf1-x136.google.com with SMTP id p4so18488962lfg.4 for <linux-arm-kernel@lists.infradead.org>; Mon, 30 May 2022 14:00:35 -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=6yQqHGmllGTqv5b6W6sRDmvHNQ6gC3VDGqt+iST1GP4=; b=S9MQR0ujpwPcnAyQYtPOzs9RCcNptzk0O/ZMxmFkOJnlI6mtmjxlbztcN0YE14G+/O CACKu4Iom63FSxFErPfKqe3D8u1NBDzLCPW0bP4ReCA8eMTw2li9C6ziCtU4wpuuXFOv qt8hKg4Ch3uraBa6Tn2+BZTqz64LBuzU3H+Y3p7d156cESE/deH1HCsjxMQApA/hMabB SVd/urKJWwl1w0Od8Z4zjUY6waUfCEhfljhE6SeNVuuV96Jjyfsdnq6mtPjXwQC9I81N 93RwoCNTdcACEhMhE6pcdd8EPkimavXlYSfpVDIUPItTBv+rAA4J2jKLCkS4egHb/581 YKqA== 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=6yQqHGmllGTqv5b6W6sRDmvHNQ6gC3VDGqt+iST1GP4=; b=PR+WAaptm+tX7y50hm1bBxg08X0RRNNVOt4zx5EyqAcQFX04ZWFhE8x1qBSth1Lm4x 7NPolKmw5vsJ/QzZw22ZWEW73NXDbrfxWmdb4hZuBNL1/no3SU5rGtt0daMd2o+eso3L Uoq7hmPwIZZYPq92Msjl1DXLenZEHKVME15cPZSZphm2LkFkwuddCwptPWxrSlQWFS/o NT56cqdG6TTgAt0WEqrpkd5Tsx7c7pR2LwODjqXyPzR+62Z31/PL0bkqlw+3R5RncoGi BY8P8R0fyUC80aIaDLXjRB/gGgbOHfxfb2gg8sa6Jmz56Ot9e4NnSqSst1UqMFiFegM8 Kvbg== X-Gm-Message-State: AOAM533wS3sevjA8d/exi8eZUoqFzYpfxtcG9YaV8imVu6CqfmRKDT7P EtFc090ZkDg4HvXctosFxPe6kw7jZ78= X-Google-Smtp-Source: ABdhPJxRI3M09HPtHmhTVLy5lEGHXzz2fTw91+bnwCJ2p93uOzuCHkjvEzV3hyRjrqV1bLRUpJbu/Q== X-Received: by 2002:a05:6512:22c2:b0:478:3ed7:f0f7 with SMTP id g2-20020a05651222c200b004783ed7f0f7mr37717893lfu.112.1653944434440; Mon, 30 May 2022 14:00:34 -0700 (PDT) Received: from otyshchenko.router ([212.22.223.21]) by smtp.gmail.com with ESMTPSA id k21-20020a2ea275000000b0025550e2693asm581541ljm.38.2022.05.30.14.00.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 May 2022 14:00:34 -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 V3 8/8] arm/xen: Assign xen-grant DMA ops for xen-grant DMA devices Date: Tue, 31 May 2022 00:00:17 +0300 Message-Id: <1653944417-17168-9-git-send-email-olekstysh@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1653944417-17168-1-git-send-email-olekstysh@gmail.com> References: <1653944417-17168-1-git-send-email-olekstysh@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220530_140037_112908_F9F1B6A6 X-CRM114-Status: GOOD ( 17.86 ) 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 }