From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47904) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8qlt-00020G-1x for qemu-devel@nongnu.org; Wed, 07 Jan 2015 08:35:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y8qlr-0003Nv-U7 for qemu-devel@nongnu.org; Wed, 07 Jan 2015 08:35:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8qlr-0002Ye-Gw for qemu-devel@nongnu.org; Wed, 07 Jan 2015 08:35:35 -0500 Message-ID: <54AD1D92.9050009@redhat.com> Date: Wed, 07 Jan 2015 13:50:42 +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> <54AD1271.1080202@redhat.com> <54AD137D.4030209@redhat.com> <54AD1544.1000405@suse.de> In-Reply-To: <54AD1544.1000405@suse.de> 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: Alexander Graf , Paolo Bonzini , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, mst@redhat.com, stefanha@redhat.com, lersek@redhat.com, afaerber@suse.de, rth@twiddle.net On 01/07/2015 01:15 PM, Alexander Graf wrote: > > > On 07.01.15 12:07, Paolo Bonzini wrote: >> >> >> On 07/01/2015 12:03, Marcel Apfelbaum wrote: >>> >>> 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 >> >> That's effectively vga_interface_type == VGA_DEVICE || >> vga_interface_type == VGA_STD. That means moving select_vgahw (vl.c) that sets vga_interface_type much much earlier in main, before the current machine is created. And it depends itself on other stuff... >> >>> - (PPC_INPUT(env) == PPC_FLAGS_INPUT_970) for mac99. >>> (The env itself is set in machine_init) >> >> Alex, why is auto-USB disabled for 6xx? Can it use vga_interface_type >> like spapr does? > > That one's a nasty hack. We basically have 2 different machine types > that we expose as a single type to the user: mac99. In reality there's a > 64bit mac99 and a 32bit mac99. > > 32bit mac99 can expose keyboard and mouse via a special apple bus. That > driver doesn't work with 64bit Linux guests though, so there we need USB. > > Thinking about it, maybe the best way forward would be to create 2 > machine types out of these. Have a mac99 (32bit) and a mac99-g5 target > where the g5 target defaults to -cpu G5 and USB enabled. > > All of this is pretty frankenstein btw. What we would really want for a > G5 guest is something built around U3 or U4, not the U1 that -M mac99 > exposes. Given my (lack of) expertise on ppc, I shouldn't throw myself yet in the above adventure. Since I will not be able (soon) to get in the stuff Alex mentioned and the implications moving the setting of vga_interface_type earlier in main fall far beyond this series target (fix a bug/simpligu -usb on the way), I suggest putting the above on todo list. I plan to do the same (access machine's properties instead of quering QemuOpts) for all other machine properties because I am sure we have other hidden bugs there. Thanks, Marcel > > > Alex >