From nobody Thu Dec 18 08:06:55 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1665424985; cv=none; d=zohomail.com; s=zohoarc; b=guw+2bY+8UJDOkVcM7t1l9xSyadZDvs4Rj1+zFnJN/Dsch7gNHAuRNHEZZxfGn7ZbbrxD1JRKA7FDc6wcxqXSeyLPA3Oi8VmdA4DAbFUZGP+qL6TkCTt9/7p+i3Cs9AUJTVDh9TuVyVMXRTS1kClY2E5+7g9Es/f1jMre42ahww= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665424985; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jmsSQG3tgR/SeJWv4vUdgBQ5eNjunHANNe2NjKH/GKc=; b=gnKbiyv7Ho6NcrN3uBdI5LcYW5cmRCCE9G+AuINqQZb8VguHDJkhbYXYR8bM4cA1U0M2ACg/0WLx0HuJMrjGoBhCBcFimDx3Bfx7a7OlBJTcfKPAcNPUcM73zSNY5a7S87fXC4bWIt+YOK0h/MIfSQFzQL7cMyPhArFZwtjFsWk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1665424985652912.8495015562569; Mon, 10 Oct 2022 11:03:05 -0700 (PDT) Received: from localhost ([::1]:41302 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohx7H-0007Kw-EK for importer@patchew.org; Mon, 10 Oct 2022 14:03:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46178) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohwbM-000218-Al for qemu-devel@nongnu.org; Mon, 10 Oct 2022 13:30:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:51519) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohwbH-0006fp-NN for qemu-devel@nongnu.org; Mon, 10 Oct 2022 13:30:03 -0400 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-477-y8tcy04lOGeE4Za_ITBT0g-1; Mon, 10 Oct 2022 13:29:58 -0400 Received: by mail-wm1-f72.google.com with SMTP id i5-20020a1c3b05000000b003c47c8569easo4143228wma.1 for ; Mon, 10 Oct 2022 10:29:57 -0700 (PDT) Received: from redhat.com ([2.55.183.131]) by smtp.gmail.com with ESMTPSA id u19-20020a05600c19d300b003bf6da9d2cesm15887970wmq.28.2022.10.10.10.29.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Oct 2022 10:29:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665422999; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jmsSQG3tgR/SeJWv4vUdgBQ5eNjunHANNe2NjKH/GKc=; b=bv1zbCC1joPeY513Fli5YVjjtN0Fw/dkyjardc8OD7yJVMtBYIH3FTIAvIIINGtNFKoAS2 kBN5lnw4TU+WwwvvJwUigNQBVpUxRYTrDuU61cRKFlB3xzUg+jnyTS3CdO6aG2lhvwIq0C xPIwjukd5zoMWq3FydVdpqWRpFSfdao= X-MC-Unique: y8tcy04lOGeE4Za_ITBT0g-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jmsSQG3tgR/SeJWv4vUdgBQ5eNjunHANNe2NjKH/GKc=; b=mloUVSgYFjf5iQwjKwyoioSXvaRyqVktEV5hIcH0vL3a4ODHl58KdDBrv/DhW3SqQL ZCLQti70M2KbpDyOxFxjFqyFpoLf2fesgbNMJf8Rjf0gc9y8QpFRsXO3R5gqUFjNJbRT gicpQN4Rl05BfYWznu6wB6+aJ7mdZFrGnDy0sKaFb5KOITJRaEnrTwu7d47Nq4h6IeNK 7etyeEGQ2uI0/9Kpejomg1BBsrLQr60SV6BQ+YsJW8W8N3hwLFgIifWKAY44gLlH/HcO OtZWdMDsLZyv8MVhWh47mt0eXA9FYinnamY2WT+4yE3b9Lynx+ainYguDKhHfpuAf9iK +sTg== X-Gm-Message-State: ACrzQf23O+1j6Or5x0FEY1oxyzdlOfiW/bEQO+XyjOA8dOx9jB3hWqpg /m087sYUG5CNYKNOad4Ix5ti3f8zeGhDfIvRwtIfNHNvA7I9LnKoIv93QDKqvSPFiGuPY5iRkcX 1ivuxs0WmtIJHzV1jpzlfsnMS/4/ZqnS3V6bZ3t2f/aFZB3EQ85gGnJkM+JmM X-Received: by 2002:a05:600c:a09:b0:3b5:2f6b:c7c5 with SMTP id z9-20020a05600c0a0900b003b52f6bc7c5mr13385641wmp.141.1665422996017; Mon, 10 Oct 2022 10:29:56 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4FmHxJF736rb5iIVLjVTMzfMFrxR8ya/9qffebxLtQdXawZ5s0TEAcuXjALd+ICNeYzLSTOQ== X-Received: by 2002:a05:600c:a09:b0:3b5:2f6b:c7c5 with SMTP id z9-20020a05600c0a0900b003b52f6bc7c5mr13385616wmp.141.1665422995721; Mon, 10 Oct 2022 10:29:55 -0700 (PDT) Date: Mon, 10 Oct 2022 13:29:51 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Alex =?utf-8?Q?Benn=C3=A9e?= , Thomas Huth , Laurent Vivier , Paolo Bonzini Subject: [PULL 17/55] tests/qtest: implement stub for VHOST_USER_GET_CONFIG Message-ID: <20221010172813.204597-18-mst@redhat.com> References: <20221010172813.204597-1-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20221010172813.204597-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1665424987062100001 From: Alex Benn=C3=A9e 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=C3=A9e Message-Id: <20220802095010.3330793-21-alex.bennee@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- 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 a99f55ed84..3052386634 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 =3D 16, VHOST_USER_GET_QUEUE_NUM =3D 17, VHOST_USER_SET_VRING_ENABLE =3D 18, + VHOST_USER_GET_CONFIG =3D 24, + VHOST_USER_SET_CONFIG =3D 25, VHOST_USER_MAX } VhostUserRequest; =20 @@ -372,6 +374,17 @@ static void chr_read(void *opaque, const uint8_t *buf,= int size) } break; =20 + 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 |=3D VHOST_USER_REPLY_MASK; + p =3D (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 --=20 MST