From patchwork Wed Jan 18 20:27:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bobby Eshleman X-Patchwork-Id: 13107063 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48A32C54EBE for ; Wed, 18 Jan 2023 20:30:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230077AbjARUaH (ORCPT ); Wed, 18 Jan 2023 15:30:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230120AbjARU3y (ORCPT ); Wed, 18 Jan 2023 15:29:54 -0500 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D70F5DC14 for ; Wed, 18 Jan 2023 12:29:26 -0800 (PST) Received: by mail-pj1-x1033.google.com with SMTP id d8so234320pjc.3 for ; Wed, 18 Jan 2023 12:29:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Y8SspAPfkyjpo8sc8kHtR2b6FK9e6JUk9ZrRa3juDFE=; b=f8rHo6PO4YO5TdnLBaE4J6q8/eQpi+BGKzSxfubcJh9QNGVWzsHzRWPXSgxj5N4Kf3 GX2EQVjBJjHaSu9WVwhJ3vT9nD2AfDKI/DmbCUsyAq3T3EYUtZaeCWiJAlqYRNkechJa Tygs5lx2A69GxGBDZDA/W9G7NDGE8I5JLs6jXJYt7o5uNXrUeotsOy7aIjQlMnniw/h7 A/SS+mzACZG656qV6nSDglIaJ8aHNVGQqNgbCDOQN6yRDtohqgODdJy6mKVe7v5YK2cz JJmcsSEc0iA5+obrcFQWa31ko9Y+WHOeQt50EuaF0WBdu9U6z132iMQfrCG+5W2lZBh7 4fsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y8SspAPfkyjpo8sc8kHtR2b6FK9e6JUk9ZrRa3juDFE=; b=rl4yHYOkhzDhw4GXoTZgBKkQ+2v47944dobCyoSKn4wIfp4Z3X6XmkcRbzQaT5mylL UKJE1lbXGdN8JsTvVJiJL3sRtHn8nzBgg2m4hWCULSIDmLE68AqSNpE9QhuOhZjLLvzF pvkgf+LUlAy/nRp2mvBZvZRbBdHPMcIM6kvRV4yWfUJLxRdjJzxRZfZ7yMSoOOYpaYPA WQEv5VNzAmZClTzr+bKADGyzg7LE8bZq/0ggMGiOZrmS0RBgUTvVzHQRHvhoVjFFqR31 0hoAnQ1K8x/87GUYFsaMQCfhooWtA9hZALMadqg2IJRFAxqWN0wPLcspfl+qMJWOU63f 6kFg== X-Gm-Message-State: AFqh2koadh12BeQFlhaumZpdHWJC59tv1xzgbObmoYKqnkk+g/zI8G7u /vQdwk6FWnNOxfNRgfW8NhDElQ== X-Google-Smtp-Source: AMrXdXsJLK+EISYnk3NuapK9nUhIvsuTriY5KbmYTlcP0MQIsy0J7HnRgxhC/s4nRTR+zxmjrFzfdg== X-Received: by 2002:a17:90a:468d:b0:229:983:f3f9 with SMTP id z13-20020a17090a468d00b002290983f3f9mr25342454pjf.40.1674073765683; Wed, 18 Jan 2023 12:29:25 -0800 (PST) Received: from [127.0.1.1] (c-73-164-155-12.hsd1.wa.comcast.net. [73.164.155.12]) by smtp.gmail.com with ESMTPSA id t13-20020a17090a3b4d00b002132f3e71c6sm1724948pjf.52.2023.01.18.12.29.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 12:29:25 -0800 (PST) From: Bobby Eshleman Date: Wed, 18 Jan 2023 12:27:40 -0800 Subject: [PATCH RFC 2/3] selftests/bpf: add vsock to vmtest.sh MIME-Version: 1.0 Message-Id: <20230118-support-vsock-sockmap-connectible-v1-2-d47e6294827b@bytedance.com> References: <20230118-support-vsock-sockmap-connectible-v1-0-d47e6294827b@bytedance.com> In-Reply-To: <20230118-support-vsock-sockmap-connectible-v1-0-d47e6294827b@bytedance.com> To: Stefan Hajnoczi , Stefano Garzarella , "Michael S. Tsirkin" , Jason Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrii Nakryiko , Mykola Lysenko , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Shuah Khan Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, Bobby Eshleman , Cong Wang X-Mailer: b4 0.11.2 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Add the ability to use vsock in the vmtest.sh script and the test kernel config. Signed-off-by: Bobby Eshleman --- tools/testing/selftests/bpf/config.x86_64 | 4 ++++ tools/testing/selftests/bpf/vmtest.sh | 1 + 2 files changed, 5 insertions(+) diff --git a/tools/testing/selftests/bpf/config.x86_64 b/tools/testing/selftests/bpf/config.x86_64 index dd97d61d325ca..db5e6b9a91711 100644 --- a/tools/testing/selftests/bpf/config.x86_64 +++ b/tools/testing/selftests/bpf/config.x86_64 @@ -234,7 +234,11 @@ CONFIG_VIRTIO_BLK=y CONFIG_VIRTIO_CONSOLE=y CONFIG_VIRTIO_NET=y CONFIG_VIRTIO_PCI=y +CONFIG_VIRTIO_VSOCKETS=y +CONFIG_VIRTIO_VSOCKETS_COMMON=y CONFIG_VLAN_8021Q=y +CONFIG_VSOCKETS=y +CONFIG_VSOCKETS_LOOPBACK=y CONFIG_X86_ACPI_CPUFREQ=y CONFIG_X86_CPUID=y CONFIG_X86_MSR=y diff --git a/tools/testing/selftests/bpf/vmtest.sh b/tools/testing/selftests/bpf/vmtest.sh index 316a56d680f25..aad27ffd4ec68 100755 --- a/tools/testing/selftests/bpf/vmtest.sh +++ b/tools/testing/selftests/bpf/vmtest.sh @@ -250,6 +250,7 @@ EOF -enable-kvm \ -m 4G \ -drive file="${rootfs_img}",format=raw,index=1,media=disk,if=virtio,cache=none \ + -device vhost-vsock-pci,guest-cid=1234 \ -kernel "${kernel_bzimage}" \ -append "root=/dev/vda rw console=${QEMU_CONSOLE}" }