From patchwork Thu Jun 23 16:13:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Sementsov-Ogievskiy X-Patchwork-Id: 12892914 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 0250AC433EF for ; Thu, 23 Jun 2022 16:18:36 +0000 (UTC) Received: from localhost ([::1]:40632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4PXQ-0006fL-2U for qemu-devel@archiver.kernel.org; Thu, 23 Jun 2022 12:18:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4PSr-0000oT-80 for qemu-devel@nongnu.org; Thu, 23 Jun 2022 12:13:56 -0400 Received: from forwardcorp1p.mail.yandex.net ([77.88.29.217]:53200) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4PSl-0008EG-UF for qemu-devel@nongnu.org; Thu, 23 Jun 2022 12:13:52 -0400 Received: from sas1-9c28cd37d27b.qloud-c.yandex.net (sas1-9c28cd37d27b.qloud-c.yandex.net [IPv6:2a02:6b8:c14:309b:0:640:9c28:cd37]) by forwardcorp1p.mail.yandex.net (Yandex) with ESMTP id CA4AD2E1BB7; Thu, 23 Jun 2022 19:13:37 +0300 (MSK) Received: from sas1-7470331623bb.qloud-c.yandex.net (sas1-7470331623bb.qloud-c.yandex.net [2a02:6b8:c08:bd1e:0:640:7470:3316]) by sas1-9c28cd37d27b.qloud-c.yandex.net (mxbackcorp/Yandex) with ESMTP id CDFzn402Mb-DaK4bleB; Thu, 23 Jun 2022 19:13:37 +0300 X-Yandex-Fwd: 2 Precedence: bulk DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1656000817; bh=rM7a6H3XEkC53Jd8XXbbD0b4YNaF0oiN3pz+EfaGZ0c=; h=Cc:Message-Id:Date:Subject:To:From; b=N09RVfNaFPI1s0ldFpOmJc/hxnvnPRDUmzYMEw+eFplsQZjfh5hQIYZqG09DiNfDC H4rv3K5qBU7oEd85FcQ43wMzZsYsdNZ25NJD5Ncdd3cAtT3rFlt4hZ8dVOIjXDmPow rmBm5T/RCe1E5yNnKpDjd3JEub5bR5qXr9ESI2v0= Authentication-Results: sas1-9c28cd37d27b.qloud-c.yandex.net; dkim=pass header.i=@yandex-team.ru Received: from vsementsov-win.yandex-team.ru (unknown [2a02:6b8:b081:14::1:1e]) by sas1-7470331623bb.qloud-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id nZkhqFOnB8-DaNiwU4s; Thu, 23 Jun 2022 19:13:36 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Cc: mst@redhat.com, vsementsov@yandex-team.ru, yc-core@yandex-team.ru, rvkagan@yandex-team.ru, armbru@redhat.com Subject: [PATCH v2 0/2] vhost: implement VHOST_SET_VRING_ERR Date: Thu, 23 Jun 2022 19:13:23 +0300 Message-Id: <20220623161325.18813-1-vsementsov@yandex-team.ru> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Received-SPF: pass client-ip=77.88.29.217; envelope-from=vsementsov@yandex-team.ru; helo=forwardcorp1p.mail.yandex.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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 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" Both vhost-user and kernel vhost can inform Qemu about virt-queue error through separate eventfd. Let's use this possibility. For now just dump a message on error like elsewhere in vhost.c. Further plan is implement QAPI event for this and may be some other vhost/virtio errors to make it possible to instantly notify user about problems in vm. That would be a separate patch or patchset. v2: don't add QAPI event for now. Let's first realize the vhost interface. Yandex-ST: CLOUD-101375 Konstantin Khlebnikov (2): vhost: add method vhost_set_vring_err vhost: setup error eventfd and dump errors hw/virtio/vhost-backend.c | 7 ++++++ hw/virtio/vhost-user.c | 6 +++++ hw/virtio/vhost.c | 37 +++++++++++++++++++++++++++++++ include/hw/virtio/vhost-backend.h | 3 +++ include/hw/virtio/vhost.h | 1 + 5 files changed, 54 insertions(+)