Announcement

Collapse
No announcement yet.

Xen - VGA passthrough is the way to go!!!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • grantek
    replied
    Originally posted by unknown2 View Post
    if i have only one monitor and 1 display card, can i perform VGA passthrough?
    No, you need 2 display cards (eg. a built-in one on the motherboard and a discrete PCI-E graphics card or a laptop with something like an Optimus setup with 2 GPUs)

    What I want to know is if it's possible for Windows to have accelerated graphics display on an output with no 3d acceleration. Eg. for a physical machine, you might have one of those USB GPUs with a second display on it, would it be possible to display part or all of a game window on that output, with the 3D work being done by a PCIE GPU and redirected back via the PCIE bus to the other output, even if it's a significant performance hit.

    If that's possible, then you could have Xen pass through a discrete GPU, and also emulate the usual Cirrus graphics. The guest sees 2 heads, but you only really work on the Cirrus display with the discrete GPU doing 3d work and passing it back to the emulated display. Basically you could have a hardware-accelerated guest display in a window on the Dom0 desktop without having to dedicate a monitor (or monitor input) to it.

    Like I said, it'd likely cause a big performance hit, but if it's less than 50% it'd probably be acceptable for a lot of cases.

    Leave a comment:


  • unknown2
    replied
    if i have only one monitor and 1 display card, can i perform VGA passthrough?

    besides, is it "stable"? e.g will it works on nvidia 690, but fail on nvidia 680
    or works on HSI cards, but fail on Inno3D cards.

    Leave a comment:


  • thorgas
    replied
    Good you, thanks a lot!

    Just passing the secondary graphics card seems to be a quite good first step. I'll try to use the GPU from the chipset for dom0 and pass the powerful GPU to domU.

    If I get along with that and get some good results I'll show up with a howto again

    Leave a comment:


  • jockinator
    replied
    pci passthrough vs vga passthrough

    I do PCI passthrough (because I have 2 graphics cards). it's really easier to setup. if you have only 1 graphic card, then you need to do VGA passthrough which require patching/rebuilding xen.

    basically to setup your HVM, you need to modify the .cfg, so that :
    vnc=1 (to have a display, before you install the driver)
    setup the disk to point to windows iso file

    I don't have time to provide a complete howto, but you can follow any xen HVM howto.
    [https://help.ubuntu.com/community/XenProposed]
    then you only need the "xen_remove.sh" script and the pci=[ '00:1a.0', '01:00.0', '01:00.1', '04:00.0' ] in your vm .cfg to have pci passthrough working.

    Leave a comment:


  • thorgas
    replied
    Thank you a lot. Got the same GPU overhere trying to set VGA Passthrough up.

    My new setup works nicefully with PCI Passthrough (very easy to setup, all standard package from Ubuntu 12.04, no patch).
    Would you kindly tell me more about the easy setup, what steps did you go through?
    I'll try to install the xen Kernel for Xubuntu 12.04 and virt-manager to create my VM but I don't really know how to go on.
    Do I just have to run the unregister script and change the xen configuration like you did or is there more to do?

    Greetings, Thorgas

    Leave a comment:


  • jockinator
    replied
    configuration of a working setup (pci passthrough)

    HW config is in a previous post.
    here is the result of lspci

    00:00.0 Host bridge: Intel Corporation Ivy Bridge DRAM Controller (rev 09)
    00:01.0 PCI bridge: Intel Corporation Ivy Bridge PCI Express Root Port (rev 09)
    00:02.0 VGA compatible controller: Intel Corporation Ivy Bridge Graphics Controller (rev 09)
    00:14.0 USB controller: Intel Corporation Panther Point USB xHCI Host Controller (rev 04)
    00:16.0 Communication controller: Intel Corporation Panther Point MEI Controller #1 (rev 04)
    00:1a.0 USB controller: Intel Corporation Panther Point USB Enhanced Host Controller #2 (rev 04)
    00:1b.0 Audio device: Intel Corporation Panther Point High Definition Audio Controller (rev 04)
    00:1c.0 PCI bridge: Intel Corporation Panther Point PCI Express Root Port 1 (rev c4)
    00:1c.5 PCI bridge: Intel Corporation Panther Point PCI Express Root Port 6 (rev c4)
    00:1c.7 PCI bridge: Intel Corporation Panther Point PCI Express Root Port 8 (rev c4)
    00:1d.0 USB controller: Intel Corporation Panther Point USB Enhanced Host Controller #1 (rev 04)
    00:1f.0 ISA bridge: Intel Corporation Panther Point LPC Controller (rev 04)
    00:1f.2 SATA controller: Intel Corporation Panther Point 6 port SATA Controller [AHCI mode] (rev 04)
    00:1f.3 SMBus: Intel Corporation Panther Point SMBus Controller (rev 04)
    01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Tahiti PRO [Radeon HD 7950]
    01:00.1 Audio device: Advanced Micro Devices [AMD] nee ATI Tahiti XT HDMI Audio [Radeon HD 7970 Series]
    03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)
    04:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 01)

    my script to unregister pci devices (needed before starting the VM)

    joc@xenos:~ cat xen_remove.sh
    remove_device () {
    BDF=$1
    # Unbind a PCI function from its driver as necessary
    [ ! -e /sys/bus/pci/devices/$BDF/driver/unbind ] || \
    echo -n $BDF > /sys/bus/pci/devices/$BDF/driver/unbind
    # Add a new slot to the PCI Backend's list
    echo -n $BDF > /sys/bus/pci/drivers/pciback/new_slot
    # Now that the backend is watching for the slot, bind to it
    echo -n $BDF > /sys/bus/pci/drivers/pciback/bind
    }

    #usb controller
    remove_device "0000:00:1a.0"
    #sata controller
    remove_device "0000:04:00.0"
    #radeon 7950
    remove_device "0000:01:00.0"
    remove_device "0000:01:00.1"

    my xen configuration file :

    kernel="/usr/lib/xen-default/boot/hvmloader"
    builder='hvm'
    memory = 8096
    vcpus=6
    name = "win7steam"
    vif = [ 'type=ioemu, bridge=br0' ]
    disk = ['phy:/dev/sda7,ioemu:hda,w','phy:/dev/sda9,ioemu:hdb,w']
    acpi = 1
    boot="c"
    sdl=0
    serial='pty'
    vnc=0
    pci=[ '00:1a.0', '01:00.0', '01:00.1', '04:00.0' ]

    also I use a usb switch


    so I can switch my keyboard/mouse/gaming pad from win7 to linux easily
    also I connect the intel graphic card to my LCD with DVI, and my radeon HD on the same screen with HDMI.
    on the monitor, switching the input source make me switch from Linux to Windows. (I then press the USB switch, and my keyboard/mouse enumerate on the OS)
    to avoid passing sound, I bought a USB soundcard, connected to one of the "windows" usb port.


    I tried to setup a linux PVM too (to use the powerful radeon under Linux). but I got a kernel panic when passing pci devices.

    Leave a comment:


  • thorgas
    replied
    Originally posted by jockinator View Post
    My new setup works nicefully with PCI Passthrough (very easy to setup, all standard package from Ubuntu 12.04, no patch).

    here is my hw :
    core i7-3770 (do not take the "K" because it doesn't have iommu)
    asrock Z77 Pro4-M
    sapphire radeon HD 7950
    16G DDR.

    basically I have xen 4.1.2, a Dom0 running Ubuntu 12.04, on the Intel HD4000 graphique card. (connected in DVI to my screen).
    and a HVM DomU (windows8 release preview) on the radeon HD 7950 (connected on the same screen with HDMI).

    so I can switch from Linux/Windows by changing the source on the screen. (1 button).

    I can share my settings if someone need it.

    also in the future I may add an ubuntu PVM which will use the radeon HD7950 for Linux game.
    Yes please, share your configuration

    Leave a comment:


  • powerhouse
    replied
    Originally posted by jockinator View Post
    according to Intel spec, it is called Intel? "HD Graphics 4000"


    so now i have a free OS with free graphics driver, and a proprietary with catalyst, running at the same time.
    I'll check if HD4000 on Linux is enough for humble indie bundle games, otherwise I will have to setup a Linux PVM, to use the radeon.
    Congratulations! I wish i could already go ahead with installing, but my PC is still at the repair shop where they're trying to figure out the hardware issues.

    Leave a comment:


  • jockinator
    replied
    Originally posted by Linuxxx View Post
    Just a small correction: HD 2500 GPU
    (yeah, this whole K and non-K non-sense from Intel really sucks, but atleast they do have the OSTC [almost Halo 3 style])
    according to Intel spec, it is called Intel? "HD Graphics 4000"


    so now i have a free OS with free graphics driver, and a proprietary with catalyst, running at the same time.
    I'll check if HD4000 on Linux is enough for humble indie bundle games, otherwise I will have to setup a Linux PVM, to use the radeon.

    Leave a comment:


  • Linuxxx
    replied
    Typo...

    Originally posted by jockinator View Post
    ...on the Intel HD4000 graphique card...
    Just a small correction: HD 2500 GPU
    (yeah, this whole K and non-K non-sense from Intel really sucks, but atleast they do have the OSTC [almost Halo 3 style])

    Leave a comment:

Working...
X