5

I'm trying to do some OS development in qemu with kvm. I'm using x86-64, my host cpu is an Intel i7-6700K (Skylake). The problem is that some of the cpu feature flags don't get passed through when I run qemu with -cpu host.

I'm specifically looking for 'est' (Enhanced SpeedStep). If I run lscpu in the host, it shows many cpu flags, including est. If look at the cpuid results in my OS I see that around half are missing, including est).

I think I understand that kvm doesn't automatically passthrough all cpu flags, but how can I tell it to pass through a particular flag (or perhaps just all flags)?

  • 4
    Perhaps KVM doesn’t implement the speed step control registers, so it cannot pass it through. (Note that you typically don’t want to let a guest access the hardware control registers directly, because then it can affect other guests.) – prl Aug 10 '19 at 18:33

1 Answers1

0

When kvm, it if it can enable each flag of the host CPU. You can tell it to pass specific flag by adding the flag after the cpu you choose. For example: -cpu SandyBridge,avx,pdpe1gb

and you will get a warning it it can't enable it.

yehudahs
  • 2,488
  • 8
  • 34
  • 54