All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Tramnitz <chris.ace@gmx.net>
To: xen-devel@lists.xensource.com
Subject: Re: graphics passthrough with VT-d
Date: Mon, 31 Aug 2009 18:48:03 +0200	[thread overview]
Message-ID: <h7gusr$m71$1@ger.gmane.org> (raw)
In-Reply-To: <715D42877B251141A38726ABF5CABF2C054B533A0C@pdsmsx503.ccr.corp.intel.com>

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 = func(*args, **kwds)
  File "/usr/lib/python2.6/site-packages/xen/xend/XendDomainInfo.py",
line 2470, in _constructDomain
    pci_str = 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=" line, but obviously this is
not a good scenario to test gfx passthrough ;-)


My config file for the test-domU:
kernel = "/usr/lib/xen/boot/hvmloader"
builder='hvm'
memory = 4096
name = "TEST2"
vcpus=8
vif = [ 'type=netfront, mac=00:16:3e:ff:ff:22, bridge=eth0' ]
disk = [ 'phy:vgtest/test2,xvda,w' ]
#viridian = 1
device_model = '/usr/lib/xen/bin/qemu-dm'
#boot="cd"
#sdl=0
#opengl=0
#vnc=1
#vnclisten="127.0.0.1"
#vncdisplay=1
#vncpasswd=''
#stdvga=0
gfx_passthru=2
pci=['03:00.0']


Thanks,
   Christian


Han, Weidong wrote:
> Teo,
>  
> I attached some experimental patches for you to try to sthorugh Geforce 
> 8400 GS.
>  
> 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 
> 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 ...
>  
>  
> Regards,
> Weidong

  parent reply	other threads:[~2009-08-31 16:48 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-28 15:34 [PATCH 2/2] graphics passthrough with VT-d Teo En Ming (Zhang Enming)
2009-08-28 15:55 ` Mr. Teo En Ming (Zhang Enming)
2009-08-28 16:08   ` Mr. Teo En Ming (Zhang Enming)
2009-08-28 16:10   ` [PATCH(es)] " Tim Moore
2009-08-28 16:19     ` Alan Cox
2009-08-28 16:22       ` Tim Moore
2009-08-28 16:28     ` Mr. Teo En Ming (Zhang Enming)
2009-08-28 16:31       ` Mr. Teo En Ming (Zhang Enming)
2009-08-28 16:36       ` Alan Cox
2009-08-28 16:39         ` Mr. Teo En Ming (Zhang Enming)
2009-08-28 16:59   ` [PATCH 2/2] " Mr. Teo En Ming (Zhang Enming)
2009-08-28 20:13     ` Mr. Teo En Ming (Zhang Enming)
2009-08-28 22:42       ` Tim Moore
2009-08-29  2:17         ` Mr. Teo En Ming (Zhang Enming)
2009-08-29  3:48           ` Mr. Teo En Ming (Zhang Enming)
2009-08-29  6:58             ` Mr. Teo En Ming (Zhang Enming)
2009-08-29 11:03               ` Mr. Teo En Ming (Zhang Enming)
2009-08-29 12:25                 ` Mr. Teo En Ming (Zhang Enming)
2009-08-29 13:20                   ` Mr. Teo En Ming (Zhang Enming)
2009-08-29 13:29                     ` Tim Moore
2009-08-29 14:12                       ` Mr. Teo En Ming (Zhang Enming)
2009-08-29 14:48                         ` Mr. Teo En Ming (Zhang Enming)
2009-08-31  8:47                         ` Han, Weidong
2009-08-31 14:54                           ` Mr. Teo En Ming (Zhang Enming)
2009-08-31 16:48                           ` Christian Tramnitz [this message]
2009-08-31 17:03                             ` djmagee
2009-08-31 17:18                               ` Keir Fraser
2009-08-31 17:22                                 ` Mr. Teo En Ming (Zhang Enming)
2009-08-31 21:14                                 ` Christian Tramnitz
2009-09-01  8:08                                   ` Han, Weidong
2009-09-01  8:29                                     ` Christian Tramnitz
2009-09-01  8:59                                       ` Han, Weidong
2009-09-02  8:38                                         ` Christian Tramnitz
2009-09-02  8:48                                           ` Teo En Ming (Zhang Enming)
2009-09-02  8:57                                           ` Han, Weidong
2009-09-03 19:38                                             ` Christian Tramnitz
2009-09-04 10:25                                               ` Christian Tramnitz
2009-08-31 19:35                           ` Tim Moore
2009-09-01  1:07                             ` Han, Weidong
2009-09-01  7:12                             ` Han, Weidong
2009-08-29 13:46                     ` Mr. Teo En Ming (Zhang Enming)
2009-08-29 14:39                       ` Mr. Teo En Ming (Zhang Enming)
2009-08-29 15:06                         ` Mr. Teo En Ming (Zhang Enming)
2009-08-29 10:41             ` Failure when "make tools" via xen-3.4.1 tarball on Ubuntu 9.10 Server ALPHA 4 Boris Derzhavets
2009-08-29 11:05               ` Boris Derzhavets
2009-08-29 15:17               ` Failure to setup Xen 3.4.1 Dom0 on top of Ubuntu 9.10 Server HVM DomU ( 2.6.30.2 xenified kernel) Boris Derzhavets
2009-08-30  9:32                 ` Boris Derzhavets
2009-08-30 12:44                   ` Keir Fraser
2009-08-30 13:19                     ` Boris Derzhavets
2009-08-30 17:55                     ` Ian Pratt
2009-08-30 18:17                       ` Tim Moore
2009-08-30 18:32                         ` Keir Fraser
2009-08-30 13:26                 ` Christian Tramnitz
2009-08-30 15:17                   ` Boris Derzhavets
2009-08-30 15:53                     ` Boris Derzhavets
2009-08-30 15:50                   ` Keir Fraser
2009-08-30 16:22                     ` Boris Derzhavets
2009-08-30 16:41                       ` Keir Fraser
2009-08-30 16:55                         ` Keir Fraser
2009-08-30 17:10                           ` Boris Derzhavets
2009-08-30 17:49                             ` Keir Fraser
2009-08-30 18:14                   ` Failure to start Xen >3.4.1 and xen-3.5-unstable Dom0 using GRUB2 Tim Moore
2009-08-30 18:19                   ` Re: Failure to setup Xen 3.4.1 Dom0 on top of Ubuntu 9.10 Server HVM DomU ( 2.6.30.2 xenified kernel) Boris Derzhavets
2009-08-31  7:17                     ` Boris Derzhavets

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='h7gusr$m71$1@ger.gmane.org' \
    --to=chris.ace@gmx.net \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.