qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jay Zhou <jianjay.zhou@huawei.com>
Cc: qemu-devel@nongnu.org, pbonzini@redhat.com,
	weidong.huang@huawei.com, stefanha@redhat.com,
	pasic@linux.vnet.ibm.com, longpeng2@huawei.com,
	xin.zeng@intel.com, roy.fan.zhang@intel.com,
	arei.gonglei@huawei.com, wangxinxin.wang@huawei.com
Subject: Re: [Qemu-devel] [PATCH v6 2/4] cryptodev: add vhost support
Date: Tue, 13 Feb 2018 18:44:08 +0200	[thread overview]
Message-ID: <20180213184248-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <0468514c9952e09a93038a70c16e0cc7f283b1c9.1516538887.git.arei.gonglei@huawei.com>

On Sun, Jan 21, 2018 at 08:54:48PM +0800, Jay Zhou wrote:
> diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs
> index 765d363..c65dca2 100644
> --- a/hw/virtio/Makefile.objs
> +++ b/hw/virtio/Makefile.objs
> @@ -7,7 +7,7 @@ common-obj-y += virtio-mmio.o
>  obj-y += virtio.o virtio-balloon.o 
>  obj-$(CONFIG_LINUX) += vhost.o vhost-backend.o vhost-user.o
>  obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock.o
> -obj-y += virtio-crypto.o
> +obj-$(CONFIG_LINUX) += virtio-crypto.o
>  obj-$(CONFIG_VIRTIO_PCI) += virtio-crypto-pci.o
>  endif
>  

This disables virtio crypto completely on non-Linux, which is not
nice. We should not break working configs.

In particular this causes test failures on non-Linux
hosts. Peter Maydell was kind enough to debug this and reported
this backtrace:

gdb --args ./aarch64-softmmu/qemu-system-aarch64 -device virtio-crypto-pci -machine virt
[...]
#0  0x00007f7ff450e6fa in _lwp_kill () from /usr/lib/libc.so.12
#1  0x00007f7ff450e385 in abort () from /usr/lib/libc.so.12
#2  0x00007f7ff5c65da2 in g_assertion_message () from /usr/pkg/lib/libglib-2.0.so.0
#3  0x00007f7ff5c65e11 in g_assertion_message_expr () from /usr/pkg/lib/libglib-2.0.so.0
#4  0x000000000074dc16 in object_initialize_with_type (data=data@entry=0x7f7ff33a2170, size=<optimized out>, type=0x0)
    at /root/qemu/qom/object.c:372
#5  0x000000000074de33 in object_initialize (data=data@entry=0x7f7ff33a2170, size=<optimized out>, typename=<optimized out>)
    at /root/qemu/qom/object.c:392
#6  0x00000000004d2293 in virtio_instance_init_common (proxy_obj=0x7f7ff339a000, data=0x7f7ff33a2170, vdev_size=<optimized out>, 
    vdev_name=<optimized out>) at /root/qemu/hw/virtio/virtio.c:2232
#7  0x000000000074db0d in object_initialize_with_type (data=data@entry=0x7f7ff339a000, size=33664, type=type@entry=0x7f7ff7b79a80)
    at /root/qemu/qom/object.c:384
#8  0x000000000074dc66 in object_new_with_type (type=0x7f7ff7b79a80) at /root/qemu/qom/object.c:492
#9  0x000000000074deb9 in object_new (typename=typename@entry=0x7f7ff7b454e0 "virtio-crypto-pci") at /root/qemu/qom/object.c:502
#10 0x00000000005924d6 in qdev_device_add (opts=0x7f7ff7b4c070, errp=errp@entry=0x7f7fffffda10) at /root/qemu/qdev-monitor.c:615
#11 0x0000000000594d31 in device_init_func (opaque=<optimized out>, opts=<optimized out>, errp=<optimized out>) at /root/qemu/vl.c:2373
#12 0x0000000000826e56 in qemu_opts_foreach (list=<optimized out>, func=func@entry=0x594d0c <device_init_func>, opaque=opaque@entry=0x0, 
    errp=errp@entry=0x0) at /root/qemu/util/qemu-option.c:1073
#13 0x00000000008b723d in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at /root/qemu/vl.c:4642


He explained:


<pm215> ... this is almost certainly the classic "device A depends on device B, device B is conditionally compiled but device A isn't"
<pm215> the type that is missing is virtio-crypto-device
<pm215> virtio-crypto.o is built only if CONFIG_LINUX, but virtio-crypto-pci is in virtio-crypto-pci.c which is built if CONFIG_VIRTIO_PCI


-- 
MST

  reply	other threads:[~2018-02-13 16:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-21 12:54 [Qemu-devel] [PATCH v6 0/4] cryptodev: add vhost support Jay Zhou
2018-01-21 12:54 ` [Qemu-devel] [PATCH v6 1/4] cryptodev: add vhost-user as a new cryptodev backend Jay Zhou
2018-02-13 16:46   ` Michael S. Tsirkin
2018-02-14  2:30     ` Zhoujian (jay)
2018-01-21 12:54 ` [Qemu-devel] [PATCH v6 2/4] cryptodev: add vhost support Jay Zhou
2018-02-13 16:44   ` Michael S. Tsirkin [this message]
2018-02-14  2:54     ` Zhoujian (jay)
2018-01-21 12:54 ` [Qemu-devel] [PATCH v6 3/4] cryptodev-vhost-user: add crypto session handler Jay Zhou
2018-01-21 12:54 ` [Qemu-devel] [PATCH v6 4/4] cryptodev-vhost-user: set the key length Jay Zhou
2018-02-01 11:29 ` [Qemu-devel] [PATCH v6 0/4] cryptodev: add vhost support Zhoujian (jay)
2018-02-01 17:06   ` Michael S. Tsirkin
2018-02-02  1:06     ` Jay Zhou
2018-02-13 16:47 ` Michael S. Tsirkin
2018-02-14  2:35   ` Zhoujian (jay)

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=20180213184248-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=arei.gonglei@huawei.com \
    --cc=jianjay.zhou@huawei.com \
    --cc=longpeng2@huawei.com \
    --cc=pasic@linux.vnet.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=roy.fan.zhang@intel.com \
    --cc=stefanha@redhat.com \
    --cc=wangxinxin.wang@huawei.com \
    --cc=weidong.huang@huawei.com \
    --cc=xin.zeng@intel.com \
    /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).