All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: lidong chen <chen.lidong.kernel@gmail.com>
Cc: Avi Kivity <avi@redhat.com>, kvm@vger.kernel.org
Subject: Re: virtio_net sometimes didn't work
Date: Wed, 16 Feb 2011 07:10:36 +0200	[thread overview]
Message-ID: <20110216051036.GB10461@redhat.com> (raw)
In-Reply-To: <AANLkTikg_xJiLHSaVSNK-zK3sUYgoU1k-E1Kuv=a6c9=@mail.gmail.com>

On Wed, Feb 16, 2011 at 09:53:25AM +0800, lidong chen wrote:
> because of some other work, i could not focus on this problem last month.
> 
> now i find the wrong vaule of isr cause this problem.
> in function vp_interrupt, the isr is 0, and the virtio_balloon pci
> device have 100000 times initerrupts. then IRQ #11 disabled.
> 
> static irqreturn_t vp_interrupt(int irq, void *opaque)
> {
> 	struct virtio_pci_device *vp_dev = opaque;
> 	struct virtio_pci_vq_info *info;
> 	irqreturn_t ret = IRQ_NONE;
> 	unsigned long flags;
> 	u8 isr;
> 
> 	/* reading the ISR has the effect of also clearing it so it's very
> 	 * important to save off the value. */
> 	isr = ioread8(vp_dev->ioaddr + VIRTIO_PCI_ISR);
> 
> 	/* It's definitely not us if the ISR was not high */
> 	if (!isr)
> 		return IRQ_NONE;   //return from here
> 

This implies that io addr values got swapped between the
devices. Try lspci -vv in guest and info pci in qemu and compare
the io address values.

> 
> 
> 2010/12/9 Michael S. Tsirkin <mst@redhat.com>:
> > On Fri, Nov 26, 2010 at 10:38:33AM +0800, lidong chen wrote:
> >> Does this message appear on boot, or after some stress?
> >> on boot, and only appear when boot from network.
> >>
> >> Which qemu-kvm version?
> >> [root@kvm-4slot ~]# /usr/libexec/qemu-kvm --version
> >> QEMU PC emulator version 0.12.1 (qemu-kvm-0.12.1.2), Copyright (c)
> >> 2003-2008 Fabrice Bellard
> >
> > what happens with the latest qemu?
> >
> >> Does cherry-picking 3fff0179e33cd7d0a688dab65700c46ad089e934 help?
> >> the virtio_pci have already used this patch, still have this problem.
> >>
> >> What does info irqs show in qemu?
> >> how to collect this information?
> >>
> >> but I found if modify the slot number of balloon device from 0x03 to
> >> 0x09, the problem solved.
> >>
> >>     <memballoon model='virtio'>
> >>       <alias name='balloon0'/>
> >>       <address type='pci' domain='0x0000' bus='0x00' slot='0x09'
> >> function='0x0'/>
> >>     </memballoon>
> >
> > Interesting. Is it possible that even after baloon is moved,
> > there's still the message in guest, only this time
> > things keep going afterwards?
> >
> >> and i found someone else also meet this problem.
> >> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/584675
> >>
> >>
> >>
> >> 2010/11/25 Michael S. Tsirkin <mst@redhat.com>:
> >> > On Thu, Nov 25, 2010 at 10:21:24PM +0800, lidong chen wrote:
> >> >> [version]
> >> >> the host os version is 2.6.32
> >> >
> >> > Which qemu-kvm version?
> >> >
> >> >> the guest os version is 2.6.16
> >> >>
> >> >> [dmesg]
> >> >> ACPI: (supports S3 S4 S5)
> >> >> Freeing unused kernel memory: 200k freed
> >> >> input: ImExPS/2 Generic Explorer Mouse as /class/input/input2
> >> >> ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 11
> >> >> ACPI: PCI Interrupt 0000:00:03.0[A] -> Link [LNKC] -> GSI 11 (level,
> >> >> high) -> IRQ 11
> >> >> io address 0001c040ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 10
> >> >> ACPI: PCI Interrupt 0000:00:04.0[A] -> Link [LNKD] -> GSI 10 (level,
> >> >> high) -> IRQ 10
> >> >> io address 0001c060ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 10
> >> >> ACPI: PCI Interrupt 0000:00:05.0[A] -> Link [LNKA] -> GSI 10 (level,
> >> >> high) -> IRQ 10
> >> >> io address 0001c080ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 11
> >> >> ACPI: PCI Interrupt 0000:00:06.0[A] -> Link [LNKB] -> GSI 11 (level,
> >> >> high) -> IRQ 11
> >> >> io address 0001c0a0<6>ACPI: PCI Interrupt 0000:00:07.0[A] -> Link
> >> >> [LNKC] -> GSI 11 (level, high) -> IRQ 11
> >> >> io address 0001c0c0<6>ACPI: PCI Interrupt 0000:00:08.0[A] -> Link
> >> >> [LNKD] -> GSI 10 (level, high) -> IRQ 10
> >> >> io address 0001c0e0
> >> >> irq 11: nobody cared (try booting with the "irqpoll" option)
> >> >>  [<c01457b0>] __report_bad_irq+0x2b/0x69
> >> >>  [<c0145979>] note_interrupt+0x18b/0x1b2
> >> >>  [<c01452a9>] handle_IRQ_event+0x26/0x51
> >> >>  [<c014537f>] __do_IRQ+0xab/0xdc
> >> >>  [<c0106445>] do_IRQ+0x46/0x53
> >> >>  [<c0104e8a>] common_interrupt+0x1a/0x20
> >> >>  [<c01276f2>] __do_softirq+0x4f/0xc2
> >> >>  [<c0127793>] do_softirq+0x2e/0x32
> >> >>  [<c0104f3c>] apic_timer_interrupt+0x1c/0x30
> >> >>  [<c0102d55>] default_idle+0x2e/0x5c
> >> >>  [<c0102e14>] cpu_idle+0x91/0xad
> >> >>  [<c03946e5>] start_kernel+0x34c/0x353
> >> >> handlers:
> >> >> [<f88252ee>] (vp_interrupt+0x0/0x3e [virtio_pci])
> >> >> Disabling IRQ #11
> >> >
> >> > Does this message appear on boot, or after some stress?
> >> > Does cherry-picking 3fff0179e33cd7d0a688dab65700c46ad089e934 help?
> >> > Happens with a newer kernel as guest?
> >> > What does info irqs show in qemu?
> >> >
> >> >
> >> > --
> >> > MST
> >> > --
> >> > To unsubscribe from this list: send the line "unsubscribe kvm" in
> >> > the body of a message to majordomo@vger.kernel.org
> >> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >> >
> >

  reply	other threads:[~2011-02-16  5:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-25 14:21 virtio_net sometimes didn't work lidong chen
2010-11-25 15:06 ` Michael S. Tsirkin
2010-11-26  2:38   ` lidong chen
2010-12-09 13:22     ` Michael S. Tsirkin
2011-02-16  1:53       ` lidong chen
2011-02-16  5:10         ` Michael S. Tsirkin [this message]
2011-02-16  8:00           ` lidong chen
2011-02-16  8:19             ` Michael S. Tsirkin
2011-06-23  5:37               ` lidong chen

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=20110216051036.GB10461@redhat.com \
    --to=mst@redhat.com \
    --cc=avi@redhat.com \
    --cc=chen.lidong.kernel@gmail.com \
    --cc=kvm@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.