Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2414932ioo; Sat, 28 May 2022 12:53:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8xsJwVr+SxD4uIQkrQ8Tp6S6UnTvCo9RlWSLtS1ap8yLp35x+eTf5DF0wTRVJwbPHrctF X-Received: by 2002:a17:90a:7e02:b0:1e0:a6a7:6eb with SMTP id i2-20020a17090a7e0200b001e0a6a706ebmr14841372pjl.203.1653767584579; Sat, 28 May 2022 12:53:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653767584; cv=none; d=google.com; s=arc-20160816; b=m9QQFByczCzlvwMnLC/TN9YNxboHocqv1ycogi/QQRUUkUjGvU0UqOC4A2dJHBptbX 8RECWYeU4OGMMXLcE6u6m8sfCil9zj4qiqOIrQikirY4GH6B2ca0pHSRXpnV7U0ftGnz 20yuHGhH6jeu3tVmJpoT+HSTuDsotDj6e4ZhnNJKSCae+i3sIaK8Ryqd8BorBjTtAF2X 5+DzHqGeXzPWFfwWEv/vcqK0cMopFrMO45fqXME1ah9iofmYD/S6EV64WZU9htRCQ9AB wQBeN2Sgmyx6H4wEXmTJj6HVIaxZjRmM+c6rvkUxoLhPpQJZc/6qE9bs0/vO6aKFlrt8 0Bsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=cUv5tpS5RGrDYRnAjsYwiC+v1VkMuttRdgrw+2d7f3M=; b=a2JrpHPldW5DIm8GVF3htmX9Je57onz8I1lgm8hTHTM1hTOx9uqUEKqdjUcNcIyS9l x0nJkhp9QbNydKmXJ8AFEisFOu20slaEOWfMzfPHyVshABCeGpAX1gJWQSj6LuUrNsfp VJpPmX3WgOuL2gFmxO6SDD4YxOREc7hPr8hpilnb8P/CKTtCvmuNgLREUEuw5n3+clK4 jwHn3dAnGerw2XIvFiLcZwbte8ZuPEG/LzwbieHzz7pN5eeqSOkpPluBNrdgSGmPKs0W Y4oA0IDLdZdnZ3DA1S3IGaVUlRNBZItvPZD2fflT5TIic04pK1WdtQ81b3L49epuieyP eOhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=J22HiRiX; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id i4-20020a170902c94400b0015f4422dd30si11721744pla.622.2022.05.28.12.53.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 May 2022 12:53:04 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=J22HiRiX; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8BEEB7521B; Sat, 28 May 2022 12:13:05 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350193AbiE0Iys (ORCPT + 99 others); Fri, 27 May 2022 04:54:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350167AbiE0IxY (ORCPT ); Fri, 27 May 2022 04:53:24 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2E20C46B3F for ; Fri, 27 May 2022 01:52:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653641569; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cUv5tpS5RGrDYRnAjsYwiC+v1VkMuttRdgrw+2d7f3M=; b=J22HiRiXNwVBo8FO/ASP43BByGmfKE7BEgxbdKxHh2tG85rmgptoWqfD/h3Bkuwn1rzcuc NuD0Dvcw/cxTUiQYRLOXQmkahfq+Ge16LWPpCKs93hdDaoxhu4F/+85EJWkQclm2XdJapI /RXDwqF7vJ0ugKDHm0zhgsGWZ291lns= Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-371-ybN1uBEnPueY11CtWvZ5xQ-1; Fri, 27 May 2022 04:52:48 -0400 X-MC-Unique: ybN1uBEnPueY11CtWvZ5xQ-1 Received: by mail-qt1-f200.google.com with SMTP id w21-20020a05622a135500b002f3b801f51eso3827562qtk.23 for ; Fri, 27 May 2022 01:52:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=cUv5tpS5RGrDYRnAjsYwiC+v1VkMuttRdgrw+2d7f3M=; b=7k1f0E6JUBBi7PaJSsE7yRf/18rudQVInFdd8TU9k7ndeeJPawulYdpOxo8RyVuSUN L8cXQqGhiN6oCWfMUsPhecTWT53RURk39g1qXMlfouKKllUaEseQZ11cruA+880LSKO0 6/UoxpTBwmY2tLEmAZL+RrCOLph4aTNaOgJK69OjUWqcqdo/QI2flV5r1jgwBMCq5dmh EE0hJfF9Cf0u0GPiW+FPL0idaY41kE5qlLNG4J5epa2CF4KVRS/WWr5Fp9UEKGuY/fvW xzrxoGswAQBAc2mw9Lh+/+LLGEl8SwWeot/fj11FrF7CjrnCLlbFkQ2HeP0JLDAMMHet 8rFw== X-Gm-Message-State: AOAM5329AOAs3o4VrljFhmDJVZa2UT9itp0EH+7+QuK1jd4E+EbPk7Gd H453eOH3MV+MqUlELSHKpco09dDmXgiI8rNRclUFDc5xe0GI6NN20QyJ++mr/dIHisThsu4BAzR +P5vhALZdnpFMkiukwWpG3S6B0aFAz7oEzLMkOAKc X-Received: by 2002:a05:622a:1a08:b0:2fb:e220:271b with SMTP id f8-20020a05622a1a0800b002fbe220271bmr6997228qtb.221.1653641567530; Fri, 27 May 2022 01:52:47 -0700 (PDT) X-Received: by 2002:a05:622a:1a08:b0:2fb:e220:271b with SMTP id f8-20020a05622a1a0800b002fbe220271bmr6997219qtb.221.1653641567335; Fri, 27 May 2022 01:52:47 -0700 (PDT) MIME-Version: 1.0 References: <20220527060120.20964-1-jasowang@redhat.com> <20220527060120.20964-3-jasowang@redhat.com> In-Reply-To: <20220527060120.20964-3-jasowang@redhat.com> From: Eugenio Perez Martin Date: Fri, 27 May 2022 10:52:11 +0200 Message-ID: Subject: Re: [PATCH V6 2/9] virtio: use virtio_reset_device() when possible To: Jason Wang Cc: Michael Tsirkin , virtualization , linux-kernel , tglx@linutronix.de, peterz@infradead.org, paulmck@kernel.org, maz@kernel.org, Halil Pasic , Cornelia Huck , Cindy Lu , Stefano Garzarella , xuanzhuo@linux.alibaba.com, Vineeth Vijayan , Peter Oberparleiter , linux-s390@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 27, 2022 at 8:01 AM Jason Wang wrote: > > This allows us to do common extension without duplicating code. > > Cc: Thomas Gleixner > Cc: Peter Zijlstra > Cc: "Paul E. McKenney" > Cc: Marc Zyngier > Cc: Halil Pasic > Cc: Cornelia Huck > Cc: Vineeth Vijayan > Cc: Peter Oberparleiter > Cc: linux-s390@vger.kernel.org > Reviewed-by: Cornelia Huck > Signed-off-by: Jason Wang Reviewed-by: Eugenio P=C3=A9rez > --- > drivers/virtio/virtio.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c > index 938e975029d4..aa1eb5132767 100644 > --- a/drivers/virtio/virtio.c > +++ b/drivers/virtio/virtio.c > @@ -430,7 +430,7 @@ int register_virtio_device(struct virtio_device *dev) > > /* We always start by resetting the device, in case a previous > * driver messed it up. This also tests that code path a little.= */ > - dev->config->reset(dev); > + virtio_reset_device(dev); > > /* Acknowledge that we've seen the device. */ > virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE); > @@ -496,7 +496,7 @@ int virtio_device_restore(struct virtio_device *dev) > > /* We always start by resetting the device, in case a previous > * driver messed it up. */ > - dev->config->reset(dev); > + virtio_reset_device(dev); > > /* Acknowledge that we've seen the device. */ > virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE); > -- > 2.25.1 >