Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1607571 > unrolled thread

Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")

Started byChristoph Hellwig <hch@lst.de>
First post2017-03-23 16:00 +0100
Last post2017-03-28 03:10 +0200
Articles 20 on this page of 63 — 5 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use         shared interrupts for virtqueues") Christoph Hellwig <hch@lst.de> - 2017-03-23 16:00 +0100
    Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") Thorsten Leemhuis <linux@leemhuis.info> - 2017-03-23 16:10 +0100
    Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") "Richard W.M. Jones" <rjones@redhat.com> - 2017-03-23 16:10 +0100
    Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") "Richard W.M. Jones" <rjones@redhat.com> - 2017-03-23 16:30 +0100
    Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-03-27 11:20 +0200
      Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use         shared interrupts for virtqueues") Christoph Hellwig <hch@lst.de> - 2017-03-27 19:10 +0200
        Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") "Michael S. Tsirkin" <mst@redhat.com> - 2017-03-27 20:20 +0200
          Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-03-28 03:20 +0200
            Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") "Michael S. Tsirkin" <mst@redhat.com> - 2017-03-28 04:40 +0200
              Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-03-28 05:20 +0200
                Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") "Michael S. Tsirkin" <mst@redhat.com> - 2017-03-28 17:50 +0200
                  Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-03-28 18:40 +0200
                    Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") "Michael S. Tsirkin" <mst@redhat.com> - 2017-03-28 19:30 +0200
                      Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-03-28 19:50 +0200
        Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-03-27 20:30 +0200
          Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-03-29 08:30 +0200
            Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") "Michael S. Tsirkin" <mst@redhat.com> - 2017-03-29 22:20 +0200
              Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-03-30 09:30 +0200
                Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") "Michael S. Tsirkin" <mst@redhat.com> - 2017-03-31 05:30 +0200
                  Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use         shared interrupts for virtqueues") Christoph Hellwig <hch@lst.de> - 2017-03-31 10:30 +0200
                    Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") "Michael S. Tsirkin" <mst@redhat.com> - 2017-03-31 18:50 +0200
                      Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use         shared interrupts for virtqueues") Christoph Hellwig <hch@lst.de> - 2017-04-03 16:20 +0200
                        Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") "Michael S. Tsirkin" <mst@redhat.com> - 2017-04-03 17:50 +0200
                        Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") "Michael S. Tsirkin" <mst@redhat.com> - 2017-04-03 18:20 +0200
                          Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use         shared interrupts for virtqueues") Christoph Hellwig <hch@lst.de> - 2017-04-05 08:40 +0200
                        Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-04-03 20:00 +0200
                          Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") "Michael S. Tsirkin" <mst@redhat.com> - 2017-04-03 20:20 +0200
                            Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-04-04 06:10 +0200
                              Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") "Michael S. Tsirkin" <mst@redhat.com> - 2017-04-04 15:40 +0200
                                Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-04-04 16:20 +0200
                                  Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") "Michael S. Tsirkin" <mst@redhat.com> - 2017-04-04 16:30 +0200
                                  Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") "Michael S. Tsirkin" <mst@redhat.com> - 2017-04-04 17:40 +0200
                                    Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-04-04 19:50 +0200
                                      Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-04-04 20:00 +0200
                                        Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") "Michael S. Tsirkin" <mst@redhat.com> - 2017-04-04 20:10 +0200
                                          Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-04-04 20:40 +0200
                                            Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") "Michael S. Tsirkin" <mst@redhat.com> - 2017-04-04 23:40 +0200
                                              Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-04-05 05:00 +0200
                                        Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") "Michael S. Tsirkin" <mst@redhat.com> - 2017-04-04 21:10 +0200
                                          Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-04-05 05:10 +0200
                                            Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") "Michael S. Tsirkin" <mst@redhat.com> - 2017-04-05 05:20 +0200
                                              Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-04-05 05:30 +0200
                                                Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-04-05 05:50 +0200
                                                  Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") "Michael S. Tsirkin" <mst@redhat.com> - 2017-04-05 06:00 +0200
                                                    Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-04-05 06:30 +0200
                                                      Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use         shared interrupts for virtqueues") Christoph Hellwig <hch@lst.de> - 2017-04-05 08:30 +0200
                                                        Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-04-05 09:00 +0200
                                                        Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") "Michael S. Tsirkin" <mst@redhat.com> - 2017-04-05 23:40 +0200
                                                          Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-04-07 08:10 +0200
                                                            Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") "Michael S. Tsirkin" <mst@redhat.com> - 2017-04-07 08:30 +0200
                                                              Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-04-07 08:50 +0200
                                                                Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-04-07 09:10 +0200
                                                                  Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-04-07 09:30 +0200
                                                                    Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-04-07 09:30 +0200
                                                                    Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") "Michael S. Tsirkin" <mst@redhat.com> - 2017-04-07 15:30 +0200
                                                                      Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") "Michael S. Tsirkin" <mst@redhat.com> - 2017-04-07 15:40 +0200
                                                                        Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-04-07 16:40 +0200
                                                                          Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") "Michael S. Tsirkin" <mst@redhat.com> - 2017-04-07 21:00 +0200
                                                                            Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-04-08 07:10 +0200
                                                Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") "Michael S. Tsirkin" <mst@redhat.com> - 2017-04-05 06:00 +0200
            Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared  interrupts for virtqueues") "Michael S. Tsirkin" <mst@redhat.com> - 2017-03-29 22:30 +0200
              Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-03-30 06:00 +0200
        Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use  shared interrupts for virtqueues") Mike Galbraith <efault@gmx.de> - 2017-03-28 03:10 +0200

Page 1 of 4  [1] 2 3 4  Next page →


#1607571 — Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")

FromChristoph Hellwig <hch@lst.de>
Date2017-03-23 16:00 +0100
SubjectRe: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")
Message-ID<tocnw-3Ak-29@gated-at.bofh.it>
Does the patch from Jason in the

"[REGRESSION] 07ec51480b5e ("virtio_pci: use shared interrupts for virtqueues") causes crashes in guest"

thread fix the issue for you?

[toc] | [next] | [standalone]


#1607576 — Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")

FromThorsten Leemhuis <linux@leemhuis.info>
Date2017-03-23 16:10 +0100
SubjectRe: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")
Message-ID<tocxc-3SR-19@gated-at.bofh.it>
In reply to#1607571
On 23.03.2017 15:56, Christoph Hellwig wrote:
> Does the patch from Jason in the
> "[REGRESSION] 07ec51480b5e ("virtio_pci: use shared interrupts for virtqueues") causes crashes in guest"
> thread fix the issue for you?

Ha, sorry, I'm travelling and wasn't aware that Laura earlier today did
what I should have done a few days ago: bring the issue to the proper
mailing lists.

I'll give the patch a try. Thx for pointing it out and sorry for the
noise. Ciao, Thorsten

[toc] | [prev] | [next] | [standalone]


#1607591 — Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")

From"Richard W.M. Jones" <rjones@redhat.com>
Date2017-03-23 16:10 +0100
SubjectRe: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")
Message-ID<tocxd-3SR-55@gated-at.bofh.it>
In reply to#1607571
On Thu, Mar 23, 2017 at 03:56:22PM +0100, Christoph Hellwig wrote:
> Does the patch from Jason in the
> 
> "[REGRESSION] 07ec51480b5e ("virtio_pci: use shared interrupts for virtqueues") causes crashes in guest"
> 
> thread fix the issue for you?

I didn't see this thread before.  I'll check that out for you now.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v

[toc] | [prev] | [next] | [standalone]


#1607608 — Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")

From"Richard W.M. Jones" <rjones@redhat.com>
Date2017-03-23 16:30 +0100
SubjectRe: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")
Message-ID<tocQx-473-21@gated-at.bofh.it>
In reply to#1607571
On Thu, Mar 23, 2017 at 03:56:22PM +0100, Christoph Hellwig wrote:
> Does the patch from Jason in the
> 
> "[REGRESSION] 07ec51480b5e ("virtio_pci: use shared interrupts for virtqueues") causes crashes in guest"
> 
> thread fix the issue for you?

In brief, yes it does.  I followed up on that thread.

Thanks,

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW

[toc] | [prev] | [next] | [standalone]


#1609600 — Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")

FromMike Galbraith <efault@gmx.de>
Date2017-03-27 11:20 +0200
SubjectRe: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")
Message-ID<tpyYG-5I2-9@gated-at.bofh.it>
In reply to#1607571
On Thu, 2017-03-23 at 15:56 +0100, Christoph Hellwig wrote:
> Does the patch from Jason in the
> 
> "[REGRESSION] 07ec51480b5e ("virtio_pci: use shared interrupts for virtqueues") causes crashes in guest"
> 
> thread fix the issue for you?

That seems to eliminate explosions, but not the below.

07ec51480b5e causes me some kworker grief in -rt too (100% CPU), but
that's as yet not been stared at (too darn [busy/lazy], pick one;).

virgin 4.11-rc4+referenced patch, config=enterprise-ish.
...
[  158.400210] PM: Hibernation mode set to 'shutdown'
[  158.607439] PM: Syncing filesystems ... 
[  158.986595] PM: done.
[  158.986771] Freezing user space processes ... (elapsed 0.001 seconds) done.
[  158.988758] PM: Marking nosave pages: [mem 0x00000000-0x00000fff]
[  158.989156] PM: Marking nosave pages: [mem 0x0009f000-0x000fffff]
[  158.989550] PM: Marking nosave pages: [mem 0xbffde000-0xffffffff]
[  158.990200] PM: Basic memory bitmaps created
[  158.990468] PM: Preallocating image memory... done (allocated 395798 pages)
[  159.114650] PM: Allocated 1583192 kbytes in 0.12 seconds (13193.26 MB/s)
[  159.115203] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[  159.119378] ------------[ cut here ]------------
[  159.122606] WARNING: CPU: 3 PID: 509 at drivers/pci/msi.c:1251 pci_irq_vector+0xcf/0xe0
[  159.123194] Modules linked in: fuse(E) ebtable_filter(E) ebtables(E) rpcsec_gss_krb5(E) nfsv4(E) dns_resolver(E) nfs(E) fscache(E) nf_log_ipv6(E) xt_pkttype(E) nf_log_ipv4(E) nf_log_common(E) xt_LOG(E) xt_limit(E) af_packet(E) iscsi_ibft(E) iscsi_boot_sysfs(E) ip6t_REJECT(E) xt_tcpudp(E) nf_conntrack_ipv6(E) nf_defrag_ipv6(E) ip6table_raw(E) ipt_REJECT(E) iptable_raw(E) xt_CT(E) iptable_filter(E) ip6table_mangle(E) nf_conntrack_netbios_ns(E) nf_conntrack_broadcast(E) nf_conntrack_ipv4(E) nf_defrag_ipv4(E) ip_tables(E) xt_conntrack(E) nf_conntrack(E) libcrc32c(E) ip6table_filter(E) ip6_tables(E) x_tables(E) snd_hda_codec_generic(E) snd_hda_intel(E) snd_hda_codec(E) snd_hda_core(E) snd_hwdep(E) joydev(E) snd_pcm(E) snd_timer(E) snd(E) crct10dif_pclmul(E) soundcore(E) crc32_pclmul(E) 8139too(E) ghash_clmulni_intel(E)
[  159.128123]  pcbc(E) aesni_intel(E) ppdev(E) i2c_piix4(E) aes_x86_64(E) virtio_balloon(E) crypto_simd(E) parport_pc(E) glue_helper(E) parport(E) button(E) pcspkr(E) cryptd(E) serio_raw(E) acpi_cpufreq(E) nfsd(E) dm_mod(E) auth_rpcgss(E) nfs_acl(E) lockd(E) grace(E) sunrpc(E) ext4(E) crc16(E) jbd2(E) mbcache(E) hid_generic(E) usbhid(E) sr_mod(E) cdrom(E) ata_generic(E) virtio_rng(E) virtio_blk(E) virtio_console(E) ata_piix(E) floppy(E) ehci_pci(E) qxl(E) drm_kms_helper(E) syscopyarea(E) uhci_hcd(E) ahci(E) ehci_hcd(E) sysfillrect(E) crc32c_intel(E) sysimgblt(E) libahci(E) fb_sys_fops(E) ttm(E) virtio_pci(E) virtio_ring(E) usbcore(E) virtio(E) 8139cp(E) drm(E) libata(E) mii(E) sg(E) scsi_mod(E) autofs4(E)
[  159.132177] CPU: 3 PID: 509 Comm: kworker/u16:6 Tainted: G            E   4.11.0-default #28
[  159.132677] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.8.1-0-g4adadbd-20161202_174313-build11a 04/01/2014
[  159.133428] Workqueue: events_unbound async_run_entry_fn
[  159.133768] Call Trace:
[  159.133933]  dump_stack+0x63/0x90
[  159.134161]  __warn+0xd1/0xf0
[  159.134360]  ? pci_pm_poweroff+0x100/0x100
[  159.134627]  warn_slowpath_null+0x1d/0x20
[  159.134889]  pci_irq_vector+0xcf/0xe0
[  159.135134]  vp_synchronize_vectors+0x46/0x60 [virtio_pci]
[  159.135486]  vp_reset+0x37/0x40 [virtio_pci]
[  159.135780]  virtcons_freeze+0x23/0xa0 [virtio_console]
[  159.136116]  virtio_device_freeze+0x6b/0x80 [virtio]
[  159.136431]  virtio_pci_freeze+0x1d/0x40 [virtio_pci]
[  159.136756]  pci_pm_freeze+0x5f/0xe0
[  159.136999]  dpm_run_callback+0x59/0x180
[  159.137252]  __device_suspend+0x127/0x3c0
[  159.137513]  ? pm_dev_dbg+0x80/0x80
[  159.137740]  async_suspend+0x1f/0xa0
[  159.137973]  async_run_entry_fn+0x39/0x170
[  159.138250]  process_one_work+0x16c/0x450
[  159.138514]  worker_thread+0x137/0x4e0
[  159.138761]  kthread+0x10c/0x140
[  159.138970]  ? rescuer_thread+0x3c0/0x3c0
[  159.139235]  ? kthread_park+0x90/0x90
[  159.139476]  ret_from_fork+0x2c/0x40
[  159.139721] ---[ end trace d66daafbe82e66e7 ]---
[  159.728658] PM: freeze of devices complete after 611.743 msecs
[  159.729321] PM: late freeze of devices complete after 0.243 msecs
[  159.730921] PM: noirq freeze of devices complete after 1.145 msecs
[  159.731507] Disabling non-boot CPUs ...
[  159.732004] Unregister pv shared memory for cpu 1
[  159.739017] smpboot: CPU 1 is now offline
[  159.765702] Unregister pv shared memory for cpu 2
[  159.770757] smpboot: CPU 2 is now offline
[  159.797684] Unregister pv shared memory for cpu 3
[  159.799545] smpboot: CPU 3 is now offline
[  159.821934] Unregister pv shared memory for cpu 4
[  159.823759] smpboot: CPU 4 is now offline
[  159.848588] Unregister pv shared memory for cpu 5
[  159.850375] smpboot: CPU 5 is now offline
[  159.872907] Unregister pv shared memory for cpu 6
[  159.874598] smpboot: CPU 6 is now offline
[  159.896898] Unregister pv shared memory for cpu 7
[  159.898517] smpboot: CPU 7 is now offline
[  159.916620] PM: Creating hibernation image:
[  159.998033] PM: Need to copy 394338 pages
[  159.998370] PM: Normal pages needed: 394338 + 1024, available pages: 1702516
[1266874520.353525] kvm-clock: cpu 0, msr 2:3ff54001, primary cpu clock, resume
[1266874520.354849] Suspended for 67.457 seconds
[1266874520.354877] Enabling non-boot CPUs ...
[1266874520.366683] x86: Booting SMP configuration:
[1266874520.367028] smpboot: Booting Node 0 Processor 1 APIC 0x1
[1266874520.367514] kvm-clock: cpu 1, msr 2:3ff54041, secondary cpu clock
[1266874520.370107] KVM setup async PF for cpu 1
[1266874520.370425] kvm-stealtime: cpu 1, msr 23fc4d900
[1266874520.370858]  cache: parent cpu1 should not be sleeping
[1266874520.371408] CPU1 is up
[1266874520.386657] smpboot: Booting Node 0 Processor 2 APIC 0x2
[1266874520.387189] kvm-clock: cpu 2, msr 2:3ff54081, secondary cpu clock
[1266874520.389787] KVM setup async PF for cpu 2
[1266874520.390142] kvm-stealtime: cpu 2, msr 23fc8d900
[1266874520.390604]  cache: parent cpu2 should not be sleeping
[1266874520.391178] CPU2 is up
[1266874520.410687] smpboot: Booting Node 0 Processor 3 APIC 0x3
[1266874520.411288] kvm-clock: cpu 3, msr 2:3ff540c1, secondary cpu clock
[1266874520.413851] KVM setup async PF for cpu 3
[1266874520.414162] kvm-stealtime: cpu 3, msr 23fccd900
[1266874520.414566]  cache: parent cpu3 should not be sleeping
[1266874520.415071] CPU3 is up
[1266874520.430924] smpboot: Booting Node 0 Processor 4 APIC 0x4
[1266874520.431459] kvm-clock: cpu 4, msr 2:3ff54101, secondary cpu clock
[1266874520.434048] KVM setup async PF for cpu 4
[1266874520.434381] kvm-stealtime: cpu 4, msr 23fd0d900
[1266874520.434822]  cache: parent cpu4 should not be sleeping
[1266874520.435456] CPU4 is up
[1266874520.454957] smpboot: Booting Node 0 Processor 5 APIC 0x5
[1266874520.455822] kvm-clock: cpu 5, msr 2:3ff54141, secondary cpu clock
[1266874520.458507] KVM setup async PF for cpu 5
[1266874520.458834] kvm-stealtime: cpu 5, msr 23fd4d900
[1266874520.459439]  cache: parent cpu5 should not be sleeping
[1266874520.460320] CPU5 is up
[1266874520.478907] smpboot: Booting Node 0 Processor 6 APIC 0x6
[1266874520.479586] kvm-clock: cpu 6, msr 2:3ff54181, secondary cpu clock
[1266874520.482176] KVM setup async PF for cpu 6
[1266874520.482510] kvm-stealtime: cpu 6, msr 23fd8d900
[1266874520.482936]  cache: parent cpu6 should not be sleeping
[1266874520.483466] CPU6 is up
[1266874520.502988] smpboot: Booting Node 0 Processor 7 APIC 0x7
[1266874520.503775] kvm-clock: cpu 7, msr 2:3ff541c1, secondary cpu clock
[1266874520.506519] KVM setup async PF for cpu 7
[1266874520.506884] kvm-stealtime: cpu 7, msr 23fdcd900
[1266874520.507438]  cache: parent cpu7 should not be sleeping
[1266874520.508141] CPU7 is up
[1266874520.517708] PM: noirq restore of devices complete after 3.294 msecs
[1266874520.518547] PM: early restore of devices complete after 0.129 msecs
[1266874520.553012] rtc_cmos 00:00: System wakeup disabled by ACPI
[1266874520.562260] usb usb2: root hub lost power or was reset
[1266874520.562269] usb usb1: root hub lost power or was reset
[1266874520.563296] usb usb4: root hub lost power or was reset
[1266874520.564993] ------------[ cut here ]------------
[1266874520.564998] WARNING: CPU: 0 PID: 507 at drivers/pci/msi.c:1261 pci_irq_vector+0xb5/0xe0
[1266874520.564998] Modules linked in: fuse(E) ebtable_filter(E) ebtables(E) rpcsec_gss_krb5(E) nfsv4(E) dns_resolver(E) nfs(E) fscache(E) nf_log_ipv6(E) xt_pkttype(E) nf_log_ipv4(E) nf_log_common(E) xt_LOG(E) xt_limit(E) af_packet(E) iscsi_ibft(E) iscsi_boot_sysfs(E) ip6t_REJECT(E) xt_tcpudp(E) nf_conntrack_ipv6(E) nf_defrag_ipv6(E) ip6table_raw(E) ipt_REJECT(E) iptable_raw(E) xt_CT(E) iptable_filter(E) ip6table_mangle(E) nf_conntrack_netbios_ns(E) nf_conntrack_broadcast(E) nf_conntrack_ipv4(E) nf_defrag_ipv4(E) ip_tables(E) xt_conntrack(E) nf_conntrack(E) libcrc32c(E) ip6table_filter(E) ip6_tables(E) x_tables(E) snd_hda_codec_generic(E) snd_hda_intel(E) snd_hda_codec(E) snd_hda_core(E) snd_hwdep(E) joydev(E) snd_pcm(E) snd_timer(E) snd(E) crct10dif_pclmul(E) soundcore(E) crc32_pclmul(E) 8139too(E) ghash_clmulni_intel(E)
[1266874520.565022]  pcbc(E) aesni_intel(E) ppdev(E) i2c_piix4(E) aes_x86_64(E) virtio_balloon(E) crypto_simd(E) parport_pc(E) glue_helper(E) parport(E) button(E) pcspkr(E) cryptd(E) serio_raw(E) acpi_cpufreq(E) nfsd(E) dm_mod(E) auth_rpcgss(E) nfs_acl(E) lockd(E) grace(E) sunrpc(E) ext4(E) crc16(E) jbd2(E) mbcache(E) hid_generic(E) usbhid(E) sr_mod(E) cdrom(E) ata_generic(E) virtio_rng(E) virtio_blk(E) virtio_console(E) ata_piix(E) floppy(E) ehci_pci(E) qxl(E) drm_kms_helper(E) syscopyarea(E) uhci_hcd(E) ahci(E) ehci_hcd(E) sysfillrect(E) crc32c_intel(E) sysimgblt(E) libahci(E) fb_sys_fops(E) ttm(E) virtio_pci(E) virtio_ring(E) usbcore(E) virtio(E) 8139cp(E) drm(E) libata(E) mii(E) sg(E) scsi_mod(E) autofs4(E)
[1266874520.565048] CPU: 0 PID: 507 Comm: kworker/u16:4 Tainted: G        W   E   4.11.0-default #28
[1266874520.565049] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.8.1-0-g4adadbd-20161202_174313-build11a 04/01/2014
[1266874520.565052] Workqueue: events_unbound async_run_entry_fn
[1266874520.565052] Call Trace:
[1266874520.565058]  dump_stack+0x63/0x90
[1266874520.565060]  __warn+0xd1/0xf0
[1266874520.565064]  ? pci_pm_suspend_noirq+0x190/0x190
[1266874520.565065]  warn_slowpath_null+0x1d/0x20
[1266874520.565067]  pci_irq_vector+0xb5/0xe0
[1266874520.565069]  vp_synchronize_vectors+0x46/0x60 [virtio_pci]
[1266874520.565071]  vp_reset+0x37/0x40 [virtio_pci]
[1266874520.565073]  virtio_device_restore+0x22/0x110 [virtio]
[1266874520.565074]  virtio_pci_restore+0x36/0x40 [virtio_pci]
[1266874520.565076]  pci_pm_restore+0x79/0xb0
[1266874520.565078]  dpm_run_callback+0x59/0x180
[1266874520.565079]  device_resume+0xe7/0x210
[1266874520.565080]  ? pm_dev_dbg+0x80/0x80
[1266874520.565082]  async_resume+0x1d/0x50
[1266874520.565083]  async_run_entry_fn+0x39/0x170
[1266874520.565084]  process_one_work+0x16c/0x450
[1266874520.565085]  worker_thread+0x137/0x4e0
[1266874520.565088]  kthread+0x10c/0x140
[1266874520.565089]  ? rescuer_thread+0x3c0/0x3c0
[1266874520.565090]  ? kthread_park+0x90/0x90
[1266874520.565092]  ret_from_fork+0x2c/0x40
[1266874520.565094] ---[ end trace d66daafbe82e66e8 ]---
[1266874520.600698] usb usb3: root hub lost power or was reset
[1266874520.882457] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[1266874520.883385] ata5: SATA link down (SStatus 0 SControl 300)
[1266874520.884202] ata4: SATA link down (SStatus 0 SControl 300)
[1266874520.884923] ata6: SATA link down (SStatus 0 SControl 300)
[1266874520.885592] ata3: SATA link down (SStatus 0 SControl 300)
[1266874520.886347] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[1266874520.887101] ata1.00: configured for UDMA/100
[1266874520.887835] ata2.00: configured for UDMA/100
[1266874520.946407] usb 3-1: reset high-speed USB device number 2 using ehci-pci
[1266874521.096211] PM: restore of devices complete after 543.539 msecs
[1266874521.097984] PM: Image restored successfully.
[1266874521.099356] PM: Basic memory bitmaps freed
[1266874521.100669] Restarting tasks ... done.

[toc] | [prev] | [next] | [standalone]


#1609998

FromChristoph Hellwig <hch@lst.de>
Date2017-03-27 19:10 +0200
Message-ID<tpGjv-305-5@gated-at.bofh.it>
In reply to#1609600
Hi Mike,

does the patch below fix that issue for you?

diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c
index df548a6fb844..fd1b06368b1f 100644
--- a/drivers/virtio/virtio_pci_common.c
+++ b/drivers/virtio/virtio_pci_common.c
@@ -176,7 +176,7 @@ static int vp_find_vqs_msix(struct virtio_device *vdev, unsigned nvqs,
 	if (err < 0)
 		return err;
 
-	vp_dev->msix_vectors = nvectors;
+	vp_dev->msix_vectors = err; /* number of vectors allocated */
 	vp_dev->msix_names = kmalloc_array(nvectors,
 			sizeof(*vp_dev->msix_names), GFP_KERNEL);
 	if (!vp_dev->msix_names)

[toc] | [prev] | [next] | [standalone]


#1610040 — Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")

From"Michael S. Tsirkin" <mst@redhat.com>
Date2017-03-27 20:20 +0200
SubjectRe: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")
Message-ID<tpHpf-3Jt-7@gated-at.bofh.it>
In reply to#1609998
On Mon, Mar 27, 2017 at 07:05:40PM +0200, Christoph Hellwig wrote:
> Hi Mike,
> 
> does the patch below fix that issue for you?
> 
> diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c
> index df548a6fb844..fd1b06368b1f 100644
> --- a/drivers/virtio/virtio_pci_common.c
> +++ b/drivers/virtio/virtio_pci_common.c
> @@ -176,7 +176,7 @@ static int vp_find_vqs_msix(struct virtio_device *vdev, unsigned nvqs,
>  	if (err < 0)
>  		return err;
>  
> -	vp_dev->msix_vectors = nvectors;
> +	vp_dev->msix_vectors = err; /* number of vectors allocated */
>  	vp_dev->msix_names = kmalloc_array(nvectors,
>  			sizeof(*vp_dev->msix_names), GFP_KERNEL);
>  	if (!vp_dev->msix_names)

Can this sometimes allocate less vectors than min number requested then?
I didn't realize.

In that case we probably should change if (err < 0)
to if (err != nvectors) and similarly for when we try
to get 2 vectors.


Mike, could you pls send lspci -vv that shows up after
boot?

-- 
MST

[toc] | [prev] | [next] | [standalone]


#1610225 — Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")

FromMike Galbraith <efault@gmx.de>
Date2017-03-28 03:20 +0200
SubjectRe: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")
Message-ID<tpNXI-8w9-5@gated-at.bofh.it>
In reply to#1610040
On Mon, 2017-03-27 at 21:16 +0300, Michael S. Tsirkin wrote:

> Mike, could you pls send lspci -vv that shows up after
> boot?

Presuming you mean the virtual box..

00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
	Subsystem: Red Hat, Inc Qemu virtual machine
	Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-

00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
	Subsystem: Red Hat, Inc Qemu virtual machine
	Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-

00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II] (prog-if 80 [Master])
	Subsystem: Red Hat, Inc Qemu virtual machine
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Region 0: [virtual] Memory at 000001f0 (32-bit, non-prefetchable) [size=8]
	Region 1: [virtual] Memory at 000003f0 (type 3, non-prefetchable)
	Region 2: [virtual] Memory at 00000170 (32-bit, non-prefetchable) [size=8]
	Region 3: [virtual] Memory at 00000370 (type 3, non-prefetchable)
	Region 4: I/O ports at c240 [size=16]
	Kernel driver in use: ata_piix
	Kernel modules: ata_piix, pata_acpi, ata_generic

00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
	Subsystem: Red Hat, Inc Qemu virtual machine
	Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Interrupt: pin A routed to IRQ 9
	Kernel driver in use: piix4_smbus
	Kernel modules: i2c_piix4

00:02.0 VGA compatible controller: Red Hat, Inc. QXL paravirtual graphic card (rev 04) (prog-if 00 [VGA controller])
	Subsystem: Red Hat, Inc QEMU Virtual Machine
	Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Interrupt: pin A routed to IRQ 10
	Region 0: Memory at f4000000 (32-bit, non-prefetchable) [size=64M]
	Region 1: Memory at f8000000 (32-bit, non-prefetchable) [size=64M]
	Region 2: Memory at fc054000 (32-bit, non-prefetchable) [size=8K]
	Region 3: I/O ports at c140 [size=32]
	Expansion ROM at 000c0000 [disabled] [size=128K]
	Kernel driver in use: qxl
	Kernel modules: qxl

00:03.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8100/8101L/8139 PCI Fast Ethernet Adapter (rev 20)
	Subsystem: Red Hat, Inc QEMU Virtual Machine
	Physical Slot: 3
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 11
	Region 0: I/O ports at c000 [size=256]
	Region 1: Memory at fc056000 (32-bit, non-prefetchable) [size=256]
	Expansion ROM at fc000000 [disabled] [size=256K]
	Kernel driver in use: 8139cp
	Kernel modules: 8139cp, 8139too

00:04.0 Audio device: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller (rev 01)
	Subsystem: Red Hat, Inc QEMU Virtual Machine
	Physical Slot: 4
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 29
	Region 0: Memory at fc050000 (32-bit, non-prefetchable) [size=16K]
	Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
		Address: 00000000fee00000  Data: 4091
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel

00:05.0 SATA controller: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] (rev 02) (prog-if 01 [AHCI 1.0])
	Subsystem: Red Hat, Inc QEMU Virtual Machine
	Physical Slot: 5
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 24
	Region 4: I/O ports at c160 [size=32]
	Region 5: Memory at fc057000 (32-bit, non-prefetchable) [size=4K]
	Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit+
		Address: 00000000fee00000  Data: 4041
	Capabilities: [a8] SATA HBA v1.0 BAR4 Offset=00000004
	Kernel driver in use: ahci
	Kernel modules: ahci

00:06.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03) (prog-if 00 [UHCI])
	Subsystem: Red Hat, Inc QEMU Virtual Machine
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 10
	Region 4: I/O ports at c180 [size=32]
	Kernel driver in use: uhci_hcd
	Kernel modules: uhci_hcd

00:06.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03) (prog-if 00 [UHCI])
	Subsystem: Red Hat, Inc QEMU Virtual Machine
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin B routed to IRQ 11
	Region 4: I/O ports at c1a0 [size=32]
	Kernel driver in use: uhci_hcd
	Kernel modules: uhci_hcd

00:06.2 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03) (prog-if 00 [UHCI])
	Subsystem: Red Hat, Inc QEMU Virtual Machine
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin C routed to IRQ 11
	Region 4: I/O ports at c1c0 [size=32]
	Kernel driver in use: uhci_hcd
	Kernel modules: uhci_hcd

00:06.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03) (prog-if 20 [EHCI])
	Subsystem: Red Hat, Inc QEMU Virtual Machine
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 64 bytes
	Interrupt: pin D routed to IRQ 10
	Region 0: Memory at fc058000 (32-bit, non-prefetchable) [size=4K]
	Kernel driver in use: ehci-pci
	Kernel modules: ehci_pci

00:07.0 Communication controller: Red Hat, Inc Virtio console
	Subsystem: Red Hat, Inc Device 0003
	Physical Slot: 7
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 11
	Region 0: I/O ports at c1e0 [size=32]
	Region 1: Memory at fc059000 (32-bit, non-prefetchable) [size=4K]
	Capabilities: [40] MSI-X: Enable+ Count=2 Masked-
		Vector table: BAR=1 offset=00000000
		PBA: BAR=1 offset=00000800
	Kernel driver in use: virtio-pci
	Kernel modules: virtio_pci

00:08.0 Unclassified device [00ff]: Red Hat, Inc Virtio memory balloon
	Subsystem: Red Hat, Inc Device 0005
	Physical Slot: 8
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 11
	Region 0: I/O ports at c200 [size=32]
	Kernel driver in use: virtio-pci
	Kernel modules: virtio_pci

00:09.0 Unclassified device [00ff]: Red Hat, Inc Virtio RNG
	Subsystem: Red Hat, Inc Device 0004
	Physical Slot: 9
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
	Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 10
	Region 0: I/O ports at c220 [size=32]
	Kernel driver in use: virtio-pci
	Kernel modules: virtio_pci

00:0a.0 SCSI storage controller: Red Hat, Inc Virtio block device
	Subsystem: Red Hat, Inc Device 0002
	Physical Slot: 10
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 10
	Region 0: I/O ports at c100 [size=64]
	Region 1: Memory at fc05a000 (32-bit, non-prefetchable) [size=4K]
	Capabilities: [40] MSI-X: Enable+ Count=2 Masked-
		Vector table: BAR=1 offset=00000000
		PBA: BAR=1 offset=00000800
	Kernel driver in use: virtio-pci
	Kernel modules: virtio_pci

[toc] | [prev] | [next] | [standalone]


#1610265 — Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")

From"Michael S. Tsirkin" <mst@redhat.com>
Date2017-03-28 04:40 +0200
SubjectRe: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")
Message-ID<tpPd7-VD-7@gated-at.bofh.it>
In reply to#1610225
On Tue, Mar 28, 2017 at 03:08:20AM +0200, Mike Galbraith wrote:
> On Mon, 2017-03-27 at 21:16 +0300, Michael S. Tsirkin wrote:
> 
> > Mike, could you pls send lspci -vv that shows up after
> > boot?
> 
> Presuming you mean the virtual box..

Yes. Hmm nothing strange here. Can you pls post your QEMU
command line so I can try reproducing?

[toc] | [prev] | [next] | [standalone]


#1610274 — Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")

FromMike Galbraith <efault@gmx.de>
Date2017-03-28 05:20 +0200
SubjectRe: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")
Message-ID<tpPPQ-1tx-3@gated-at.bofh.it>
In reply to#1610265
On Tue, 2017-03-28 at 05:35 +0300, Michael S. Tsirkin wrote:
> On Tue, Mar 28, 2017 at 03:08:20AM +0200, Mike Galbraith wrote:
> > On Mon, 2017-03-27 at 21:16 +0300, Michael S. Tsirkin wrote:
> > 
> > > Mike, could you pls send lspci -vv that shows up after
> > > boot?
> > 
> > Presuming you mean the virtual box..
> 
> Yes. Hmm nothing strange here. Can you pls post your QEMU
> command line so I can try reproducing?

I don't start from the command line, I poke buttons in gui tool for
virt-weenies, below is ps result (hope your monitor is 37 feet wide).

/usr/bin/qemu-system-x86_64 -name opensuse42.1 -S -machine pc-i440fx-2.3,accel=kvm,usb=off,vmport=off -cpu Haswell-noTSX,+abm,+pdpe1gb,+rdrand,+f16c,+osxsave,+pdcm,+xtpr,+tm2,+est,+smx,+vmx,+ds_cpl,+monitor,+dtes64,+pbe,+tm,+ht,+ss,+acpi,+ds,+vme -m 8192 -realtime mlock=off -smp 8,sockets=1,cores=1,threads=8 -uuid afff4e95-262d-41ca-9189-f40c87c9375b -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/opensuse42.1.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=discard -no-hpet -no-shutdown -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -boot strict=on -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x6.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x6 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x6.0x1 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x6.0x2 -device ahci,id=sata0,bus=pci.0,addr=0x5 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x7 -drive file=/abuild/lib/libvirt/images/opensuse42.1.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=off -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0xa,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive file=/dev/sr0,if=none,media=cdrom,id=drive-sata0-0-0,readonly=on,format=raw -device ide-cd,bus=sata0.0,drive=drive-sata0-0-0,id=sata0-0-0 -netdev tap,fd=22,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:be:db:82,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -chardev socket,id=charchannel1,path=/var/lib/libvirt/qemu/channel/target/opensuse42.1.org.qemu.guest_agent.0,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=org.qemu.guest_agent.0 -device usb-tablet,id=input0 -spice port=5900,addr=127.0.0.1,disable-ticketing,seamless-migration=on -k de -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vgamem_mb=16,bus=pci.0,addr=0x2 -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -chardev spicevmc,id=charredir0,name=usbredir -device usb-redir,chardev=charredir0,id=redir0 -chardev spicevmc,id=charredir1,name=usbredir -device usb-redir,chardev=charredir1,id=redir1 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x8 -object rng-random,id=objrng0,filename=/dev/random -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x9 -msg timestamp=on

If you want the xml instead, holler.

	-Mike

[toc] | [prev] | [next] | [standalone]


#1611124 — Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")

From"Michael S. Tsirkin" <mst@redhat.com>
Date2017-03-28 17:50 +0200
SubjectRe: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")
Message-ID<tq1xE-1ho-23@gated-at.bofh.it>
In reply to#1610274
On Tue, Mar 28, 2017 at 05:16:13AM +0200, Mike Galbraith wrote:
> On Tue, 2017-03-28 at 05:35 +0300, Michael S. Tsirkin wrote:
> > On Tue, Mar 28, 2017 at 03:08:20AM +0200, Mike Galbraith wrote:
> > > On Mon, 2017-03-27 at 21:16 +0300, Michael S. Tsirkin wrote:
> > > 
> > > > Mike, could you pls send lspci -vv that shows up after
> > > > boot?
> > > 
> > > Presuming you mean the virtual box..
> > 
> > Yes. Hmm nothing strange here. Can you pls post your QEMU
> > command line so I can try reproducing?
> 
> I don't start from the command line, I poke buttons in gui tool for
> virt-weenies, below is ps result (hope your monitor is 37 feet wide).
> 
> /usr/bin/qemu-system-x86_64 -name opensuse42.1 -S -machine pc-i440fx-2.3,accel=kvm,usb=off,vmport=off -cpu Haswell-noTSX,+abm,+pdpe1gb,+rdrand,+f16c,+osxsave,+pdcm,+xtpr,+tm2,+est,+smx,+vmx,+ds_cpl,+monitor,+dtes64,+pbe,+tm,+ht,+ss,+acpi,+ds,+vme -m 8192 -realtime mlock=off -smp 8,sockets=1,cores=1,threads=8 -uuid afff4e95-262d-41ca-9189-f40c87c9375b -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/opensuse42.1.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=discard -no-hpet -no-shutdown -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -boot strict=on -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x6.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x6 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x6.0x1 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x6.0x2 -device ahci,id=sata0,bus=pci.0,addr=0x5 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x7 -drive file=/abuild/lib/libvirt/images/opensuse42.1.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=off -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0xa,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive file=/dev/sr0,if=none,media=cdrom,id=drive-sata0-0-0,readonly=on,format=raw -device ide-cd,bus=sata0.0,drive=drive-sata0-0-0,id=sata0-0-0 -netdev tap,fd=22,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:be:db:82,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -chardev socket,id=charchannel1,path=/var/lib/libvirt/qemu/channel/target/opensuse42.1.org.qemu.guest_agent.0,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=org.qemu.guest_agent.0 -device usb-tablet,id=input0 -spice port=5900,addr=127.0.0.1,disable-ticketing,seamless-migration=on -k de -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vgamem_mb=16,bus=pci.0,addr=0x2 -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -chardev spicevmc,id=charredir0,name=usbredir -device usb-redir,chardev=charredir0,id=redir0 -chardev spicevmc,id=charredir1,name=usbredir -device usb-redir,chardev=charredir1,id=redir1 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x8 -object rng-random,id=objrng0,filename=/dev/random -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x9 -msg timestamp=on
> 
> If you want the xml instead, holler.
> 
> 	-Mike

No, that's fine, thanks. Anything specific that you do to trigger this?

-- 
MST

[toc] | [prev] | [next] | [standalone]


#1611202 — Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")

FromMike Galbraith <efault@gmx.de>
Date2017-03-28 18:40 +0200
SubjectRe: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")
Message-ID<tq2k2-1UQ-23@gated-at.bofh.it>
In reply to#1611124
On Tue, 2017-03-28 at 18:37 +0300, Michael S. Tsirkin wrote:

> Anything specific that you do to trigger this?

Nope, all I have to do is to poke kde Power/Session Hibernate button.  

Not that it should matter, but the vm is a full clone of my 42.1 box,
including git server/repos etc, so has all whistles/bells/lard.

	-Mike

[toc] | [prev] | [next] | [standalone]


#1611235 — Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")

From"Michael S. Tsirkin" <mst@redhat.com>
Date2017-03-28 19:30 +0200
SubjectRe: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")
Message-ID<tq36p-2vD-1@gated-at.bofh.it>
In reply to#1611202
On Tue, Mar 28, 2017 at 06:33:53PM +0200, Mike Galbraith wrote:
> On Tue, 2017-03-28 at 18:37 +0300, Michael S. Tsirkin wrote:
> 
> > Anything specific that you do to trigger this?
> 
> Nope, all I have to do is to poke kde Power/Session Hibernate button.  

Oh so you actually start hypernate? Is this what you mean when
you say "poke"?

> Not that it should matter, but the vm is a full clone of my 42.1 box,
> including git server/repos etc, so has all whistles/bells/lard.
> 
> 	-Mike

[toc] | [prev] | [next] | [standalone]


#1611250 — Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")

FromMike Galbraith <efault@gmx.de>
Date2017-03-28 19:50 +0200
SubjectRe: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")
Message-ID<tq3pL-2Cz-7@gated-at.bofh.it>
In reply to#1611235
On Tue, 2017-03-28 at 20:27 +0300, Michael S. Tsirkin wrote:
> On Tue, Mar 28, 2017 at 06:33:53PM +0200, Mike Galbraith wrote:
> > On Tue, 2017-03-28 at 18:37 +0300, Michael S. Tsirkin wrote:
> > 
> > > Anything specific that you do to trigger this?
> > 
> > Nope, all I have to do is to poke kde Power/Session Hibernate
> > button.  
> 
> Oh so you actually start hypernate? Is this what you mean when
> you say "poke"?

s/hyper/hiber, but yes, and button poking == mouse clicking.

	-Mike

[toc] | [prev] | [next] | [standalone]


#1610050 — Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")

FromMike Galbraith <efault@gmx.de>
Date2017-03-27 20:30 +0200
SubjectRe: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")
Message-ID<tpHyV-3ND-7@gated-at.bofh.it>
In reply to#1609998
On Mon, 2017-03-27 at 19:05 +0200, Christoph Hellwig wrote:
> Hi Mike,
> 
> does the patch below fix that issue for you?

Thanks, I'll give it a go in the A.M.

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.

[   28.346311] NMI watchdog: BUG: soft lockup - CPU#7 stuck for 22s! [kworker/7:1:108]
[   28.347536] Modules linked in: virtio_rng(E) virtio_blk(E) virtio_console(E) ata_piix(E) qxl(E) drm_kms_helper(E) syscopyarea(E) sysfillrect(E) sysimgblt(E) fb_sys_fops(E) ttm(E) ahci(E) libahci(E) drm(E) ehci_pci(E) uhci_hcd(E) ehci_hcd(E) usbcore(E) libata(E) virtio_pci(E) virtio_ring(E) virtio(E) 8139cp(E) floppy(E) mii(E) sg(E) scsi_mod(E) autofs4(E)
[   28.351160] CPU: 7 PID: 108 Comm: kworker/7:1 Tainted: G            E   4.11.0-default #30
[   28.352085] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.8.1-0-g4adadbd-20161202_174313-build11a 04/01/2014
[   28.353547] Workqueue: events control_work_handler [virtio_console]
[   28.354450] task: ffff8802370d4440 task.stack: ffffc900010d8000
[   28.355281] RIP: 0010:__send_control_msg+0xbd/0xd0 [virtio_console]
[   28.356005] RSP: 0018:ffffc900010dbd20 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff10
[   28.356987] RAX: 0000000000000000 RBX: ffff880231c31ec8 RCX: ffff880231cb1000
[   28.357866] RDX: 0000000000000001 RSI: ffffc900010dbd2c RDI: ffff880234f87400
[   28.358738] RBP: ffffc900010dbd78 R08: 0000000001080020 R09: ffffc900010dbd30
[   28.359718] R10: ffff88023fdddc00 R11: ffffffffffffffc8 R12: ffff880234f87400
[   28.360653] R13: ffff880231c31ea8 R14: 0000000000000001 R15: 0000000000000003
[   28.361510] FS:  0000000000000000(0000) GS:ffff88023fdc0000(0000) knlGS:0000000000000000
[   28.362433] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   28.363177] CR2: 00007f4da0f40000 CR3: 0000000001c09000 CR4: 00000000001406e0
[   28.363994] Call Trace:
[   28.364420]  add_port+0x23f/0x3d0 [virtio_console]
[   28.365094]  ? _raw_spin_unlock_irqrestore+0x24/0x40
[   28.365765]  handle_control_message.constprop.32+0x2c2/0x2e0 [virtio_console]
[   28.366622]  control_work_handler+0x52/0xb7 [virtio_console]
[   28.367291]  process_one_work+0x15c/0x440
[   28.367869]  worker_thread+0x137/0x4b0
[   28.368426]  kthread+0x10c/0x140
[   28.368921]  ? process_one_work+0x440/0x440
[   28.369477]  ? kthread_create_on_node+0x40/0x40
[   28.370067]  ret_from_fork+0x2c/0x40
[   28.370611] Code: 57 e1 48 83 c4 30 31 c0 5b 41 5c 41 5d 41 5e 41 5f 5d c3 4c 89 e7 e8 03 93 f7 ff eb 0e 4c 89 e7 e8 89 84 f7 ff 84 c0 75 d1 f3 90 <48> 8d 75 b4 4c 89 e7 e8 57 91 f7 ff 48 85 c0 74 e1 eb bc 0f 1f 

[toc] | [prev] | [next] | [standalone]


#1611612 — Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")

FromMike Galbraith <efault@gmx.de>
Date2017-03-29 08:30 +0200
SubjectRe: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")
Message-ID<tqfhf-2UO-7@gated-at.bofh.it>
In reply to#1610050
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
 };
 
 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) {

[toc] | [prev] | [next] | [standalone]


#1612294 — Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")

From"Michael S. Tsirkin" <mst@redhat.com>
Date2017-03-29 22:20 +0200
SubjectRe: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")
Message-ID<tqseu-3C5-33@gated-at.bofh.it>
In reply to#1611612
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
>  };
>  
>  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) {


Poking at this some more, I was able to reproduce at
least some warnings. I still do not see a spin
but is there a chance this helps your case too?

commit 85039ca3162295759cf986aa753778043a90012c
Author: Michael S. Tsirkin <mst@redhat.com>
Date:   Wed Mar 29 23:02:28 2017 +0300

    virtio_pci: fix msix vector tracking on cleanup
    
    virtio pci tracks allocated vectors in a variable: msix_vectors. This
    isn't reset on del_vqs, as a result if reset is called after vqs are
    deleted we try to synchronize non-existing irqs producing a (probably
    harmless) warning.
    
    Fixes: 07ec51480b5e ("virtio_pci: use shared interrupts for virtqueues")
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c
index baae423..a70bed6 100644
--- a/drivers/virtio/virtio_pci_common.c
+++ b/drivers/virtio/virtio_pci_common.c
@@ -151,6 +151,7 @@ void vp_del_vqs(struct virtio_device *vdev)
 	}
 
 	free_irq(pci_irq_vector(vp_dev->pci_dev, 0), vp_dev);
+	vp_dev->msix_vectors = 0;
 	pci_free_irq_vectors(vp_dev->pci_dev);
 }
 
@@ -294,6 +295,7 @@ static int vp_find_vqs_msix(struct virtio_device *vdev, unsigned nvqs,
 out_free_msix_names:
 	kfree(vp_dev->msix_names);
 out_free_irq_vectors:
+	vp_dev->msix_vectors = 0;
 	pci_free_irq_vectors(vp_dev->pci_dev);
 	return err;
 }

[toc] | [prev] | [next] | [standalone]


#1612651 — Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")

FromMike Galbraith <efault@gmx.de>
Date2017-03-30 09:30 +0200
SubjectRe: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")
Message-ID<tqCGR-2MS-3@gated-at.bofh.it>
In reply to#1612294
On Thu, 2017-03-30 at 05:10 +0200, Mike Galbraith wrote:

> WRT spin, you should need do nothing more than boot with threadirqs,
> that's 100% repeatable here in absolutely virgin source.

No idea why virtqueue_get_buf() in __send_control_msg() fails forever
with threadirqs, but marking that vq as being busted (it clearly is)
results in one gripe, and a vbox that seemingly cares not one whit that
something went missing.  CONFIG_DEBUG_SHIRQ OTOH notices, mutters
something that sounds like "idiot" when I hibernate the thing ;-)

diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index e9b7e0b3cabe..831406dae1cb 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -567,6 +567,7 @@ static ssize_t __send_control_msg(struct ports_device *portdev, u32 port_id,
 	struct scatterlist sg[1];
 	struct virtqueue *vq;
 	unsigned int len;
+	unsigned long deadline = jiffies+1;
 
 	if (!use_multiport(portdev))
 		return 0;
@@ -583,9 +584,13 @@ static ssize_t __send_control_msg(struct ports_device *portdev, u32 port_id,
 
 	if (virtqueue_add_outbuf(vq, sg, 1, &portdev->cpkt, GFP_ATOMIC) == 0) {
 		virtqueue_kick(vq);
-		while (!virtqueue_get_buf(vq, &len)
-			&& !virtqueue_is_broken(vq))
+		while (!virtqueue_get_buf(vq, &len) && !virtqueue_is_broken(vq)) {
 			cpu_relax();
+			if (time_after(jiffies, deadline)) {
+				trace_printk("Aw crap, I'm stuck.. breaking device\n");
+				virtio_break_device(portdev->vdev);
+			}
+		}
 	}
 
 	spin_unlock(&portdev->c_ovq_lock);

[toc] | [prev] | [next] | [standalone]


#1613595 — Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")

From"Michael S. Tsirkin" <mst@redhat.com>
Date2017-03-31 05:30 +0200
SubjectRe: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")
Message-ID<tqVqa-7t0-5@gated-at.bofh.it>
In reply to#1612651
On Fri, Mar 31, 2017 at 04:23:35AM +0300, Michael S. Tsirkin wrote:
> On Thu, Mar 30, 2017 at 09:20:35AM +0200, Mike Galbraith wrote:
> > On Thu, 2017-03-30 at 05:10 +0200, Mike Galbraith wrote:
> > 
> > > WRT spin, you should need do nothing more than boot with threadirqs,
> > > that's 100% repeatable here in absolutely virgin source.
> > 
> > No idea why virtqueue_get_buf() in __send_control_msg() fails forever
> > with threadirqs, but marking that vq as being busted (it clearly is)
> > results in one gripe, and a vbox that seemingly cares not one whit that
> > something went missing.  CONFIG_DEBUG_SHIRQ OTOH notices, mutters
> > something that sounds like "idiot" when I hibernate the thing ;-)
> > 
> > diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
> > index e9b7e0b3cabe..831406dae1cb 100644
> > --- a/drivers/char/virtio_console.c
> > +++ b/drivers/char/virtio_console.c
> > @@ -567,6 +567,7 @@ static ssize_t __send_control_msg(struct ports_device *portdev, u32 port_id,
> >  	struct scatterlist sg[1];
> >  	struct virtqueue *vq;
> >  	unsigned int len;
> > +	unsigned long deadline = jiffies+1;
> >  
> >  	if (!use_multiport(portdev))
> >  		return 0;
> > @@ -583,9 +584,13 @@ static ssize_t __send_control_msg(struct ports_device *portdev, u32 port_id,
> >  
> >  	if (virtqueue_add_outbuf(vq, sg, 1, &portdev->cpkt, GFP_ATOMIC) == 0) {
> >  		virtqueue_kick(vq);
> > -		while (!virtqueue_get_buf(vq, &len)
> > -			&& !virtqueue_is_broken(vq))
> > +		while (!virtqueue_get_buf(vq, &len) && !virtqueue_is_broken(vq)) {
> >  			cpu_relax();
> > +			if (time_after(jiffies, deadline)) {
> > +				trace_printk("Aw crap, I'm stuck.. breaking device\n");
> > +				virtio_break_device(portdev->vdev);
> > +			}
> > +		}
> >  	}
> >  
> >  	spin_unlock(&portdev->c_ovq_lock);
> 
> 
> OK so with your help I was able to reproduce. Surprisingly easy:
> 
> 1. add threadirqs
> 2. add to qemu -device virtio-serial-pci -no-shutdown
> 3. within guest, do echo disk > /sys/power/state
> 
> This produces a warning. Looking deeper into it, I find:
> the device has 64 vqs. This line
> 
>                err = request_irq(pci_irq_vector(vp_dev->pci_dev, msix_vec),
>                                   vring_interrupt, IRQF_SHARED,
>                                   vp_dev->msix_names[j], vqs[i]);
> 
> fails after assigning interrupts to 33 vqs.
> Is there a limit to how many threaded irqs can share a line?

In fact it fails on the 33'rd one, and I see this:

/*
 * Unlikely to have 32 resp 64 irqs sharing one line,
 * but who knows.
 */
if (thread_mask == ~0UL) {
	printk(KERN_ERR "%s +%d\n", __FILE__, __LINE__);
	ret = -EBUSY;
	goto out_mask;
}


I'm not sure why does it fail after 32 on 64 bit, but as
virtio devices aren't limited to 32 vqs it looks like we
should go back to requesting the irq only once for all vqs.

Christoph, should I just revert for now, or do you
want to look into a smaller patch for this?

Another question is looking into intx support - that
should work but it seems to be broken at the moment.


> 
> If so we need to rethink the whole approach.
> 
> Still looking into it.
> 
> Christoph, any idea?
> 
> 
> -- 
> MST

[toc] | [prev] | [next] | [standalone]


#1613731

FromChristoph Hellwig <hch@lst.de>
Date2017-03-31 10:30 +0200
Message-ID<tr06t-26U-1@gated-at.bofh.it>
In reply to#1613595
On Fri, Mar 31, 2017 at 06:22:31AM +0300, Michael S. Tsirkin wrote:
> I'm not sure why does it fail after 32 on 64 bit, but as
> virtio devices aren't limited to 32 vqs it looks like we
> should go back to requesting the irq only once for all vqs.

Meh.

> 
> Christoph, should I just revert for now, or do you
> want to look into a smaller patch for this?

I think we'll need to do a different patch than just a simple revert,
mostly because so much infrastructure depends on the patch.

I'll take a look over the weekend.

> Another question is looking into intx support - that
> should work but it seems to be broken at the moment.

Does it?  I'm pretty sure I tested it back when I came up with the
series by artifically disabling MSI-X in the kernel.  I can try this
again, though.

[toc] | [prev] | [next] | [standalone]


Page 1 of 4  [1] 2 3 4  Next page →

Back to top | Article view | linux.kernel


csiph-web