All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Cédric Le Goater" <clg@redhat.com>
Cc: qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	Cornelia Huck <cohuck@redhat.com>, Song Gao <gaosong@loongson.cn>,
	Avihai Horon <avihaih@nvidia.com>
Subject: Re: [PATCH] update-linux-headers: Inject VIRTIO_RING_NO_LEGACY in virtio_ring.h
Date: Mon, 11 May 2026 07:42:55 -0400	[thread overview]
Message-ID: <20260511074232-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20260511111913.3327672-1-clg@redhat.com>

On Mon, May 11, 2026 at 01:19:13PM +0200, Cédric Le Goater wrote:
> The kernel commit 3c4629b68dbe ("virtio: uapi: avoid usage of libc
> types") changed the virtio_ring.h header and this breaks the build on
> Windows which requires the uintptr_t type to cast from pointer to
> integer.
> 
> Inject '#define VIRTIO_RING_NO_LEGACY' at the top of the synced header
> via the update script after the include guard. This discards the code
> section incompatible with Windows.
> 
> Signed-off-by: Cédric Le Goater <clg@redhat.com>

Acked-by: Michael S. Tsirkin <mst@redhat.com>

> ---
>  scripts/update-linux-headers.sh | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh
> index da367acee790657e33c71c10bc118b085774f45d..3c3a0e9394d277766e613dd5ef4e9c7407ec0033 100755
> --- a/scripts/update-linux-headers.sh
> +++ b/scripts/update-linux-headers.sh
> @@ -104,6 +104,7 @@ cp_portable() {
>          -e 's/__kernel_ulong_t/unsigned long/' \
>          -e 's/struct ethhdr/struct eth_header/' \
>          -e '/\#define _LINUX_ETHTOOL_H/a \\n\#include "net/eth.h"' \
> +        -e '/\#define _LINUX_VIRTIO_RING_H/a \\n\#define VIRTIO_RING_NO_LEGACY' \
>          "$f" > "$to/$header";
>  }
>  
> -- 
> 2.54.0



      reply	other threads:[~2026-05-11 11:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-11 11:19 [PATCH] update-linux-headers: Inject VIRTIO_RING_NO_LEGACY in virtio_ring.h Cédric Le Goater
2026-05-11 11:42 ` Michael S. Tsirkin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260511074232-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=avihaih@nvidia.com \
    --cc=clg@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=gaosong@loongson.cn \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.