You are not logged in.

#2851 2014-09-30 21:39:33

devianceluka
Member
Registered: 2014-05-19
Posts: 44

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Can someone help me write a script to launch 3 guests (I have those 3 qemu scripts already) each with its own GPU+USB on Fedora20 after fully booting? I know it has to be in rc.local, but I want the guests to be each in its own screen. This "server" is going to serve as a multiseat PC "plugnplay"..

Thanks!

Offline

#2852 2014-09-30 22:07:36

dwe11er
Member
Registered: 2014-03-18
Posts: 73

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

devianceluka wrote:

Can someone help me write a script to launch 3 guests (I have those 3 qemu scripts already) each with its own GPU+USB on Fedora20 after fully booting? I know it has to be in rc.local, but I want the guests to be each in its own screen. This "server" is going to serve as a multiseat PC "plugnplay"..

Thanks!

Use libvirtd for this.

Offline

#2853 2014-09-30 22:10:51

devianceluka
Member
Registered: 2014-05-19
Posts: 44

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

dwe11er wrote:
devianceluka wrote:

Can someone help me write a script to launch 3 guests (I have those 3 qemu scripts already) each with its own GPU+USB on Fedora20 after fully booting? I know it has to be in rc.local, but I want the guests to be each in its own screen. This "server" is going to serve as a multiseat PC "plugnplay"..

Thanks!

Use libvirtd for this.

Im kind of against libvirt because I have a perfect working guests with qemu and converting qemu cli to libvirtd is a pain...

Offline

#2854 2014-09-30 22:15:09

aw
Member
Registered: 2013-10-04
Posts: 921
Website

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

devianceluka wrote:
dwe11er wrote:
devianceluka wrote:

Can someone help me write a script to launch 3 guests (I have those 3 qemu scripts already) each with its own GPU+USB on Fedora20 after fully booting? I know it has to be in rc.local, but I want the guests to be each in its own screen. This "server" is going to serve as a multiseat PC "plugnplay"..

Thanks!

Use libvirtd for this.

Im kind of against libvirt because I have a perfect working guests with qemu and converting qemu cli to libvirtd is a pain...

Guess you better learn how to script then... wink


http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses?  Try https://www.redhat.com/mailman/listinfo/vfio-users

Offline

#2855 2014-09-30 22:16:41

devianceluka
Member
Registered: 2014-05-19
Posts: 44

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Can you then post a perfect working xml so I can then try to change and abuse to my liking?

Offline

#2856 2014-09-30 22:44:05

dwe11er
Member
Registered: 2014-03-18
Posts: 73

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

devianceluka wrote:

Can you then post a perfect working xml so I can then try to change and abuse to my liking?

http://pastie.org/private/oeqpunieatd3gu1ziyptw

Offline

#2857 2014-09-30 23:01:52

Denso
Member
Registered: 2014-08-30
Posts: 179

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Booting Windows 8.1 Enterprise using (EFI/BOOT/BOOTX64.EFI) returns me to the UEFI shell , what am I missing ?

Offline

#2858 2014-09-30 23:16:33

noobman
Member
Registered: 2013-12-13
Posts: 21

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

et38 wrote:
noobman wrote:

But just saying this, if you want something specifially for passthrough and looking to buy, then simply why not get what the guy which does vfio have, like the 990FX which i think that is what aw has (?) not sure lol, but that paired with an 8 core cpu could be quite a performant option. But that is just a thought, nothing more. Mentioning coz that would be my choice right now, and most likely next time i will do exactly that.

I've been thinking (a lot) of an 8-core Amd system, but the power consumption difference (vs. Intel 4c+HT) is just annoying. I'm just trying to see if there are any preferredly (Gigabyte/Asus/Z97/H97) motherboards offering relatively painless vga passthrough experience. Guests would probably be Steam OS / other dev distros.

Very arguable subject, amd vs intel, and all sides fanboys and marketing. But on short i think somewhere may be a confusion between the power rating and the actual power consumtion. When the cpu says its 130W or 220W, that is a power rating, take it as that, a rating only, but with a twist. The actual losses are not resistive like a light bulb, the losses are dubbed "switching" losses which means it depends on how you get it ticking, its cpu governor or generally how much work the cpu does, or what its the idle freq. So take a look and check intel's frequencies to be sort of lower than amd, then so is the rating, coz again by far they are switching looses and intel wont run freq high enough to need higher rating. Other than that all the billion gates are now pretty much the same on waffer, complementary pair, nothing new and nothing more to say about it. Just that it will take a change in technology to get any further in frequency, so for the time being the cpus evolution has to go in more cores and/or more features exactly because the frequency did hit its practical limit for the current gate technology. Remember how generations of cpus used to evolve from 33Mhz and up, they cant do that any more they are on the roof already. And as much as they go higher frequencies their thermal losses increase and become impossible to deal with. Generally i think intels stays further away from that frequency roof / hill while amd goes a bit closer. Probably some sort of product or marketing policy. I am not taking sides, so imho its all the same thing except the evolution in nr of cores and features, which both are sort of a waste if the user does not actually use them.

And those ratings to start with, on the other hand depend on many things, thermal junction from die to sink, thermal junction from sink to ambient etc. So its more like a thermal power rating, sort of speaking points at what level it will be and how much will dissipate before running into thermal protection mode. More or less like any single semiconductor datasheet, you can try check out how to interpret a power mosfet datasheet. When choosing a power mosfet every engineer will/should go with highest rating, with the mosfet that would conduct the most amps before it runs in termal shutdown. But when we talk about billions of those, in complementary pairs, the consumers are gonna panic and choose the lowest rating. They will choose the lowest wattage cpu but they will also choose the highest wattage stereo. And all that while the cpu is able to scale down, and the other things can not. smile

Offline

#2859 2014-10-01 00:02:28

aw
Member
Registered: 2013-10-04
Posts: 921
Website

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

noobman wrote:

But just saying this, if you want something specifially for passthrough and looking to buy, then simply why not get what the guy which does vfio have, like the 990FX which i think that is what aw has (?)

Thanks partially to my employer, I have several systems, 990FX is one of them.  It's my token AMD-Vi system though.


http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses?  Try https://www.redhat.com/mailman/listinfo/vfio-users

Offline

#2860 2014-10-01 02:57:24

noobman
Member
Registered: 2013-12-13
Posts: 21

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Thanks for sharing.

While at it, let me thank you for ... errr ... everything else big_smile

Offline

#2861 2014-10-01 07:15:28

Denso
Member
Registered: 2014-08-30
Posts: 179

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Errors when rebooting VM :

[ 6061.771873] irq 28: nobody cared (try booting with the "irqpoll" option)
[ 6061.771911] CPU: 0 PID: 0 Comm: swapper/0 Tainted: P           O  3.16.3-1-ARCH #1
[ 6061.771913] Hardware name: ASUS All Series/X99-DELUXE, BIOS 0904 09/22/2014
[ 6061.771915]  0000000000000000 b4596cd08d99296e ffff88085fc03be8 ffffffff8152b3bc
[ 6061.771920]  ffff88007ce16200 ffff88085fc03c10 ffffffff810d02a2 ffff88007ce16200
[ 6061.771924]  0000000000000000 000000000000001c ffff88085fc03c48 ffffffff810d0657
[ 6061.771928] Call Trace:
[ 6061.771930]  <IRQ>  [<ffffffff8152b3bc>] dump_stack+0x4d/0x6f
[ 6061.771947]  [<ffffffff810d02a2>] __report_bad_irq+0x32/0xd0
[ 6061.771952]  [<ffffffff810d0657>] note_interrupt+0x257/0x2a0
[ 6061.771957]  [<ffffffff810cdbae>] handle_irq_event_percpu+0xae/0x1f0
[ 6061.771961]  [<ffffffff810cdd2d>] handle_irq_event+0x3d/0x60
[ 6061.771966]  [<ffffffff810d1281>] handle_fasteoi_irq+0x81/0x170
[ 6061.771974]  [<ffffffff8101717e>] handle_irq+0x1e/0x40
[ 6061.771978]  [<ffffffff81533bed>] do_IRQ+0x4d/0xe0
[ 6061.771983]  [<ffffffff81531bad>] common_interrupt+0x6d/0x6d
[ 6061.771989]  [<ffffffff810da64e>] ? ktime_get+0x1e/0x100
[ 6061.771996]  [<ffffffff813e79b1>] intel_pstate_timer_func+0x71/0x420
[ 6061.771999]  [<ffffffff813e7952>] ? intel_pstate_timer_func+0x12/0x420
[ 6061.772003]  [<ffffffff813e7940>] ? intel_pstate_set_pstate+0x110/0x110
[ 6061.772010]  [<ffffffff8107b7f6>] call_timer_fn+0x36/0x160
[ 6061.772013]  [<ffffffff813e7940>] ? intel_pstate_set_pstate+0x110/0x110
[ 6061.772017]  [<ffffffff8107c224>] run_timer_softirq+0x274/0x320
[ 6061.772024]  [<ffffffff810736c2>] __do_softirq+0xf2/0x2e0
[ 6061.772029]  [<ffffffff81073a06>] irq_exit+0x86/0xb0
[ 6061.772033]  [<ffffffff81533cc4>] smp_apic_timer_interrupt+0x44/0x50
[ 6061.772037]  [<ffffffff81531f4d>] apic_timer_interrupt+0x6d/0x80
[ 6061.772039]  <EOI>  [<ffffffff813e88bc>] ? cpuidle_enter_state+0x4c/0xc0
[ 6061.772046]  [<ffffffff813e8a17>] cpuidle_enter+0x17/0x20
[ 6061.772050]  [<ffffffff810b710f>] cpu_startup_entry+0x32f/0x520
[ 6061.772056]  [<ffffffff815216c4>] rest_init+0x84/0x90
[ 6061.772060]  [<ffffffff818f5fc9>] start_kernel+0x45e/0x47f
[ 6061.772064]  [<ffffffff818f5120>] ? early_idt_handlers+0x120/0x120
[ 6061.772068]  [<ffffffff818f54d7>] x86_64_start_reservations+0x2a/0x2c
[ 6061.772071]  [<ffffffff818f5626>] x86_64_start_kernel+0x14d/0x170
[ 6061.772073] handlers:
[ 6061.772098] [<ffffffffa07693e0>] vfio_intx_handler [vfio_pci]
[ 6061.772129] Disabling IRQ #28

This results in vertical tears in the screen .

Offline

#2862 2014-10-01 07:36:30

et38
Member
Registered: 2014-09-29
Posts: 3

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

noobman wrote:

Probably some sort of product or marketing policy. I am not taking sides, so imho its all the same thing except the evolution in nr of cores and features, which both are sort of a waste if the user does not actually use them.

I see your point and I'm not yet entirely immune to marketing. This system should be retired/repurposed at around 2020. Since there is little data to go around, one has to rely on online reviews. It's not possible to verify them, however, the ones I found describe >50% difference in system power consumption under load roughly at the same performance level. With insufficient data, I'm unable to say what that equates to, but I'm under the impression that lower thermal load will reduce noise and probability of failure.

Offline

#2863 2014-10-01 15:06:49

Lauer
Member
Registered: 2014-09-11
Posts: 9

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Lauer wrote:

I get a compat_monitor0 screen similar to Slabity. However, I am using an intel IGP for the host, and an AMD 6990M for the Windows 7 guest.

cat /proc/cmdline

BOOT_IMAGE=/boot/vmlinuz-linux-mainline root=UUID=e7fe3792-3cba-cf01-605e-37923cbacf01 rw quiet i915.enable_hd_vgaarb=1 pci-stub.ids=1002:6720,1002:aa88 intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 kvm_intel.emulate_invalid_guest_state=0

I'm using the OP's linux-mainline package, and have also used the acs_override=downstream option with the same result.

Same result when running vga-clear vga-set.

dmesg | grep vgaarb

[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-linux-mainline root=UUID=e7fe3792-3cba-cf01-605e-37923cbacf01 rw quiet i915.enable_hd_vgaarb=1 pci-stub.ids=1002:6720,1002:aa88 intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 kvm_intel.emulate_invalid_guest_state=0
[    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux-mainline root=UUID=e7fe3792-3cba-cf01-605e-37923cbacf01 rw quiet i915.enable_hd_vgaarb=1 pci-stub.ids=1002:6720,1002:aa88 intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 kvm_intel.emulate_invalid_guest_state=0
[    0.504315] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none
[    0.504320] vgaarb: device added: PCI:0000:01:00.0,decodes=io+mem,owns=none,locks=none
[    0.504322] vgaarb: loaded
[    0.504323] vgaarb: bridge control possible 0000:01:00.0
[    0.504324] vgaarb: no bridge control possible 0000:00:02.0
[    1.723418] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=io:owns=io+mem

Any advice would be appreciated.

I solved this problem using pci-assign. The VM now starts windows, but freezes at the windows logo.

Any ideas?

Offline

#2864 2014-10-01 15:22:40

Denso
Member
Registered: 2014-08-30
Posts: 179

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Lauer wrote:
Lauer wrote:

I get a compat_monitor0 screen similar to Slabity. However, I am using an intel IGP for the host, and an AMD 6990M for the Windows 7 guest.

cat /proc/cmdline

BOOT_IMAGE=/boot/vmlinuz-linux-mainline root=UUID=e7fe3792-3cba-cf01-605e-37923cbacf01 rw quiet i915.enable_hd_vgaarb=1 pci-stub.ids=1002:6720,1002:aa88 intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 kvm_intel.emulate_invalid_guest_state=0

I'm using the OP's linux-mainline package, and have also used the acs_override=downstream option with the same result.

Same result when running vga-clear vga-set.

dmesg | grep vgaarb

[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-linux-mainline root=UUID=e7fe3792-3cba-cf01-605e-37923cbacf01 rw quiet i915.enable_hd_vgaarb=1 pci-stub.ids=1002:6720,1002:aa88 intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 kvm_intel.emulate_invalid_guest_state=0
[    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux-mainline root=UUID=e7fe3792-3cba-cf01-605e-37923cbacf01 rw quiet i915.enable_hd_vgaarb=1 pci-stub.ids=1002:6720,1002:aa88 intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 kvm_intel.emulate_invalid_guest_state=0
[    0.504315] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none
[    0.504320] vgaarb: device added: PCI:0000:01:00.0,decodes=io+mem,owns=none,locks=none
[    0.504322] vgaarb: loaded
[    0.504323] vgaarb: bridge control possible 0000:01:00.0
[    0.504324] vgaarb: no bridge control possible 0000:00:02.0
[    1.723418] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=io:owns=io+mem

Any advice would be appreciated.

I solved this problem using pci-assign. The VM now starts windows, but freezes at the windows logo.

Any ideas?

I had a similar issue , Alex solved it by adding "sp_off" to bootloader arguments after the "intel_iommu=on"

So it becomes : "intel_iommu=on,sp_off" .

That solved it for me .

Offline

#2865 2014-10-01 17:31:48

noobman
Member
Registered: 2013-12-13
Posts: 21

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

et38 wrote:
noobman wrote:

Probably some sort of product or marketing policy. I am not taking sides, so imho its all the same thing except the evolution in nr of cores and features, which both are sort of a waste if the user does not actually use them.

I see your point and I'm not yet entirely immune to marketing. This system should be retired/repurposed at around 2020. Since there is little data to go around, one has to rely on online reviews. It's not possible to verify them, however, the ones I found describe >50% difference in system power consumption under load roughly at the same performance level. With insufficient data, I'm unable to say what that equates to, but I'm under the impression that lower thermal load will reduce noise and probability of failure.

That >50%, thats quite a strangely high number, imo its way off. You can also find quite different numbers and all kinds of numbers out there will just be used to back up some guy's opinion, thats all. No point to comment on numbers. But other than that, as i said the switching losses depend on frequency, and both of the digital gates have exact same technology, so if you actually could compare both cpus running at exact same frequency, then ought to give the same consumption. But in reality they are made to run at different frequencies both at idle and at load. And that gives the perception of being more different than they actually are. Just as a note, same frequency does not equate same load, because same load will still be ran at different frequency by each. Dunno what would be the deal with thermal dissipation vs noise and failures. Thermal dissipation goes hand in hand with frequency, which in turn goes hand in hand with cycles and performance. About noise, there is really no noise in digital realm, thats why static discipline was invented for. About failures, there are both same thing inside, silicon tech that is quite rugged, and i dont see why one would be more sensitive than the other.

Imho its just like comparing two t-shirts, if you want to get into the details there are some minor differences and can focus a comparison on that area, but in the big picture lets not forget both are t-shirts, so are ~99% same thing. They even use the same "sewing machines" industrial tools to make it and same raw materials suppliers, workforce even may jump between, and same technology which again hit its own limits years back. Therefore the efficiency differences can not be all that dramatical.

And marketing does give some interesting colors. Some time ago when cpus were evolving in frequency terms, yes everybody was looking just at that. One would upgrade an 800Mhz cpu to 1,6Ghz cpu, coz clearly that was better, everybody knew that. Now the argument goes the other way, we go with 3.2Ghz instead of 4.5Ghz, coz 3.2 its more efficient and saves electricity. I quite like this focus on efficiency, i think its great issue. But what consumes 3/4 of the energy bill in every household is the ... fridge. Even much more if there is air conditioning or heating. Coz the hardest thing to do in physics is create and maintain differences of temperatures because that has to fight law of entropy continiously, every single second. And the integral of that ofc gets huge. But is the fridge isolation a consummer concern -no. When buying the air conditioning, ppls will also look to get most watts/btu. Also high wattage in the stereo, the huget flat tv, home cinema, surround sound, etc. Did ppls commenting on cpu efficiency, what did they do for this concercn, di already replaced all light bublbs in their house with leds -probably not. Did they hermetically isolate the house with 20cm foam -probably not. So the concern with reducing power consumption is great thing, all regards towards that. But, among all the things that would reduce the power bill, the cpu is really the last on the list. The cpu itself is the most scalable and most inteligent power consumer in the house, so why pick on it. Ppls who seriously want to improve the power bill, would have to do all the other things first, and then get some fotovoltaic panels and that kind of things. Other than that is nonsense to me tbh.

I will rest coz there is no point, sort of speaking yes that dead horse was beaten too much already smile and not the point of this thread, sry everyone for the side-track of it, now getting back main course.

Last edited by noobman (2014-10-01 17:33:57)

Offline

#2866 2014-10-01 18:18:12

Lauer
Member
Registered: 2014-09-11
Posts: 9

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Denso wrote:

I had a similar issue , Alex solved it by adding "sp_off" to bootloader arguments after the "intel_iommu=on"

So it becomes : "intel_iommu=on,sp_off" .

That solved it for me .

cat /proc/cmdline

BOOT_IMAGE=/boot/vmlinuz-linux-mainline root=UUID=e7fe3792-3cba-cf01-605e-37923cbacf01 rw quiet i915.enable_hd_vgaarb=1 pci-stub.ids=1002:6720,1002:aa88 intel_iommu=on,sp_off vfio_iommu_type1.allow_unsafe_interrupts=1 kvm_intel.emulate_invalid_guest_state=0

pci-assign: still freezes at windows logo.

vfio: device manager shows generic VGA card.

Offline

#2867 2014-10-01 18:28:39

aw
Member
Registered: 2013-10-04
Posts: 921
Website

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Lauer wrote:
Denso wrote:

I had a similar issue , Alex solved it by adding "sp_off" to bootloader arguments after the "intel_iommu=on"

So it becomes : "intel_iommu=on,sp_off" .

That solved it for me .

cat /proc/cmdline

BOOT_IMAGE=/boot/vmlinuz-linux-mainline root=UUID=e7fe3792-3cba-cf01-605e-37923cbacf01 rw quiet i915.enable_hd_vgaarb=1 pci-stub.ids=1002:6720,1002:aa88 intel_iommu=on,sp_off vfio_iommu_type1.allow_unsafe_interrupts=1 kvm_intel.emulate_invalid_guest_state=0

pci-assign: still freezes at windows logo.

vfio: device manager shows generic VGA card.

I have no idea what you're trying to do.  The logo freezes on what?  The emulated display?  That's supposed to happen if you're attempting to assign the GPU as a secondary display.  My only advice for pci-assign is don't use it.  If you'd like some help with vfio-pci, please share with us how you're starting the guest to start with.


http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses?  Try https://www.redhat.com/mailman/listinfo/vfio-users

Offline

#2868 2014-10-01 19:30:22

Lauer
Member
Registered: 2014-09-11
Posts: 9

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

aw wrote:

I have no idea what you're trying to do.  The logo freezes on what?  The emulated display?  That's supposed to happen if you're attempting to assign the GPU as a secondary display.  My only advice for pci-assign is don't use it.  If you'd like some help with vfio-pci, please share with us how you're starting the guest to start with.

cat runwin-vfio

qemu-system-x86_64 -enable-kvm -M q35 -m 1024 -cpu host \
-smp 6,sockets=1,cores=6,threads=1 \
-bios /usr/share/qemu/bios.bin -vnc :0 \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on \
-device piix4-ide,bus=pcie.0,id=piix4-ide \
-drive file=/dev/md0,id=disk,format=raw -device ide-hd,bus=piix4-ide.0,drive=disk

Windows loads, but my card does not appear in device manager.

Offline

#2869 2014-10-01 19:34:43

aw
Member
Registered: 2013-10-04
Posts: 921
Website

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Lauer wrote:
aw wrote:

I have no idea what you're trying to do.  The logo freezes on what?  The emulated display?  That's supposed to happen if you're attempting to assign the GPU as a secondary display.  My only advice for pci-assign is don't use it.  If you'd like some help with vfio-pci, please share with us how you're starting the guest to start with.

cat runwin-vfio

qemu-system-x86_64 -enable-kvm -M q35 -m 1024 -cpu host \
-smp 6,sockets=1,cores=6,threads=1 \
-bios /usr/share/qemu/bios.bin -vnc :0 \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on \
-device piix4-ide,bus=pcie.0,id=piix4-ide \
-drive file=/dev/md0,id=disk,format=raw -device ide-hd,bus=piix4-ide.0,drive=disk

Windows loads, but my card does not appear in device manager.

Ugh, maybe go back to the 1st post and work on the start command.  You're not specifying -vga none, so you have an emulated VGA device, the assigned device will be secondary.  I wouldn't recommend that model unless you have a Quadro card (even Quadro doesn't work in this mode on Q35).  That also basically negates the x-vga=on option.  You're also trying to attach a piix4 (440FX) IDE device to a Q35 chipset.  There's just too many problems in that commandline to even deal with.


http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses?  Try https://www.redhat.com/mailman/listinfo/vfio-users

Offline

#2870 2014-10-01 20:06:51

Lauer
Member
Registered: 2014-09-11
Posts: 9

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

aw wrote:

Ugh, maybe go back to the 1st post and work on the start command.  You're not specifying -vga none, so you have an emulated VGA device, the assigned device will be secondary.  I wouldn't recommend that model unless you have a Quadro card (even Quadro doesn't work in this mode on Q35).  That also basically negates the x-vga=on option.  You're also trying to attach a piix4 (440FX) IDE device to a Q35 chipset.  There's just too many problems in that commandline to even deal with.

This is what I'm trying to achieve.

-vga none results in compat_monitor0 terminal, which is why I was using pci-assign. (I posted this before but nobody responded so I tried using pci-assign)

The piix4 lines are from the OP, so that's not really my fault for using them. (Should I get rid of them even though the VM boots just fine with vfio?)

Offline

#2871 2014-10-01 20:23:13

aw
Member
Registered: 2013-10-04
Posts: 921
Website

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Lauer wrote:
aw wrote:

Ugh, maybe go back to the 1st post and work on the start command.  You're not specifying -vga none, so you have an emulated VGA device, the assigned device will be secondary.  I wouldn't recommend that model unless you have a Quadro card (even Quadro doesn't work in this mode on Q35).  That also basically negates the x-vga=on option.  You're also trying to attach a piix4 (440FX) IDE device to a Q35 chipset.  There's just too many problems in that commandline to even deal with.

This is what I'm trying to achieve.

Please notice that in that demonstration, the desktop window is a tigervnc client and you can see from the icon on the guest desktop that it's running TightVNC and is connected, so there's some degree of trickery here that makes it look like the VM is running in a desktop window, but it's actually no different than if you did a VNC connection to a remote system.  They also have a spice display, so presumably they do also have an emulated graphics device.  Reports like this come through every so often that someone got things to work as a secondary device w/o using VGA assignment, maybe even using pci-assign.  It depends on the guest driver working in that configuration.  If it doesn't, you're SOL on that path.

-vga none results in compat_monitor0 terminal, which is why I was using pci-assign. (I posted this before but nobody responded so I tried using pci-assign)

I didn't respond because I don't know what a "compat_monitor0 terminal" even means.  If it means you got a console window, use the -nographic option to make it go away.

The piix4 lines are from the OP, so that's not really my fault for using them. (Should I get rid of them even though the VM boots just fine with vfio?)

Seems odd to me, but whatever.  I'm encouraging people just trying to run windows to forget about Q35 and just use the default 440FX model.  It seems like you're also working with a mobile AMD GPU.  Hybrid, dual GPU laptops are wired in strange ways, so if you're expecting that you can plug a monitor into one of the outputs and get the discrete graphics output, there's a good chance it won't work.  You might be able to install everything, setup the Catalyst driver and VNC server in the guest with and emulated VGA, then add the Radeon, remove the emulated VGA, and hope you can blind boot the guest and connect.


http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses?  Try https://www.redhat.com/mailman/listinfo/vfio-users

Offline

#2872 2014-10-01 23:56:10

Lauer
Member
Registered: 2014-09-11
Posts: 9

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

aw wrote:

I didn't respond because I don't know what a "compat_monitor0 terminal" even means.  If it means you got a console window, use the -nographic option to make it go away.

Seems odd to me, but whatever.  I'm encouraging people just trying to run windows to forget about Q35 and just use the default 440FX model.  It seems like you're also working with a mobile AMD GPU.  Hybrid, dual GPU laptops are wired in strange ways, so if you're expecting that you can plug a monitor into one of the outputs and get the discrete graphics output, there's a good chance it won't work.  You might be able to install everything, setup the Catalyst driver and VNC server in the guest with and emulated VGA, then add the Radeon, remove the emulated VGA, and hope you can blind boot the guest and connect.

Running with -vga none -nographic -vnc :0 gets rid of the terminal.:) The vnc window now says "This VM has no graphics display device."

Does this change anything? Should I try the vnc in guest solution? Would that solution even work if there is no graphics display device?

Also when I plug in HDMI, arch mirrors my desktop automatically. (even with no X server running)

Offline

#2873 2014-10-02 00:24:02

aw
Member
Registered: 2013-10-04
Posts: 921
Website

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Lauer wrote:
aw wrote:

I didn't respond because I don't know what a "compat_monitor0 terminal" even means.  If it means you got a console window, use the -nographic option to make it go away.

Seems odd to me, but whatever.  I'm encouraging people just trying to run windows to forget about Q35 and just use the default 440FX model.  It seems like you're also working with a mobile AMD GPU.  Hybrid, dual GPU laptops are wired in strange ways, so if you're expecting that you can plug a monitor into one of the outputs and get the discrete graphics output, there's a good chance it won't work.  You might be able to install everything, setup the Catalyst driver and VNC server in the guest with and emulated VGA, then add the Radeon, remove the emulated VGA, and hope you can blind boot the guest and connect.

Running with -vga none -nographic -vnc :0 gets rid of the terminal.:) The vnc window now says "This VM has no graphics display device."

Does this change anything? Should I try the vnc in guest solution? Would that solution even work if there is no graphics display device?

Have you installed a guest, installed a VNC server, installed Catalyst drivers, and have the VM working so that you can connect to that VNC server from the host?

Also when I plug in HDMI, arch mirrors my desktop automatically. (even with no X server running)

See comments about mobile/hybrid graphics.  That's a good hint that the discrete graphics isn't directly connected to the HDMI port.


http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses?  Try https://www.redhat.com/mailman/listinfo/vfio-users

Offline

#2874 2014-10-02 08:27:33

Duelist
Member
Registered: 2014-09-22
Posts: 358

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Denso wrote:

Errors when rebooting VM :

crashlog

This results in vertical tears in the screen .

>Hardware name: ASUS All Series/X99-DELUXE
Is it that fresh DDR4-based motherboard, requesting fresh CPUs like intel i7-5XXX? Don't they have some APICv2 or something?


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

#2875 2014-10-02 14:15:13

Denso
Member
Registered: 2014-08-30
Posts: 179

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Duelist wrote:
Denso wrote:

Errors when rebooting VM :

crashlog

This results in vertical tears in the screen .

>Hardware name: ASUS All Series/X99-DELUXE
Is it that fresh DDR4-based motherboard, requesting fresh CPUs like intel i7-5XXX? Don't they have some APICv2 or something?

Yes , it is . I use i7-5930k with it . It's giving a headache .

My previous Z77 board worked flawlessly , I thought X99 would be the same if not easier to setup .

Now , every time I reboot a VM with GPU passed-through to it , it ceashes the whole host . I tried the solution Alex suggested and it worked for a couple reboots , but then it returned to crashing the host .

Any help would be appreciated folks !

Offline

Board footer

Powered by FluxBB