Why AMD-V/RVI is not supported Officially by EVE-NG?

Moderator: mike

Post Reply
Posts: 22
Joined: Wed Jul 26, 2017 12:35 pm

Why AMD-V/RVI is not supported Officially by EVE-NG?

Post by Linux@software » Sat Nov 09, 2019 8:02 pm


Why AMD-V/RVI is not supported Officially by EVE-NG?

I read the below KVM FAQ and QEMU - ArchWiki article found below points to know about KVM and QEMU. Seem like KVM and QEMU supports both Intel and AMD. Since EVE-NG uses KVM and QEMU how AMD-V/RVI is not supported by EVE-NG. Is there any modification at architecture level in EVE-NG. Please some one can explain about EVE-NG architecture. And why it is not support AMD-V and any compatible issue with EVE-NG.

KVM FAQ: https://www.linux-kvm.org/page/FAQ#What ... .2F_hvm.3F

List of IOMMU-supporting hardware: https://en.wikipedia.org/wiki/List_of_I ... g_hardware

QEMU - ArchWiki: https://wiki.archlinux.org/index.php/QEMU#Enabling_KVM

What is Intel VT / AMD-V / hvm?
Intel VT and AMD's AMD-V are instruction set extensions that provide hardware assistance to virtual machine monitors. They enable running fully isolated virtual machines at native hardware speeds, for some workloads.

HVM (for Hardware Virtual Machine) is a vendor-neutral term often used to designate the x86 instruction set extensions.

How can I use AMD-V extension?
modprobe kvm-amd

CPU Performance
Modern processors come with a wide variety of performance enhancing features such as streaming instructions sets (sse) and other performance-enhancing instructions. These features vary from processor to processor.

QEMU and KVM default to a compatible subset of cpu features, so that if you change your host processor, or perform a live migration, the guest will see its cpu features unchanged. This is great for compatibility but comes at a performance cost.

To pass all available host processor features to the guest, use the command line switch

qemu -cpu host

Nested Guests
Nested guests are KVM guests run in a KVM guest. As of Feb 2018 this feature is considered working but experimental, and some limitations apply.

When describing nested guests, we will use the following terminology:

"L0" – the bare metal host, running KVM
"L1" – a VM running on L0; also called the "guest hypervisor" — as it itself is capable of running KVM
"L2" – a VM running on L1, also called the "nested guest"

Why use it?
An additional layer of virtualization sometimes comes in handy. You might have access to a large virtual machine in a cloud environment that you want to compartmentalize into multiple workloads. You might be running a lab environment in a training session.

How to run
The KVM kernel modules do not enable nesting by default (though your distribution may override this default). To enable nesting, set the nested module parameter to Y or 1. You may set this parameter persistently in a file in /etc/modprobe.d in the L0 host, for example:

# If you have an Intel CPU, use this:
$ cat /etc/modprobe.d/kvm_intel.conf
options kvm-intel nested=Y

# If you have an AMD CPU, then this:
$ cat /etc/modprobe.d/kvm_amd.conf
options kvm-amd nested=1
Once your L0 host is capable of nesting, you should be able to start an L1 guest with the -cpu host option (or for better live migration compatibility, use a named CPU model supported by QEMU, such as: -cpu Haswell-noTSX-IBRS,vmx=on) and the guest will subsequently be capable of running an L2 guest with accelerated KVM.

How can I check that I'm not falling back to QEMU with no hardware acceleration?
If you think that you might not be using the hardware acceleration provided by the KVM module, here are a few steps to help you check this.

First of all, check that you don't have messages such as:

qemu-system-x86_64 -hda myvm.qcow2
open /dev/kvm: No such file or directory
Could not initialize KVM, will disable KVM support

In that case, you can check that:

the modules are correctly loaded lsmod|grep kvm
you don't have a "KVM: disabled by BIOS" line in the output of dmesg
/dev/kvm exists and you have the correct rights to use it
Other ways to do the diagnostic:

if you have access to the QEMU monitor (Ctrl-Alt-2, use Ctrl-Alt-1 to get back to the VM display), enter the "info kvm" command and it should respond with "KVM support: enabled"
the right-end columns of the output from <code>lsmod|grep kvm on the host system, once the VM is started should show only non zero values. The value on the line corresponding to the architecture specific module (e-g kvm_intel, kvm_amd) show the number of VM using the module. For instance, if I have 2 VM running using the KVM module on a machine with vt, it will report:

Enabling KVM

KVM must be supported by your processor and kernel, and necessary kernel modules must be loaded. See KVM for more information.

To start QEMU in KVM mode, append -enable-kvm to the additional start options. To check if KVM is enabled for a running VM, enter the #QEMU monitor using Ctrl+Alt+2, and type info kvm.

The argument accel=kvm of the -machine option is equivalent to the -enable-kvm option.
If you start your VM with a GUI tool and experience very bad performance, you should check for proper KVM support, as QEMU may be falling back to software emulation.
KVM needs to be enabled in order to start Windows 7 and Windows 8 properly without a blue screen.

Enabling IOMMU (Intel VT-d/AMD-Vi) support

First enable IOMMU, see PCI passthrough via OVMF#Setting up IOMMU.

Add -device intel-iommu to create the IOMMU device:

$ qemu-system-x86_64 -enable-kvm -machine q35 -device intel-iommu -cpu host ..

Note: On Intel CPU based systems creating an IOMMU device in a QEMU guest with -device intel-iommu will disable PCI passthrough with an error like:

Device at bus pcie.0 addr 09.0 requires iommu notifier which is currently not supported by intel-iommu emulation

While adding the kernel parameter intel_iommu=on is still needed for remapping IO (e.g. PCI passthrough with vfio-pci), -device intel-iommu should not be set if PCI PCI passthrough is required.

What Is the Difference between QEMU and KVM?

As previously mentioned, QEMU can run independently, but due to the emulation being performed entirely in software it is extremely slow. To overcome this, QEMU allows you to use KVM as an accelerator so that the physical CPU virtualization extensions can be used. So to conclude QEMU is a type 2 hypervisor that runs within user space and performs virtual hardware emulation, where as KVM is a type 1 hypervisor that runs in kernel space, that allows a user space program access to the hardware virtualization features of various processors[3].

https://www.fir3net.com/images/articles ... ne.svg.png

Figure 1 - High-level overview of the KVM/QEMU virtualization environment

Posts: 5
Joined: Mon Oct 22, 2018 6:15 pm

Re: Why AMD-V/RVI is not supported Officially by EVE-NG?

Post by drhoades » Tue Nov 12, 2019 1:58 pm

I am also interested in the answer to this. I want to build a multipurpose machine with one of the soon to be released threadripper processors and run EVE-NG pro on it. However, not only is it unsupported but I don't believe you can even get a pro license on AMD hardware.

Are there any plans to explore this in the future from the development team? It seems like the new AMD Ryzen and Threadripper hardware would be ideal to run EVE-NG as it supports more CPU cores for less money than comparable Intel CPUs.

Post Reply