RE: [PATCH] hw/virtio: Fix getting the correct ring number on loading

2024-11-23 Thread Wafer
> -Original Message- > From: Philippe Mathieu-Daudé > Sent: 2024年11月22日 15:02 > To: Wafer ; m...@redhat.com; > jasow...@redhat.com; gr...@kaod.org > Cc: epere...@redhat.com; qemu-devel@nongnu.org; Angus Chen > > Subject: Re: [PATCH] hw/virtio: Fix getting th

Re: [PATCH] hw/virtio: Fix getting the correct ring number on loading

2024-11-22 Thread Greg Kurz
On Fri, 22 Nov 2024 08:01:34 +0100 Philippe Mathieu-Daudé wrote: > Hi Wafer, > > On 22/11/24 03:00, Wafer wrote: > > From: Wafer Xie > > > > The virtio-1.2 specification writes: > > > > 2.7.6 The Virtqueue Available Ring: > > "idx field indicates where the driver would put the next descriptor

Re: [PATCH] hw/virtio: Fix getting the correct ring number on loading

2024-11-21 Thread Philippe Mathieu-Daudé
Hi Wafer, On 22/11/24 03:00, Wafer wrote: From: Wafer Xie The virtio-1.2 specification writes: 2.7.6 The Virtqueue Available Ring: "idx field indicates where the driver would put the next descriptor entry in the ring (modulo the queue size). This starts at 0, and increases" "modulo" ...

[PATCH] hw/virtio: Fix getting the correct ring number on loading

2024-11-21 Thread Wafer
From: Wafer Xie The virtio-1.2 specification writes: 2.7.6 The Virtqueue Available Ring: "idx field indicates where the driver would put the next descriptor entry in the ring (modulo the queue size). This starts at 0, and increases" The idx will increase from 0 to 0x and repeat, So idx may