From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: vhost changes (batched) in linux-next after 12/13 trigger random crashes in KVM guests after reboot Date: Tue, 11 Feb 2020 08:57:58 -0500 Message-ID: <20200211085736-mutt-send-email-mst@kernel.org> References: <2a63b15f-8cf5-5868-550c-42e2cfd92c60@de.ibm.com> <1ade56b5-083f-bb6f-d3e0-3ddcf78f4d26@de.ibm.com> <20200206171349-mutt-send-email-mst@kernel.org> <5c860fa1-cef5-b389-4ebf-99a62afa0fe8@de.ibm.com> <20200207025806-mutt-send-email-mst@kernel.org> <97c93d38-ef07-e321-d133-18483d54c0c0@de.ibm.com> <43a5dbaa-9129-e220-8483-45c60a82c945@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" To: Eugenio =?iso-8859-1?Q?P=E9rez?= Cc: Stephen Rothwell , kvm list , Cornelia Huck , "linux-kernel@vger.kernel.org" , "virtualization@lists.linux-foundation.org" , Halil Pasic , Christian Borntraeger , Linux Next Mailing List List-Id: virtualization@lists.linuxfoundation.org On Tue, Feb 11, 2020 at 02:04:54PM +0100, Eugenio P=C3=A9rez wrote: > On Mon, 2020-02-10 at 12:01 +0100, Christian Borntraeger wrote: > > = > > On 10.02.20 10:47, Eugenio Perez Martin wrote: > > > Hi Christian. > > > = > > > I'm not able to reproduce the failure with eccb852f1fe6bede630e2e4f1a= 121a81e34354ab commit. Could you add more data? > > > Your configuration (libvirt or qemu line), and host's dmesg output if= any? > > > = > > > Thanks! > > = > > If it was not obvious, this is on s390x, a big endian system. > > = > = > Hi Christian. Thank you very much for your fast responses. > = > Could you try this patch on top of eccb852f1fe6bede630e2e4f1a121a81e34354= ab? > = > Thanks! > = > >From 71d0f9108a18aa894cc0c0c1c7efbad39f465a27 Mon Sep 17 00:00:00 2001 > From: =3D?UTF-8?q?Eugenio=3D20P=3DC3=3DA9rez?=3D < > eperezma@redhat.com> > Date: Tue, 11 Feb 2020 13:19:10 +0100 > Subject: [PATCH] vhost: fix return value of vhost_get_vq_desc > = > Before of the batch change, it was the chain's head. Need to keep that > way or we will not be able to free a chain of descriptors. I think it's cleaner to have all descriptors in the chain have the same id. > Fixes: eccb852f1fe6 ("vhost: batching fetches") > --- > drivers/vhost/vhost.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > = > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c > index b5a51b1f2e79..fc422c3e5c08 100644 > --- a/drivers/vhost/vhost.c > +++ b/drivers/vhost/vhost.c > @@ -2409,12 +2409,11 @@ int vhost_get_vq_desc(struct vhost_virtqueue *vq, > *out_num +=3D ret; > } > = > - ret =3D desc->id; > - > if (!(desc->flags & VRING_DESC_F_NEXT)) > break; > } > = > + ret =3D vq->descs[vq->first_desc].id; > vq->first_desc =3D i + 1; > = > return ret; > -- = > 2.18.1