From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33873) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdEcX-0006mC-7z for qemu-devel@nongnu.org; Wed, 01 Apr 2015 05:07:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YdEcS-0007TH-6c for qemu-devel@nongnu.org; Wed, 01 Apr 2015 05:07:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52414) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdEcS-0007T9-1E for qemu-devel@nongnu.org; Wed, 01 Apr 2015 05:07:28 -0400 Message-ID: <551BB54A.9050700@redhat.com> Date: Wed, 01 Apr 2015 11:07:22 +0200 From: Paolo Bonzini 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> In-Reply-To: <87fv8kxmrh.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset=windows-1252 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: Markus Armbruster Cc: marcel@redhat.com, Tony Krowiak , qemu-devel@nongnu.org, =?windows-1252?Q?Andreas_F=E4rber?= 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; } ? Paolo