From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8a7E-0006aF-EK for qemu-devel@nongnu.org; Tue, 06 Jan 2015 14:48:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y8a7A-0000rF-En for qemu-devel@nongnu.org; Tue, 06 Jan 2015 14:48:32 -0500 Received: from mail-we0-x232.google.com ([2a00:1450:400c:c03::232]:52361) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8a7A-0000r8-8f for qemu-devel@nongnu.org; Tue, 06 Jan 2015 14:48:28 -0500 Received: by mail-we0-f178.google.com with SMTP id p10so10251380wes.37 for ; Tue, 06 Jan 2015 11:48:27 -0800 (PST) Sender: Paolo Bonzini Message-ID: <54AC3C07.4020307@redhat.com> Date: Tue, 06 Jan 2015 20:48:23 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1420550957-22337-1-git-send-email-marcel@redhat.com> In-Reply-To: <1420550957-22337-1-git-send-email-marcel@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/6] simplify usb enabling logic and fix a Qemu crash List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcel Apfelbaum , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, mst@redhat.com, agraf@suse.de, stefanha@redhat.com, lersek@redhat.com, afaerber@suse.de, rth@twiddle.net On 06/01/2015 14:29, Marcel Apfelbaum wrote: > Patch e79d5a6 ("machine: remove qemu_machine_opts global list") removed option > descriptions from the -machine QemuOptsList to avoid repeating MachineState's QOM properties. > > This resulted in a Qemu crash: > $ qemu-system-x86_64 -usb > qemu-system-x86_64: util/qemu-option.c:387: qemu_opt_get_bool_helper: > Assertion `opt->desc && opt->desc->type == QEMU_OPT_BOOL' failed. > Aborted (core dumped) > > Fixed it by simplifying usb_enabled usage: > - removed the usb_enabled argument > - call directly to machine's QOM property. > - expose defaults_enabled to calling sites > > As part of this series the semantics for some ppc machines to > create the default usb controller were changed, but I still think > is correct, please let me know if you see a problem there. > > Based on the comments I will receive, I will continue to fix the options > properties in the same way. > > Marcel Apfelbaum (6): > hw/ppc: modified the condition for usb controllers to be created for > some ppc machines > hw/machine: added machine_usb wrapper > hw/usb: simplified usb_enabled > hw/ppc/mac_newworld: QOMified mac99 machines > hw/ppc/spapr: simplify usb controller creation logic > hw/ppc/mac_newworld: simplify usb controller creation logic > > hw/arm/nseries.c | 2 +- > hw/arm/pxa2xx.c | 4 ++-- > hw/arm/realview.c | 2 +- > hw/arm/versatilepb.c | 2 +- > hw/core/machine.c | 5 +++++ > hw/i386/pc_piix.c | 2 +- > hw/i386/pc_q35.c | 2 +- > hw/ppc/mac_newworld.c | 32 +++++++++++++++++++++----------- > hw/ppc/mac_oldworld.c | 2 +- > hw/ppc/prep.c | 2 +- > hw/ppc/spapr.c | 3 ++- > include/hw/boards.h | 2 ++ > include/sysemu/sysemu.h | 3 ++- > vl.c | 16 ++++++++++------ > 14 files changed, 51 insertions(+), 28 deletions(-) > I like the way you structured the series! Reviewed-by: Paolo Bonzini