Received: by 10.223.185.116 with SMTP id b49csp6434531wrg; Wed, 28 Feb 2018 09:19:46 -0800 (PST) X-Google-Smtp-Source: AG47ELuxpn/FcJtDOxl5B590ND5uUbmqTocD+ezD6cQcsyNS2wU5DI1aZe/kYK9IWC9pHR8+VA5A X-Received: by 10.99.114.70 with SMTP id c6mr9540833pgn.337.1519838386767; Wed, 28 Feb 2018 09:19:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519838386; cv=none; d=google.com; s=arc-20160816; b=CszXqjIC8+g9nbhMXvcdmz/RyY5mWETNgnlSj52K1zdq7ge/FGrjRGdYHVjqUUZxcB yGb1kHHS/0GFxajtXRYH6j8ND+Z6t/1XfqPTmclsqhzqoFMetTNZP7/qa3rKTqmQVArs W5cgfEDgX+nhZ0vfS/nDgw5WGhxkw5TyKqrZU72tpBirAFtM7jZ2jl7460MBN26TWg5g XsWhhc2gfK7St+TDAZGXRevRB7vdUHazqDEwShOR8uklZTB3yxvLhHYbZCvvQiMU/g/F 1Rxmf8S44MU4TM9/GiEo0T6PS/AdRpHrVqS+Vr8kKMHpdJTBLfepv+onAITUHZkY18Bk YBiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=lxDsC6KqAWPEBnBiScU4vPOaHTVh1g1tMFAO5Zc839A=; b=rPoJi9duWi67fQgkpBAfUXyVIwK+TqEJ0zDx7niqBDTAbZJmKlSzKeZ7u5vj5yRz8e P8Zuda4gQecsnkj2GI0dVTVymXCk8Pgby9U94BTuXuTiKMTcPTaSvZrG/ng4EPaerA45 sFCNDKjRdLQNobtxu9NHfr0cYJ37kbjQ0FBjs5FY340iROX4VCzIduatc5+hCBLnAhWw dIq8DQgA2eXo7JpEK8YAjefheJO4V6tNoEF1JnrhtWBQazY+xJiwlHCxXJGnMzOo22Ng u7n6VkZIQ5ehZniretNmGyAevX/btO1Q6RTS8GLEBpg7Ranc4zHomXtZaQ/MR6Q1HFMN gPJw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f5si1232944pgv.476.2018.02.28.09.19.32; Wed, 28 Feb 2018 09:19:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933379AbeB1RRm (ORCPT + 99 others); Wed, 28 Feb 2018 12:17:42 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:45910 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932224AbeB1RRk (ORCPT ); Wed, 28 Feb 2018 12:17:40 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 60FFF40FB650; Wed, 28 Feb 2018 17:17:39 +0000 (UTC) Received: from redhat.com (ovpn-123-220.rdu2.redhat.com [10.10.123.220]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1EED22166BB2; Wed, 28 Feb 2018 17:17:39 +0000 (UTC) Date: Wed, 28 Feb 2018 19:17:38 +0200 From: "Michael S. Tsirkin" To: =?iso-8859-1?Q?Marc-Andr=E9?= Lureau Cc: Linux Kernel Mailing List , Sergio Lopez Pascual , Baoquan He , "Somlo, Gabriel" , xiaolong.ye@intel.com Subject: Re: [PATCH v15 11/11] RFC: fw_cfg: do DMA read operation Message-ID: <20180228191650-mutt-send-email-mst@kernel.org> References: <20180215213312.29234-1-marcandre.lureau@redhat.com> <20180215213312.29234-12-marcandre.lureau@redhat.com> <20180227020104-mutt-send-email-mst@kernel.org> <20180228173444-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 28 Feb 2018 17:17:39 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 28 Feb 2018 17:17:39 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'mst@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 28, 2018 at 04:41:51PM +0100, Marc-Andr? Lureau wrote: > I don't know if it's always safe to enable dma in read_raw(), how > could we know? Is there a check we could use to choose one or ther > other (and thus avoiding explicit dma/readfn argument)? IMHO the way to go is not to try to do zero copy. Allocate a buffer and DMA there, then copy. -- MST