From patchwork Tue May 24 15:40:54 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: 575742 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:c603:0:0:0:0 with SMTP id jv3csp2425878mab; Tue, 24 May 2022 09:03:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqe6IaWAnHUBr6sdQEkGRbmb/QPrEu3606VxeSizVjJ7jUNhLLylL0Uz+KNH1XePBxd2xz X-Received: by 2002:ac8:5988:0:b0:2f3:decb:6b6b with SMTP id e8-20020ac85988000000b002f3decb6b6bmr20513902qte.289.1653408197532; Tue, 24 May 2022 09:03:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653408197; cv=none; d=google.com; s=arc-20160816; b=EZ8BYQcBdtDUJu/ymhSGq0ywXaZrQfg1Wnd1wAYcXtO/Dc/nOlT2q2utMFwPNKk4rV s6MapfPpi2WhYPlWaD3N7/IWMwcPM5YwmRdvwje0/b5qnyk6887Ja1ANEQkFaMG/7WNY UBTVf7wbZo3OXM4HkIwiUH0+gm7SfBizrmsj2CzKMHzFOJiFVqrprp40VGqvq+d+Mdem XYs52Z+RKD8YBxiLEjLTg2epaEccyhFrAaE4xiq0fdKzMinFBkMNo5rp/G5XmZQ8I4fk 4BOoXbo9qbVmKZ0BOBC6/excKlPa8R6p5av24L52uLxnv8LBfANPd5DhNNs0HqND5WdC xcSw== 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=hfKNVlrrL3u0vef+FWTAR3LbzLx2Gk+OTMM5YcoQN7Q=; b=HYv4NWQ7JpkYAeMQbRJMqoKviZ3pAhwiqHsHemSMeYjzqzXYmVBbCxTLQzXUGW3PTY TMeH5rbACm87WO3qcHfAI6ZJM5fl2ddN14rWLsodCctM/odLwKbcdzvnPEXBkokWMTpa AuGR8YjzIJrOo1d9H+GjZCNYQJ49YDEffrsqq3bxm29hxAxOkOJlO8ZxJ5+4gkhnvb1v +2fpAg2XuWoOJW3uFMDGw+nT3Vo3EnFxPdi2UQ0JyuOH8mYzKHIRI8SXkVJR8/CBcPPG TpHRvCt2QSkXwW8SYA4cEduLXeJKl1FCH+8jquZTN5HkSrPCexOnj0kFxAFrh37lfPDN gp1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="owQHW/kR"; 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 p21-20020a05620a113500b006a38b115213si2707992qkk.632.2022.05.24.09.03.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 May 2022 09:03:17 -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="owQHW/kR"; 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]:46866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ntX09-00037n-46 for patch@linaro.org; Tue, 24 May 2022 12:03:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntWer-0004LA-In for qemu-devel@nongnu.org; Tue, 24 May 2022 11:41:18 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:35775) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ntWep-0005QW-QQ for qemu-devel@nongnu.org; Tue, 24 May 2022 11:41:17 -0400 Received: by mail-wr1-x434.google.com with SMTP id x12so2027892wrg.2 for ; Tue, 24 May 2022 08:41:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hfKNVlrrL3u0vef+FWTAR3LbzLx2Gk+OTMM5YcoQN7Q=; b=owQHW/kRAB58wTje3tlWm07SzXA21elY3U42uFBe60oQRlewztfkpjz7YmVg6PB6zA /bauRLTd1k2Q3s81zHWbo2J79jhBIEHELgr97AYV+upEdGcqqOo6zuSI869Zr0hwTptX 3wEI/aillpylk1ulvGCFYkyKpT5kpAOBf0zdDTs8YZ0bYjvWMjjT9YZKr/Hk3G4PgP1h xnV3hI82zbmyXPZ7eeowiriOZBuPsz3GXzkoyfo0xectFFk5UG41kyX7Zql8QB0QA3Ng /mMTFEnIxbwlPgECPCwtSrgSlo1GqpST+/mA8LVWTecI07AH3i3Xwqwy4ALgsndaswjs VYwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hfKNVlrrL3u0vef+FWTAR3LbzLx2Gk+OTMM5YcoQN7Q=; b=zDr13bIXccctEz+kEG4COZLnyRilWcbNMbwHHSlIPj6iOtlX2YvzTmPhIlDCPbiCsD E+reaATfitx1pY7ptQc8o3vwh3iqY7ZFkd+UdxhwUdd4RrdzGLEJ7ZSJDnfgJJpqoahJ 0MTzZZMBOYN61fx6n1jDl5v02B2Y4o0/NTVRChnI/t2ru4N+2WPOiYH8QFqErmrA58Ap clVR98F1CQRDllkMHualB9SdwlqlAYTUBirNynGWrMqdNB7bc73Cu6xLnyETrOVnI127 4wiOyluZcLLlMQVIGedB4lfBomtowGYUQvzm9pRv6MZENi3oNG9PgrixZ/kuyLhZbDa/ nxCg== X-Gm-Message-State: AOAM530cptbqyTzzFK45E4HlG4wgUtRlKob3XhdnojNDMWM4DLg9AEiw QLqh7ta5ga4FhSMkvXO/ifI7ywRFwVX8eg== X-Received: by 2002:a5d:4e05:0:b0:20d:1f0:1f31 with SMTP id p5-20020a5d4e05000000b0020d01f01f31mr24130748wrt.492.1653406874518; Tue, 24 May 2022 08:41:14 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id q22-20020a1cf316000000b00394708a3d7dsm2355759wmq.15.2022.05.24.08.41.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 May 2022 08:41:09 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 820E91FFC5; Tue, 24 May 2022 16:40:57 +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 v2 13/15] tests/qtest: implement stub for VHOST_USER_GET_CONFIG Date: Tue, 24 May 2022 16:40:54 +0100 Message-Id: <20220524154056.2896913-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220524154056.2896913-1-alex.bennee@linaro.org> References: <20220524154056.2896913-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.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 db18e0b664..d546721f5d 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