Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6244803ybv; Wed, 12 Feb 2020 08:34:59 -0800 (PST) X-Google-Smtp-Source: APXvYqyqT5ByXue5LjXLcfgr+AnKcPJdXH/YE74hGZsWaAPkXLYQ7wI+vpIAnk5lA3yPrSXkh8da X-Received: by 2002:a05:6830:1:: with SMTP id c1mr9187988otp.254.1581525298951; Wed, 12 Feb 2020 08:34:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581525298; cv=none; d=google.com; s=arc-20160816; b=w1vE3D1xX6KSfkgrZQvYmc7PehlbJZFfMUm9huTmiCgq9hfpejUi0J2mup2eHZkaxA pAoeJtXIcvvy4ugj76J+cAXwuk3uA9X1VY8EyrcZxjch9atGJVO8Nj2QOuJMliUHYPDD dgHc9JodoYoatvz7h2kNwUwc5Xj7JMsiiBWgM7t1B7L3Jbx67gUGAFfzj8W8cq7scJQS iDye9tqcZ3ic36oPaxV9Aeb/s0wM7Sbbsad7K8ZsvErbFz3UG5j1FA/0sytdGIGO0Cpk ZiOHwnYfF+P+eljiWo40bJR/O+7hA+IB3tvfc1HoXHLGB8rF0i/JbLPozMKA3dR1l5uo uR8A== 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:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=XeLe0VqvdqoWiGR03rxndmykwmmXsnBvd6JZdgln7y4=; b=TF1RE4oxlmuZJMfs+sNP7h0saeav/KNnKPkcINeyOLBVgCL9uDqwzEnB/Ra3vpoGnT PMEiXDUszaFgvaB/OSiJV6GgwfXNd6Vg86v0pDvw8Kd9k/zdmEdDW2lu8LP4JUoYgnMu /iRh9EIm66oqdy9z48qODd/ADmT9IOZNgmBzjPIyap8H4QY3VW5z3xhNJVsP1aZ9NTgW Eg3mkSmz7uj7V/OCMdxtzJ3Vw6FoDc/tGtPWHPKINrlA9k5atlV+WzMQwQloS4fZRVAl OxHrA09GUYngDZbs8QbrSZNgwN0vDV9steFlQ+56Z9qE+XUx/N6P4yvb2b0SMR43ZKyp OO2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=POlhJANY; 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 w24si3265457oic.260.2020.02.12.08.34.36; Wed, 12 Feb 2020 08:34:58 -0800 (PST) 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=POlhJANY; 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 S1727279AbgBLQeX (ORCPT + 99 others); Wed, 12 Feb 2020 11:34:23 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:28945 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727439AbgBLQeX (ORCPT ); Wed, 12 Feb 2020 11:34:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581525261; 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=XeLe0VqvdqoWiGR03rxndmykwmmXsnBvd6JZdgln7y4=; b=POlhJANYimN8IanVDLDyKw5Vm92rElusmK1HDa36YIsL0TR/GUlzBc2rg+uPesIbsxFgNq Ye3beJ3IcgEzFLVgIiqeovem1t5Hxl/cDuWjImWiBTaH/mLic/WIbAcMcp96kd9RVUGHb9 /t64QnwgNzPjBWffstFgO3V2dzmh5CY= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-362-TgV48k-ROgqaZ5fnqyH9Sw-1; Wed, 12 Feb 2020 11:34:19 -0500 X-MC-Unique: TgV48k-ROgqaZ5fnqyH9Sw-1 Received: by mail-wm1-f70.google.com with SMTP id p26so933189wmg.5 for ; Wed, 12 Feb 2020 08:34:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=XeLe0VqvdqoWiGR03rxndmykwmmXsnBvd6JZdgln7y4=; b=OjWyQu5detZaRq6d0k5Fi+XjIdaGjZKAy1akxa+wXdspenLj4Av+GPmFOu+HH5Q26a aAsGPLmjMdWWItBIzcBH/4UTTGPOlUKQgVIq3h7e4C4wZlG33lDwWrsMMJ7XVC3A/S2U W2+qHCFIKEZFXdkHyMxzXK6HM64ZLp5Bx5YY50wQWMaWS9/w4QfQcnjY/4bwF2fz7GE2 8GpzCS4BXdJ4V+CY5eieKYpJ8MYG+hLBhmbdA6KnvyvTSU3wpsHmRXN8/uErdUC2L6Hh ZES5QHXrnDWaHSslV7qTNIMhkY6erMUF15/CKHCRCIrVAxoFrCv03nNsQ3HIzKPXFaxd AY4Q== X-Gm-Message-State: APjAAAWZ+MDKtukloH3BAe5vinXsn7DPths49CiQqVVgnAZFe1dI/SSs Bg4psMIY/+okX4mJnnQn8HC+WDstnfQE+7/n/2hvmlqG5rJq4SQ59U31NCn90U0FFVur7hF6qW8 PrGt9y6uYN/KpM4sY3z6x68AF X-Received: by 2002:a05:600c:21c5:: with SMTP id x5mr13953431wmj.72.1581525258505; Wed, 12 Feb 2020 08:34:18 -0800 (PST) X-Received: by 2002:a05:600c:21c5:: with SMTP id x5mr13953400wmj.72.1581525258231; Wed, 12 Feb 2020 08:34:18 -0800 (PST) Received: from eperezma.remote.csb (153.143.221.87.dynamic.jazztel.es. [87.221.143.153]) by smtp.gmail.com with ESMTPSA id a16sm1172111wrt.30.2020.02.12.08.34.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Feb 2020 08:34:17 -0800 (PST) Message-ID: <50a79c3491ac483583c97df2fac29e2c3248fdea.camel@redhat.com> Subject: Re: vhost changes (batched) in linux-next after 12/13 trigger random crashes in KVM guests after reboot From: Eugenio =?ISO-8859-1?Q?P=E9rez?= To: Christian Borntraeger Cc: "Michael S. Tsirkin" , "virtualization@lists.linux-foundation.org" , Stephen Rothwell , Linux Next Mailing List , "linux-kernel@vger.kernel.org" , kvm list , Halil Pasic , Cornelia Huck Date: Wed, 12 Feb 2020 17:34:16 +0100 In-Reply-To: <4c3f70b7-723a-8b0f-ac49-babef1bcc180@de.ibm.com> References: <20200107042401-mutt-send-email-mst@kernel.org> <20200107065434-mutt-send-email-mst@kernel.org> <20200120012724-mutt-send-email-mst@kernel.org> <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> <4c3f70b7-723a-8b0f-ac49-babef1bcc180@de.ibm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-6.el8) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2020-02-11 at 14:13 +0100, Christian Borntraeger wrote: > > On 11.02.20 14:04, Eugenio PĂ©rez 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 eccb852f1fe6bede630e2e4f1a121a81e34354ab 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 eccb852f1fe6bede630e2e4f1a121a81e34354ab? > > I still get > [ 43.665145] Guest moved used index from 0 to 289 > after some reboots. > > > > Thanks! > > > > From 71d0f9108a18aa894cc0c0c1c7efbad39f465a27 Mon Sep 17 00:00:00 2001 > > From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= < > > 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. > > > > 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 += ret; > > } > > > > - ret = desc->id; > > - > > if (!(desc->flags & VRING_DESC_F_NEXT)) > > break; > > } > > > > + ret = vq->descs[vq->first_desc].id; > > vq->first_desc = i + 1; > > > > return ret; > > Sorry, still not able to reproduce the issue. Could we try to disable all the vhost features? Thanks! diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 661088ae6dc7..08f6d2ccb697 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -250,11 +250,11 @@ int vhost_init_device_iotlb(struct vhost_dev *d, bool enabled); } while (0) enum { - VHOST_FEATURES = (1ULL << VIRTIO_F_NOTIFY_ON_EMPTY) | - (1ULL << VIRTIO_RING_F_INDIRECT_DESC) | - (1ULL << VIRTIO_RING_F_EVENT_IDX) | - (1ULL << VHOST_F_LOG_ALL) | - (1ULL << VIRTIO_F_ANY_LAYOUT) | + VHOST_FEATURES = /* (1ULL << VIRTIO_F_NOTIFY_ON_EMPTY) | */ + /* (1ULL << VIRTIO_RING_F_INDIRECT_DESC) | */ + /* (1ULL << VIRTIO_RING_F_EVENT_IDX) | */ + /* (1ULL << VHOST_F_LOG_ALL) | */ + /* (1ULL << VIRTIO_F_ANY_LAYOUT) | */ (1ULL << VIRTIO_F_VERSION_1) };