From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D7FCCC6FA82 for ; Tue, 13 Sep 2022 06:10:00 +0000 (UTC) Received: from localhost ([::1]:54342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oXz7P-0004eQ-MV for qemu-devel@archiver.kernel.org; Tue, 13 Sep 2022 02:09:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44918) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXz3r-000360-38 for qemu-devel@nongnu.org; Tue, 13 Sep 2022 02:06:19 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:32271) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXz3n-0005Uj-QK for qemu-devel@nongnu.org; Tue, 13 Sep 2022 02:06:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663049174; 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=Qv78+5tmczIN9e8IMR5pPraeCmO5MZuxovaYm8jFjM8=; b=dFc0La1qR54vWmpflCCCZcc6aEJeMQ430qe/b7YqhakcTOsPbePbix7Y5I0gp+aFAyuoJq AGVz3ukw3MPfWHdYEqbe+jn1wQOWktzhpg3Y0nOKfQrY8uYUC8REka1kI5H+rmvwaHp1JR Z91ppJz3ybSbSlD4teIdrcXeFn/IKoU= Received: from mail-ua1-f71.google.com (mail-ua1-f71.google.com [209.85.222.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-602-NBcL6EOjORuHgyOYkAEnoA-1; Tue, 13 Sep 2022 02:06:12 -0400 X-MC-Unique: NBcL6EOjORuHgyOYkAEnoA-1 Received: by mail-ua1-f71.google.com with SMTP id h19-20020ab01353000000b00392f0767f64so3340048uae.17 for ; Mon, 12 Sep 2022 23:06:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=Qv78+5tmczIN9e8IMR5pPraeCmO5MZuxovaYm8jFjM8=; b=U4ZeeHRmnsvEZhq8yiL25GiRI5F//6FmTvOF49WaB/PEDzRaM26skElIbNaGj30krY tGDb9r76Bh/cMhchxP/NOKWLQQQE7OqWv7u/2Yb0h75JEKGTjIQgQisXE3CepEh4J1C2 5Qm2+nqhdk9c1RP/o/sLf1WtrjZ+4bQkbPlhuNyawVIyv7iHmP3j/xoNPFr8dIUCTiKN Ib/OUne01NkvFsIgOX1Azj6w/t4oxQKTOjP2z0Bjb97IvCpKInB9620s6adkzUy76ywv AI2lBGkGo6zFqbienJrdI8jExpFevEGj0R99N6KLN02Ch1Bp3JT2CRk/l/j6psNm2UGA ga6Q== X-Gm-Message-State: ACgBeo1rmIzuUlsUZRVjd6WwqorbEXZopQzgVWEXYpVAcbrrQ6MWA7KW xGT2lxVK6ax4HgfAr9y0E/pCO9j8JA7ZDXocR5UlI491U0zIE74OwqecYf+Jt0R3k8DQ2VMAyT/ DOXvoXPg3pHLvQ8aJIvVFAowv84v2tk4= X-Received: by 2002:a05:6102:a84:b0:357:c234:8041 with SMTP id n4-20020a0561020a8400b00357c2348041mr9134848vsg.25.1663049172506; Mon, 12 Sep 2022 23:06:12 -0700 (PDT) X-Google-Smtp-Source: AA6agR4prvI0xqNXfEVWWhiOYZcbCUQQ45AOXL4dB5GoQO5DLZubXF9/brn5RKEXuIfDfnjgQAHWN1aP0EJrawadUwo= X-Received: by 2002:a05:6102:a84:b0:357:c234:8041 with SMTP id n4-20020a0561020a8400b00357c2348041mr9134845vsg.25.1663049172255; Mon, 12 Sep 2022 23:06:12 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jason Wang Date: Tue, 13 Sep 2022 14:06:00 +0800 Message-ID: Subject: Re: [PATCH v4 08/15] vhost: expose vhost_virtqueue_start() To: Kangjie Xu Cc: qemu-devel , mst , Eduardo Habkost , Marcel Apfelbaum , =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= , wangyanan55@huawei.com, Heng Qi , Xuan Zhuo Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=170.10.133.124; envelope-from=jasowang@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Mon, Sep 12, 2022 at 1:22 AM Kangjie Xu wrote: > > Expose vhost_virtqueue_start(), we need to use it when restarting a > virtqueue. > > Signed-off-by: Kangjie Xu > Signed-off-by: Xuan Zhuo Acked-by: Jason Wang > --- > hw/virtio/vhost.c | 8 ++++---- > include/hw/virtio/vhost.h | 3 +++ > 2 files changed, 7 insertions(+), 4 deletions(-) > > diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c > index f758f177bb..7900bc81ab 100644 > --- a/hw/virtio/vhost.c > +++ b/hw/virtio/vhost.c > @@ -1081,10 +1081,10 @@ out: > return ret; > } > > -static int vhost_virtqueue_start(struct vhost_dev *dev, > - struct VirtIODevice *vdev, > - struct vhost_virtqueue *vq, > - unsigned idx) > +int vhost_virtqueue_start(struct vhost_dev *dev, > + struct VirtIODevice *vdev, > + struct vhost_virtqueue *vq, > + unsigned idx) > { > BusState *qbus = BUS(qdev_get_parent_bus(DEVICE(vdev))); > VirtioBusState *vbus = VIRTIO_BUS(qbus); > diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h > index a346f23d13..b092f57d98 100644 > --- a/include/hw/virtio/vhost.h > +++ b/include/hw/virtio/vhost.h > @@ -279,6 +279,9 @@ int vhost_net_set_backend(struct vhost_dev *hdev, > > int vhost_device_iotlb_miss(struct vhost_dev *dev, uint64_t iova, int write); > > +int vhost_virtqueue_start(struct vhost_dev *dev, struct VirtIODevice *vdev, > + struct vhost_virtqueue *vq, unsigned idx); > + > void vhost_dev_reset_inflight(struct vhost_inflight *inflight); > void vhost_dev_free_inflight(struct vhost_inflight *inflight); > void vhost_dev_save_inflight(struct vhost_inflight *inflight, QEMUFile *f); > -- > 2.32.0 >