From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52135) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ycx3A-0007Dy-Hs for qemu-devel@nongnu.org; Tue, 31 Mar 2015 10:21:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ycx36-0001z3-D4 for qemu-devel@nongnu.org; Tue, 31 Mar 2015 10:21:52 -0400 Received: from e33.co.us.ibm.com ([32.97.110.151]:48584) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ycx36-0001yq-5n for qemu-devel@nongnu.org; Tue, 31 Mar 2015 10:21:48 -0400 Received: from /spool/local by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 31 Mar 2015 08:21:45 -0600 Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 2818E19D8042 for ; Tue, 31 Mar 2015 08:12:49 -0600 (MDT) Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t2VELVNW38666284 for ; Tue, 31 Mar 2015 07:21:31 -0700 Received: from d03av01.boulder.ibm.com (localhost [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t2VELg4g013502 for ; Tue, 31 Mar 2015 08:21:42 -0600 Message-ID: <551AAD75.8090909@linux.vnet.ibm.com> Date: Tue, 31 Mar 2015 10:21:41 -0400 From: Tony Krowiak MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="------------080104070501050008090503" Subject: [Qemu-devel] [qemu devel] disable shared memory is not available with this QEMU binary List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: marcel.apfelbaum@gmail.com This is a multi-part message in MIME format. --------------080104070501050008090503 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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" } }' No machine option parameters are returned: {"return":[{"parameters":[],"option":"machine"}],"id":"libvirt-11"} 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? --------------080104070501050008090503 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit 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:

    <memoryBacking>
        ...
        <nosharepages>
        ...
    </memoryBacking>

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" } }'

No machine option parameters are returned:

    {"return":[{"parameters":[],"option":"machine"}],"id":"libvirt-11"}


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?
--------------080104070501050008090503--