Re: [PATCH v2 2/4] linux-headers: Update to Linux v7.1-rc1

2026-05-12 Thread gaosong

在 2026/5/13 上午5:30, Cédric Le Goater 写道:

Hello,


On 5/7/26 11:23, Song Gao wrote:

From: Avihai Horon

Update Linux headers to get VFIO_PRECOPY_INFO_REINIT feature of VFIO
migration uAPI.

The update was done by running `update-linux-headers.sh` on commit
254f49634ee1 ("Linux 7.1-rc1") in the Linux tree.

Signed-off-by: Avihai Horon
Reviewed-by: Cédric Le Goater
---
  include/standard-headers/drm/drm_fourcc.h |  28 +-
  include/standard-headers/linux/const.h    |  18 +
  include/standard-headers/linux/ethtool.h  |  28 +-
  .../linux/input-event-codes.h |  13 +
  include/standard-headers/linux/pci_regs.h |  71 ++-
  include/standard-headers/linux/typelimits.h   |   8 +
  include/standard-headers/linux/virtio_ring.h  |   3 +-
  include/standard-headers/linux/virtio_rtc.h   | 237 ++
  include/standard-headers/linux/vmclock-abi.h  |  20 +
  linux-headers/asm-arm64/kvm.h |   1 +
  linux-headers/asm-arm64/unistd_64.h   |   1 +
  linux-headers/asm-generic/unistd.h    |   5 +-
  linux-headers/asm-loongarch/kvm.h |   5 +
  linux-headers/asm-loongarch/kvm_para.h    |   1 +
  linux-headers/asm-loongarch/unistd_64.h   |   2 +
  linux-headers/asm-mips/unistd_n32.h   |   1 +
  linux-headers/asm-mips/unistd_n64.h   |   1 +
  linux-headers/asm-mips/unistd_o32.h   |   1 +
  linux-headers/asm-powerpc/unistd_32.h |   1 +
  linux-headers/asm-powerpc/unistd_64.h |   1 +
  linux-headers/asm-riscv/kvm.h |  11 +-
  linux-headers/asm-riscv/ptrace.h  |  37 ++
  linux-headers/asm-riscv/unistd_32.h   |   1 +
  linux-headers/asm-riscv/unistd_64.h   |   1 +
  linux-headers/asm-s390/unistd_32.h    | 446 --
  linux-headers/asm-s390/unistd_64.h    |   1 +
  linux-headers/asm-x86/kvm.h   |  21 +-
  linux-headers/asm-x86/unistd_32.h |   1 +
  linux-headers/asm-x86/unistd_64.h |   1 +
  linux-headers/asm-x86/unistd_x32.h    |   1 +
  linux-headers/linux/const.h   |  18 +
  linux-headers/linux/iommufd.h |  48 ++
  linux-headers/linux/kvm.h |  46 +-
  linux-headers/linux/mshv.h    |   4 +-
  linux-headers/linux/psp-sev.h |   2 +-
  linux-headers/linux/stddef.h  |   4 +
  linux-headers/linux/vduse.h   |  85 +++-
  linux-headers/linux/vfio.h    |  30 +-
  38 files changed, 711 insertions(+), 493 deletions(-)
  create mode 100644 include/standard-headers/linux/typelimits.h
  create mode 100644 include/standard-headers/linux/virtio_rtc.h
  delete mode 100644 linux-headers/asm-s390/unistd_32.h


The linux headers update needs to be regenerated with this fix :

https://lore.kernel.org/qemu-devel/[email protected]/


Got it , we will add this patch.

Thanks.
Song Gao

Thanks,

C.





Re: [PATCH v2 2/4] linux-headers: Update to Linux v7.1-rc1

2026-05-12 Thread Cédric Le Goater

Hello,


On 5/7/26 11:23, Song Gao wrote:

From: Avihai Horon

Update Linux headers to get VFIO_PRECOPY_INFO_REINIT feature of VFIO
migration uAPI.

The update was done by running `update-linux-headers.sh` on commit
254f49634ee1 ("Linux 7.1-rc1") in the Linux tree.

Signed-off-by: Avihai Horon
Reviewed-by: Cédric Le Goater
---
  include/standard-headers/drm/drm_fourcc.h |  28 +-
  include/standard-headers/linux/const.h|  18 +
  include/standard-headers/linux/ethtool.h  |  28 +-
  .../linux/input-event-codes.h |  13 +
  include/standard-headers/linux/pci_regs.h |  71 ++-
  include/standard-headers/linux/typelimits.h   |   8 +
  include/standard-headers/linux/virtio_ring.h  |   3 +-
  include/standard-headers/linux/virtio_rtc.h   | 237 ++
  include/standard-headers/linux/vmclock-abi.h  |  20 +
  linux-headers/asm-arm64/kvm.h |   1 +
  linux-headers/asm-arm64/unistd_64.h   |   1 +
  linux-headers/asm-generic/unistd.h|   5 +-
  linux-headers/asm-loongarch/kvm.h |   5 +
  linux-headers/asm-loongarch/kvm_para.h|   1 +
  linux-headers/asm-loongarch/unistd_64.h   |   2 +
  linux-headers/asm-mips/unistd_n32.h   |   1 +
  linux-headers/asm-mips/unistd_n64.h   |   1 +
  linux-headers/asm-mips/unistd_o32.h   |   1 +
  linux-headers/asm-powerpc/unistd_32.h |   1 +
  linux-headers/asm-powerpc/unistd_64.h |   1 +
  linux-headers/asm-riscv/kvm.h |  11 +-
  linux-headers/asm-riscv/ptrace.h  |  37 ++
  linux-headers/asm-riscv/unistd_32.h   |   1 +
  linux-headers/asm-riscv/unistd_64.h   |   1 +
  linux-headers/asm-s390/unistd_32.h| 446 --
  linux-headers/asm-s390/unistd_64.h|   1 +
  linux-headers/asm-x86/kvm.h   |  21 +-
  linux-headers/asm-x86/unistd_32.h |   1 +
  linux-headers/asm-x86/unistd_64.h |   1 +
  linux-headers/asm-x86/unistd_x32.h|   1 +
  linux-headers/linux/const.h   |  18 +
  linux-headers/linux/iommufd.h |  48 ++
  linux-headers/linux/kvm.h |  46 +-
  linux-headers/linux/mshv.h|   4 +-
  linux-headers/linux/psp-sev.h |   2 +-
  linux-headers/linux/stddef.h  |   4 +
  linux-headers/linux/vduse.h   |  85 +++-
  linux-headers/linux/vfio.h|  30 +-
  38 files changed, 711 insertions(+), 493 deletions(-)
  create mode 100644 include/standard-headers/linux/typelimits.h
  create mode 100644 include/standard-headers/linux/virtio_rtc.h
  delete mode 100644 linux-headers/asm-s390/unistd_32.h


The linux headers update needs to be regenerated with this fix :

  https://lore.kernel.org/qemu-devel/[email protected]/

Thanks,

C.




Re: [PATCH v2 2/4] linux-headers: Update to Linux v7.1-rc1

2026-05-11 Thread Michael S. Tsirkin
On Mon, May 11, 2026 at 11:26:56AM +0200, Cédric Le Goater wrote:
> On 5/10/26 22:19, Michael S. Tsirkin wrote:
> > On Sun, May 10, 2026 at 10:08:49PM +0200, Cédric Le Goater wrote:
> > > On 5/7/26 11:23, Song Gao wrote:
> > > > diff --git a/include/standard-headers/linux/virtio_ring.h 
> > > > b/include/standard-headers/linux/virtio_ring.h
> > > > index 22f6eb8ca7..7baf1968a3 100644
> > > > --- a/include/standard-headers/linux/virtio_ring.h
> > > > +++ b/include/standard-headers/linux/virtio_ring.h
> > > > @@ -31,7 +31,6 @@
> > > > * SUCH DAMAGE.
> > > > *
> > > > * Copyright Rusty Russell IBM Corporation 2007. */
> > > > -#include 
> > > >#include "standard-headers/linux/types.h"
> > > >#include "standard-headers/linux/virtio_types.h"
> > > > @@ -200,7 +199,7 @@ static inline void vring_init(struct vring *vr, 
> > > > unsigned int num, void *p,
> > > > vr->num = num;
> > > > vr->desc = p;
> > > > vr->avail = (struct vring_avail *)((char *)p + num * 
> > > > sizeof(struct vring_desc));
> > > > -   vr->used = (void *)(((uintptr_t)&vr->avail->ring[num] + 
> > > > sizeof(__virtio16)
> > > > +   vr->used = (void *)(((unsigned long)&vr->avail->ring[num] + 
> > > > sizeof(__virtio16)
> > > > + align-1) & ~(align - 1));
> > > >}
> > > 
> > > The kernel commit 3c4629b68dbe ("virtio: uapi: avoid usage of
> > > libc types") changed this virtio header and this breaks the
> > > build on Windows :
> > > 
> > >https://gitlab.com/legoater/qemu/-/jobs/14297040230
> > > 
> > > A fix could be to reintroduce 'uintptr_t' (available through
> > > osdep.h) by modifying the linux headers update script. Ideas ?
> > > 
> > > Thanks,
> > > 
> > > C.
> > 
> > Yea sorry ( Just add
> > #define VIRTIO_RING_NO_LEGACY
> > somewhere.
> > 
> > 
> 
> Something like :
> 
>   --- a/scripts/update-linux-headers.sh
>   +++ b/scripts/update-linux-headers.sh
>   @@ -104,6 +104,7 @@ cp_portable() {
>-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";
>}
> 
> 
> Thanks,
> 
> C.


right.




Re: [PATCH v2 2/4] linux-headers: Update to Linux v7.1-rc1

2026-05-11 Thread Cédric Le Goater

On 5/10/26 22:19, Michael S. Tsirkin wrote:

On Sun, May 10, 2026 at 10:08:49PM +0200, Cédric Le Goater wrote:

On 5/7/26 11:23, Song Gao wrote:

diff --git a/include/standard-headers/linux/virtio_ring.h 
b/include/standard-headers/linux/virtio_ring.h
index 22f6eb8ca7..7baf1968a3 100644
--- a/include/standard-headers/linux/virtio_ring.h
+++ b/include/standard-headers/linux/virtio_ring.h
@@ -31,7 +31,6 @@
* SUCH DAMAGE.
*
* Copyright Rusty Russell IBM Corporation 2007. */
-#include 
   #include "standard-headers/linux/types.h"
   #include "standard-headers/linux/virtio_types.h"
@@ -200,7 +199,7 @@ static inline void vring_init(struct vring *vr, unsigned 
int num, void *p,
vr->num = num;
vr->desc = p;
vr->avail = (struct vring_avail *)((char *)p + num * sizeof(struct 
vring_desc));
-   vr->used = (void *)(((uintptr_t)&vr->avail->ring[num] + 
sizeof(__virtio16)
+   vr->used = (void *)(((unsigned long)&vr->avail->ring[num] + 
sizeof(__virtio16)
+ align-1) & ~(align - 1));
   }


The kernel commit 3c4629b68dbe ("virtio: uapi: avoid usage of
libc types") changed this virtio header and this breaks the
build on Windows :

   https://gitlab.com/legoater/qemu/-/jobs/14297040230

A fix could be to reintroduce 'uintptr_t' (available through
osdep.h) by modifying the linux headers update script. Ideas ?

Thanks,

C.


Yea sorry ( Just add
#define VIRTIO_RING_NO_LEGACY
somewhere.




Something like :

  --- a/scripts/update-linux-headers.sh
  +++ b/scripts/update-linux-headers.sh
  @@ -104,6 +104,7 @@ cp_portable() {
   -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";
   }


Thanks,

C.




Re: [PATCH v2 2/4] linux-headers: Update to Linux v7.1-rc1

2026-05-10 Thread Michael S. Tsirkin
On Sun, May 10, 2026 at 10:08:49PM +0200, Cédric Le Goater wrote:
> On 5/7/26 11:23, Song Gao wrote:
> > diff --git a/include/standard-headers/linux/virtio_ring.h 
> > b/include/standard-headers/linux/virtio_ring.h
> > index 22f6eb8ca7..7baf1968a3 100644
> > --- a/include/standard-headers/linux/virtio_ring.h
> > +++ b/include/standard-headers/linux/virtio_ring.h
> > @@ -31,7 +31,6 @@
> >* SUCH DAMAGE.
> >*
> >* Copyright Rusty Russell IBM Corporation 2007. */
> > -#include 
> >   #include "standard-headers/linux/types.h"
> >   #include "standard-headers/linux/virtio_types.h"
> > @@ -200,7 +199,7 @@ static inline void vring_init(struct vring *vr, 
> > unsigned int num, void *p,
> > vr->num = num;
> > vr->desc = p;
> > vr->avail = (struct vring_avail *)((char *)p + num * sizeof(struct 
> > vring_desc));
> > -   vr->used = (void *)(((uintptr_t)&vr->avail->ring[num] + 
> > sizeof(__virtio16)
> > +   vr->used = (void *)(((unsigned long)&vr->avail->ring[num] + 
> > sizeof(__virtio16)
> > + align-1) & ~(align - 1));
> >   }
> 
> The kernel commit 3c4629b68dbe ("virtio: uapi: avoid usage of
> libc types") changed this virtio header and this breaks the
> build on Windows :
> 
>   https://gitlab.com/legoater/qemu/-/jobs/14297040230
> 
> A fix could be to reintroduce 'uintptr_t' (available through
> osdep.h) by modifying the linux headers update script. Ideas ?
> 
> Thanks,
> 
> C.

Yea sorry ( Just add
#define VIRTIO_RING_NO_LEGACY
somewhere.


-- 
MST




Re: [PATCH v2 2/4] linux-headers: Update to Linux v7.1-rc1

2026-05-10 Thread Cédric Le Goater

On 5/7/26 11:23, Song Gao wrote:

diff --git a/include/standard-headers/linux/virtio_ring.h 
b/include/standard-headers/linux/virtio_ring.h
index 22f6eb8ca7..7baf1968a3 100644
--- a/include/standard-headers/linux/virtio_ring.h
+++ b/include/standard-headers/linux/virtio_ring.h
@@ -31,7 +31,6 @@
   * SUCH DAMAGE.
   *
   * Copyright Rusty Russell IBM Corporation 2007. */
-#include 
  #include "standard-headers/linux/types.h"
  #include "standard-headers/linux/virtio_types.h"
  
@@ -200,7 +199,7 @@ static inline void vring_init(struct vring *vr, unsigned int num, void *p,

vr->num = num;
vr->desc = p;
vr->avail = (struct vring_avail *)((char *)p + num * sizeof(struct 
vring_desc));
-   vr->used = (void *)(((uintptr_t)&vr->avail->ring[num] + 
sizeof(__virtio16)
+   vr->used = (void *)(((unsigned long)&vr->avail->ring[num] + 
sizeof(__virtio16)
+ align-1) & ~(align - 1));
  }
  


The kernel commit 3c4629b68dbe ("virtio: uapi: avoid usage of
libc types") changed this virtio header and this breaks the
build on Windows :

  https://gitlab.com/legoater/qemu/-/jobs/14297040230

A fix could be to reintroduce 'uintptr_t' (available through
osdep.h) by modifying the linux headers update script. Ideas ?

Thanks,

C.