HOW-TO make dual-boot obsolete using kvm VGA passthrough

Questions about virtualization software
Forum rules
Before you post please read how to get help
HPMint
Level 1
Level 1
Posts: 23
Joined: Mon Aug 18, 2014 10:56 am

Re: HOW-TO make dual-boot obsolete using kvm VGA passthrough

Postby HPMint » Thu Sep 21, 2017 4:29 pm

Arp wrote:But still, dmesg will not show me "DMAR: Intel(R) Virtualization Technology for Directed I/O".


Hello

Did you follow the 4th step of the first part?
You need to edit grub configuration and reboot.

powerhouse
Level 5
Level 5
Posts: 987
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: HOW-TO make dual-boot obsolete using kvm VGA passthrough

Postby powerhouse » Fri Sep 22, 2017 8:19 am

HPMint wrote:
Arp wrote:But still, dmesg will not show me "DMAR: Intel(R) Virtualization Technology for Directed I/O".


Hello

Did you follow the 4th step of the first part?
You need to edit grub configuration and reboot.


After editing the grub file, make sure to run

Code: Select all

sudo update-grub
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Gigabyte GTX 970 + PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB + Samsung EVO 850 250GB SSD + 5 HDD, Corsair 500R case, SeaSonic 660W Gold X PS

powerhouse
Level 5
Level 5
Posts: 987
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: HOW-TO make dual-boot obsolete using kvm VGA passthrough

Postby powerhouse » Fri Sep 22, 2017 8:23 am

HPMint wrote:This is the result of the passmark test:

Image

The result seems low. But I give only 2 core & 2 threads from the 7700. No OC.
The 2D perf of the CG is pretty low too.


That doesn't look too bad, particularly when you consider the no. of cores/threads you use for the VM.

My 2D performance is also low, but I can't see any problem with that.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Gigabyte GTX 970 + PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB + Samsung EVO 850 250GB SSD + 5 HDD, Corsair 500R case, SeaSonic 660W Gold X PS

powerhouse
Level 5
Level 5
Posts: 987
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: HOW-TO make dual-boot obsolete using kvm VGA passthrough

Postby powerhouse » Fri Sep 22, 2017 8:25 am

juju wrote:Posting this reply from my Windows 7 x64 Ultimate SP1 KVM VGA Passthrough! What a very long and strange trip this has been :roll:

http://www.userbenchmark.com/UserRun/4934991

I managed to create a Win 7 VM from a USB Drive that was made with official win7 ult x64 sp1 ISO and rufus USB creator tool. I made this using my Windows 10 x64 passthrough :)

What worked was during the Windows 7 install my card was passthroughed, but I did not use the video card during the install process at all or even Windows 7 updates. I had vga std and nographic set the entire time until Windows updates put NVIDIA Driver on the machine, bingo!

After this point I could not get back into the VM...kind of expected though cause nothing has worked for like 2 weeks now.

I figured I would try again and install over the last install, this time I was using my Passthroughed card when trying to install instead of the vga std and nographic like last time. So I created a UEFI Bootable Win 7 ISO from the knowledge I learned over the past week, but I could not get the VM to boot to it at all. So I started fiddling with the boot to file options in the BIOS, I must have hit the right file in my Windows 7 Ult x64 Install that I did previously and my machine booted to it to my wild surprise. Since I had installed the NVIDIA Driver previously, I checked dxdiag and my GTX 970 shows up. Linux Mint Host is just fine while my Win 7 guest is running.

I need to take sometime to analyze what the rainbows actually made this work and save it off to the side but I think I have some clues. Windows Update is asking me to reboot lets hope I can get back to this point reliably :wink:

Cheers,
Juju

Congratulations! You actually made it. For the record, I gave up on Windows 7 and UEFI boot long ago.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Gigabyte GTX 970 + PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB + Samsung EVO 850 250GB SSD + 5 HDD, Corsair 500R case, SeaSonic 660W Gold X PS

powerhouse
Level 5
Level 5
Posts: 987
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: HOW-TO make dual-boot obsolete using kvm VGA passthrough

Postby powerhouse » Fri Sep 22, 2017 8:30 am

About mounting qcow images under Linux, see http://ask.xmodulo.com/mount-qcow2-disk-image-linux.html.

Make sure you DON'T run the VM at the same time!!!
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Gigabyte GTX 970 + PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB + Samsung EVO 850 250GB SSD + 5 HDD, Corsair 500R case, SeaSonic 660W Gold X PS

juju
Level 1
Level 1
Posts: 7
Joined: Sun Aug 27, 2017 9:45 pm

Re: HOW-TO make dual-boot obsolete using kvm VGA passthrough

Postby juju » Sun Sep 24, 2017 12:47 pm

powerhouse wrote:About mounting qcow images under Linux, see http://ask.xmodulo.com/mount-qcow2-disk-image-linux.html.

Make sure you DON'T run the VM at the same time!!!


Roger! I made a mount script that has a check like in your VM Launcher script to see if it is not running then it mounts the disk drive. Mounting the drive works great I copied an ISO to my host that was downloaded to a Guest machine.

The short and sweet way to get Windows 7 working "easily" and this worked with both SP1 and non SP1 and does not require any uefi rufus media creation steps at all - I confirmed yesterday this works consistently and also found a workaround to have windows 7 boot without going into the bios and doing maintenance boot to file.

1) Make a VM with your Video Card passed through but use Spice and Cirrus instead of using the physical card for video during setup, mount the virtio driver disk from redhat, use whatever WIndows 7 ISO you have - q35 with ovmf etc same as the Win 10 setup
(I found it easy to use virt-manager to do the above, even though I don't use it ultimately in the end and never used it before, it default added the Spice and I switched it from qxl to cirrus - its pretty easy to pass through the video card and usb devices you need to setup the machine in virt-manager dialogs)

2) Install Windows 7 like normal to the Virtual disk, you will choke at "Starting Windows" if using qxl video mode is set - so make sure to use Cirrus (I could be mixing the two but I am almost certain you want to use cirrus), Update Windows 7 reboot a few times, Install your Nvidia Video Card Driver

3) Modify your Windows 10 qemu launcher script to point to the Windows 7 disk instead (Stop using Cirrus and just use your video card like you normally would), I literately just copy pasted your Windows 10 launcher renamed vm and pointed to new disk.

When I stop using virt-manager, and toss the qcow2 image I made into a copied launcher shell script identical to your windows 10 qemu launcher - when I run it it will not boot to the OS it gets stuck in the bios, this is fine.

4) How you get into the OS is you go into the BIOS and into the Boot maintenance manager, choose boot to file, choose the disk device that has Windows 7 installed on it (Not the network device), navigate to: C:\Windows\Boot\EFI\bootmgfw.efi - use this to boot. Now your Windows 7 Will start to boot, except the first time you do this when switching from using the Spice/cirrus to the real card - it will just sit at a black screen after it switches from the Starting Windows logo this is ok, I let this sit for like 2-3 minutes still black screen. I figure its actually working at this point but some bits are not set quite right at this point but on next boot it will be Ok. Close the VM down from the host ctrl+c - On the next boot of the VM, without changing anything. (Go into bios, boot to the efi like before). Now everything works perfectly, your NVIDIA GTX 970 or whatever card you use will be in use and its driver is in use. Windows 7 is working at this point! yay!

5) Getting around going into BIOS and doing maintenance boot to file every-time you want to Boot Windows 7

Here is where I did a bit of "hackery" haha - I learned enough about what the rufus tool does failing to get this working for so long. It was super simple, it copies the files from the ISO to a disk, makes a file called bootx64.efi copies it into a file location and makes the disk bootable - not that complicated.

So I decided to go ahead and copy the bootmgfw.efi file and paste it into the base: C:\Windows Directory similar to what rufus is doing. I copied it again in this location and renamed it bootx64.efi. So I have 2 efi files in the root windows location now, I think it being named bootx64.efi and being in the root location is enough for the BIOS to pick up on it automatically. I think you only need the bootx64 efi but I have both in the root WIndows 7 directory and it works great just boots right to disk every-time now,

Cheers,
Juju

powerhouse
Level 5
Level 5
Posts: 987
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: HOW-TO make dual-boot obsolete using kvm VGA passthrough

Postby powerhouse » Fri Sep 29, 2017 8:09 am

@Juju: Thanks for sharing your journey to get Windows 7 working with UEFI boot. I gave up long ago and upgraded to Windows 10. I am sure your input will help others.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Gigabyte GTX 970 + PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB + Samsung EVO 850 250GB SSD + 5 HDD, Corsair 500R case, SeaSonic 660W Gold X PS

Foxybingo15
Level 1
Level 1
Posts: 2
Joined: Mon Oct 16, 2017 4:29 pm

Re: HOW-TO make dual-boot obsolete using kvm VGA passthrough

Postby Foxybingo15 » Mon Oct 16, 2017 6:49 pm

Hi all,

Firstly, thanks for the amazing tutorial! I'm very new to Linux and am currently trying to follow to get windows 10 working in a VM. Here are my specs:

    R7 1700
    Asus X370 hero
    Vega 56
    16gb 3000Mhz
    750gb MX300
    Evga GS 650
    Linux mint 18.2 64 bit Cinnamon

This is my first post here so forgive me if I don't include all the stuff you need to help.

So far I've got up to the script to run the VM (part 7) . The only difference I've noticed so far is that my Hugepages is located in '/dev/hugepages' rather than '/run/hugepages/kvm'.

Here is my script to start the VM:

Code: Select all

#!/bin/bash

vmname="gaming"

if ps -A | grep -q $vmname; then
   echo "$vmname is already running." &
   exit 1

else

# use pulseaudio
export QEMU_AUDIO_DRV=pa
export QEMU_PA_SAMPLES=8192
export QEMU_AUDIO_TIMER_PERIOD=99
export QEMU_PA_SERVER=/run/user/1000/pulse/native

cp /usr/share/OVMF/OVMF_VARS.fd /tmp/my_vars.fd

qemu-system-x86_64 \
  -name $vmname,process=$vmname \
  -machine type=pc,accel=kvm \
  -cpu host \
  -smp 12,sockets=1,cores=6,threads=2 \
  -m 12G \
  -mem-path /dev/hugepages \
  -mem-prealloc \
  -balloon none \
  -rtc clock=host,base=localtime \
 # -vga none \
  -nographic \
  -serial none \
  -parallel none \
  -soundhw hda \
  -usb -usbdevice host:1af3:0001 -usbdevice host:195d:2030 \
  -device vfio-pci,host=2b:00.0,multifunction=on \
  -device vfio-pci,host=2b:00.1 \
  -drive if=pflash,format=raw,readonly,file=/usr/share/OVMF/OVMF_CODE.fd \
  -drive if=pflash,format=raw,file=/tmp/my_vars.fd \
  -boot order=dc \
  -drive id=disk0,if=virtio,cache=none,format=raw,file=/media/daniel/win.img \
  -drive file=/home/daniel/Downloads/win10.iso,index=3,media=cdrom \
  -drive file=/home/daniel/Downloads/virtio-win-0.1.141.iso,index=4,media=cdrom \
  -netdev type=tap,id=net0,ifname=tap0,vhost=on \
  -device virtio-net-pci,netdev=net0,mac=00:16:3e:00:01:01

   exit 0
fi


I'm getting a few issues. Firstly if I uncomment '-vga none' I get the error 'qemu-system-x86_64: Too many IDE buses defined (3 > 2)'. When it's commented as above I get a popup screen for the network boot, but it fails with 'Boot failed: Could not read from CDROM (code 0003)'. The last issue I've notice is I get the message 'qemu-system-x86_64: AMD CPU doesn't support hyperthreading. Please configure -smp options properly.' aswell.

I'm using QEMU 2.6.2 with the latest stable kernal 4.13.7-041307 and virtio-win-0.1.141.iso. The windows 10 iso was downloaded straight from the Microsoft website.

I followed the first trouble shooting step by using the command:

Code: Select all

lspci -k | grep -i -A 3 vga


which gave me:
2b:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Device 687f (rev c3)
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Device 6b76
Kernel driver in use: vfio-pci
Kernel modules: amdgpu
--
2c:00.0 VGA compatible controller: NVIDIA Corporation Device 1c81 (rev a1)
Subsystem: Micro-Star International Co., Ltd. [MSI] Device 8c97
Kernel driver in use: nvidia
Kernel modules: nvidiafb, nouveau, nvidia_375_drm, nvidia_375


So it seems my vega 56 has been successfully bound.

One other thing that might be useful is that my Audio and GPU video are in separate iommu groups. The output to:

Code: Select all

for a in /sys/kernel/iommu_groups/*; do find $a -type l; done

is shortened to:
/sys/kernel/iommu_groups/11/devices/0000:1d:04.0
/sys/kernel/iommu_groups/12/devices/0000:29:00.0
/sys/kernel/iommu_groups/13/devices/0000:2a:00.0
/sys/kernel/iommu_groups/14/devices/0000:2b:00.0
/sys/kernel/iommu_groups/15/devices/0000:2b:00.1
/sys/kernel/iommu_groups/16/devices/0000:2c:00.1
/sys/kernel/iommu_groups/16/devices/0000:2c:00.0
/sys/kernel/iommu_groups/2/devices/0000:00:02.0
/sys/kernel/iommu_groups/3/devices/0000:00:03.0


The 2b devices in 14 and 15 are the VGA & audio for my vega 56.

I tried to give all the info I could think of that would be useful, please let me know if I missed anything. Any help would be greatly appreciated, thanks :)

powerhouse
Level 5
Level 5
Posts: 987
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: HOW-TO make dual-boot obsolete using kvm VGA passthrough

Postby powerhouse » Tue Oct 17, 2017 3:28 am

@Foxybingo15 :

EDIT: In the start script, change the smp option to "smp 4" - you specified the architecture for my CPU, which supports hyperthreading, yours is different and doesn't support hyperthreading.

When you first run the script to install Windows, specify the boot order to have it boot from the Windows ISO image - see the tutorial. It happened to me that when booting the first time, I landed in an UEFI shell. You'll then need to navigate to the Windows image (or boot drive). You should be presented with 3 (or 2?) options - choose the one that points to the Windows ISO. If unsure, select one and see if it works. If not, try the other option.

Once Windows boots, you will be prompted to select a driver disk. Select the disk image and point to the storage driver as described in the tutorial. From there on the installation should go smooth.

Once Windows is installed, change the boot order in the script. Then you will want to install the graphics driver under Windows.

Regarding hugepages: Thanks for pointing it out. I need to check once I'm home at my PC.

Regarding the start script and the errors: check your drive definitions, perhaps the path is incorrect.

Please post the output of:

Code: Select all

dmesg | grep AMD-Vi


and:

Code: Select all

hugeadm --explain


Hopefully these hints will bring you closer to success.

EDIT: Check your /etc/modprobe.d/local.conf file and post its contents here.

You need to specify both the graphics part and the audio part.

Last not least, check section no. 12 on my own website: https://heiko-sieger.info/running-windows-10-on-linux-using-kvm-with-vga-passthrough/. I continue to respond here, but the latest updates to the tutorial are found on my website (because of restrictions or limitations on this site).
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Gigabyte GTX 970 + PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB + Samsung EVO 850 250GB SSD + 5 HDD, Corsair 500R case, SeaSonic 660W Gold X PS

Foxybingo15
Level 1
Level 1
Posts: 2
Joined: Mon Oct 16, 2017 4:29 pm

Re: HOW-TO make dual-boot obsolete using kvm VGA passthrough

Postby Foxybingo15 » Wed Oct 18, 2017 4:39 pm

@powerhouse

Thanks for your help, it is much appreciated. I'm struggling to find time to work on this at the moment but will continue to reply as soon as I can.

I'm still having issues with the hyper threading thing. My AMD CPU (R7 1700) has Simultaneous multi threading which is AMD's version of hyperthreading. Does this have a different command in the script? I tried setting it to 'smp 4' as you suggested but it just complained that 2*6 threads is greater than the 4 threads specified.

Doesn't the line '-boot order=dc' in my startup script specify the boot order?

I double checked the paths and made sure they are correct. I have located both the windows ISO and

Output to:

Code: Select all

dmesg | grep AMD-Vi

is:
    [ 1.227519] AMD-Vi: IOMMU performance counters supported
    [ 1.229930] AMD-Vi: Found IOMMU at 0000:00:00.2 cap 0x40
    [ 1.229931] AMD-Vi: Extended features (0xf77ef22294ada):
    [ 1.229934] AMD-Vi: Interrupt remapping enabled
    [ 1.229934] AMD-Vi: virtual APIC enabled
    [ 1.230193] AMD-Vi: Lazy IO/TLB flushing enabled

Output to:

Code: Select all

hugeadm --explain

is:
    Total System Memory: 16035 MB

    Mount Point Options
    /dev/hugepages rw,relatime,pagesize=2M

    Huge page pools:
    Size Minimum Current Maximum Default
    2097152 6500 6500 6500 *
    1073741824 0 0 0

    Huge page sizes with configured pools:
    2097152

    The /proc/sys/vm/min_free_kbytes of 67584 is too small. To maximiuse efficiency
    of fragmentation avoidance, there should be at least one huge page free per zone
    in the system which minimally requires a min_free_kbytes value of 112640

    The recommended shmmax for your currently allocated huge pages is 13631488000 bytes.
    To make shmmax settings persistent, add the following line to /etc/sysctl.conf:
    kernel.shmmax = 13631488000

    To make your hugetlb_shm_group settings persistent, add the following line to /etc/sysctl.conf:
    vm.hugetlb_shm_group = 0

    Note: Permanent swap space should be preferred when dynamic huge page pools are used.

The contents of /etc/modprobe.d/local.conf is:

    options vfio-pci ids=1002:687f,1002:aaf8

These are my Video and Audio addresses of my vega 56 which I'd like passed through to windows.

Here is a picture of the screen I get when I run the script with VGA commented out as shown in my last post.

https://imgur.com/vStb3as

powerhouse
Level 5
Level 5
Posts: 987
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: HOW-TO make dual-boot obsolete using kvm VGA passthrough

Postby powerhouse » Thu Oct 19, 2017 4:43 am

@Foxybingo15:

Could it be that your Windows 10 image file is damaged? Try download it again and use the new file then. Another user here had similar issues and it turned out it was because of a corrupted file.

If the above doesn't help, have a look here: https://forum.level1techs.com/t/ryzen-virtualization-success-gtx-1080ti-passthrough-with-windows-10-client/117390

You do not need to change your /etc/default/grub file (just make sure you ran update-grub). Don't use dracut, as mentioned there - your graphics card gets bound to the vfio driver so it should be fine.

Regarding the cpu definition:

They use some option I'm not familiar with:

Code: Select all

<cpu mode='host-passthrough' check='none'>
    <topology sockets='1' cores='4' threads='2'/>
    <feature policy='disable' name='smep'/>
  </cpu>


The above is in xml format - in plain qemu this should be:

-cpu host,-smep \
-smp sockets=1,cores=4,threads=2 \


I think you can try without the smp configuration. See also https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Improving_performance_on_AMD_CPU.

If my method using the bash script and qemu commands doesn't work, you can always install libvirt and virt-manager and follow the suggestions in the links I provided. My experiences with virt-manager haven't been positive, but many users had success.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Gigabyte GTX 970 + PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB + Samsung EVO 850 250GB SSD + 5 HDD, Corsair 500R case, SeaSonic 660W Gold X PS

odtech
Level 2
Level 2
Posts: 89
Joined: Sat Jan 21, 2017 9:25 am

Re: HOW-TO make dual-boot obsolete using kvm VGA passthrough

Postby odtech » Fri Oct 27, 2017 2:51 am

Foxybingo15 wrote:I'm getting a few issues. Firstly if I uncomment '-vga none' I get the error 'qemu-system-x86_64: Too many IDE buses defined (3 > 2)'. When it's commented as above I get a popup screen for the network boot, but it fails with 'Boot failed: Could not read from CDROM (code 0003)'.


In my experience if you comment a line with # the script is interrupted. Try removing the line completely.

Edit: Yes the comment is definitely your problem. I can recreate the (0003) cd error on my pc. Either remove the comment and focus on the ide busses error or remove the whole line.

powerhouse
Level 5
Level 5
Posts: 987
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: HOW-TO make dual-boot obsolete using kvm VGA passthrough

Postby powerhouse » Fri Oct 27, 2017 9:00 am

Thanks odtech! I totally missed the comment.

You are right, the qemu command can't be commented. I usually copy the command option to the end of the script and the place a # in front. The bash script allows #, just not the qemu command.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Gigabyte GTX 970 + PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB + Samsung EVO 850 250GB SSD + 5 HDD, Corsair 500R case, SeaSonic 660W Gold X PS

odtech
Level 2
Level 2
Posts: 89
Joined: Sat Jan 21, 2017 9:25 am

Re: HOW-TO make dual-boot obsolete using kvm VGA passthrough

Postby odtech » Sat Oct 28, 2017 1:16 pm

I've read on several forums that the acs override patch has been added since kernel version 4.9. I installed kernel 4.13 the other day and it doesn't work.

Is this true or is it hit and miss depending on hardware?

powerhouse
Level 5
Level 5
Posts: 987
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: HOW-TO make dual-boot obsolete using kvm VGA passthrough

Postby powerhouse » Wed Nov 01, 2017 11:43 am

odtech wrote:I've read on several forums that the acs override patch has been added since kernel version 4.9. I installed kernel 4.13 the other day and it doesn't work.

Is this true or is it hit and miss depending on hardware?

Just to be sure, you did modify your grub file to enable ACS and ran update-grub?

If the ACS patch is included, it certainly won't be activated.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Gigabyte GTX 970 + PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB + Samsung EVO 850 250GB SSD + 5 HDD, Corsair 500R case, SeaSonic 660W Gold X PS

odtech
Level 2
Level 2
Posts: 89
Joined: Sat Jan 21, 2017 9:25 am

Re: HOW-TO make dual-boot obsolete using kvm VGA passthrough

Postby odtech » Fri Nov 03, 2017 12:17 pm

powerhouse wrote:
odtech wrote:I've read on several forums that the acs override patch has been added since kernel version 4.9. I installed kernel 4.13 the other day and it doesn't work.

Is this true or is it hit and miss depending on hardware?

Just to be sure, you did modify your grub file to enable ACS and ran update-grub?

If the ACS patch is included, it certainly won't be activated.


I did.

powerhouse
Level 5
Level 5
Posts: 987
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: HOW-TO make dual-boot obsolete using kvm VGA passthrough

Postby powerhouse » Sat Nov 04, 2017 3:58 pm

I have no idea regarding 4.9+ kernel and ACS patch. You can check the kernel sources and look at the change log. It should be listed. See https://www.kernel.org/ and https://kernelnewbies.org/Linux_4.9.

Where did you read that kernel 4.9+ includes the ACS patch? I didn't see it, but haven't researched.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Gigabyte GTX 970 + PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB + Samsung EVO 850 250GB SSD + 5 HDD, Corsair 500R case, SeaSonic 660W Gold X PS

odtech
Level 2
Level 2
Posts: 89
Joined: Sat Jan 21, 2017 9:25 am

Re: HOW-TO make dual-boot obsolete using kvm VGA passthrough

Postby odtech » Mon Nov 06, 2017 2:03 am

powerhouse wrote:I have no idea regarding 4.9+ kernel and ACS patch. You can check the kernel sources and look at the change log. It should be listed. See https://www.kernel.org/ and https://kernelnewbies.org/Linux_4.9.

Where did you read that kernel 4.9+ includes the ACS patch? I didn't see it, but haven't researched.


I guess i was mistaken about reading it on "several forum posts". When looking again i just found 1 post mentioning it.

powerhouse
Level 5
Level 5
Posts: 987
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: HOW-TO make dual-boot obsolete using kvm VGA passthrough

Postby powerhouse » Fri Nov 10, 2017 3:49 pm

odtech wrote:
powerhouse wrote:I have no idea regarding 4.9+ kernel and ACS patch. You can check the kernel sources and look at the change log. It should be listed. See https://www.kernel.org/ and https://kernelnewbies.org/Linux_4.9.

Where did you read that kernel 4.9+ includes the ACS patch? I didn't see it, but haven't researched.


I guess i was mistaken about reading it on "several forum posts". When looking again i just found 1 post mentioning it.

Don't get me wrong - I meant to say that I simply don't know. I'm just curious to know where you read it. Did you have a chance to search the change log?

The ACS patch is not something you would want to apply without a good reason, as it can open security holes. To my knowledge only Arch Linux has the ACS patch as part of a virtualization add-on package that's easy to install.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Gigabyte GTX 970 + PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB + Samsung EVO 850 250GB SSD + 5 HDD, Corsair 500R case, SeaSonic 660W Gold X PS

Misairu_G
Level 1
Level 1
Posts: 1
Joined: Wed Nov 15, 2017 11:58 am

Re: HOW-TO make dual-boot obsolete using kvm VGA passthrough

Postby Misairu_G » Wed Nov 15, 2017 12:05 pm

kvm VGA passthrough with an Optimus laptop is not impossible anymore. Just did that myself, with OVMF.

The Code 43 error bash64 once encounter might be the incorrect Subsystem ID. Which can actually be masquerade using some vfio-pci option.

Spent days working on a complete tutorial. Check my Github Gist here https://gist.github.com/Misairu-G/616f7 ... addc940b28


Return to “Virtualization”