From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33359) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8rXU-0003If-Ch for qemu-devel@nongnu.org; Wed, 07 Jan 2015 09:24:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y8rXO-0007hI-5y for qemu-devel@nongnu.org; Wed, 07 Jan 2015 09:24:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54355) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8rXN-0007fi-VH for qemu-devel@nongnu.org; Wed, 07 Jan 2015 09:24:42 -0500 Message-ID: <54AD1271.1080202@redhat.com> Date: Wed, 07 Jan 2015 13:03:13 +0200 From: Marcel Apfelbaum MIME-Version: 1.0 References: <1420550957-22337-1-git-send-email-marcel@redhat.com> <1420550957-22337-6-git-send-email-marcel@redhat.com> <54AC496B.70501@redhat.com> In-Reply-To: <54AC496B.70501@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 5/6] hw/ppc/spapr: simplify usb controller creation logic List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , 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 01/06/2015 10:45 PM, Paolo Bonzini wrote: > > > On 06/01/2015 14:29, Marcel Apfelbaum wrote: >> @@ -1484,9 +1484,10 @@ static void ppc_spapr_init(MachineState *machine) >> /* Graphics */ >> if (spapr_vga_init(phb->bus)) { >> spapr->has_graphics = true; >> + machine->usb |= defaults_enabled(); >> } > > Could the solution be to do this in instance_init? Then you would have > patches 2, 4, 5, 6, 3 (patch 1 would not be needed anymore). Hi Paolo, Thanks for the review. While I agree it will be better if we place this in instance_init, setting the machine_usb to defaults_enabled() there would be problematic since it depends on - papr_vga_init(phb->bus) for sparpr and - (PPC_INPUT(env) == PPC_FLAGS_INPUT_970) for mac99. (The env itself is set in machine_init) Both of those conditions may be available only at machine_init time, and I am not sure how it would affect those machines. This is why I prefer it this way, Thanks, Marcel > > Paolo >