From: Jan Kiszka <jan.kiszka@siemens.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: KVM list <kvm@vger.kernel.org>
Subject: Re: [bug 1.1] -M pc-1.0 + vhost = SIGSEGV
Date: Mon, 02 Jul 2012 09:20:06 +0200 [thread overview]
Message-ID: <4FF14BA6.5070400@siemens.com> (raw)
In-Reply-To: <4FF06770.905@msgid.tls.msk.ru>
On 2012-07-01 17:06, Michael Tokarev wrote:
> When running current git version of qemu-kvm with -M pc-1.0
Just to clarify: you are talking about stable-1.1 git, not master.
> and with vhost-net enabled, it crashes with SIGSEGV right when
> linux guest loads a virtio-net module.
>
> I haven't tried to debug this deeply. The first result is:
>
> (gdb) ru -M pc-1.0 -nodefconfig -nodefaults -rtc base=utc -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -netdev tap,ifname=tap-kvm,script=no,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:b4:05:b5,bus=pci.0,addr=0x3 -vga cirrus
> Starting program: /build/kvm/debian/build/x86_64-softmmu/qemu-system-x86_64 -M pc-1.0 -nodefconfig -nodefaults -rtc base=utc -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -netdev tap,ifname=tap-kvm,script=no,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:b4:05:b5,bus=pci.0,addr=0x3 -vga cirrus
> ...
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0xf65f4b70 (LWP 11245)]
> 0x5668b01a in virtio_pci_mask_vq (vector=vector@entry=1, vq=0x57064448,
> masked=masked@entry=0,
> dev=<error reading variable: Unhandled dwarf expression opcode 0xfa>)
> at /build/kvm/debian/hw/virtio-pci.c:546
> 546 int r = kvm_set_irqfd(dev->msix_irq_entries[vector].gsi,
>
> Now, my gdb can't read `dev' variable. One level up the stack
> this variable is shown correctly:
>
> #1 0x5668b15d in virtio_pci_mask_notifier (dev=0x57062748, vector=1, masked=0)
> at /build/kvm/debian/hw/virtio-pci.c:576
> 576 r = virtio_pci_mask_vq(dev, vector, virtio_get_queue(vdev, n), masked);
> (gdb) p dev->msix_irq_entries[vector].gsi
> Cannot access memory at address 0x10
> (gdb) p dev
> $1 = (PCIDevice *) 0x57062748
> (gdb) p dev->msix_irq_entries
> $4 = (KVMMsiMessage *) 0x0
>
> So it looks like msix isn't initialized for -M pc-1.0 ?
Yes, because the machine option defaults are missing here. Will send a
patch.
Also vhost is buggy as it depends on in-kernel irqchip but doesn't check
for it. Needs to be fixed as well.
Jan
--
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2012-07-02 7:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-01 15:06 [bug 1.1] -M pc-1.0 + vhost = SIGSEGV Michael Tokarev
2012-07-01 15:26 ` Michael Tokarev
2012-07-02 7:20 ` Jan Kiszka [this message]
2012-07-02 9:30 ` Michael Tokarev
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=4FF14BA6.5070400@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=kvm@vger.kernel.org \
--cc=mjt@tls.msk.ru \
/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.