qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] vl: Delay initialization of memory backends


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH] vl: Delay initialization of memory backends
Date: Fri, 02 Sep 2016 08:13:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Eduardo Habkost <address@hidden> writes:

> On Wed, Aug 31, 2016 at 02:47:21PM -0700, address@hidden wrote:
> [...]
>> GTESTER check-qtest-x86_64
>> qemu-system-x86_64: Failed initializing vhost-user memory map, consider 
>> using -object memory-backend-file share=on
>> qemu-system-x86_64: vhost_set_mem_table failed: Success (0)
> [...]
>> **
>> ERROR:/tmp/qemu-test/src/tests/vhost-user-test.c:149:wait_for_fds: assertion 
>> failed: (s->fds_num)
>
> Ouch. It looks like the ordering requirements are messier than I
> thought. vhost-user depends on the memory backends to be already
> initialized.
>
> We can't use early initialization because prealloc delays chardev
> init too much. We can't delay initialization because it is done
> after netdevs.
>
> We _really_ need to change this to simply use the ordering used
> on the command-line/config instead of hardcoding messy ordering
> requirements, but I wouldn't like to wait for a QemuOpts
> refactoring to fix the bug. I will take a look at the memory
> regions initialization path, and try to trigger the
> memory-backend prealloc code there.

As discussed before, there are two workable ways to process the command
line: strictly left to right (leave ordering to the user), and "do the
right thing" (order of options doesn't matter).

Of course, we do neither.  We kind of try to do the right thing, by
adding special cases whenever we get bitten.  Order doesn't matter,
except when it does, and things work, except when they don't.
Reordering your command line may or may not get it to work.

Fails the basic interface taste test: would explaining it in plain
English be impractical and/or embarrassing?

How to best get out of this self-dug hole isn't obvious.  Switching to
strictly left to right will break some command lines.  Making order
truly not matter looks hard, because the dependencies are complex and
not well understood.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]