From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C959C28B4FD for ; Wed, 10 Dec 2025 07:01:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765350109; cv=none; b=gSsj/KiiLzkf4pYW/YCxOivB3P4sjWKGf9Drk8XJJIFO3cHGTHwJ7FjWJF7zMa0S2x4ZKyFAlaHQYJx3t2rl81LNENjma1pMJr1763P/tAM/KDcy8a+Mo2vExHBNxJ6ErRz/r/Oo0TMWetLcpHmz+c4R2iAIkscW4WT8rTLtEgU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765350109; c=relaxed/simple; bh=gibbgAxI7cZAdCz+ugRHbf3iB61X+HkRWsWttHJKwbo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Zg7j6clOgV0XaXf8gfeek3TL7bpVYT9X8xMrtJhKaAfFfd5BLnDZh7LWwzLoH+D/Ab7yFY7NpAD6fJbVidSvrjfX+xcflSv4z3OHbR3vvFaL+6OQIr6clpFL0bNxZtlbyKGsAQbVoLD8u0nCcIG1vSJE1M4WdFTDv7/IwiDkjvw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=D4TbrSG1; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=ADhkFUwJ; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="D4TbrSG1"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="ADhkFUwJ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765350105; 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=zX/e8bRTTjVFt97WaH+e1WJ6OfAsE6amXFqYYu2rFLM=; b=D4TbrSG1gzU5pFYxnbJs6xQaL3nvVi7rm1BvmKo3qJxE7+itf5JKUXhsElOCYIvNjpgI9k RbWHQw7sRfBiJ+Td5/tZaDEOM12yamFiFSs5OTp1UZccy7nZOGxitC9dsAkcnBukDgtpUQ 69KaWyAdmNIM5yHapKJLXmNLlvf2knQ= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-649-1jSFU7klPay-qKoMHYWA1w-1; Wed, 10 Dec 2025 02:01:43 -0500 X-MC-Unique: 1jSFU7klPay-qKoMHYWA1w-1 X-Mimecast-MFC-AGG-ID: 1jSFU7klPay-qKoMHYWA1w_1765350103 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-477563e531cso41731835e9.1 for ; Tue, 09 Dec 2025 23:01:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1765350102; x=1765954902; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=zX/e8bRTTjVFt97WaH+e1WJ6OfAsE6amXFqYYu2rFLM=; b=ADhkFUwJazAOhB47YOaj2cF1RWWgg9Zf364j7w5fo3SC3hNFefrugBgtEoR+PGlDvi vxc7zStDBZzYuAAp3AlR+yHX8P0TnPbrKCbrdyDLtbau2Fes6fsU8Bc6pD5BubQAP30X 8KxwIJybBDbvQdvuT54bNdwFaMv9OpGigfSJ3Wt72nNtmLCs62sqlU1DF1wGtpeHfW7J Zh9oyAQDZpQEykNwF8b2MLWHPIMJh23IGcWZ8b85BjF4vY4zSIKrLUU3C9LqluBLkacF 2yfWJCaG4U9nQMA77o/c9BIWhfWY0jK0vNSzjt2abVIKtp79f4OdT3Lgr+Mhr0W3Mxm6 /VsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765350102; x=1765954902; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zX/e8bRTTjVFt97WaH+e1WJ6OfAsE6amXFqYYu2rFLM=; b=lnyNTLIWHGDeX9sux7YKtGNezh5oKW6ni7CALUbGSf514TrQONK7skkXa7Q34CMJIr Jz2GGeR+9/W3Ca/Pgis75Y8bO+u4ygW8mhlK0SxE+vVMEGS3VXzCQIG9WXgzPZj9jHKD 9xZwVpGKcNNRuU5KyTgmLjGZQZDgOuwt6xFm8qLb61C9XLmMgF7Jq2qq/1CEgI5pGc8l bSdpevCCFPQWEY7njtBPZt7yt0ubZfEpGMztfcgXP/+KyhuV+//9PM2a9Z0fWZeev4vS XXT7ilIsaaJjIFrCTC0YDsaUHu+nHsOtWg6m0jC9ydQIho2b0oOGRq5XP9G6td9qePzn Wzbw== X-Gm-Message-State: AOJu0YybpucGpqzGQeU5Q0cMGCORZLtcoAupcCicYuE+ChqfInwvI0Yq qdc0w9nrx/HmDhZzm++YgsXM+Vi4B6MhBv7JwKZqrDkxVV3S4w2RLaNlyfO4qccfWluPK62zNyb mXwICL5o+caQdhJTn221Ic7jljx7KH0j99LqyIZgZ6+Au30rJJs1Jt6hiwcTRn0+ZKg== X-Gm-Gg: ASbGncsKd0rGnfkIEDyMfpa9oKHHBUXNrwsdkXBbp5tWROWb7V/iVYFBCWrkb/Podwh e448tATybj/sABRetFR2ZxIr3GTxuBgtF0p+jxwGB1S3eemIH/QGzF96O8JM/NWwBbEkLQNcfx6 d+wZlnRRCpLR4Ub6tTB0ELn1brept2bsVl3H2WXebGVpYNAnSJS8eKCnGMhBFsm4SEmxk75f85v +rcU4Tg+O8na6t4eOt9UCbGww3teLHFPtEqMF4NQ5qQW0q9UeWZLLKCEZXzizXfY6IWxG8gaPzX JpgcObhYqvIl5Nh1JjhNTNlXPZg2KswsLhG0pj5iOMWFH5FlisOnXcvEBKyn/xJLlUirFUPPpK2 6zvjtWdHXjQVAeCu48olfPXPf2krZPTc= X-Received: by 2002:a05:600c:1c93:b0:477:63db:c718 with SMTP id 5b1f17b1804b1-47a8380ca45mr14384205e9.16.1765350102354; Tue, 09 Dec 2025 23:01:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IEqmrQ6MzJUQ/LqJShkvMtV8AofINZuLnCxqbR6YZxwtI2MI+IWASHHwvubI2JNq7YbkXKiyA== X-Received: by 2002:a05:600c:1c93:b0:477:63db:c718 with SMTP id 5b1f17b1804b1-47a8380ca45mr14383755e9.16.1765350101819; Tue, 09 Dec 2025 23:01:41 -0800 (PST) Received: from redhat.com (IGLD-80-230-33-27.inter.net.il. [80.230.33.27]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47a82d2734fsm27508565e9.6.2025.12.09.23.01.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Dec 2025 23:01:40 -0800 (PST) Date: Wed, 10 Dec 2025 02:01:38 -0500 From: "Michael S. Tsirkin" To: Jason Wang Cc: linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: Re: [PATCH 00/14] tools/virtio: cleanups, fixes Message-ID: <20251210015855-mutt-send-email-mst@kernel.org> References: <20251209080926-mutt-send-email-mst@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Wed, Dec 10, 2025 at 02:24:02PM +0800, Jason Wang wrote: > On Tue, Dec 9, 2025 at 9:09 PM Michael S. Tsirkin wrote: > > > > On Thu, Dec 04, 2025 at 01:46:01PM -0500, Michael S. Tsirkin wrote: > > > Recent virtio changes brought about build errors for tools/virtio, > > > as usual. I did some refactoring to hopefully reduce maintainance > > > load going forward. > > > > > > Adding stubs is tedious and seemed a perfect fit for cursor - > > > so I used it for that, then rewrote some commits and accepted > > > others. commit logs I've rewritten. > > > > > > Found and fixed a couple of minor bugs while doing this - that > > > part's all mine. > > > > > > Jason, any feedback? > > Looks good to me. But I wonder, it looks like synchronization will > become more and more a burden in the future, I wonder if it's time to > switch to using uAPI instead of trying to reuse kernel virtio core to > test vhost? > > Thanks Nothing prevents you from adding more tests, for sure. UAPI - will likely not get us there. But if you have the energy to add selftests, maybe. > > > > > Michael S. Tsirkin (14): > > > tools/virtio: fix up compiler.h stub > > > virtio: make it self-contained > > > tools/virtio: use kernel's virtio.h > > > tools/virtio: add struct module forward declaration > > > tools/virtio: stub DMA mapping functions > > > tools/virtio: add dev_WARN_ONCE and is_vmalloc_addr stubs > > > tools/virtio: add ucopysize.h stub > > > tools/virtio: pass KCFLAGS to module build > > > tools/virtio: add struct cpumask to cpumask.h > > > tools/virtio: stub might_sleep and synchronize_rcu > > > tools/virtio: switch to kernel's virtio_config.h > > > virtio_features: make it self-contained > > > tools/virtio: fix up oot build > > > tools/virtio: add device, device_driver stubs > > > > > > include/linux/virtio.h | 2 + > > > include/linux/virtio_features.h | 2 + > > > tools/virtio/Makefile | 8 ++- > > > tools/virtio/linux/compiler.h | 6 ++ > > > tools/virtio/linux/cpumask.h | 4 ++ > > > tools/virtio/linux/device.h | 8 +++ > > > tools/virtio/linux/dma-mapping.h | 4 ++ > > > tools/virtio/linux/kernel.h | 16 +++++ > > > tools/virtio/linux/module.h | 2 + > > > tools/virtio/linux/ucopysize.h | 21 ++++++ > > > tools/virtio/linux/virtio.h | 73 +-------------------- > > > tools/virtio/linux/virtio_config.h | 102 +---------------------------- > > > tools/virtio/oot-stubs.h | 10 +++ > > > 13 files changed, 82 insertions(+), 176 deletions(-) > > > create mode 100644 tools/virtio/linux/ucopysize.h > > > create mode 100644 tools/virtio/oot-stubs.h > > > > > > -- > > > MST > > > > >