From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdCYM-0006YD-5S for qemu-devel@nongnu.org; Wed, 01 Apr 2015 02:55:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YdCYH-0002uZ-TX for qemu-devel@nongnu.org; Wed, 01 Apr 2015 02:55:06 -0400 Received: from mail-wi0-x233.google.com ([2a00:1450:400c:c05::233]:36455) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdCYH-0002sK-NS for qemu-devel@nongnu.org; Wed, 01 Apr 2015 02:55:01 -0400 Received: by wixo5 with SMTP id o5so38224069wix.1 for ; Tue, 31 Mar 2015 23:55:00 -0700 (PDT) Message-ID: <551B963E.9060800@gmail.com> Date: Wed, 01 Apr 2015 09:54:54 +0300 From: Marcel Apfelbaum MIME-Version: 1.0 References: <551AAD75.8090909@linux.vnet.ibm.com> In-Reply-To: <551AAD75.8090909@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [qemu devel] disable shared memory is not available with this QEMU binary Reply-To: marcel@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Tony Krowiak , qemu-devel@nongnu.org Cc: Paolo Bonzini , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= On 03/31/2015 05:21 PM, Tony Krowiak wrote: > Commit 49d2e648e8087d154d8bf8b91f27c8e05e79d5a6 removed the QemuOptDesc elements from the > *desc* field of the *qemu_machine_opts *array defined in vl.c. Since applying that patch to qemu > on my system, I can not start a guest from libvirt when certain machine options are configured > for the guest domain. For example, if I configure the following for my guest domain: > > > ... > > ... > > > I get the following libvirt error when I try to start the guest: > > error: unsupported configuration: disable shared memory is not available with this QEMU binary > > The *nosharepages *element generates the *-machine* option *mem-merge=off* on the QEMU command line. The error is > thrown by libvirt because the QMP *query-command-line-options* command does not return *mem-merge* in the machine > options parameter list. In fact, if I issue the *query-command-line-options* command via virsh as follows: > > virsh qemu-monitor-command guest_c2aa '{ "execute": "query-command-line-options", "arguments": { "option": "machine" } }' > Hi Tony, Thank you for finding this bug. > No machine option parameters are returned: > > {"return":[{"parameters":[],"option":"machine"}],"id":"libvirt-11"} Indeed, we have a problem here. This is the first object for which QemuOps are defined per sub-type and are not global (if you don't take "object" under consideration). I saw others as well, like netdev, but I am not sure what happens there. Once the QemuOpts are parsed, the only place we can find those options is the machine object itself (as QOM properties). I see a few options here: 1. Add a feature to QemuOpts: "Look for options in QOM properties of this obj" 2. Add a callback to QEMU opts that supplies the options (have machine supply the callback) 3. Have the machine object fill in the corresponding QemuOpts on init. Any thoughts? Thanks, Marcel > > > I took a look at the *qmp_query_command_line_options* function in *util/qemu-config.c*. The function derives the > option parameters to return with the the query response from the QemuOptDesc elements contained in the > *desc* field of the *qemu_machine_opts *array defined in vl.c. It appears that removing the > QemuOptDesc elements broke the *qmp_query_command_line_options* function. If I restore the QemuOptDesc > elements removed by commit 49d2e648e8087d154d8bf8b91f27c8e05e79d5a6, I can start the guest with > *nosharepages* configured. > > It would appear that a bug was introduced with commit 49d2e648e8087d154d8bf8b91f27c8e05e79d5a6, > what say you?