From: Gerd Hoffmann <kraxel@redhat.com>
To: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>,
"seabios@seabios.org" <seabios@seabios.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Cc: James Morse <james.morse@arm.com>
Subject: Re: [PATCH seabios 3/3] kvmtool: support larger virtio queues
Date: Fri, 03 Nov 2017 16:34:26 +0100 [thread overview]
Message-ID: <1509723266.5662.5.camel@redhat.com> (raw)
In-Reply-To: <66585b58-481f-7eb2-1786-43e377619368@arm.com>
On Fri, 2017-11-03 at 13:49 +0000, Jean-Philippe Brucker wrote:
> On 02/11/17 15:50, Gerd Hoffmann wrote:
> > Queues have 256 entries on kvmtool, support that. Needs more
> > memory for
> > virtqueues now. But with the move to 32bit drivers for virtio this
> > should not be much of an issue any more.
> >
> > Known problems (probably kvmtool bugs):
> > * Must bump to 260 entries to make things actually work,
> > otherwise kvmtool segfaults. Oops.
>
> You mean setting MAX_QUEUE_NUM to 256 instead of 260 in seabios
> causes a
> kvmtool crash?
yes.
> Do you have any more detail on the segfault?
Ok, lets have a look with gdb ...
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f81caf3c700 (LWP 20234)]
virt_queue__get_head_iov (vq=vq@entry=0x7f82576be0a0, iov=iov@entry=0x7
f826770aae0,
out=out@entry=0x7f826770bae0, in=in@entry=0x7f826770bae2,
head=65104, kvm=kvm@entry=0x246eee0)
at virtio/core.c:105
105 *out = *in = 0;
(gdb) bt
#0 0x000000000040c91b in virt_queue__get_head_iov (vq=vq@entry=0x7f825
76be0a0, iov=iov@entry=0x7f826770aae0, out=out@entry=0x7f826770bae0, in
=in@entry=0x7f826770bae2, head=65104, kvm=kvm@entry=0x246eee0) at
virtio/core.c:105
#1 0x000000000040bbf7 in virtio_blk_thread (bdev=0x7f82576be010,
vq=0x7f82576be0a0, kvm=0x246eee0)
at virtio/blk.c:134
#2 0x000000000040bbf7 in virtio_blk_thread (dev=0x7f82576be010) at
virtio/blk.c:208
#3 0x00007f82571c6e25 in start_thread () at /lib64/libpthread.so.0
#4 0x00007f82543b134d in clone () at /lib64/libc.so.6
(gdb) print *vq
$1 = {vring = {num = 256, desc = 0x7f824cf3e000, avail =
0x7f824cf3f000, used = 0x7f824cf40000},
pfn = 524285, last_avail_idx = 263, last_used_signalled = 1, endian =
1}
last_avail_idx looks bogus ...
> Since seabios doesn't use the event indexes, this would lead to
> missing signals, but not a segfault.
seabios polls anyway, so it doesn't need signals.
> > * Linux kernel doesn't find virtio-blk devices after seabios
> > initialized them. virtio device reset not working properly?
>
> No, reset isn't implemented at all... A lot of work is required to
> properly clear the state and threads of each device.
Hmm. That is required for any kind of boot loader support though.
/me wonders what the kvmtool --firmware switch is good for then if a
direct kernel boot is apparently the only thing which actually works.
cheers,
Gerd
next prev parent reply other threads:[~2017-11-03 15:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-02 15:50 [PATCH seabios 0/3] add kvmtool support Gerd Hoffmann
2017-11-02 15:50 ` [PATCH seabios 1/3] kvmtool: initial support Gerd Hoffmann
2017-11-02 15:50 ` [PATCH seabios 2/3] kvmtool: allow mmio for legacy bar 0 Gerd Hoffmann
2017-11-02 15:50 ` [PATCH seabios 3/3] kvmtool: support larger virtio queues Gerd Hoffmann
2017-11-03 13:49 ` Jean-Philippe Brucker
2017-11-03 15:34 ` Gerd Hoffmann [this message]
2017-11-03 19:42 ` Jean-Philippe Brucker
2017-11-06 14:54 ` Jean-Philippe Brucker
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=1509723266.5662.5.camel@redhat.com \
--to=kraxel@redhat.com \
--cc=james.morse@arm.com \
--cc=jean-philippe.brucker@arm.com \
--cc=kvm@vger.kernel.org \
--cc=seabios@seabios.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.