Received: by 10.223.185.116 with SMTP id b49csp6439190wrg; Wed, 28 Feb 2018 09:24:07 -0800 (PST) X-Google-Smtp-Source: AH8x226N6YO48ZoUOjWRKfgfcaTCXw5OZ5yyOFx36ikNrvuLwVaSbMzHqM3XD4l08+AsbGf4MTCB X-Received: by 2002:a17:902:aa43:: with SMTP id c3-v6mr18883343plr.357.1519838647125; Wed, 28 Feb 2018 09:24:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519838647; cv=none; d=google.com; s=arc-20160816; b=NszNn56+yNe6/1ja8uNvgquKCsrK0cDOEHHVWGqydpjf5K1CXdpLL53OssVMrtAXji E7iQXviA4CKa7dRr+xahhn+rE9D7RkYgqW0uO8VtBnCdcZNXT/U3cWgIG1wqcp3NEH3W x/8ZXQ5TM7eMocLo7np4Khm4gm8v33QysLyibqfv4iRBZotDphSVItHbImWCNecN9xXP sZiWZZTb2fV/9J4g2BryeQQVI3UN5aS8DMajdq/D1YfnxTBauDO1vA4Qx9W/eiyroe3Z gkCDo7qIP1B1VxoCP6wya0EgcgpK6LQmiqu2HROJP3ZJry7WzTL+/wdE2opBehr0L1H4 7FAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :arc-authentication-results; bh=i4h868/fRot9iTWZarA+1uct619S7UzfG8DN7ML9kVE=; b=owpoNz4mwRrBByQgJoiAQc29yyh1J7zC2Nq6LPHVy/L753b+O02NfiX+Ng6bFqquPQ mpD45PoddEpCqWNrzjLLcAtB0TW8xuagWYGdt9AQb6j0LbzQzKHfLTzSMdnmHOPs6D0u Q5Nt0JXnyG/dwXPoJcil8cEbqmU/RvRppBRZnNa3Yt9MZZayLdJuvtCMiBuq3tj3UdJ7 Zdw37x/YHtOg4VS2CmTU00nDiUs7+9v3ZqJnQH34h9n1QLU+AoGl4UNqp7WvhCgSrnaH IlX/9wHy0LcuvuILHqxW/C6UwkvmuGdT5BDSoMTgUC4uqh6nhV9uhvfDq0zN+zwauEgy vwJA== 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 h3-v6si1522516pld.180.2018.02.28.09.23.51; Wed, 28 Feb 2018 09:24:07 -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 S1752679AbeB1RWd convert rfc822-to-8bit (ORCPT + 99 others); Wed, 28 Feb 2018 12:22:33 -0500 Received: from mail-qt0-f173.google.com ([209.85.216.173]:34337 "EHLO mail-qt0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753071AbeB1RWa (ORCPT ); Wed, 28 Feb 2018 12:22:30 -0500 Received: by mail-qt0-f173.google.com with SMTP id l25so3949284qtj.1 for ; Wed, 28 Feb 2018 09:22:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=/ymkLhK09nUcmi0uSXPMqBzqyb+TULqz74eRUT2L4uM=; b=m8psqvgAUkCXk+82stMVN6GWY9pUx22N/7HufHfa+2QnHApb/eKjnLXt8qhSc44gO+ tzWILKxKlrCDNb2Yr6eM1deLPAOGy82VI5yJcqQqaKPramtjKuARKyfkZZwWX67tRq/9 qoSJjUm59Z/iBfvTG0owIbDESU7UmsBrfC3MfIwo+Vv5Kl4Uo4Ekr7IEx4kHxxtFTrW1 pFUqmFyAUU7upkoR8qRphEk/Kz3II0oh9jepcjQ+OmPq7F3L/qBSlaYmz73vkaEI+Rfv 8kaKPPVc5hE9o/Dyp0wF7SQsRAPTYI/H38m9oDLOTMqwxKXhc4VUfYPUTcZdICiLnenH 45sA== X-Gm-Message-State: APf1xPBldbvhLVNMIZ3Hs/cPvdCHhofIgbYp9zNZ0DF19qkzoVoVdNTB zEBteP+xtGRkgpj+K4iUPMSrO88lNMzcYfKT5NCFKw== X-Received: by 10.237.42.198 with SMTP id t64mr30231539qtd.274.1519838549944; Wed, 28 Feb 2018 09:22:29 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.137.194 with HTTP; Wed, 28 Feb 2018 09:22:29 -0800 (PST) In-Reply-To: <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> <20180228191650-mutt-send-email-mst@kernel.org> From: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Date: Wed, 28 Feb 2018 18:22:29 +0100 Message-ID: Subject: Re: [PATCH v15 11/11] RFC: fw_cfg: do DMA read operation To: "Michael S. Tsirkin" Cc: Linux Kernel Mailing List , Sergio Lopez Pascual , Baoquan He , "Somlo, Gabriel" , xiaolong.ye@intel.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi On Wed, Feb 28, 2018 at 6:17 PM, Michael S. Tsirkin wrote: > 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. Sounds fine to me, I'll resend this patch separately if the rest from v16 is applied. thanks