From patchwork Tue Aug 2 09:50:08 2022 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: 594860 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp4216349maz; Tue, 2 Aug 2022 03:26:56 -0700 (PDT) X-Google-Smtp-Source: AA6agR4v7EjZK7pPC/756iKiY4/1kPnvpHPcAqSYqLlfUm+7kqQ0Wsj0L/L4BCmOItfjaFC7QU1t X-Received: by 2002:a0c:8d8e:0:b0:473:6406:9dbb with SMTP id t14-20020a0c8d8e000000b0047364069dbbmr17896724qvb.80.1659436016159; Tue, 02 Aug 2022 03:26:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659436016; cv=none; d=google.com; s=arc-20160816; b=v0LD+q/HgXT7i3/jpB2DHDKRCkJdRZIacGYjyWA+oD1U046RQoYfJdyh+s9KlOzxsg cfpuBNrZamUSCgbbkO61iaFQgwLiXd0kJJDqhiORe27nl51wRSwLvHlcPZSNgKAcY+Se uTYL2Lew/4Jq6xsnCbodV2d4gRpQoiPgKuqtIWjzCuCuUeb0+7C8+jKsYAQl0W+yg3dm aCDTEmqUyCpecNeuc+uhdQrikyPBCfBsf0fGdXIefJuliJmDxs5G50PzpBQXLbpHJUO9 TNyA0H/BXe0VdEJwFKsu4Ks7HUtnruPbjiDG8ImCN1d6LdzALvk+1IK9910KXAMiFoaB SiXA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=g/o8m65biskhxapd/iISMtVnr5sb7Kumaq7aeEYhX/o=; b=NI0mcYzjyBLIjNW0NDqCD1eTU02nP9xQuuN+zlqTBVMSdsN4zgkuItBgFIgKkVIhwX iAKtjUb8S683YOf4mX5LfNoo9EptQn8/1eiRQZiTNPfv+stV8bLyS1OQ1AdGfutIe+ZJ 6jTKIxo3q9hdaZN3ejFn5FVh7KRQfDd6fArZJfYBRshNxUCIpXp7CtSPU7P+mfQbd2nj wKNo0RNeXb2ju79eV/ZMxqnS4czJqcvvEjZ9Nm6CUfz9QFhyllpKlUMPMKTd1uQ+AaUy cBfSy6S2pbxa0k37Ohwom7+W3Tazjq16G1dYxDAReRkMeai72ZyAntY4CDSLiS+73uvo Hvbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FE2Ao+wj; 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 fd9-20020a05622a4d0900b0031ef837a87dsi8120525qtb.594.2022.08.02.03.26.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Aug 2022 03:26:56 -0700 (PDT) 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=FE2Ao+wj; 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]:52398 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIp71-0004t6-Gg for patch@linaro.org; Tue, 02 Aug 2022 06:26:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIohM-00053O-CY for qemu-devel@nongnu.org; Tue, 02 Aug 2022 06:00:24 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:39846) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIohF-0006DO-Sr for qemu-devel@nongnu.org; Tue, 02 Aug 2022 06:00:24 -0400 Received: by mail-wr1-x436.google.com with SMTP id m13so13247284wrq.6 for ; Tue, 02 Aug 2022 03:00:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=g/o8m65biskhxapd/iISMtVnr5sb7Kumaq7aeEYhX/o=; b=FE2Ao+wjb6GPA5O7wRZp3M7kNFyPGOHF6bqGoRhTMopmkkbvxB0NLwpfUggyEzoC2D 8b8T0fAjMHohk9l5a8NS3isgVN1n303Sim3crVbuukDMcQ19uI+1Hw5LZiwXwA+QHk82 HeYKn+BtOQKTmrbYVhkoEuC9edXso69+cAeqbkK31YvSu8bTdX7tixAkDKfi6nIvx+IN +5cxmtqFnvQMzKFEdkXuwJ4vMzqeBSDfdQA8PK3MYTB0K/ohWj/OH1gDMoskStjKuXME roNu0oeZS/+/iAS9E8N4Qd0ql9fmGwps2hDRPm+oMRuCQ9o8ZSsuzpS4+MTOYIsf048Y Wpdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=g/o8m65biskhxapd/iISMtVnr5sb7Kumaq7aeEYhX/o=; b=13oytQljbEZt4W3lSlvLwAgB5LMU+ZQON6alHEKR2eBtiJmIlepWxWvuyw0E8TNmqS 0RM9dKFQo7xnK7QSDb25EVRipSDMrRwAthu+4VnbQxtnejCCnqAKoGjWjSeKtMq01uxa gudZfhD/dZRX2gYd9/+EAg8w+/O4Zg2+thPVru7QAjQcI/VXnlflFPta6JjZhveOLSRt Vy/pgFifmbq14PRDuK8m7xKvSiC42WSwe1HkMmkgnyPvzXX82Y5IEc1FWFdbbc/9IlCW ZXxx5NXzm/ptAVydNCxTjRJOnAXu8Zo0Fc0jlfGmlhWK2XivxRPqtUfXXVln+JQUBSO7 1bjA== X-Gm-Message-State: ACgBeo3fxs0TtAfdLivm4D47t/l3lh2UkLYMhaC1AUNLT0NHQ5GvBnIm V0AMAe59sn5qWHF2CxQ0FlsbSA== X-Received: by 2002:a5d:634d:0:b0:220:5ff7:3969 with SMTP id b13-20020a5d634d000000b002205ff73969mr6642871wrw.709.1659434416540; Tue, 02 Aug 2022 03:00:16 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id p8-20020a05600c1d8800b003a2e655f2e6sm1290939wms.21.2022.08.02.03.00.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Aug 2022 03:00:14 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 650651FFCC; Tue, 2 Aug 2022 10:50:12 +0100 (BST) 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, =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , Laurent Vivier , Paolo Bonzini Subject: [PATCH v4 20/22] tests/qtest: implement stub for VHOST_USER_GET_CONFIG Date: Tue, 2 Aug 2022 10:50:08 +0100 Message-Id: <20220802095010.3330793-21-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220802095010.3330793-1-alex.bennee@linaro.org> References: <20220802095010.3330793-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x436.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, 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We don't implement the full solution because frankly none of the tests need to at the moment. We may end up re-implementing libvhostuser in the end. Signed-off-by: Alex Bennée --- tests/qtest/vhost-user-test.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/qtest/vhost-user-test.c b/tests/qtest/vhost-user-test.c index 4af031c971..61980bfc6a 100644 --- a/tests/qtest/vhost-user-test.c +++ b/tests/qtest/vhost-user-test.c @@ -79,6 +79,8 @@ typedef enum VhostUserRequest { VHOST_USER_SET_PROTOCOL_FEATURES = 16, VHOST_USER_GET_QUEUE_NUM = 17, VHOST_USER_SET_VRING_ENABLE = 18, + VHOST_USER_GET_CONFIG = 24, + VHOST_USER_SET_CONFIG = 25, VHOST_USER_MAX } VhostUserRequest; @@ -372,6 +374,17 @@ static void chr_read(void *opaque, const uint8_t *buf, int size) } break; + case VHOST_USER_GET_CONFIG: + /* + * Treat GET_CONFIG as a NOP and just reply and let the guest + * consider we have updated its memory. Tests currently don't + * require working configs. + */ + msg.flags |= VHOST_USER_REPLY_MASK; + p = (uint8_t *) &msg; + qemu_chr_fe_write_all(chr, p, VHOST_USER_HDR_SIZE + msg.size); + break; + case VHOST_USER_SET_PROTOCOL_FEATURES: /* * We did set VHOST_USER_F_PROTOCOL_FEATURES so its valid for