skytree
skytree

Reputation: 1100

QEMU debugging:: Warning:TCG doesn't support requested feature: CPUID.01H:ECX

I want to use QEMU to debug my compiled kernel linux-4.13.4 on Ubuntu 16.04.3 LTS

I follow the following steps:

1 install qemu

sudo apt-get install qemu

2 run qemu

qemu-system-x86_64 -s -S -kernel /home/wxf/kernelSources/linux-4.13.4/arch/x86_64/boot/bzImage -initrd /boot/initrd.img-4.13.4

Note:

-s shorthand for -gdb tcp::1234

-S freeze CPU at startup (use 'c' to start execution)

But I get the following warning:

warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]

enter image description here

The terminal stops there and I cannot input other commands.

The QEMU window pops up when I run it but it is stopped.

enter image description here

So, my question is

How to eliminate the warning and is it normal(since it is not an error information)?

Upvotes: 10

Views: 35584

Answers (3)

Ben Aveling
Ben Aveling

Reputation: 914

I had this problem, or something very similar. It gave the same warning and, while it would then boot, it was unusably slow.

I fixed it it by adding -machine ubuntu,accel=kvm to the qemu-system-x86_64 command line.

Upvotes: 4

Code zan
Code zan

Reputation: 101

You missed out giving the RAM size to be used by the VM. The default RAM allocated by qemu is 128M, which in your case was not sufficient, I guess. Try passing

-m 512

Source

Upvotes: 4

Anatoly Trosinenko
Anatoly Trosinenko

Reputation: 754

Frankly speaking, I don't know how to handle that warning, can it be ignored or have you to do something with it. But I suppose the main problem is that you cannot run the VM. If so, you need to properly determine where to enter that c to start the VM. :)

QEMU has several graphical interfaces (and AFAIK can even be run in plain console). Suppose we have identical defaults for which UI to use (probably, the GTK one). When I run similar command (qemu-system-x86_64 -s -S -kernel ...), I can switch to the monitor console of QEMU by pressing Ctrl+Alt+2 (just 2, not F2). There I press c (and Enter, it seems to behave like regular terminal) and then switch to the VM display by Ctrl+Alt+1.

QEMU monitor console

Upvotes: 4

Related Questions