From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmglT-0006z0-Po for qemu-devel@nongnu.org; Mon, 16 Jan 2012 02:14:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RmglN-0000wQ-O1 for qemu-devel@nongnu.org; Mon, 16 Jan 2012 02:13:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47738) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmglM-0000vz-SG for qemu-devel@nongnu.org; Mon, 16 Jan 2012 02:13:53 -0500 From: Vadim Rozenfeld In-Reply-To: References: <20120101114514.GC20432@garlic.redhat.com> <20120101141928.GE20432@garlic.redhat.com> <20120102101855.GH20432@garlic.redhat.com> <20120102114919.GJ20432@garlic.redhat.com> <1326627698.2734.1.camel@vadimr.dell> Content-Type: text/plain; charset="UTF-8" Date: Mon, 16 Jan 2012 09:13:36 +0200 Message-ID: <1326698016.2734.13.camel@vadimr.dell> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Spice-devel] Vioserial of Windows guest OS on Qemu 0.15 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Charles=2ETsai-=E8=94=A1=E6=B8=85=E6=B5=B7-=E7=A0=94=E7=A9=B6?= =?UTF-8?Q?=E7=99=BC=E5=B1=95=E9=83=A8?= Cc: Stefan Hajnoczi , Alex =?UTF-8?Q?Huang-=E9=BB=83=E5=BF=85=E8=B3=A2-=E7=A0=94=E7=A9=B6=E7=99=BC?= =?UTF-8?Q?=E5=B1=95=E9=83=A8?= , Alon Levy , qemu-devel , spice-devel@lists.freedesktop.org On Mon, 2012-01-16 at 10:02 +0800, Charles.Tsai-=E8=94=A1=E6=B8=85=E6=B5=B7= -=E7=A0=94=E7=A9=B6=E7=99=BC=E5=B1=95=E9=83=A8 wrote: > Vadim, >=20 > Thank you for your prompt reply. Here are the information for our test = case. >=20 >=20 > 1) we use the following command line to launch the guest OS >=20 >=20 > /usr/bin/kvm -S -M pc-0.14 -enable-kvm -m 1024 -smp 1,sockets=3D1,cores= =3D1,threads=3D1 -name win_xp -uuid d9388815-ddd3-c38e-33c2-a9d5fcc7a775 = -nodefconfig -nodefaults -chardev socket,id=3Dcharmonitor,path=3D/var/lib= /libvirt/qemu/win_xp.monitor,server,nowait > -mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dreadline > -rtc base=3Dlocaltime > -device virtio-serial-pci,id=3Dvirtio-serial0,bus=3Dpci.0,multifunction= =3Don,addr=3D0x5.0x0 > -drive file=3D/media/Images/Windows-XP.img,if=3Dnone,id=3Ddrive-ide0-0-= 0,format=3Draw > -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0= -0-0,bootindex=3D1 > -netdev tap,fd=3D17,id=3Dhostnet0 > -device rtl8139,netdev=3Dhostnet0,id=3Dnet0,mac=3D52:54:00:e8:dc:b1,bus= =3Dpci.0,multifunction=3Don,addr=3D0x3.0x0 > -chardev pty,id=3Dcharserial0 > -device isa-serial,chardev=3Dcharserial0,id=3Dserial0 > -chardev spicevmc,id=3Dcharchannel0,name=3Dvdagent > -device virtserialport,bus=3Dvirtio-serial0.0,nr=3D1,chardev=3Dcharchan= nel0,id=3Dchannel0,name=3Dcom.redhat.spice.0 > -usb -device usb-tablet,id=3Dinput0 > -spice port=3D5900,addr=3D0.0.0.0,disable-ticketing > -vga qxl -global qxl-vga.vram_size=3D67108864 -device virtio-balloon-pc= i,id=3Dballoon0,bus=3Dpci.0,multifunction=3Don,addr=3D0x4.0x0 >=20 >=20 >=20 > 2). In Guest Windows XP OS >=20 >=20 > When the following callback function of the vioserial device is called= in guest OS. The allocated resources is empty. >=20 >=20 > VIOSerialEvtDevicePrepareHardware() ---This function is to get the I/O = address of the vioserial device and map the physical address to the logic= al address space. >=20 > I added the following trace and the value of nListSize is ZERO. > TraceEvents(TRACE_LEVEL_INFORMATION, DBG_PNP, "%s (nListSize=3D%d)\n", = __FUNCTION__,nListSize);=20 >=20 >=20 > So far, we have tested Qemu 0.14 without any problem but Qemu 0.15 seem= ed to be broken in vioserial device. > Let me know if you need further information. Thanks. >=20 Hi Charles, You're right.=20 If WdfCmResourceListGetCount returns zero,=20 it must be a problem with resources list. Output of "info pci" and "info qtree" commands could be helpful in analyzing this problem. Best regards, Vadim. >=20 >=20 >=20 > -----Original Message----- > From: Vadim Rozenfeld [mailto:vrozenfe@redhat.com]=20 > Sent: Sunday, January 15, 2012 7:42 PM > To: Stefan Hajnoczi > Cc: Charles.Tsai-=E8=94=A1=E6=B8=85=E6=B5=B7-=E7=A0=94=E7=A9=B6=E7=99=BC= =E5=B1=95=E9=83=A8; Alon Levy; spice-devel@lists.freedesktop.org; Alex Hu= ang-=E9=BB=83=E5=BF=85=E8=B3=A2-=E7=A0=94=E7=A9=B6=E7=99=BC=E5=B1=95=E9=83= =A8; qemu-devel > Subject: Re: [Spice-devel] Vioserial of Windows guest OS on Qemu 0.15 >=20 > On Sun, 2012-01-15 at 11:27 +0000, Stefan Hajnoczi wrote: > > 2012/1/14 Charles.Tsai-=E8=94=A1=E6=B8=85=E6=B5=B7-=E7=A0=94=E7=A9=B6= =E7=99=BC=E5=B1=95=E9=83=A8 : > > > I tested Qemu 0.15 for Windows XP guest OS. But I found that= the Virtual Serial I/O driver failed in driver initialization. > > > The root cause of this problem is because the hardware resou= rces(I/O in this device) is not allocated to the virtual serial I/O. > > > When I debugged on the vioserial driver, no hardware resourc= e actually is allocated to this device. > > > This bug seems to be in the area of Qemu. Do you know whom I= can consult to fix this problem? Please let me know if you know the grou= p or the person. > >=20 > > I have CCed Vadim (virtio Windows driver) and the QEMU mailing list. > >=20 > > Please post your QEMU command-line so we can see how the guest is con= figured. > >=20 > > You mentioned that you debugged the driver and hardware resources=20 > > weren't allocated. Do you have a virtio PCI device inside the guest=20 > > for this virtio-serial device? Were you able to tell which part of=20 > > driver initialization failed (finding the PCI device, mapping its=20 > > resources (BARs), etc)? > >=20 > > Stefan >=20 > Could you post "pci info" output? >=20 > thanks, > Vadim. >=20