From patchwork Mon Jan 30 12:47:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 648548 Delivered-To: patch@linaro.org Received: by 2002:a17:522:d8c:b0:4be:c3dc:14d8 with SMTP id d12csp1123001pva; Mon, 30 Jan 2023 04:48:24 -0800 (PST) X-Google-Smtp-Source: AMrXdXs+1ZzU2zc1QPD9vXzVSJr/Sca70wLWsC26gX7DDrwr6lVM+qevMhlrLPLq24rawtcP9ZgR X-Received: by 2002:a05:622a:4897:b0:3ab:a3d9:c5c8 with SMTP id fc23-20020a05622a489700b003aba3d9c5c8mr79461200qtb.3.1675082904464; Mon, 30 Jan 2023 04:48:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675082904; cv=none; d=google.com; s=arc-20160816; b=TNXcaoQVbbX/RVpDKbv1aVR44EjpaNGwr5Sx/jS3n6p7JFb13FJPPpZHmdQZgpp7rJ RuMhMfT6mLODjZlJkOX/f1LDPIODL1byE2YeIsHcZpFzUH3Q12c4DiHZvPGD/2ba0wY0 IPVDLCvSNwHajzbyutZNFyzVqixfQE3ow69StHS6O02SHAYSjFP7z4Dvj5DPoNydauY9 pJ2tQ+YFP2+3Lu8zc5tL9fY299lu4uGAQDNZcW+Ixf6+8D9yLCw/OExPzewjl3ybWS2H OxgqhPrLSAGm2ZEKo4nOt4h+1GXL0VpniXduoDsRDSIwlrRkbOFmdcz3pe0DNyepuqqK 5xDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=EkzAhXkjPYMqQD6lasia7w4DvtWO7ASRRB4oJPhD+wI=; b=b58KzkYFbL2DOyXzDULTw7NgNHm4Xbk88vQ8ag7kJNhtLBrp+grxAavIf6HMOKmWll gzfx7KsX8dpwFyMGcEsoyFSmzahXMlg5YMqH7Te5BNHLvR5WfDlkEahHxz243XNmLJ4c roW32Xo8V9FYkWBkyqfe5DoG9LErqpx2/qVRlpGlnyrKglkENVCuGTSBj4FmAgJSESbC /3RiQ0khIdUw5k2zlozG52oBwBEPbi/NTr7iNCxm3eydSBAoR/aONzTOXKwPS/Ykn5Uy KoVALOAd64TIN0wnX++moWDO2/1t+bGT4vnz2hMRlxH45ZR3Ga2cmHjrOyq0Mqshn+lG zWfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GTLVCXP5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 5-20020ac85905000000b003a68fe872b3si6448874qty.399.2023.01.30.04.48.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Jan 2023 04:48:24 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GTLVCXP5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMTZb-0002D8-0V; Mon, 30 Jan 2023 07:47:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMTZX-0002Cv-Gp for qemu-devel@nongnu.org; Mon, 30 Jan 2023 07:47:43 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pMTZV-00079w-Qu for qemu-devel@nongnu.org; Mon, 30 Jan 2023 07:47:43 -0500 Received: by mail-wr1-x42d.google.com with SMTP id m7so10938338wru.8 for ; Mon, 30 Jan 2023 04:47:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=EkzAhXkjPYMqQD6lasia7w4DvtWO7ASRRB4oJPhD+wI=; b=GTLVCXP5QcBqk+2Jknm6JM8ck6uTGe+sC4mirEoAxd1xynfJh6WhKl4lfJU0HZjUVg oi7KjxgaQoLZs9JVf5iJEt07xTYUrOwkTqGzv0elaQYCmPwRqlO2GgxwFQoOidnmNQaX qyDW0VF4vYGXim99ZcEhf8P2yli2tcrSSZVHA7n/7bIp5PhG9y7sdNFvag7rN+6GGt/0 HNDKe65mq1mMIOMe+fCJlXSmAPK4EUqWXY4U6q/mBYcn6MaY8+RYITYHRvNrz1ZAD+wz +KfUbZEVXS2a3RH0CuFmdS4rDk8uinrLgAlnaNLWYe+ylXnSxN1iOcT+g87eSCP9gxUu kYDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EkzAhXkjPYMqQD6lasia7w4DvtWO7ASRRB4oJPhD+wI=; b=jkYoJCwIYqWoDDs2lVnlUvI4Kn1DlJDRHiy7tujRHhMb8cOlzAlsPoSc3muuFG4uvK DCgIDeP47pn59kCxgdxkjZw+GAjsNf8F1hye9dr0ZEo3sjCdvscyCZBOFFwS1n5Z60cQ 4pFmsS4TbJT2oFzCfd5tPqJb8OP9jjwdlStFrsckaoJmZWjH2Mf8qW1hk3ItWLEjPIpL q8onIkrq+YrS4UT/s/xDdNSsDuqfPOex2oIvTox1Tzhglb2CL5IEm5JxGr7Sl/QKuUDc D/iJ0pYGGKCHpafpuiZsu+uH9tmKLS4yCsv/KmB85wgEa/lQmYbWJmSqURuZkZsOw9KI ROCA== X-Gm-Message-State: AO0yUKULwkvLfmEBebsjMlIn9O8TD82qMKpU0FRwYe54aXM7ablBeKE0 ucFG8RQb/O/bkOrdMOC+IZv3QQ== X-Received: by 2002:a5d:6401:0:b0:2bf:ccf3:ee50 with SMTP id z1-20020a5d6401000000b002bfccf3ee50mr11332247wru.58.1675082859881; Mon, 30 Jan 2023 04:47:39 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id n15-20020a5d598f000000b002bdff778d87sm12945937wri.34.2023.01.30.04.47.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 04:47:39 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id DB9861FFB7; Mon, 30 Jan 2023 12:47:38 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: slp@redhat.com, mst@redhat.com, marcandre.lureau@redhat.com, stefanha@redhat.com, mathieu.poirier@linaro.org, viresh.kumar@linaro.org, sgarzare@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , Gerd Hoffmann Subject: [PATCH v2] backends/vhost-user: remove the ioeventfd check Date: Mon, 30 Jan 2023 12:47:28 +0000 Message-Id: <20230130124728.175610-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.google.com 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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org While ioeventfds are needed for good performance with KVM guests it should not be a gating requirement. We can run vhost-user backends using simulated ioeventfds or inband signalling. With this change I can run: $QEMU $OPTS \ -display gtk,gl=on \ -device vhost-user-gpu-pci,chardev=vhgpu \ -chardev socket,id=vhgpu,path=vhgpu.sock with: ./contrib/vhost-user-gpu/vhost-user-gpu \ -s vhgpu.sock \ -v and at least see things start-up - although the display gets rotated by 180 degrees. Once lightdm takes over we never make it to the login prompt and just get a blank screen. Signed-off-by: Alex Bennée Cc: Gerd Hoffmann Message-Id: <20221202132231.1048669-1-alex.bennee@linaro.org> Reviewed-by: Stefan Hajnoczi --- v2 - reword commit message to make it clear we simulate ioeventfd - drop check altogether as we can fallback for KVM as well --- backends/vhost-user.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/backends/vhost-user.c b/backends/vhost-user.c index 7bfcaef976..7aae57f56c 100644 --- a/backends/vhost-user.c +++ b/backends/vhost-user.c @@ -21,12 +21,6 @@ #include "io/channel-command.h" #include "hw/virtio/virtio-bus.h" -static bool -ioeventfd_enabled(void) -{ - return kvm_enabled() && kvm_eventfds_enabled(); -} - int vhost_user_backend_dev_init(VhostUserBackend *b, VirtIODevice *vdev, unsigned nvqs, Error **errp) @@ -35,11 +29,6 @@ vhost_user_backend_dev_init(VhostUserBackend *b, VirtIODevice *vdev, assert(!b->vdev && vdev); - if (!ioeventfd_enabled()) { - error_setg(errp, "vhost initialization failed: requires kvm"); - return -1; - } - if (!vhost_user_init(&b->vhost_user, &b->chr, errp)) { return -1; }