Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4700893ybv; Tue, 11 Feb 2020 01:37:29 -0800 (PST) X-Google-Smtp-Source: APXvYqximW327kPbY6cU3oUWQdbbDIoe+QRlm2QMQ7YUtYUxvJ0vKckyRcRoQJwZzd+gTz4hplm+ X-Received: by 2002:a9d:6452:: with SMTP id m18mr4375701otl.366.1581413849423; Tue, 11 Feb 2020 01:37:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581413849; cv=none; d=google.com; s=arc-20160816; b=pzvOEK9O3TUcERH+jyw8jWKrlK11MGTp5hVnZS884jqfiZULXKZqtx32Eb7/wgQb/Y 1sh7amFuP6ersMEnnJqnKSaBlrLk2Gif+WAathVppFpubaC5XGZdpmhii7dRSSwA1kIC t0jnhFj5EYc7r7R8h8wez0vACQ2etpCk+z6UyHoMbnIOls4HBRamAOG127iI704uzTnr RCzlAUlvuj4S1FE7wv4RxikreFXSdiR921hoi+hYZF72eWlWLZv2TUF+xsXxoosqtdcV 1Bzr/VFal85vWN9VO7qV7jRH2A7zcgrcNusAcMUOWMTCDhUv4SrZE+julADMclY290uc slGA== 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=OorDu29eE+PEol4sSArzlxHl7pCN4jrwJ8i6pGbkBeI=; b=DKP2IXBk3WttEN32mLrO6R9OmGVb8dEZwixFlMmj3Iv5hX6/2cXV3wL6jZAVzmBVck Enm59ezlL+edqwwgtJoypuDCA1u+rPJm3T544KY2KWKg7UsC5S1ltSugcEjPD4vM5Kt0 t3qjR85lRoG6tJ9FAw5O2kCEpzHamhz9WLyJVzIXojiuxe6xDFnemzshrEOQyUlfANL+ zQvPnFQ353ebY4K+pga0P7OSOCNCecWu1OGiugQqhyG/wtDoPMA78GkrNGo8oJYp+Wyo v9PMI9jmPiViodtBA3I2kxr6SCGk0RrYO2A2oTZCXQrNY+sSAZO1+zrwv0AfrsARi+ly e0tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PTYBeN9y; 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 x6si1661872ota.322.2020.02.11.01.37.18; Tue, 11 Feb 2020 01:37:29 -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=PTYBeN9y; 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 S1727902AbgBKJdr (ORCPT + 99 others); Tue, 11 Feb 2020 04:33:47 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:54540 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727652AbgBKJdq (ORCPT ); Tue, 11 Feb 2020 04:33:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581413625; 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=OorDu29eE+PEol4sSArzlxHl7pCN4jrwJ8i6pGbkBeI=; b=PTYBeN9ydEoeJ00Evl5w+JqVkX4V/F5r9Af5VOODU1bt8C4g2UrlsxsOYFR7Cizgxs23ig YnHFh7ZaNjN7l3xwKbi1HmEizIGaXyd8tzGjOUud7gVH0mB9dYoR6tmDSv+1qxM7g8KcDQ Wbo1xsrae1DzqfnIV7ckMJFCY4Oabs8= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-402-WhPbg-DTMyW2i6tY-QqxyA-1; Tue, 11 Feb 2020 04:33:43 -0500 X-MC-Unique: WhPbg-DTMyW2i6tY-QqxyA-1 Received: by mail-wm1-f69.google.com with SMTP id p26so1080415wmg.5 for ; Tue, 11 Feb 2020 01:33:43 -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=OorDu29eE+PEol4sSArzlxHl7pCN4jrwJ8i6pGbkBeI=; b=si/CulGL5VAhfA4NMdI/s5HVqL7DTKYtXVP5ozhvnjCqSBmPqwNcq7kpBcmV1lndfo O/ei6iz3yBhPuYCB2+9/q9evzdG+mG/sfwyHhBcHxjv3H/4zd3iMIDsVh02V2S8xfnaD r82S7NzdUbAcGZP9cTgCGRpwJHqds5Ba8tepxwF0OtcEl/CBvU7fW1/YT1xoyOfV7ODT cDJ852PlLq6oqv2Gt/1Qiogfqru5X/wTkeeQvahc4SRQufdrwVxR7sbGMg9p70W2UL5P Q4Y+fo/HrkTA6mQGjRltkvWGOcUjuktkOOQJ4JeNO3RopGFgCAhy4G2GIBl0PABafxz/ vYgg== X-Gm-Message-State: APjAAAWe2Nr39r9+pZa0NStgj0+ppuFaVlmTEJS+i2lRRKOgYsFdqs4d b8Mveh6z8X8Txm+Nau1+Z6xlWCzeq7XUSVQZGr06KiMKy5cHWy/kRvte7MGUXH+loEisS0PHVlZ GG2cCkQkz3xUE57XVedHTcWjs X-Received: by 2002:a1c:cc11:: with SMTP id h17mr4480290wmb.19.1581413622484; Tue, 11 Feb 2020 01:33:42 -0800 (PST) X-Received: by 2002:a1c:cc11:: with SMTP id h17mr4480274wmb.19.1581413622269; Tue, 11 Feb 2020 01:33:42 -0800 (PST) Received: from eperezma.remote.csb (121.142.221.87.dynamic.jazztel.es. [87.221.142.121]) by smtp.gmail.com with ESMTPSA id s8sm3070475wmf.45.2020.02.11.01.33.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 01:33:41 -0800 (PST) Message-ID: <5119e785ed98cc446ad96d893bd2c6efa127f8e1.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: Tue, 11 Feb 2020 10:33:39 +0100 In-Reply-To: <43a5dbaa-9129-e220-8483-45c60a82c945@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> 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: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 the hints. Could we add some debug traces? Something like the inline patch should give us some clues. Thanks! From a8d65d5f0ae3d305443ee84b4842b7c712a1ac1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= Date: Tue, 11 Feb 2020 10:29:01 +0100 Subject: [PATCH] Add some traces --- drivers/vhost/vhost.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index b5a51b1f2e79..60c048eebe4d 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -2239,8 +2239,8 @@ static int fetch_buf(struct vhost_virtqueue *vq) vq->avail_idx = vhost16_to_cpu(vq, avail_idx); if (unlikely((u16)(vq->avail_idx - last_avail_idx) > vq->num)) { - vq_err(vq, "Guest moved used index from %u to %u", - last_avail_idx, vq->avail_idx); + vq_err(vq, "Guest moved vq %p used index from %u to %u", + vq, last_avail_idx, vq->avail_idx); return -EFAULT; } @@ -2336,6 +2336,8 @@ static int fetch_descs(struct vhost_virtqueue *vq) while (!ret && vq->ndescs <= vq->batch_descs) ret = fetch_buf(vq); + pr_debug("[vq=%p][vq->ndescs=%d]", vq, vq->ndescs); + return vq->ndescs ? 0 : ret; } @@ -2416,6 +2418,8 @@ int vhost_get_vq_desc(struct vhost_virtqueue *vq, } vq->first_desc = i + 1; + pr_debug("[vq=%p][vq->ndescs=%d][vq->first_desc=%d]", vq, vq->ndescs, + vq->first_desc); return ret; @@ -2459,6 +2463,7 @@ static int __vhost_add_used_n(struct vhost_virtqueue *vq, start = vq->last_used_idx & (vq->num - 1); used = vq->used->ring + start; + pr_debug("[vq=%p][start=%d][count=%u]", vq, start, count); if (vhost_put_used(vq, heads, start, count)) { vq_err(vq, "Failed to write used"); return -EFAULT; -- 2.18.1