Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp864799ybn; Wed, 25 Sep 2019 08:49:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqxRliwWvD5qQqvARQsCLCpX+NbOpKF03eYnBQ1ezMxk9xZwk3wObLR9F0d82juwWTU/Va18 X-Received: by 2002:aa7:dcca:: with SMTP id w10mr3696551edu.183.1569426570195; Wed, 25 Sep 2019 08:49:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569426570; cv=none; d=google.com; s=arc-20160816; b=rNHSknRpo+4qzMpZONH8uwExzUY1sLzqimu14wcEfa0X3oLh6osfkq7DoUSK7RbGgV ok9xj7VzF4UOd7mw2yBeXnWBHucThK8BxXWEZNm9143lxwEezlbjSNSg10KiKn7NXCSC cGXAVCN8oD4uUK9A71IXOFY9CRA4FxjOsFBpKXTpKH7ZVfUOunJgwq6D9dYEvrkJhYIu Jensp0L8OIxy+0I37XWwNG+rXB1u+Ov7KBVNG230IYiwWgspFfP+3/Bu8qUp0GOShgrg nmBzpxwJtc6hRieJD9x1HNntTVGkPfIx7SPAHIpDQncj2PZK+x7JWynAQdJYp//RJcfN zGpw== 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-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=FnrZlG9onHbzoUOas395WBpQBkqdPWiXJrz3kgJAMNs=; b=HSrxdQRmQqIO1s9la+U4xIAhUamZH+RE25mRgu7jyUFO4PWONIYwlVkvrO44qYjQGI JlYBveZYOThrq6L1SX+cXVCICVoDbEzSycxx1B2ATUZMjn5NMrK5Sw9eoHeu5Cdw1UUO dj+lNeBp5oBFb8Ot2UVqIrWTkvHvkqRWcB/MK/lN1pn/4lr8NHfxseLQcLsYa03tlaRb pfDiNDG4B8kMfNPIpQrZEBMzTAtPDrwSnzEuZHjtu61dQ1J62PvDqt6RtNJSHORo4oWZ TdRGzktRAr3RfavBKE4y1iBma6gTp4zrEJ5jrCd6IBAQ8m1PF25rGs4GN6X7oQOgBIKp 0E1g== 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 b22si3561438eda.194.2019.09.25.08.49.02; Wed, 25 Sep 2019 08:49:30 -0700 (PDT) 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 S2387824AbfIWQA4 (ORCPT + 99 others); Mon, 23 Sep 2019 12:00:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53812 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732882AbfIWQAz (ORCPT ); Mon, 23 Sep 2019 12:00:55 -0400 Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8DEA881F31 for ; Mon, 23 Sep 2019 16:00:54 +0000 (UTC) Received: by mail-qt1-f197.google.com with SMTP id m6so17755663qtk.23 for ; Mon, 23 Sep 2019 09:00:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=FnrZlG9onHbzoUOas395WBpQBkqdPWiXJrz3kgJAMNs=; b=uPrCEuwgYM1mv+vcWdVdM5SGTy3DQsOvwy5Fv5nikjtblwlrersdKhlh7+WPpKITst H4aSg8qQv0eGbyJy7rmpI3OfznYX9CoA8QlvLS7mQ3es0mqeCJ9jMRYAp0Ea+7l0ZFfB MIVkxAdZBvxRnQIkmoKu5II5seD12lZGJpmMKryZKkupFkJgsTCOhsgqHTF5UO+P3kNg JnzXa+6qnQHxJwkk3cncmyA4lQBCxo+NUx1STzFHrMzr4lXMvOyQvqyaNkG05ou8Uh+z gN2xZXi/f+2MnVsNPPoPtyYRcu0CJcn9i4JMTPgg7Ek5A07ndG2p2bl7+cW5pWUqCK1R Aqsw== X-Gm-Message-State: APjAAAV57t8EF5ujn1hcEiwXH/x5sa1J5ScNy8UYeCkofw/ByJIFQGnF 3+CGRKhQlUSWvSBs2NQ/NoQN3zIJ9nqC1vsjmLp92g2ZKByfUsRg+P4KbOT2oRBDLadTIDuXcOU oD/WZ8rEZLsaID+xeFFtRW1rJ X-Received: by 2002:a0c:e48b:: with SMTP id n11mr25662847qvl.38.1569254453722; Mon, 23 Sep 2019 09:00:53 -0700 (PDT) X-Received: by 2002:a0c:e48b:: with SMTP id n11mr25662820qvl.38.1569254453463; Mon, 23 Sep 2019 09:00:53 -0700 (PDT) Received: from redhat.com (bzq-79-176-40-226.red.bezeqint.net. [79.176.40.226]) by smtp.gmail.com with ESMTPSA id m125sm5840827qkd.3.2019.09.23.09.00.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2019 09:00:52 -0700 (PDT) Date: Mon, 23 Sep 2019 12:00:41 -0400 From: "Michael S. Tsirkin" To: Alex Williamson Cc: Jason Wang , kvm@vger.kernel.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, kwankhede@nvidia.com, tiwei.bie@intel.com, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, cohuck@redhat.com, maxime.coquelin@redhat.com, cunming.liang@intel.com, zhihong.wang@intel.com, rob.miller@broadcom.com, xiao.w.wang@intel.com, haotian.wang@sifive.com, zhenyuw@linux.intel.com, zhi.a.wang@intel.com, jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com, airlied@linux.ie, daniel@ffwll.ch, farman@linux.ibm.com, pasic@linux.ibm.com, sebott@linux.ibm.com, oberpar@linux.ibm.com, heiko.carstens@de.ibm.com, gor@linux.ibm.com, borntraeger@de.ibm.com, akrowiak@linux.ibm.com, freude@linux.ibm.com, lingshan.zhu@intel.com, idos@mellanox.com, eperezma@redhat.com, lulu@redhat.com, parav@mellanox.com Subject: Re: [PATCH 5/6] vringh: fix copy direction of vringh_iov_push_kern() Message-ID: <20190923115930-mutt-send-email-mst@kernel.org> References: <20190923130331.29324-1-jasowang@redhat.com> <20190923130331.29324-6-jasowang@redhat.com> <20190923094559.765da494@x1.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190923094559.765da494@x1.home> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 23, 2019 at 09:45:59AM -0600, Alex Williamson wrote: > On Mon, 23 Sep 2019 21:03:30 +0800 > Jason Wang wrote: > > > We want to copy from iov to buf, so the direction was wrong. > > > > Signed-off-by: Jason Wang > > --- > > drivers/vhost/vringh.c | 8 +++++++- > > 1 file changed, 7 insertions(+), 1 deletion(-) > > > Why is this included in the series? Seems like an unrelated fix being > held up within a proposal for a new feature. Thanks, > > Alex It's better to have it as patch 1/6, but it's a dependency of the example driver in the series. I can reorder when I apply. > > diff --git a/drivers/vhost/vringh.c b/drivers/vhost/vringh.c > > index 08ad0d1f0476..a0a2d74967ef 100644 > > --- a/drivers/vhost/vringh.c > > +++ b/drivers/vhost/vringh.c > > @@ -852,6 +852,12 @@ static inline int xfer_kern(void *src, void *dst, size_t len) > > return 0; > > } > > > > +static inline int kern_xfer(void *dst, void *src, size_t len) > > +{ > > + memcpy(dst, src, len); > > + return 0; > > +} > > + > > /** > > * vringh_init_kern - initialize a vringh for a kernelspace vring. > > * @vrh: the vringh to initialize. > > @@ -958,7 +964,7 @@ EXPORT_SYMBOL(vringh_iov_pull_kern); > > ssize_t vringh_iov_push_kern(struct vringh_kiov *wiov, > > const void *src, size_t len) > > { > > - return vringh_iov_xfer(wiov, (void *)src, len, xfer_kern); > > + return vringh_iov_xfer(wiov, (void *)src, len, kern_xfer); > > } > > EXPORT_SYMBOL(vringh_iov_push_kern); > >