Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2348575pxa; Mon, 3 Aug 2020 14:01:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUPb3aTyu/mMAeIeUmmpFqreZwh3BYSoLvDYH9VGeQAYPzuLwavJP+8npRBzF8VzMPNgw3 X-Received: by 2002:a17:906:6412:: with SMTP id d18mr17871510ejm.473.1596488494745; Mon, 03 Aug 2020 14:01:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596488494; cv=none; d=google.com; s=arc-20160816; b=CRCfzmzLA986yiU1XYp5Z3lvrwgaxbnCeL+QfqA+XWu37UJuxK1CQyksZD3SGRqLCL s16v6OO/knXcLny6M+hb/5ycEo6QeUUP6irz6CY9f4hmYg7wKGLkMR8sIbV5F4Wkp60c jjA8SyFyhEG/w68g2+1cgotkhOhbdU+dRzOu6P7EDS892wqB9MePmNAVEi7/U3Wbanjv ZJ3QprHhpaOO6+ZuxeIomNHuXJLre3vGiCmSnzfa2vLh8f3I/+Cc7yJTc+wF4/VP0s9E tK1oTpdfWz/N+yXhdgQ+Mxfoh7ndyI/0S3Q92sxtRIsgHvS63nhoTQkXTFvMyqen43qp OfVQ== 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 :dkim-signature; bh=f1A99Kan+ToYvUmOMuODkd0BFkRSjBNq3WkT2nA5570=; b=g8vZ4Y24skUfvdpIk42qKQLwDIPe/WjkUiywRxrPZIYWswq4aLtU/U3H+3dfYlHbtO fH0STTzJzbdExJXZwcc5RgX+aTnnaJ4g9vjtZ2fZWFol/KHcfRjUHzqfX/DBFrlUQwBA i7Dd7gkWxVUnHVCpgqcnqgrCRqQtf5T0TMXRplsgMKhXHGLPLuc4cpaTHUM2cCiV/pUm c9XQQMPSv6LghDsawC3bZheMI9naTRpSu9Ro4PqIY9CV5oOow2Om+DzdhosoFRt4y9y9 RH260NTgkBIqzntKxmR2RaIQy6BsUnZYzLrgY91FHATay5tDT+rkktf856OMKBzgrveH l5Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TCnZDM7L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ca27si2934600edb.481.2020.08.03.14.01.11; Mon, 03 Aug 2020 14:01:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TCnZDM7L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729219AbgHCVAY (ORCPT + 99 others); Mon, 3 Aug 2020 17:00:24 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:54850 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729208AbgHCVAW (ORCPT ); Mon, 3 Aug 2020 17:00:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596488421; 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=TCnZDM7LuL2r5CuPjpYrYgCS8hG7jUIZ3lyQhApZT64N0zxKgx7eMAloCQXBrC2QgsX3zT FhifUM5mXTUjIOTJx0pEC08qRdxwwS0xvTtrZSGsWGbYaNNIoRwvKuspUzqeSdc8nIkwca rX4oqcu3kXqUZYzsmTohxO/OR66fmYA= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-291-V8Aa0evPOMyTXK_KAP5IMw-1; Mon, 03 Aug 2020 17:00:17 -0400 X-MC-Unique: V8Aa0evPOMyTXK_KAP5IMw-1 Received: by mail-qv1-f72.google.com with SMTP id p15so13850637qvv.7 for ; Mon, 03 Aug 2020 14:00:17 -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=X/g/vcElOTg29ltbMhLM9hQRnKd5hlr+ULzmS7nW6mWrX1b2Z6KOnVDk3Uh+Va9vM9 787DlMleRqrPruFE8Ssq2SYowY1yxvQjvs4abee6hH7QdFc2WptQw4QhpUih8h2rFe2s CsDRsWUYeXwiWQ4PwCXmAXej9bToiONwkdPbk3THlXK7VqPJtMOX9h6STCu9lAzAvcpq bgUadXQyFufESz2929bWAMXgBOmcw7U436g1f8Fuz5nq5LFVFSL/e9T0hKhVeEQiywQu P/+YejzDeJTLDvfYaifHJ3t2h/RuhjjuwKceu/IEt8bNpuHuBLp0LBt3S3Vw9tSP/XKP npbw== X-Gm-Message-State: AOAM530MopXxwUFQDZsOPHxIcA0e1cnzRXYL8G2tQIfMcdmBPYydvt5k 84jqBVtqwGpSRr3Bz50/XZ0QyggWne5xCu1rlZ+PmRQN2fiMIbUc4pnnpVc80coOI0KQRcQbTaN IKvW3O/S7bWv1gV+LtP5rAeYP X-Received: by 2002:ae9:f409:: with SMTP id y9mr17081841qkl.383.1596488415775; Mon, 03 Aug 2020 14:00:15 -0700 (PDT) X-Received: by 2002:ae9:f409:: with SMTP id y9mr17081819qkl.383.1596488415580; Mon, 03 Aug 2020 14:00:15 -0700 (PDT) Received: from redhat.com (bzq-79-177-102-128.red.bezeqint.net. [79.177.102.128]) by smtp.gmail.com with ESMTPSA id x137sm20654324qkb.47.2020.08.03.14.00.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2020 14:00:15 -0700 (PDT) Date: Mon, 3 Aug 2020 17:00:11 -0400 From: "Michael S. Tsirkin" To: linux-kernel@vger.kernel.org Cc: virtualization@lists.linux-foundation.org, Jason Wang , kvm@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v2 20/24] vhost/vdpa: switch to new helpers Message-ID: <20200803205814.540410-21-mst@redhat.com> References: <20200803205814.540410-1-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200803205814.540410-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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