linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Mike Galbraith <efault@gmx.de>
Cc: Christoph Hellwig <hch@lst.de>,
	Thorsten Leemhuis <linux@leemhuis.info>,
	virtio-dev@lists.oasis-open.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	rjones@redhat.com
Subject: Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")
Date: Wed, 29 Mar 2017 23:19:16 +0300	[thread overview]
Message-ID: <20170329231738-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <1490768602.5950.25.camel@gmx.de>

On Wed, Mar 29, 2017 at 08:23:22AM +0200, Mike Galbraith wrote:
> On Mon, 2017-03-27 at 20:18 +0200, Mike Galbraith wrote:
> 
> > BTW, WRT RT woes with $subject, I tried booting a generic kernel with
> > threadirqs, and bingo, same deal, just a bit more painful than for RT,
> > where there's no watchdog moaning accompanying the (preemptible) spin.
> 
> BTW++: the last hunk of this bandaid may be a bug fix.  With only the
> first two, box tried to use uninitialized stuff on hibernate, went
> boom.  Looks like that may be possible without help from me.
> 
> --- a/drivers/char/virtio_console.c
> +++ b/drivers/char/virtio_console.c
> @@ -2058,7 +2058,7 @@ static int virtcons_probe(struct virtio_
>  	portdev->max_nr_ports = 1;
>  
>  	/* Don't test MULTIPORT at all if we're rproc: not a valid feature! */
> -	if (!is_rproc_serial(vdev) &&
> +	if (!is_rproc_serial(vdev) && !IS_ENABLED(CONFIG_IRQ_FORCED_THREADING) &&
>  	    virtio_cread_feature(vdev, VIRTIO_CONSOLE_F_MULTIPORT,
>  				 struct virtio_console_config, max_nr_ports,
>  				 &portdev->max_nr_ports) == 0) {
> @@ -2179,7 +2179,9 @@ static struct virtio_device_id id_table[
>  
>  static unsigned int features[] = {
>  	VIRTIO_CONSOLE_F_SIZE,
> +#ifndef CONFIG_IRQ_FORCED_THREADING
>  	VIRTIO_CONSOLE_F_MULTIPORT,
> +#endif
>  };

These look kind of questionable.
Is this part needed?

>  static struct virtio_device_id rproc_serial_id_table[] = {
> @@ -2202,14 +2204,16 @@ static int virtcons_freeze(struct virtio
>  
>  	vdev->config->reset(vdev);
>  
> -	virtqueue_disable_cb(portdev->c_ivq);
> +	if (use_multiport(portdev))
> +		virtqueue_disable_cb(portdev->c_ivq);
>  	cancel_work_sync(&portdev->control_work);
>  	cancel_work_sync(&portdev->config_work);
>  	/*
>  	 * Once more: if control_work_handler() was running, it would
>  	 * enable the cb as the last step.
>  	 */
> -	virtqueue_disable_cb(portdev->c_ivq);
> +	if (use_multiport(portdev))
> +		virtqueue_disable_cb(portdev->c_ivq);
>  	remove_controlq_data(portdev);
>  
>  	list_for_each_entry(port, &portdev->ports, list) {

This looks real. No idea why would interrupt sharing
trigger anything like this but go figure.
Can you pls submit this separately with
a signature?

-- 
MST

  parent reply	other threads:[~2017-03-29 20:19 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-23 14:51 Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues") Thorsten Leemhuis
2017-03-23 14:56 ` Christoph Hellwig
2017-03-23 14:59   ` Richard W.M. Jones
2017-03-23 15:01   ` Thorsten Leemhuis
2017-03-23 15:19   ` Richard W.M. Jones
2017-03-27  9:07   ` Mike Galbraith
2017-03-27 17:05     ` Christoph Hellwig
2017-03-27 18:16       ` Michael S. Tsirkin
2017-03-28  1:08         ` Mike Galbraith
2017-03-28  2:35           ` Michael S. Tsirkin
2017-03-28  3:16             ` Mike Galbraith
2017-03-28 15:37               ` Michael S. Tsirkin
2017-03-28 16:33                 ` Mike Galbraith
2017-03-28 17:27                   ` Michael S. Tsirkin
2017-03-28 17:47                     ` Mike Galbraith
2017-03-27 18:18       ` Mike Galbraith
2017-03-29  6:23         ` Mike Galbraith
2017-03-29 20:10           ` Michael S. Tsirkin
2017-03-30  3:10             ` Mike Galbraith
2017-03-30  7:20               ` Mike Galbraith
     [not found]                 ` <20170331041959-mutt-send-email-mst@kernel.org>
2017-03-31  3:22                   ` Michael S. Tsirkin
2017-03-31  8:20                     ` Christoph Hellwig
2017-03-31 16:47                       ` Michael S. Tsirkin
2017-04-03 14:18                         ` Christoph Hellwig
2017-04-03 15:49                           ` Michael S. Tsirkin
2017-04-03 16:14                           ` Michael S. Tsirkin
2017-04-05  6:36                             ` Christoph Hellwig
2017-04-03 17:56                           ` Mike Galbraith
2017-04-03 18:11                             ` Michael S. Tsirkin
2017-04-04  4:02                               ` Mike Galbraith
2017-04-04 13:38                                 ` Michael S. Tsirkin
2017-04-04 14:18                                   ` Mike Galbraith
2017-04-04 14:24                                     ` Michael S. Tsirkin
2017-04-04 15:30                                     ` Michael S. Tsirkin
2017-04-04 17:40                                       ` Mike Galbraith
2017-04-04 17:54                                         ` Mike Galbraith
2017-04-04 18:00                                           ` Michael S. Tsirkin
2017-04-04 18:38                                             ` Mike Galbraith
2017-04-04 21:31                                               ` Michael S. Tsirkin
2017-04-05  2:54                                                 ` Mike Galbraith
2017-04-04 19:03                                           ` Michael S. Tsirkin
2017-04-05  3:09                                             ` Mike Galbraith
2017-04-05  3:13                                               ` Michael S. Tsirkin
2017-04-05  3:24                                                 ` Mike Galbraith
2017-04-05  3:40                                                   ` Mike Galbraith
2017-04-05  3:51                                                     ` Michael S. Tsirkin
2017-04-05  4:24                                                       ` Mike Galbraith
2017-04-05  6:29                                                         ` Christoph Hellwig
2017-04-05  6:51                                                           ` Mike Galbraith
2017-04-05 21:38                                                           ` Michael S. Tsirkin
2017-04-07  6:03                                                             ` Mike Galbraith
2017-04-07  6:24                                                               ` Michael S. Tsirkin
2017-04-07  6:44                                                                 ` Mike Galbraith
2017-04-07  7:05                                                                   ` Mike Galbraith
2017-04-07  7:22                                                                     ` Mike Galbraith
2017-04-07  7:23                                                                       ` Mike Galbraith
2017-04-07 13:20                                                                       ` Michael S. Tsirkin
2017-04-07 13:35                                                                         ` Michael S. Tsirkin
2017-04-07 14:29                                                                           ` Mike Galbraith
2017-04-07 18:56                                                                             ` Michael S. Tsirkin
2017-04-08  5:01                                                                               ` Mike Galbraith
2017-04-10 21:23                                                                                 ` Michael S. Tsirkin
2017-04-11  4:19                                                                                   ` Mike Galbraith
2017-04-05  3:52                                                   ` Michael S. Tsirkin
2017-04-07 21:35                           ` [Random guest crashes since 5c34d002dcc7 ("virtio_pci] 3313bedd74: WARNING:at_include/linux/pci.h:#vp_del_vqs kernel test robot
2017-03-29 20:19           ` Michael S. Tsirkin [this message]
2017-03-30  3:54             ` Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues") Mike Galbraith
2017-03-28  1:01       ` Mike Galbraith
2017-03-23 14:59 ` Richard W.M. Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170329231738-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=efault@gmx.de \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@leemhuis.info \
    --cc=rjones@redhat.com \
    --cc=virtio-dev@lists.oasis-open.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).