mercredi 12 avril 2017
[Xen 4.8.0] Windows 10 Pro 64 Bits: VGA Passthrough (HD 7970) + Xen PV Drivers 8.2.0
Par david techer, mercredi 12 avril 2017 à 01:58 :: Xen
Video (Youtube)

Xen 4.8.0: Virtual Machine = Win 10 Pro 64, GPU = HD 7970 ( Vga passthrough), RAM = 8GB, Xen PV Drivers 8.2.0
Configuration file
First I was convinced that I had to patch Xen so VGA Passthrough process can work. Reading Xen documentation I discovered that it was not the case. You just need to override msitranslate parameter to 0 for the GPU Card.
################################# # Mandatory Configuration Items # ################################# name="Windows" ######################## # Selecting Guest Type # ######################## builder='hvm' ######################## # Device-Model Options # ######################## device_model_version="qemu-xen-traditional" # 2 Parameters listed below are optional when device_model_version is set to qemu-xen-traditional # I keep them here as simple reminder :D #device_model_override="/usr/lib/xen/bin/qemu-dm" #firmware_override="/usr/lib/xen/boot/hvmloader" ################## # CPU Allocation # ################## vcpus = '4' ##################### # Memory Allocation # ##################### memory='8192' ################################################## # Fully-virtualised (HVM) Guest Specific Options # ################################################## boot="cd" hap=1 ################################### # Processor and Platform Features # ################################### #bios="rombios" # This parameter is optional and can only be set to rombios when using qemu-xen-traditional pae=1 acpi=1 apic=1 hap=1 hpet=1 ############################### # Guest Virtual Time Controls # ############################### localtime=1 ############ # Devices # ############ # Disks #====== disk = [ 'phy:/dev/xenvgssd/mercury-xenvgssd-Window-10-64Bits-disk-1,xvda,w', # Disk 1 'file:/opt/Xen/CD_DVD/Win10_1607_SingleLang_French_x64.iso,xvdc:cdrom,r', # CD-ROM ] # Network Interface #================== # Notice model e1000 is supposed to be the fastest device vif=[ 'mac=00:26:2d:23:c5:ff,bridge=xenbr0,model=e1000' ] # PCI to Passthrough #==================== # Notice: For Xen 4.8 I had # - to add rdm_policy=relaxed option for USB controllers x2 # - to override msitranslate to 0 for my graphic card as workaround for VGA Passthrough. # parameter pci_msitranslate governs all PCI. Its value can be overridden by using 'msitranslate=0' to a local PCI # That the reason why I used it for my HD 7970 AMD Card # OR use pci_msitranslate=0 as global value instead of the local parameter for GPU pci = [ '01:00.0,msitranslate=0', # VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Tahiti XT [Radeon HD 7970] '01:00.1,msitranslate=0', # Audio device: Advanced Micro Devices [AMD] nee ATI Tahiti XT HDMI Audio [Radeon HD 7970 Series] '00:1d.0,rdm_policy=relaxed', # USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05) # USB CONTROLLER - PC FRONT '00:1a.0,rdm_policy=relaxed' # USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05) # USB CONTROLLER - PC BACK ] e820_host=1 # Vga Passthrough #================= # Quoted from Xen documentation: # Note that some graphics adapters (AMD/ATI cards, for example) do not necessarily require # gfx_passthru option, so you can use the normal Xen PCI passthrough to assign the graphics card # as a secondary graphics card to the VM. The QEMU-emulated graphics card remains the primary # graphics card, and VNC output is available from the QEMU-emulated primary adapter. gfx_passthru=0 # Disables graphics device PCI passthrough. ################# # Event Actions # ################# on_poweroff = 'destroy' on_reboot = 'restart' on_crash = 'restart' ################################### # Miscellaneous Emulated Hardware # ################################### usb=1 usbdevice = 'tablet' # Required to get the pointer mouse synchronized while using VNC soundhw = "all" serial='pty' audio="on" ################################ # Emulated VGA Graphics Device # ################################ sdl=0 vnc=1 vnclisten="0.0.0.0" vncconsole=1 vncpasswd='' ################################################ # Support for Paravirtualisation of HVM Guests # ################################################ #xen_extended_power_mgmt=1 xen_platform_pci=1 viridian = 1 monitor=1