Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFFA6C433E1 for ; Wed, 5 Aug 2020 13:44:20 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AFAB92065C for ; Wed, 5 Aug 2020 13:44:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GU1n4Gb6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AFAB92065C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=virtualization-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id A04458816B; Wed, 5 Aug 2020 13:44:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fqspT13I88Xu; Wed, 5 Aug 2020 13:44:20 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id 3113D88177; Wed, 5 Aug 2020 13:44:20 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1A1B2C0051; Wed, 5 Aug 2020 13:44:20 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id B9A37C004C for ; Wed, 5 Aug 2020 13:44:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A9796875B4 for ; Wed, 5 Aug 2020 13:44:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id I3GhxnvAp8Yp for ; Wed, 5 Aug 2020 13:44:18 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by whitealder.osuosl.org (Postfix) with ESMTPS id 181AE875BD for ; Wed, 5 Aug 2020 13:44:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596635057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=f1A99Kan+ToYvUmOMuODkd0BFkRSjBNq3WkT2nA5570=; b=GU1n4Gb6W/bz4qUDxQDKxsIT4SH27Wq0G/mPZoNami2kSLfN5LOPQawjRlJYZDIKSX9K94 yYIblZn1Gcx5+JtJZPWZ7S/1u9RRxL51QQ29qjr9suQNHk4qYkkHjIoC1OGxz+0hFEUSMG dDswgmEU/rK+JYExjxfOSvwqtUNRxOc= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-350-Uw66v4FOMN2OnwcfzchFCA-1; Wed, 05 Aug 2020 09:44:14 -0400 X-MC-Unique: Uw66v4FOMN2OnwcfzchFCA-1 Received: by mail-wm1-f70.google.com with SMTP id d22so2750065wmd.2 for ; Wed, 05 Aug 2020 06:44:14 -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=f1A99Kan+ToYvUmOMuODkd0BFkRSjBNq3WkT2nA5570=; b=Dxav8YASLzlOKbahDk5Vp2ohaxtIjhINtN0hkVaW7WG6vIw6zmY2oRci/6wnW5QpXu ohB5XXD9zm2mpmx7T+y/+fm/FN+6m9/04p2MIs/+WteUgnKrlQ1W4Awv/qGdTfd/ptH7 ETXlB2XsudP26Z0j+qwc1d22i/E/b4WZnjVtqTXkhQTgVme5HDiE9i06/LudmJerRa46 s6TAB6AWktZU1J+8Et5uaVseS/EyMbqwFBMsZUIsf0C+nvOaJQzb3TWl3BNvMYoisBJ3 OA9IZaZiKYhgsCO2aWtd+WZRw1//+jlL/4W9oWGA1ay6nYbp5g6YAT0Rl1XvWe/19Ec2 Dvug== X-Gm-Message-State: AOAM5322rXY7mxu3ZSJISf8p+iSRbBzKIOlV9qjJAZ3M0JkHENF/fxAU 8p2ZdAqiQo8RKS2QA9/yy/cvQXZzpvqa42VW5kqn4ft5V9knQI3D++yoqLS1tSQXdbFBsKPK18H LfPsX37QIKUHyqG74aAZ8jdOB5uuX0QbxocfEakEnuw== X-Received: by 2002:a5d:56c9:: with SMTP id m9mr2815441wrw.311.1596635052938; Wed, 05 Aug 2020 06:44:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1s5cwBUNfyg52XUg786M5asAtfYsirHkxCrJWthFsY+eLaHorMKAhGdLmAYB5+K4MVfGhow== X-Received: by 2002:a5d:56c9:: with SMTP id m9mr2815427wrw.311.1596635052770; Wed, 05 Aug 2020 06:44:12 -0700 (PDT) Received: from redhat.com (bzq-79-180-0-181.red.bezeqint.net. [79.180.0.181]) by smtp.gmail.com with ESMTPSA id o30sm2873971wra.67.2020.08.05.06.44.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Aug 2020 06:44:12 -0700 (PDT) Date: Wed, 5 Aug 2020 09:44:10 -0400 From: "Michael S. Tsirkin" To: linux-kernel@vger.kernel.org Subject: [PATCH v3 20/38] vhost/vdpa: switch to new helpers Message-ID: <20200805134226.1106164-21-mst@redhat.com> References: <20200805134226.1106164-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200805134226.1106164-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Cc: netdev@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" For new helpers handling legacy features to be effective, vhost needs to invoke them. Tie them in. Signed-off-by: Michael S. Tsirkin --- drivers/vhost/vdpa.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index 18869a35d408..3674404688f5 100644 --- a/drivers/vhost/vdpa.c +++ b/drivers/vhost/vdpa.c @@ -118,9 +118,8 @@ static irqreturn_t vhost_vdpa_config_cb(void *private) static void vhost_vdpa_reset(struct vhost_vdpa *v) { struct vdpa_device *vdpa = v->vdpa; - const struct vdpa_config_ops *ops = vdpa->config; - ops->set_status(vdpa, 0); + vdpa_reset(vdpa); } static long vhost_vdpa_get_device_id(struct vhost_vdpa *v, u8 __user *argp) @@ -196,7 +195,6 @@ static long vhost_vdpa_get_config(struct vhost_vdpa *v, struct vhost_vdpa_config __user *c) { struct vdpa_device *vdpa = v->vdpa; - const struct vdpa_config_ops *ops = vdpa->config; struct vhost_vdpa_config config; unsigned long size = offsetof(struct vhost_vdpa_config, buf); u8 *buf; @@ -209,7 +207,7 @@ static long vhost_vdpa_get_config(struct vhost_vdpa *v, if (!buf) return -ENOMEM; - ops->get_config(vdpa, config.off, buf, config.len); + vdpa_get_config(vdpa, config.off, buf, config.len); if (copy_to_user(c->buf, buf, config.len)) { kvfree(buf); @@ -282,7 +280,7 @@ static long vhost_vdpa_set_features(struct vhost_vdpa *v, u64 __user *featurep) if (features & ~vhost_vdpa_features[v->virtio_id]) return -EINVAL; - if (ops->set_features(vdpa, features)) + if (vdpa_set_features(vdpa, features)) return -EINVAL; return 0; -- MST _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization