You are not logged in.
I have windows 8.1 working under kvm using bios. I had passed R9 270 and it is working fine. I was able to pass my video card using ovfm and I can install win 8.1 bu it freezes on first boot. Does anyone know any work around ?
I have ati 6540 that i am trying to pass to second guest and the sound portion is not in the same group as video. I have compiled custom kernel with acs overwrite. How I can force my audio part to be in same group with video?
I am geting this /sys/bus/pci/devices/000:02:00.1/vendor: No such file or device for my hdmi portion of video card both are in group 15 I am using script and servie to bind devices
Rebidding solved the issue I wonder why it does not work at boot.
I can use ovmf with default chipset no q35
Last edited by tritron4 (2015-03-15 21:22:10)
Offline
There's one small hiccup in step 5: as soon as the pass-through GPU's driver was installed and the guest was rebooted, the QXL display stopped working (exclamation mark in device manager, code 43). However, at that point the passthrough display worked fine, so I didn't bother trying to figure out why I could not have *dual* display. I was satisfied with the one passthrough display. IOW, step 5 became mandatory / automatic, effectively.
I guess some conflict arises. Like, interrupts or memory ranges. You know better. As i said, we can ditch that temporary stuff later.
I guess, if QXL now(btw since which version or date?) works with int 10h, we don't even need to install drivers for it, just do the setup and install GPU's drivers.
We need to install QXL's drivers only to get rid of that int 10h wizardry. That's the right way, but we don't always need it.
Is there any way to make QEMU "emulate" or make work int 10h for the physical GPU temporarily? Something hints me that won't work for some reason..
Like, we have "-win2k-hack use it when installing Windows 2000 to avoid a disk full bug", maybe there's possibility to make a similar switch -srv2k8uefi-hack or something?
P.S.
Hail something, as it always hints me stuff.
Last edited by Duelist (2015-03-15 21:54:20)
The forum rules prohibit requesting support for distributions other than arch.
I gave up. It was too late.
What I was trying to do.
The reference about VFIO and KVM VGA passthrough.
Offline
I have windows 8.1 working under kvm using bios. I had passed R9 270 and it is working fine. I was able to pass my video card using ovfm and I can install win 8.1 bu it freezes on first boot. Does anyone know any work around ?
I have ati 6540 that i am trying to pass to second guest and the sound portion is not in the same group as video. I have compiled custom kernel with acs overwrite. How I can force my audio part to be in same group with video?
I am geting this /sys/bus/pci/devices/000:02:00.1/vendor: No such file or device for my hdmi portion of video card both are in group 15 I am using script and servie to bind devices
Rebidding solved the issue I wonder why it does not work at boot.I can use ovmf with default chipset no q35
Errr... So your windows8.1 VM with R9 270 works or freezes at the first boot?
Maybe you have a broken GPU ROM(vbios). Try adding
-debugcon file:debug.log -global isa-debugcon.iobase=0x402
into your qemu startup script and show us the end of debug.log
Regarding your HD6450 card... I think if there's no other devices in the same group as it's HDMI audio device - it will work fine.
ACS override patch will 100% work without errors only on some selected motherboards, where there is granted that there is device isolation. Provide us motherboard make/model.
Last edited by Duelist (2015-03-15 22:05:36)
The forum rules prohibit requesting support for distributions other than arch.
I gave up. It was too late.
What I was trying to do.
The reference about VFIO and KVM VGA passthrough.
Offline
Ovmf works fine without q35 chip set. I wonder if I can use same ovmf files for second guest config or do I need setup custom location ?
Offline
tritron4 wrote:I have windows 8.1 working under kvm using bios. I had passed R9 270 and it is working fine. I was able to pass my video card using ovfm and I can install win 8.1 bu it freezes on first boot. Does anyone know any work around ?
I have ati 6540 that i am trying to pass to second guest and the sound portion is not in the same group as video. I have compiled custom kernel with acs overwrite. How I can force my audio part to be in same group with video?
I am geting this /sys/bus/pci/devices/000:02:00.1/vendor: No such file or device for my hdmi portion of video card both are in group 15 I am using script and servie to bind devices
Rebidding solved the issue I wonder why it does not work at boot.I can use ovmf with default chipset no q35
Errr... So your windows8.1 VM with R9 270 works or freezes at the first boot?
Maybe you have a broken GPU ROM(vbios). Try adding
-debugcon file:debug.log -global isa-debugcon.iobase=0x402
into your qemu startup script and show us the end of debug.log
Regarding your HD6450 card... I think if there's no other devices in the same group as it's HDMI audio device - it will work fine.
ACS override patch will 100% work without errors only on some selected motherboards, where there is granted that there is device isolation. Provide us motherboard make/model.
I have to rebind both pci addresses for it to work. I have assus A88X pro I am using scripts from first page
Offline
I guess, if QXL now(btw since which version or date?)
https://github.com/tianocore/edk2/commit/90803342
works with int 10h, we don't even need to install drivers for it, just do the setup and install GPU's drivers.
Yes, that seems to make sense.
We need to install QXL's drivers only to get rid of that int 10h wizardry. That's the right way, but we don't always need it.
Well, the genuine QXL drivers (ie. those that are independent of Int10h) are necessary because they allow the user to take advantage of QXL's actual capabilities. The Int10h shim that OVMF installs is just a minimal service that isn't supposed to do anything beyond getting the user through the guest installation. After that you'll probably want something more than just 1 resolution, 1024x768x32. Normally that "more" means the QXL XDDM driver, but in this case, the passthru GPU and its drivers are just as fine, for "more".
IOW, the Int10h shim is not "harmful" in any way, for which reason you'd want to get rid of it; it simply has minimal functionality (== fill the gap for as long as the Win2k8r2 guest is being installed, and first booted).
Is there any way to make QEMU "emulate" or make work int 10h for the physical GPU temporarily?
No. First, the Int10h shim is not provided by QEMU, it is provided by OVMF. Second, as you can read in the whitepaper and in the commit message I linked above, it is a valid implementation of a very small set of VBE services, as far as it comes to the underlying video card (ie. QXL). See the subroutine-like labels under the "Handler:" label in the source. Importantly, the code under "SetMode:" and "KnownMode2:" actually implement a graphics mode switch on the QXL card.
(The reason for providing the Int10h shim only on stdvga and QXL is exactly because they are simple (and identical, on this level) to program. And of those two -- I'll digress a bit --, we recommend QXL over stdvga only because QXL has full-featured guest drivers. But, if you're going to install the passthru GPU driver anyway, and not install the QXL guest driver, then you can just as well use
-device VGA
(ie. stdvga) with the Int10h shim.)
Back to your question: in order to provide an Int10h shim for any other card than stdvga & QXL, that shim whould have to program that card for real.
So, just to reiterate: the fake thing about the Int10h shim is not the video card programming; that's real. The fake thing is that
it provides just a minimal set of services, just enough for the win7 family installation to succeed, and
said VBE services and related descriptor structures are not placed in the C segment, and similarly the Int10h vector is not pointed to the handler in the C segment, by way of posting an actual legacy PCI oprom (which the CSM would do). Instead, they are put into place by OVMF just because we figured out that the legacy vga driver of win2k8r2 will look for them there as data, and it will emulate the VBE code (ie. not directly execute it on the CPU) in an internal real-mode (16-bit) emulator.
So, the "external interface" of the shim is fake (because it doesn't have to work in any other environment than with win2k8r2's real-mode emulator), but its internal (hardware facing) code is valid (because hardware accesses like ioport writes encountered in the internal emulator are replayed for real), and those would have to be implemented for any other card.
Offline
I wonder if I can use same ovmf files for second guest config or do I need setup custom location ?
The OVMF_CODE.fd file is mapped read-only and it is supposed to be shared by all guests. This allows central (host-wide) firmware binary upgrades that affect all guests at once, similarly to SeaBIOS upgrades.
The OVMF_VARS.fd file is not mapped by any guest; it is a varstore template. Whenever you create a new guest, it must start out with a private copy of this pristine (empty) varstore template. Then the guest will keep its non-volatile UEFI variables in this private variable store. That's why varstore files are VM-private.
When you use libvirt, libvirtd takes care of instantiating a private varstore from OVMF_VARS.fd for each new VM you create. (Look under /var/lib/libvirt/qemu/nvram.) In fact libvirt can accommodate several use cases (the domain XML is really flexible), but this is the main use case that virt-manager and virt-install generate a domain XML for.
However, if you use the qemu command line manually, you must copy OVMF_VARS.fd first, and pass the copy to the VM as the second pflash chip. See here (I fixed the wiki yesterday):
Offline
So , GT610 reboot issue remains . It happens after hours though , meaning if I rebooted the VM when the host is freshly booted it reboots fine . Checking dmesg , the only thing that happens after hours of host being up are these type of messages :
perf samples too long (2502 > 2500), lowering kernel.perf_event_max_sample_rate to 50100
Using :
echo 0 > /proc/sys/kernel/perf_cpu_time_max_percent
as soon as the host boots up disables that mechanism , and the GT610's VM is now rebooting fine after 10 hours of operation .
I don't know why they are related though .
Edit : Correcting the time periods . lol
Last edited by Denso (2015-03-16 11:10:44)
Offline
tritron4 wrote:I wonder if I can use same ovmf files for second guest config or do I need setup custom location ?
The OVMF_CODE.fd file is mapped read-only and it is supposed to be shared by all guests. This allows central (host-wide) firmware binary upgrades that affect all guests at once, similarly to SeaBIOS upgrades.
The OVMF_VARS.fd file is not mapped by any guest; it is a varstore template. Whenever you create a new guest, it must start out with a private copy of this pristine (empty) varstore template. Then the guest will keep its non-volatile UEFI variables in this private variable store. That's why varstore files are VM-private.
When you use libvirt, libvirtd takes care of instantiating a private varstore from OVMF_VARS.fd for each new VM you create. (Look under /var/lib/libvirt/qemu/nvram.) In fact libvirt can accommodate several use cases (the domain XML is really flexible), but this is the main use case that virt-manager and virt-install generate a domain XML for.
However, if you use the qemu command line manually, you must copy OVMF_VARS.fd first, and pass the copy to the VM as the second pflash chip. See here (I fixed the wiki yesterday):
I created new folders for OVMF_VARS.fd. I wonder if there is a version of virt manager that will allow me to turnoff vga ?
Offline
I wonder if there is a version of virt manager that will allow me to turnoff vga ?
virt-manager does not provide access to low-level knobs, on purpose. (Unless of course I'm misunderstanding you. If you simply mean "removing the VGA device from the VM config", that's certainly doable, but I don't think you would ask about that, because it's obvious.) So virt-install / virt-manager should be used to install an OVMF-based guest the easy way (covering even the PCI and USB device assignments), then you can shut down the guest, and use "virsh edit" to customize the finer bits for GPU passthrough (vcpu pinning, cpuid massaging etc).
Offline
I had compiled virt-manger git aur and installed it but it cant find uefi ? Does anyone know the location and name of files virt-manager is looking.
Well I edited /etc/libvirt/qemu.conf end enabled nvram
Last edited by tritron4 (2015-03-16 16:29:11)
Offline
I had compiled virt-manger git aur and installed it but it cant find uefi ? Does anyone know the location and name of files virt-manager is looking.
Well I edited /etc/libvirt/qemu.conf end enabled nvram
Assuming you are using recent enough libvirtd and virt-manager / virt-install, see "Installation of OVMF guests with virt-manager and virt-install" in http://people.redhat.com/~lersek/ovmf-w … 770f8c.txt , especially point (5) there.
Offline
Hello, I am confused, and I'm not sure where I went wrong.
My system setup:
GPU #1: AMD Radeon HD 7750 (VM)
GPU #2: Terrible Intel Graphics (Host)
CPU: Intel i5 4460
Motherboard: Asus H81M-C
As you can see, my setup isn't the most complicated in the world, yet it confused me much frustation. I managed to get pci-stub and vfio-bind working, however I am having massive issues with running QEMU.
My first question is, should I be running Intel as bootup graphics in the BIOS? Or, should it be AMD that boots first?
Secondly, on both occasions in QEMU my GPU fan spins up, but this yields two different results. When running with AMD as boot-up, I have a lot of issues, such as not being to access X without nomodeset and doing all kinds of hacks to get in (no acceleration either), and while it does display an image with QEMU, it is artifacted and crashes when I mount an ISO or access any of the TTYs. When I use Intel as boot-up, I can actually get 3D acceleration, but QEMU shows nothing.
Thirdly, does this display in a small window, or does it show on a different monitor? On AMD, it seemed to have taken over the screen, however I've seen screenshots showing that it should be windowed.
I am very confused but I've almost got it hopefully working
Offline
I had compiled virt-manger git aur and installed it but it cant find uefi ? Does anyone know the location and name of files virt-manager is looking.
Well I edited /etc/libvirt/qemu.conf end enabled nvram
get ovmf-svn from aur
Offline
If you are assigning ati video card I would boot intel first there is option in bios to select build in video card as first. This works for me you can setup vga to cirrus to get output in spice
#/bin/sh!
QEMU_AUDIO_DRV=alsa \
/usr/bin/qemu-system-x86_64 -enable-kvm -m 8196 -cpu host \
-smp 4,sockets=2,cores=2,threads=1 -vga none -spice port=5910,addr=0.0.0.0,disable-ticketing \
-drive if=pflash,format=raw,readonly,file=/usr/share/ovmf/x64/OVMF_CODE-pure-efi.fd -drive if=pflash,format=raw,file=/usr/share/ovmf/x64/OVMF_VARS-pure-efi.fd \
-device virtio-scsi-pci,id=scsi \
-net nic,model=e1000,macaddr=64:C5:63:4D:A4:44 -net bridge,br=xenbr0 \
-usb -device usb-host,hostbus=9,hostaddr=2 \
-soundhw hda \
-device vfio-pci,host=01:00.0,multifunction=on,x-vga=on \
-device vfio-pci,host=01:00.1 \
-device vfio-pci,host=04:00.0 \
-drive file=/data/kvm/win.img,id=disk,format=raw,if=none -device scsi-hd,drive=disk \
-drive file=/home/kvm/iso/en_windows_8_1.iso,id=isocd,if=none -device scsi-cd,drive=isocd \
-drive file=/home/kvm/iso/virtio-win-0.1-100.iso,id=isocd2,if=none -device ide-cd,drive=isocd2
Offline
Hello, I am confused, and I'm not sure where I went wrong.
My system setup:
GPU #1: AMD Radeon HD 7750 (VM)
GPU #2: Terrible Intel Graphics (Host)
CPU: Intel i5 4460
Motherboard: Asus H81M-CAs you can see, my setup isn't the most complicated in the world, yet it confused me much frustation. I managed to get pci-stub and vfio-bind working, however I am having massive issues with running QEMU.
My first question is, should I be running Intel as bootup graphics in the BIOS? Or, should it be AMD that boots first?
Secondly, on both occasions in QEMU my GPU fan spins up, but this yields two different results. When running with AMD as boot-up, I have a lot of issues, such as not being to access X without nomodeset and doing all kinds of hacks to get in (no acceleration either), and while it does display an image with QEMU, it is artifacted and crashes when I mount an ISO or access any of the TTYs. When I use Intel as boot-up, I can actually get 3D acceleration, but QEMU shows nothing.Thirdly, does this display in a small window, or does it show on a different monitor? On AMD, it seemed to have taken over the screen, however I've seen screenshots showing that it should be windowed.
I am very confused but I've almost got it hopefully working
Re-read the first post carefully
Offline
I am running into issue where efi-e1000.rom is not found. Ho to tell libvirt proper location ? I have the files in /usr/share/qemu
Offline
I'm a knob, I forgot to enable the i915 patch. Also, is there a way of not losing DRI and making it run? (using i440fx instead of OVMF as apparently that doesn't work with non-UEFI graphic cards)
Offline
I'm a knob, I forgot to enable the i915 patch. Also, is there a way of not losing DRI and making it run? (using i440fx instead of OVMF as apparently that doesn't work with non-UEFI graphic cards)
Yes, using OVMF, there's also a post by duelist here on how create an uefi rom for you amd card.
Offline
After that you'll probably want something more than just 1 resolution, 1024x768x32. Normally that "more" means the QXL XDDM driver, but in this case, the passthru GPU and its drivers are just as fine, for "more".
HA! I've tried setting up windows 8 on a hardware UEFI platform, and i burst out laughing when..
1.It boots into 1024x768x32.
2.I try to download drivers(or, at least, a browser), starting Internet exploder..
3.And it says "Screen resolution is too small, internet will not be exploded for today"
4.No drivers - no resolution change.
5.No resolution change - no drivers.
So you've got to have some CD with drivers when you try installing windows 8 or some other UEFI-compatible windowns. Or you can't download drivers.
BTW, i've got my second GPU back, but i have my NTFS partition with a hybrid ROM in it trashed by windows 8 VM(apparently, you have to do shutdown -t 0 -h everytime you want to save your filesystem from trashing).
The forum rules prohibit requesting support for distributions other than arch.
I gave up. It was too late.
What I was trying to do.
The reference about VFIO and KVM VGA passthrough.
Offline
I have setup windows 8.1 and windows 10 using ovmf libvirt. How I can use virsh to remove emulated vga cards ? How I can get my sound to work with alsa and my windows guest. Both windows guest have functioning emulated sound cards and I can hear sound in Linux.
Is there a way to hotswap vga cards between guests ?
Offline
Is there a way to hotswap vga cards between guests ?
There is kind of way.
Basically, all you need to do is to eject the card from windows. Then it becomes bound to vfio-pci and not used by anyone. And you can attach it to some other VM via various methods, including starting a new VM for example.
The forum rules prohibit requesting support for distributions other than arch.
I gave up. It was too late.
What I was trying to do.
The reference about VFIO and KVM VGA passthrough.
Offline
Thank you so much for your help guys
I have hopefully the final two questions:
1. Windows hangs on "Loading Windows", any ideas why that might be caused?
2. Is there a way of making it on the Intel screen (hopefully windowed), or/and sharing the mouse/keyboard? I don't really want to plug in two keyboards and mice to operate 2 OS
Thanks again,
VOT.
Offline
You can assign usb receiver for mouse/keyboard to guest or you can assign whole usb controller. I assign whole usb controller to windows 8 guest, with scripts you can return usb controller back to linux. If you want to use guest in windows why not to use spice client ? You can assign usb device to it and you can share mouse keyboard from client.
Did anyone install osx on amd cpu under ovmf kv ?
Last edited by tritron4 (2015-03-17 18:39:26)
Offline
I've been struggling with VGA passthrough for a few days and finally got something that works but unfortunately not in an optimal way. My plan was to use a radeon juniper card in guest and a radeon cedar card on host. The problem is that the hardware manufacturer for my cpu decided in their wisdom to not support ACS on the pcie root port.
Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller [8086:0c01]
Both graphic card therefore show up in the same iommu group. What options do I have for working around that problem?
Option 1: Use the ACS override patch and hope for the best.
Not a good idea in my opinion. I'm pretty sure the root port do per-to-per without any way of disabling that. Using the override patch is asking for problems.
Options 2: Rearrange the card to break apart the iommu group.
Unfortunately all 16X lanes go to the cpu through that root port. The 1X ports go through the chipset but I don't have any 1X graphics card. I could buy one but the selection is VERY limited. The only one I found only supports 2 monitors. I could do surgery on the 1X mobo slot or my 16X cedar graphics card to force it in but that not something I want to do.
http://i.imgur.com/NxzaK6L.png block diagram of my mobo. (Let's see if I'm allowed to post a link in my first post to this forum)
Option 3: Buy a new mobo
please no...
Option 4: Use the intel IGP for host graphics and non-legacy guest boot for working around the problems in IGP
My juniper card does not support EFI boot. I've seen some people do Macgyver style mods involving copy paste in hexeditors with other card's vbios. That is something I would like to avoid if possible.
Option 5: Use the intel IGP with the vga arbiter patch
That is what I'm using right now for testing but it's not a longterm solution. It's too inconvenient to apply a patch at every kernel update.
Strangely DRI is not disabled for me even with the vga arbiter patch. I assume I screwed up somewhere but I don't know where. The old patch submitted to the LKML doesn't apply on new kernels anymore. There is another patch named i915_317.patch that do apply to 3.19.1 with some fuss. I boot with the i915.enable_hd_vgaarb=1 argument and verify that argument is on with dmesg but I still get DRI.
# glxinfo |grep render
direct rendering: Yes
...
OpenGL renderer string: Mesa DRI Intel(R) Haswell Desktop
# dmesg |grep vgaarb
[ +0.000000] Command line: BOOT_IMAGE=/vmlinuz intel_iommu=on memtest=1 i915.enable_hd_vgaarb=1 pci-stub.ids=1002:68ba,1002:aa58,1002:68f9,1002:aa68
[ +0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz intel_iommu=on memtest=1 i915.enable_hd_vgaarb=1 pci-stub.ids=1002:68ba,1002:aa58,1002:68f9,1002:aa68
[ +0.000131] vgaarb: setting as boot device: PCI:0000:00:02.0
[ +0.000045] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none
[ +0.000051] vgaarb: device added: PCI:0000:03:00.0,decodes=io+mem,owns=none,locks=none
[ +0.000050] vgaarb: device added: PCI:0000:04:00.0,decodes=io+mem,owns=none,locks=none
[ +0.000048] vgaarb: loaded
[ +0.000040] vgaarb: bridge control possible 0000:04:00.0
[ +0.000044] vgaarb: bridge control possible 0000:03:00.0
[ +0.000043] vgaarb: no bridge control possible 0000:00:02.0
[ +0.073126] [drm:i915_disable_vga_mem] *ERROR* enable_hd_vgaarb is on at i915_disable_vga_mem
[ +0.000002] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=io:owns=io+mem
The error is a DRM_ERROR() call I added in i915_disable_vga_mem() just to make sure the patch loaded.
The forwarding appears to work. I can run the unigine benchmarks with good speed and I don't notice any other problems on the host.
Offline