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.133.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 6AB381DF963 for ; Thu, 11 Dec 2025 07:13:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765437186; cv=none; b=Ob6E/MEivI/r1K6+FDgrsqgxIpb/fQC4Y9DJ58Z5cL5z+9vYPYKJV2t7jcSYYbpCYIp+DRpwGPgyU/eCjZ1D0M8xXgIzrmG0Vl6GZRzqk4fcL1VJbJY7wlRlOHs0Hd9BihXZ1NjA9auENx50F3+GXYswpjC86euN/C9LC0DWQJY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765437186; c=relaxed/simple; bh=5O6gfoiqu7zl7MI+AkNAqQRORg55DnnzdXIZ0kgrUhY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=IYMrVTez9NHTydCNB8SmVTct8XFLVBtFiz2+550zZj4+B2SuQFCe+nkwxIPngVdFH0QlZboXLtJPIbbziSIl+HUDZYH0cqjDpV2WjJlSRIx7Mk/L4hKZ3IkRN903klWXfYRAKqcLFYr01azrtozgKuetKyfTqNY2mfB4QMYi8b4= 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=Jo8maEKq; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=D3A4kt/s; arc=none smtp.client-ip=170.10.133.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="Jo8maEKq"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="D3A4kt/s" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765437181; 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=v3cMBVAe34zCfUEjMJd3Yg8WL57AHfV+19MqgBfdOTA=; b=Jo8maEKq4iuJhk+p7m06Ak4u+gsn/geAnPsloscMRU4l2p5aImEYEYQCPGibZ//FVvCRoY iraf8RJSmOQ46kAP61YIs3C8Bk46IMBZXLxVQukdzSh/kjs/ZvSD8xaZjCqmHIgGCt5SK/ UDz9TYdrmDkg+bJ/uye85dGMc6RM96w= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-580-Q4iOoTZuOhKF7JPQtYG5gw-1; Thu, 11 Dec 2025 02:12:59 -0500 X-MC-Unique: Q4iOoTZuOhKF7JPQtYG5gw-1 X-Mimecast-MFC-AGG-ID: Q4iOoTZuOhKF7JPQtYG5gw_1765437178 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-42e1e1ca008so885329f8f.0 for ; Wed, 10 Dec 2025 23:12:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1765437178; x=1766041978; 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=v3cMBVAe34zCfUEjMJd3Yg8WL57AHfV+19MqgBfdOTA=; b=D3A4kt/s1KSYZN+g+LAeliARxg9S3fX1/G9Xy28CovGP+TkgybQgdoyFSGjTyn4GIL ApPm7lzK0XLCZ9BDfjQXVpO+PMIYzmDSiykJtrflWC23ny0HEOQzNQHsWH3CYbKFdLGj WG6jQWYp4STpxfNg1jZRsPm/+Jn3XSVaYA+Clqi8lvG88j9hHJgbCj/LyElI+/UPBKVe EO+mFqKR7PDwqHgQKrZ78Abc2FAgh3NtUyukeHFdWRPtb6yHtyaqU4mGL9rl/z/fxY0i nyiXZ3fiQ8RseMnR4WOW3kYbeIIwIoHDcy49u9aYtAeuwtMLAJ/2tilYCbmzSwlU2FLH FN9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765437178; x=1766041978; 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=v3cMBVAe34zCfUEjMJd3Yg8WL57AHfV+19MqgBfdOTA=; b=Xkodx8ou8hNyL01q5ZtgD8Sk+k3rIua5SDOiheRyVWyeqfBlcqM3dK/I67fG3nAhFn O9l0w627pjXDruo+umOGZ4U8hPNUvA6aAnMltm8/awCaP8YDmXYpU5mrrTzN3yZYzt+9 urfp3s25/amO2n+WrGbTKRsaA6KrbWW6pWHT6ZVvQkHSpWP5CK8FgbFKA7waHBzjW8In hltMMICz18pzd8F8nWAE0hu3x5YiEY/g1Vyqt5mrW1mzEbt+Td3lJ0Kx7LFlBdfgo6ak nKAxydmJinS5NP/rAaF1A3jzCe+/tQSWLmv/HaNO1X/Q69Uyxp3+sifVBOCsso+64vlA fjPg== X-Gm-Message-State: AOJu0Yw+io9BJaWu6gK3G9U+YxjjbJx6/JykkgEvtjfGt0fzkHYyKLJb N3CINClq0k3L+bJ3Cu5N/Op/M+iBT3M8asPu88jCPUpK8RY038C6Xt9BXlMl4o70Ds4jlY38/3V 3mUF6ImHhTA8zjHn1LMeJLAYgkBc89m+wbhpfSoqD+lyq5kF+Ce0uSWI2QsfPtUfssurXiSZ0Sg == X-Gm-Gg: AY/fxX4AHw3UvTXxGxmfVitKTuDKxOWesjYxDID3NeXpphnNPtPFw4UKqFLYzWQd1Nk YTse3IEiW2xweVYcr9jBYHCUkTHLSxrJmOaz1/RwMi+KXGbL676ifGrxrHCRv8+JUxEaYdCypBD SYMCnThxuPDrUrfjnqY+kb+isq2zCkec5lvY0ApWg4e5Wb5lb5lzMGqezTIwdjAs6reHdMRzShf gZSpqlXs9N2n1o+hx0pWTUo1VZ77fbHEl5K/In5cyE3BgZyyQrexIj6Hkf0y7CVM5BLJcqh3oUF b6/FHb5gAoubWI3TJMXmYy6MzLnmXi4/Xj6rs5aRy1SDCB6BLa8dsGxoySLlN3jhHdkuWqaE2pC Eo2AW3ttCSc1EnA48ZHjZyQFfKZfZfs8= X-Received: by 2002:a5d:5f45:0:b0:42c:a420:e755 with SMTP id ffacd0b85a97d-42fab31cb50mr1018980f8f.23.1765437177815; Wed, 10 Dec 2025 23:12:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IGsRQb3dc0zrujevNh5F8A5JyRrJgwU0E9KIhEHs1g4Ij2vfYO5/MNTzGT1VdTYMn9H/dSoqw== X-Received: by 2002:a5d:5f45:0:b0:42c:a420:e755 with SMTP id ffacd0b85a97d-42fab31cb50mr1018937f8f.23.1765437177238; Wed, 10 Dec 2025 23:12:57 -0800 (PST) Received: from redhat.com (IGLD-80-230-32-59.inter.net.il. [80.230.32.59]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42fa8a70440sm3800667f8f.16.2025.12.10.23.12.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Dec 2025 23:12:56 -0800 (PST) Date: Thu, 11 Dec 2025 02:12:54 -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: <20251211021233-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. Can I get an Ack then? > 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 > > > > > > 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 > > > > >