From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42383) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCp1A-0008HA-Vp for qemu-devel@nongnu.org; Tue, 05 Mar 2013 05:22:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UCp15-0006q5-Vo for qemu-devel@nongnu.org; Tue, 05 Mar 2013 05:22:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44214) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCoua-00056b-Du for qemu-devel@nongnu.org; Tue, 05 Mar 2013 05:15:56 -0500 Message-ID: <5135C699.6000207@redhat.com> Date: Tue, 05 Mar 2013 11:19:05 +0100 From: Hans de Goede MIME-Version: 1.0 References: <511A3E25.9010303@tiscali.it> <51307CC7.1080107@tiscali.it> In-Reply-To: <51307CC7.1080107@tiscali.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Spice-devel] Advice on some configuration parameters List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: fantonifabio@tiscali.it Cc: spice-devel@lists.freedesktop.org, qemu-devel@nongnu.org Hi, On 03/01/2013 11:02 AM, Fabio Fantoni wrote: > Il 12/02/2013 14:05, Fabio Fantoni ha scritto: >> I'm making patches to enable some qemu upstream features in xen that are missing in libxl. >> I'm trying to do it just by giving arguments to qemu, and I want them to be dynamic (e.g. without physical addresses if possible) and concise. >> >> I'm confused about usb configuration. >> >> Looking at what virt-manager does, it seems that you set the usbredirection in channels like this: >> -chardev spicevmc,id=charredir0,name=usbredir -device usb-redir,chardev=charredir0,id=redir0 >> >> At the moment I'm defining the physical usb devices like this: >> -readconfig /etc/qemu/ich9-ehci-uhci.cfg >> >> If I try to set up virt-manager so that it doesn't point to a file, it uses this configuration: >> >> -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x5.0x7 >> -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x5 >> -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x5.0x1 >> -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x5.0x2 >> >> This seems to differ from the configuration file, e.g. you have multifunzion=on only on the first uhci That does not matter the multifunction bit needs to set only on 0x5.0x0. > besides I can't understand how many physical ports are defined. 6, the same as with the "-readconfig /etc/qemu/ich9-ehci-uhci.cf" directive. > I tried setting 9 usbredirection channels in virt-manager but that configuration doesn't change and no errors are reported, but I doubt that physical ports are being define dynamically. Hmm, that would be a libvirt bug you should be able to add only 6 usb-redir channels, unless you add a second usb controller ... Possibly libvirt is also adding a hub? That would work sort-of, it would make channels 6-9 be usb-1 only, since we don't emulate usb-2 hubs. >> >> Can you omit physical addresses? In most cases yes, then qemu will pick one itself. >> I searched the web but I can't find detailed informations about it. Can someone explain in detail how you are supposed to configure usb physical ports? I want to enable both usb redirection and usb passthrough in a dynamic and concise manner. The easiest way to do is probably to create the setup you want using virt-manager and then run the vm once, after that the xml file should contain fixed addresses for all devices. >> >> About spice vdagent at the moment I'm using this configuration that seems to work: >> -device virtio-serial -chardev spicevmc,id=vdagent,name=vdagent -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 >> >> But I noticed that virt-manager use this slightly different one: >> -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 >> >> Are there any problem with the more concise one I'm using? No. Regards, Hans