From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37151) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdEj5-00032W-4X for qemu-devel@nongnu.org; Wed, 01 Apr 2015 05:14:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YdEj4-0001dt-Cj for qemu-devel@nongnu.org; Wed, 01 Apr 2015 05:14:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdEj4-0001dg-89 for qemu-devel@nongnu.org; Wed, 01 Apr 2015 05:14:18 -0400 Message-ID: <551BB6E7.4090003@redhat.com> Date: Wed, 01 Apr 2015 12:14:15 +0300 From: Marcel Apfelbaum MIME-Version: 1.0 References: <551AAD75.8090909@linux.vnet.ibm.com> <551B963E.9060800@gmail.com> <551BA5D1.8050002@redhat.com> <87fv8kxmrh.fsf@blackfin.pond.sub.org> <551BB54A.9050700@redhat.com> In-Reply-To: <551BB54A.9050700@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [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: Paolo Bonzini , Markus Armbruster Cc: Tony Krowiak , qemu-devel@nongnu.org, =?windows-1252?Q?Andreas_F=E4rber?= On 04/01/2015 12:07 PM, Paolo Bonzini wrote: > > > On 01/04/2015 10:42, Markus Armbruster wrote: >> The obvious way to return them is to put them right back in >> qemu_machine_opts.desc[]. But then -machine rejects machine-specific >> parameters. >> >> Hack: monkey-patch them in after we're done parsing. >> >> Cleaner: "empty desc[] means accept anything" has always been overly >> restrictive. Have a flag "accept additional parameters". >> >> We may have to do the former for 2.3, but that's no excuse not to >> replace it by something less gross in 2.4. > > The latter sounds less intrusive, actually. Could it be as easy as > > static bool opts_accepts_any(const QemuOpts *opts) > { > - return opts->list->desc[0].name == NULL; > + return opts->list->desc[0].name == NULL || opts->list->accept_any; > } > > ? This + 'monkey-patch' may be a feasible solution for 2.4 Thanks, I'll give it a try and see how ugly will be Marcel > > Paolo >