Martin Wolf
2011-Oct-18 16:17 UTC
[Xen-users] vga passthrough xen 4.1.1 ubuntu 11.10 kernel 3.1.0-0301rc9-generic x86_64
hello, 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@lists.xensource.com http://lists.xensource.com/xen-users
Martin Wolf
2011-Oct-18 21:33 UTC
[Xen-users] vga passthrough xen 4.1.1 ubuntu 11.10 kernel 3.1.0-0301rc9-generic x86_64
chris
2011-Oct-19 01:56 UTC
Re: [Xen-users] vga passthrough xen 4.1.1 ubuntu 11.10 kernel 3.1.0-0301rc9-generic x86_64
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 http://wiki.xen.org/xenwiki/VTdHowTo 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@adiumentum.com> 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@lists.xensource.com > http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Martin Wolf
2011-Oct-22 11:51 UTC
Re: [Xen-users] vga passthrough xen 4.1.1 ubuntu 11.10 kernel 3.1.0-0301rc9-generic x86_64
Boris Derzhavets
2011-Oct-22 14:48 UTC
Re: [Xen-users] vga passthrough xen 4.1.1 ubuntu 11.10 kernel 3.1.0-0301rc9-generic x86_64
Not sure it will help. Build Xen 4.1.2 for Ubuntu Oneiric https://launchpad.net/~bderzhavets/+archive/xen-next5 Boris. --- On Sat, 10/22/11, Martin Wolf <mwolf@adiumentum.com> wrote: From: Martin Wolf <mwolf@adiumentum.com> Subject: Re: [Xen-users] vga passthrough xen 4.1.1 ubuntu 11.10 kernel 3.1.0-0301rc9-generic x86_64 To: xen-users@lists.xensource.com Date: Saturday, October 22, 2011, 7:51 AM 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 http://wiki.xen.org/xenwiki/VTdHowTo 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@adiumentum.com> 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@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users -- Adiumentum GmbH Gf. Martin Wolf Banderbacherstraße 76 90513 Zirndorf 0911 / 9601470 mwolf@adiumentum.com -----Inline Attachment Follows----- _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
chris
2011-Oct-22 17:05 UTC
Re: [Xen-users] vga passthrough xen 4.1.1 ubuntu 11.10 kernel 3.1.0-0301rc9-generic x86_64
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@adiumentum.com> 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 > http://wiki.xen.org/xenwiki/VTdHowTo > > 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@adiumentum.com> 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@lists.xensource.com >> http://lists.xensource.com/xen-users >> > > > > _______________________________________________ > Xen-users mailing listXen-users@lists.xensource.comhttp://lists.xensource.com/xen-users > > > > -- > Adiumentum GmbH > Gf. Martin Wolf > Banderbacherstraße 76 > 90513 Zirndorf > > 0911 / 9601470mwolf@adiumentum.com > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users