Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2217912ybb; Fri, 27 Mar 2020 01:06:02 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvnn5F+hhAzyXyrgqZzBwGxGiKtqaOUOgdXOpJhW0gSz/iYHsqF3LfNKXtVvENxVtwjM5RW X-Received: by 2002:a05:6830:1bef:: with SMTP id k15mr9056401otb.372.1585296361922; Fri, 27 Mar 2020 01:06:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585296361; cv=none; d=google.com; s=arc-20160816; b=RGPGsoiq2oKxlSfzNlJf6Xcy8e1DpDVuov5bWjS/DE15tJn2qJL1vMwIuIYv014hpn YLb4nOzDV+J06pgvwm2Qa26FSCQlZNL9Tje28iXR6HKREv9vKhGNIjAaJKwkQsxbgSGd +dFUtBqKBPzDDJ8k9su6TsjHRiElxByM2gqPv6guRXSjvJnkHB7oVkZG4sv7ni51TrNx p85BWap8Xy4q6oZBe/UaTo8yR1N8AmzN+Qgmi6wWSspftCDINmW0KK5PinWJhWaMvdf4 8/hVbPfhzY9GgPRw2311vDLWmijYIb24PP4Ghp/162zWwld801XkNwnZVEMt8m53eTMC k4Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=s3wT6nFybrS3qXNqSectqAHi2tg9aj7KFPNVsR/+fuQ=; b=r2wNAYSfE+6XciezKVKmho66eq9x1mi3ZQWw523aUUmXCF//7NlDt57diTWOqI72zQ jxr6/wEqG8v5CC/4ha+/h2Wh+UlQUQcxb7IksSDGK7ijRooeeMFvd+zJDzoR48qmFBnt 8B2evvhSMIZi9GBKfolgmQvbpVlceu4kwVhz/8mPTPTzJGNUrY9crWiIjN6YrHqj9EOK cxN+Bh3tWZfjuaqdObXhtaj4s8PoloeQopS7H2m7AlWpxpRolZHuky+mcWUJVbEMocY5 d4lmNoJGKxkJ13Injhuux6q3YDX+Gb+MQP8OWByR7P+po/pD3+tBwujOby3HPdDnI3YL U/7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bkeb68vQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 89si1958218otr.256.2020.03.27.01.05.48; Fri, 27 Mar 2020 01:06:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bkeb68vQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727143AbgC0IDm (ORCPT + 99 others); Fri, 27 Mar 2020 04:03:42 -0400 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]:53864 "EHLO us-smtp-delivery-74.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726027AbgC0IDm (ORCPT ); Fri, 27 Mar 2020 04:03:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585296221; 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=s3wT6nFybrS3qXNqSectqAHi2tg9aj7KFPNVsR/+fuQ=; b=bkeb68vQDHqLQBm7qtKsacWPsKTx4nziO9Q6TQP4XaTLGVavkOGCMW7W9k/BwfPE60GtBJ 3W4wYIUuxHfMikNAr3JXWVFv9d8HvUZRZQmxMUDvfV+JkmWYQP0UgRfLvXIkh6FG6rAQ8L HjMnudjAONxDfssM+EiFAMKWtdvpDX4= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-249-W7PIXX2-ObCt_wpSaJBoTA-1; Fri, 27 Mar 2020 04:03:39 -0400 X-MC-Unique: W7PIXX2-ObCt_wpSaJBoTA-1 Received: by mail-qt1-f198.google.com with SMTP id x10so7557719qts.14 for ; Fri, 27 Mar 2020 01:03:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=s3wT6nFybrS3qXNqSectqAHi2tg9aj7KFPNVsR/+fuQ=; b=jT088XJ3Fk6bAy/2/41rXecIWPWalPOJBACa0/dKBseq25UD18g2c1r413A8GxMOQA OYsMwSWjpD0+Vle03XWDaYZxqGfHq6YSftd3vL//y4H++A/NtnUu7iCKLasnjRuxaT+m ogEQAEtuOhFYtd2A69O6dtk8XlegPEzmcetCqDs6XhdBIxrs4MbUIHdkkAlXyvX646il l5mqmhHfWuvKoXt5tUpgPwsGP2oMRlkAsn6d0AgWIdPbzq8tABXnBRDhMa2iDyGEMc81 bZsj1NzGTNQnpRCVD4gv6RwCZEDDIkSneVWaq3RR9eyQSxgC6KXukfXcFl8glzO/X4jJ mY2Q== X-Gm-Message-State: ANhLgQ31KRGUYhw3uKbOedZtl0YLzGufAyvI8pKDdOvEK8eR7zfY1/oK Or0rHNN1sy0p3xrd5zf06TRcDQ7VBpaj9qRCeEMyGRGxDdUOb/6OnCA9eMu+nNyeVQ97uoPAkyz 7KMXWT+0ayzEwjPh+WZt+H7XslORLgH9nuIITZnV9 X-Received: by 2002:ac8:740b:: with SMTP id p11mr1079300qtq.379.1585296219320; Fri, 27 Mar 2020 01:03:39 -0700 (PDT) X-Received: by 2002:ac8:740b:: with SMTP id p11mr1079281qtq.379.1585296219048; Fri, 27 Mar 2020 01:03:39 -0700 (PDT) MIME-Version: 1.0 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> <20200211085736-mutt-send-email-mst@kernel.org> In-Reply-To: <20200211085736-mutt-send-email-mst@kernel.org> From: Eugenio Perez Martin Date: Fri, 27 Mar 2020 09:03:02 +0100 Message-ID: Subject: Re: vhost changes (batched) in linux-next after 12/13 trigger random crashes in KVM guests after reboot To: "Michael S. Tsirkin" Cc: Christian Borntraeger , "virtualization@lists.linux-foundation.org" , Stephen Rothwell , Linux Next Mailing List , "linux-kernel@vger.kernel.org" , kvm list , Halil Pasic , Cornelia Huck Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 11, 2020 at 2:58 PM Michael S. Tsirkin wrote: > > 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 eccb852f1fe6bede630e2e4f= 1a121a81e34354ab 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 eccb852f1fe6bede630e2e4f1a121a81e343= 54ab? > > > > 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. > Hi Michael. Not sure if I understood you correctly. All the descriptors in the chain still have the same id, this just returns the first one instead of update it in every loop iteration. Can left unapplied in the final version though, is up to you. > > 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 *v= q, > > *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 >