From patchwork Tue Jul 26 19:21:48 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: 593475 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b811:0:0:0:0 with SMTP id fc17csp3824609mab; Tue, 26 Jul 2022 12:39:47 -0700 (PDT) X-Google-Smtp-Source: AGRyM1udmYX7h813Cmpid94HN+j5zLZFZwrnzrudvx+irZPCUOUkBhfKq4toRhXh/jFY79kLrF1k X-Received: by 2002:a05:620a:44d3:b0:6b5:f5b7:8d6c with SMTP id y19-20020a05620a44d300b006b5f5b78d6cmr13956175qkp.319.1658864386957; Tue, 26 Jul 2022 12:39:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658864386; cv=none; d=google.com; s=arc-20160816; b=pVB7j/gFf3OXIXZ7BPl671W07aUfbqQnKiVDZ2rVoJfaeAwtydLjrpFBzl5Wa37N96 ++8Z9PrHl6ORMCAcUUJ1IaN7qb15JJaYAkhKF27fEdpw6lPHG7g9qmtNHmiu3XyBMNPm m66ocA65WBTgYDWxAn3vCwm34X1F9Kq7Uv2+0TkX9LRvk7DGyJSqAivxqonPSIMoFzrD GPCKHlyIV62Y5K+62zTMSzrlCIiT1ac9CHIMETC7m7wpMIe6CpB/3JS282ZLPshGiyx7 Pjga/srCrjfdZ6SBXGW8Ya/5HuE7yiwbAEYIDxHDzhKQiw0ZAqWGwoPDdjfNHjmqUdSR kpdQ== 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=rl0O1YheXmW1bsLsAb9xdN1lTiPRuwoCT3J2uA8qCzzBgPxBmtbqwShjwZy28Diu0x DS8AJ4zu3fVTrDj0royEBK6Y8+gOnLfZeXAFwd2oF3NBVUTSPT+aR0KHkyxruaICBqPo J3NQHXv28zXGJbiFR/BTTx0m/M/H6w2d3fkzc2nOBCPRFU6nMJ6z+8AevBSmDaW699JT TCtuZDssIdgkG7vtqUZaCVjou7VboXzLVB6ZY5YUHa5o9igZ0GaV7D/3zu2WMdM44aF5 qxAgwFMBdIp1dga2w+0QIKlj8TlTsX0O3i/nzj/vHD9mehzZFz2ofCFukhBlDKRr/pkc MQlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CP7lN+Tm; 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 x11-20020a05620a448b00b006b5da5fade8si12314931qkp.54.2022.07.26.12.39.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Jul 2022 12:39:46 -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=CP7lN+Tm; 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]:48592 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGQPC-0003gp-GG for patch@linaro.org; Tue, 26 Jul 2022 15:39:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49136) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGQ8H-0003Or-J5 for qemu-devel@nongnu.org; Tue, 26 Jul 2022 15:22:18 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:41555) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGQ8F-0002PG-VR for qemu-devel@nongnu.org; Tue, 26 Jul 2022 15:22:17 -0400 Received: by mail-wr1-x429.google.com with SMTP id q18so11037760wrx.8 for ; Tue, 26 Jul 2022 12:22: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=CP7lN+TmZ3Pujh0mILQ2/noel6Xy+f6GVEdKkt7wPZTgcLy/3d+waBOSwnEauerGe6 GTIb4KE6LeUH6OvLAHCy0fVRV7IpoaC9KaD+glw+HCFliTQxbMQg0jzOLRR9/95aZ3r0 IxFp7nQuc0GqtVn3EuVklVS9wJtUhK6nmTvTbhPxhnDphkcrpFmDGE/CmOlvskhT7LAP HYt4hxlaYSVzFYeBux39dxQ5jz9MBSV7xv9HeGKEQKQvGN//IqlGthWESbN5kJVuvVgZ YbcQZaUAc97TozDJikyVxPRwbF3B2OWdkM8FjLFp7BsONr64zsCFSwxrbRDSq/0E/wmR LWRA== 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=RZ0oEyPvpBlaAdlG+ddP9govW8pEHRFlmBhskcsU7tFdF6sP8eZcXLELkRCbsI5uA7 01LIH7Lr2wbWhTW3qNscX6LoVfu1ETQNFsCKyQv7fRgayXhy3JMjXMUhI+hqx7rvxnk6 0e+V4vSTS7xS5sYYZaPKNx7qVUE2WFrz8x8RExX/9NIhJ2J85XJ2MJxj/9+K9fnRxCwz 8UMUBSwUacnNNdfTBJ8iDDrA4Jxujfxz3q6Rc7phVurDnVGjEqC+Q2RUYnC0oxH4X92Q EW8Tj135XEHJEo4OjahXOaeHSlerU1F/DzSP9t+QwSyg8ZMKUdxbeXNSatN38wCxYDOS tP4g== X-Gm-Message-State: AJIora+bmsr5g90rxNmeK1LlPBJC+XZsYm0uawbDIgooECBOG2zTNlna hv6BQ17bXFL48Z4xWOR5nGZlCA== X-Received: by 2002:a05:6000:1547:b0:21e:5be2:9ed3 with SMTP id 7-20020a056000154700b0021e5be29ed3mr11929957wry.459.1658863334633; Tue, 26 Jul 2022 12:22:14 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id p20-20020a05600c1d9400b003a3561d4f3fsm9574115wms.43.2022.07.26.12.21.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jul 2022 12:22:07 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E1F9F1FFCB; Tue, 26 Jul 2022 20:21:51 +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, mark.cave-ayland@ilande.co.uk, jasowang@redhat.com, =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Thomas Huth , Laurent Vivier , Paolo Bonzini Subject: [PATCH v3 19/21] tests/qtest: implement stub for VHOST_USER_GET_CONFIG Date: Tue, 26 Jul 2022 20:21:48 +0100 Message-Id: <20220726192150.2435175-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220726192150.2435175-1-alex.bennee@linaro.org> References: <20220726192150.2435175-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x429.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