WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] vga passthrough xen 4.1.1 ubuntu 11.10 kernel 3.1.0-0301

To: Martin Wolf <mwolf@xxxxxxxxxxxxxx>
Subject: Re: [Xen-users] vga passthrough xen 4.1.1 ubuntu 11.10 kernel 3.1.0-0301rc9-generic x86_64
From: chris <tknchris@xxxxxxxxx>
Date: Sat, 22 Oct 2011 13:05:24 -0400
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sat, 22 Oct 2011 10:06:53 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=nKcFO3IZFOCBob7RQNkwPFna8nPzDnMJTFJBLbaTTrM=; b=XGA8pnwMo7Y7fP11CxP1cOocS+xT1ijd5vExKfrd9N7KcNxDVADcWycUZJq7Emco+Y bpmsV69jKxmtcC5UIoUgADtXvrh0YZkTAQmah875QK1Uf2/M/NNWWn5n7+fJeHClWfzF nXsgA/8f6KSfqbAZyexN3uwYUbxqWItPdPcl4=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4EA2AE35.5010908@xxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <4E9DF091.6090802@xxxxxxxxxxxxxx> <CAKnNFz9CqG+jh5XtxQsAJbpDoSaXSTJ+S1UsEHazZhWTRqTwAw@xxxxxxxxxxxxxx> <4EA2AE35.5010908@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
there is no facility to switch video dynamically for HVM domains. with PV sure this is more doable, but you are working with an unmodified OS here which belives it is running on physical hardware. once you initialize your VGA card once thats pretty much it in most cases you cant just pass it around to different domains :)

On Sat, Oct 22, 2011 at 7:51 AM, Martin Wolf <mwolf@xxxxxxxxxxxxxx> wrote:
if i do that, i would have no video output on xen right?
is there no way to "switch" video output?


Am 19.10.2011 03:56, schrieb chris:
lspci shows there is a driver loaded in dom0 for your vga. i think that is your problem, try blacklisting i915 and see if it works. you also might have better luck doing the unbinding and rebinding manually

check out

section Binding Devices to pci-stub

I had setup a large number of boxes doing vtd and i found that doing everything the most manual way made it much easier to debug problems one by one as i encountered and solved them.

good luck,
chris

On Tue, Oct 18, 2011 at 5:33 PM, Martin Wolf <mwolf@xxxxxxxxxxxxxx> wrote:
hello,

i hope i did not sent it twice since im not sure if the first one was posted.

okay now to the problem


im trying to get a vm with vga passthrough running but i get always this
error:  Error: pci: PCI Backend and pci-stub don't own device 0000:00:02.0

The PC contains an Intel DQ67SW mainboard (q67 chipset) and an i5-2400s.
according to xm dmesg | grep I/O
(XEN) I/O virtualisation enabled
 vt-d is active.

im using kernel 3.1.0-0301rc9-generic x86_64 with CONFIG_XEN_PCIDEV_BACKEND=m
and i loaded the module with following options in /etc/modprobe.d/xen-pciback
options xen-pciback passthrough=1
dmesg shows that with
[   15.566815] xen-pciback: backend is passthrough

and this is my config file for the vm:


import os, re
arch = os.uname()[4]
if re.search('64', arch):
    arch_libdir = 'lib64'
else:
    arch_libdir = 'lib'

kernel = "/usr/lib/xen/boot/hvmloader"
builder='hvm'
memory = 6144

# Should be at least 2KB per MB of domain memory, plus a few MB per vcpu.
shadow_memory = 32
name = "xenwin7"
vif = [ 'type=ioemu, bridge=virbr0' ]
acpi = 1
apic = 1
#disk = [ 'phy:/dev/sdb,hda,w' ]
#disk = [ 'phy:/dev/sdb,hda,w', 'phy:/dev/cdrom,hdc:cdrom.r' ]
#disk = [ 'file:/home/xen/xenwin7.img,hda,w', 'file:/home/xen/windows7.iso,hdc:$
disk = [ 'file:/home/martin/xenwin7.img,hda,w', 'phy:/dev/cdrom,hdc:cdrom,r' ]


device_model = '/usr/' + arch_libdir + '/xen/bin/qemu-dm'

#-----------------------------------------------------------------------------
# boot on floppy (a), hard disk (c) or CD-ROM (d)
# default: hard disk, cd-rom, floppy
boot="dc"
sdl=0
vnc=1
vncconsole=1
vncpasswd=''

serial='pty'
usbdevice='tablet'

gfx_passthru=1
pci=['00:02.0']

this is the lspci output of the videocard.

00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) (prog-if 00 [VGA controller])
        Subsystem: Intel Corporation Device 2008
        Flags: bus master, fast devsel, latency 0, IRQ 307
        Memory at fe000000 (64-bit, non-prefetchable) [size=4M]
        Memory at d0000000 (64-bit, prefetchable) [size=256M]
        I/O ports at f000 [size=64]
        Expansion ROM at <unassigned> [disabled]
        Capabilities: <access denied>
        Kernel driver in use: i915
        Kernel modules: i915


i really hope you can give me an idea where to continue.

best wishes and thanks in advance.
martin






_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users



_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


-- 
Adiumentum GmbH
Gf. Martin Wolf
Banderbacherstraße 76
90513 Zirndorf

0911 / 9601470
mwolf@xxxxxxxxxxxxxx

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users