From mboxrd@z Thu Jan 1 00:00:00 1970 From: Subject: RE: Re: graphics passthrough with VT-d Date: Mon, 31 Aug 2009 13:03:27 -0400 Message-ID: References: <7CB0A101731F44C391569BAEBF727CF9@ASOITIS16> <4A97FDE9.2060302@asiasoftsea.net> <4A980CDE.8060109@asiasoftsea.net> <4A983A73.80602@asiasoftsea.net> <14D9C9E2ED61ED41BC3B37ACDF4E880002CE4F3F9CE5@heavy-vm03.heavy.org.uk> <4A988FD4.4080602@asiasoftsea.net> <4A98A51D.6070602@asiasoftsea.net> <4A98D1AD.5060703@asiasoftsea.net> <4A990AE9.1080303@asiasoftsea.net> <4A991E57.5030703@asiasoftsea.net> <4A992B24.1070404@asiasoftsea.net> <14D9C9E2ED61ED41BC3B37ACDF4E880002CE4F3F9CE6@heavy-vm03.heavy.org.uk> <4A99375C.7050604@asiasoftsea.net><715D42877B251141A38726ABF5CABF2C054B533A0C@pdsmsx503.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Content-class: urn:content-classes:message In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Christian Tramnitz , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org I had the same problem with unpatched xen-unstable that was up-to-date this morning. This was simply in trying to pass through a usb controller, to test xen-unstable before I went ahead and applied the gfx passthrough patches. This seems like a bug in xen-unstable. -----Original Message----- From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Christian Tramnitz Sent: Monday, August 31, 2009 12:48 PM To: xen-devel@lists.xensource.com Subject: [Xen-devel] Re: graphics passthrough with VT-d I took a snapshot from xen-unstable and applied those patches. However when trying to create a HVM domU the following error comes up: # xm create test2.xm Error: local variable 'str' referenced before assignment Using config file "/etc/xen/test2.xm". And xend-debug.log gives some more info: [2009-08-31 18:10:23 6189] DEBUG (XendDomainInfo:99) XendDomainInfo.create(['vm', ['name', 'TEST2'], ['memory', 4096], ['vcpus', 8], ['on_xend_start', 'ignore'], ['on_xend_stop', 'ignore'], ['uuid', '06ed00ff-1162-4fc4-b5d8-11993ee4a8c0'], ['image', ['hvm', ['kernel', '/usr/lib/xen/boot/hvmloader'], ['videoram', 4], ['device_model', '/usr/lib/xen/bin/qemu-dm'], ['pae', 1], ['vcpus', 8], ['boot', 'c'], ['fda', ''], ['fdb', ''], ['timer_mode', 1], ['localtime', 0], ['serial', ''], ['stdvga', 0], ['isa', 0], ['nographic', 0], ['soundhw', ''], ['vncunused', 1], ['display', ':0.0'], ['xauthority', '/root/.xauthPdEBhy'], ['rtc_timeoffset', 0], ['monitor', 0], ['acpi', 1], ['apic', 1], ['usb', 0], ['usbdevice', ''], ['keymap', ''], ['pci', [['0x0000', '0x03', '0x00', '0x0', '0x100', [], '03:00.0']]], ['hpet', 0], ['guest_os_type', 'default'], ['hap', 1], ['cpuid', []], ['cpuid_check', []], ['viridian', 0], ['pci_msitranslate', 1], ['vpt_align', 1], ['pci_power_mgmt', 0], ['xen_platform_pci', 1], ['gfx_passthru', 2]]], ['s3_integrity', 1], ['device', ['vbd', ['uname', 'phy:vgtest/test2'], ['dev', 'xvda'], ['mode', 'w']]], ['device', ['pci', ['dev', ['slot', '0x00'], ['domain', '0x0000'], ['key', '03:00.0'], ['bus', '0x03'], ['vdevfn', '0x100'], ['func', '0x0']]]], ['device', ['vif', ['bridge', 'eth0'], ['mac', '00:16:3e:00:00:22'], ['type', 'netfront']]]]) [2009-08-31 18:10:23 6189] DEBUG (XendDomainInfo:2366) XendDomainInfo.constructDomain [2009-08-31 18:10:23 6189] DEBUG (balloon:181) Balloon: 4101688 KiB free; need 4096; done. [2009-08-31 18:10:23 6189] ERROR (XendDomainInfo:467) VM start failed Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/xen/xend/XendDomainInfo.py", line 452, in start XendTask.log_progress(0, 30, self._constructDomain) File "/usr/lib/python2.6/site-packages/xen/xend/XendTask.py", line 209, in log_progress retval =3D func(*args, **kwds) File "/usr/lib/python2.6/site-packages/xen/xend/XendDomainInfo.py", line 2470, in _constructDomain pci_str =3D str(pci) UnboundLocalError: local variable 'str' referenced before assignment Is this error related to the patches or is something else broken? I have to admit that I've not been using xen-unstable for some time, only release-3.4.1 and recently Xenclient, so I don't know if this is also a problem on unpatched xen-unstable. The error disappears when I omit the "pci=3D" line, but obviously this = is not a good scenario to test gfx passthrough ;-) My config file for the test-domU: kernel =3D "/usr/lib/xen/boot/hvmloader" builder=3D'hvm' memory =3D 4096 name =3D "TEST2" vcpus=3D8 vif =3D [ 'type=3Dnetfront, mac=3D00:16:3e:ff:ff:22, bridge=3Deth0' ] disk =3D [ 'phy:vgtest/test2,xvda,w' ] #viridian =3D 1 device_model =3D '/usr/lib/xen/bin/qemu-dm' #boot=3D"cd" #sdl=3D0 #opengl=3D0 #vnc=3D1 #vnclisten=3D"127.0.0.1" #vncdisplay=3D1 #vncpasswd=3D'' #stdvga=3D0 gfx_passthru=3D2 pci=3D['03:00.0'] Thanks, Christian Han, Weidong wrote: > Teo, > =20 > I attached some experimental patches for you to try to sthorugh Geforce=20 > 8400 GS. > =20 > Based on my patches posted last Friday, pls follow below instructions: > 1. apply xen-load-vbios-file.patch to xen-unstable.hg > this patch supports to load vga bios from a file. > 2. apply xen-vBAR-pBAR.patch to xen-unstable.hg > this patch is used to 1:1 map between vBAR and pBAR > 3. apply qemu-change-for-vBAR-pBAR.patch to ioemu-remote (qemu tree). > this patch is used to 1:1 map between vBAR and pBAR on qemu side > 4. apply qemu-claim-cycle-for-secondary-gfx-passthrough.patch > it's needed if you want to assign the secondary gfx to guest. > 5. cd xen-unstable.hg > 6. make clean > 7. copy the vga bios file to=20 > xen-unstabl.hg/tools/firmware/vgabios/vgabios-pt.bin > 8. make; make install > 9. reboot the system. or xend restart. then passthrough gfx to guest ... > =20 > =20 > Regards, > Weidong _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel