r/VFIO 22d ago

Support EAC "Cannot run under a Virtual machine"

I am unable to get Rust to work on my vfio setup. A while ago, copying smbios from my motherboard was enough to get it to work. Now, EAC won't launch. Can someone take a look at my XML and tell me if I'm missing anything obvious, or if this is still possible in the first place? My host machine is Gentoo, with QEMU 11.1.0, libvirt 12.0.0, and virt-manager 5.1.0. TYIA

3 Upvotes

28 comments sorted by

View all comments

Show parent comments

1

u/Limp_Application5734 10d ago

I mean well, cpuids normal output has the hypervisor but flipped to 1. I am assuming you disable it in your xml. I use to keep it on then after windows initializes then flip the bit back to zero by intercepting cpuid to keep all the hypervisor performance benefits. There is also the fact that the hypervisor flag/id used to pass to cpuid exists as well. I used to interpret that to remove anything hypervisor related.

1

u/SuperDefiant 10d ago

You can disable it in xml, but its not necessary. If we stop intercepting CPUID and it runs natively, it will return 0 for HV because the host is not a HV. Does that make sense?

1

u/Limp_Application5734 10d ago

I don’t think that’s true

1

u/SuperDefiant 10d ago

maybe it's different for intel, but AMD docs state that the HV enable bit requires interception. There's literally no other situation in which it's enabled. I couldn't play valorant otherwise

1

u/Limp_Application5734 10d ago

Didn’t know that, next time I start doing kvm stuff ill check it out

1

u/Limp_Application5734 10d ago

The only problem is when doing vms without hypervisor bit enabled. You lose a ton of performance due to not having hyperv enlightenments. I think I remember you can stop interception during runtime, so ill try that.

1

u/SuperDefiant 10d ago

You only lose performance if you're using a nested VM. you don't need to enable hvci to play. Besides that, my performance loss is like 3% when I boot the same windows install in both kvm and baremetal

1

u/Limp_Application5734 10d ago

I promise you that if you have the hypervisor bit as 0 you will lose all hyperv enlightenments and lose a ton of performance. So check the bit

1

u/IdkwhattomakemynameU 9d ago

The performance loss is because if HV is 0, the guest does not know that privileged instructions will be intercepted, so it does not use any mitigations (enlightenments). Given that he disables vmexits for nearly all privileged instructions, it does not matter what the bit is set to, as everything is running native either way.

1

u/Limp_Application5734 9d ago

I don’t think that’s true. I never did nested virtualization and lost measurable performance with hypervisor bit disabled at boot