Skip to contentSkip to conversation

emulate the Intel-VT behavior on any type of CPU

Qemu-devel octane indice 6 participants 13 messages Jan 20, 2008 – Jan 23, 2008

lore
Share & tools
lore
#0 lore raw

Hello

I'm using qemu a lot for testing.

I have to test some scenarios involving intel-VT machines.

Can qemu emulates the intel-VT (or AMD pacifica) behavior on any type of machine?

Is it possible? Is it planned?

Thank you

Eurolines : Voyagez au meilleur prix : http://www.alinto.com/pub/

#1 lore raw

Hi,

Quoted 8 lines · octane indice

Hello

I'm using qemu a lot for testing.

I have to test some scenarios involving intel-VT machines.

Can qemu emulates the intel-VT (or AMD pacifica) behavior on any type of machine?

SVM (AMD pacifica) is party integrated. You don't have an IOMMU and high SVM exit codes don't work (mostly unused anyway), but apart from that it should be mostly feature-identical to what you get from a real K9 CPU.

You are welcome to implement VMX as well ;-).

Regards,

Alex

#2 lore raw

Note however, that as far as I know, all the Qemu accelerators - KQemu and KVM do not support this.

Signature · 1 line
-Alexey Eremenko "Technologov"
#3 lore raw

Alexey, you're wrong again.

svm is supported.

Quoted 3 lines · Alexey Eremenko

Note however, that as far as I know, all the Qemu accelerators - KQemu and KVM do not support this.

#4 lore raw

He was talking about running SVM code in KQemu/KVM. It might work with kqemu (I honestly have not tested it, but see no reason it shouldn't), but definitely not with KVM. Simply said, you can not run KVM inside of a KVM virtualized machine.

Regards,

Alex

Quoted 12 lines · Dor Laor

Alexey, you're wrong again.

svm is supported.

Quoted 3 lines · Alexey Eremenko

Note however, that as far as I know, all the Qemu accelerators - KQemu and KVM do not support this.

#12 lore raw
In reply to Dor Laor

Opps, me wrong this time, it should have been private. Didn't notice the reply address is different. Sorry.

Quoted 12 lines · Dor Laor

Alexey, you're wrong again.

svm is supported.

Quoted 3 lines · Alexey Eremenko

Note however, that as far as I know, all the Qemu accelerators - KQemu and KVM do not support this.

#5 lore raw
In reply to Alexander Graf
Quoted 4 lines · Alexander Graf

He was talking about running SVM code in KQemu/KVM. It might work with kqemu (I honestly have not tested it, but see no reason it shouldn't), but definitely not with KVM. Simply said, you can not run KVM inside of a KVM virtualized machine.

What would be the problem with supporting that in KVM? The host SVM should just report that the guest is trying to execute an SVM insn and generate an Illegal Operation which would be handled by qemu.

Regards

#6 lore raw
Quoted 8 lines · andrzej zaborowski
Quoted 5 lines · Alexander Graf

He was talking about running SVM code in KQemu/KVM. It might work with kqemu (I honestly have not tested it, but see no reason it shouldn't), but definitely not with KVM. Simply said, you can not run KVM inside of a KVM virtualized machine.

Quoted 8 lines

What would be the problem with supporting that in KVM? The host SVM should just report that the guest is trying to execute an SVM insn and generate an Illegal Operation which would be handled by qemu.

Regards

right now kvm never call to qemu for cpu emulation, qemu is used just for the devices, if kvm have something that it need to emulate it have a small emulator inside the kernel,

(ofcruse with modification what you just said is possible)

#10 lore raw
In reply to Alexander Graf

En réponse à Alexander Graf <[email protected]> :

Quoted 8 lines

He was talking about running SVM code in KQemu/KVM. It might work with
kqemu (I honestly have not tested it, but see no reason it shouldn't),
but definitely not with KVM. Simply said, you can not run KVM inside
of a KVM virtualized machine.

I just want to run KVM in a non VT machine. And I want to test a lot of things. So if qemu can emulate it, it's really good for me. I need to test hvm-Xen too.

So, as qemu emulates CPU, does it emulates [pacifica|VT] extensions too?
With a patch?

Do you have a link to some docs?

thanks

Eurolines : Voyagez au meilleur prix : http://www.alinto.com/pub/

#11 lore raw
Quoted 3 lines

So, as qemu emulates CPU, does it emulates [pacifica|VT] extensions too?
With a patch?

Yes, Qemu 0.91, can emulate AMD Pacifica/SVM, according to:
http://fabrice.bellard.free.fr/qemu/changelog.html

So yes, theoretically KVM should work inside Qemu, but don't expect real-hardware performance.

Signature · 1 line
-Alexey Eremenko "Technologov"
#7 lore raw
In reply to andrzej zaborowski
Quoted 6 lines · andrzej zaborowski
Quoted 4 lines · Alexander Graf

He was talking about running SVM code in KQemu/KVM. It might work with kqemu (I honestly have not tested it, but see no reason it shouldn't), but definitely not with KVM. Simply said, you can not run KVM inside of a KVM virtualized machine.

Quoted 7 lines

What would be the problem with supporting that in KVM? The host SVM should just report that the guest is trying to execute an SVM insn and generate an Illegal Operation which would be handled by qemu.

Regards

Yes, you're completely right about this. The main reason it isn't implemented in kvm is that nobody did it yet. It is actually one of the things on my "would like to do"-list, so if things stay the way they are, maybe you will see this feature in kvm someday.

Regards,

Alex

#8 lore raw

En réponse à Alexander Graf <[email protected]> :

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

He was talking about running SVM code in KQemu/KVM. It might work with kqemu

No, I have a intel PIII CPU without vt extensions.

I want to test KVM.

My idea is to use a qemu machine emulating the VT instruction.

So, in the qemu machine, I could load KVM.

But it doesn't seem to work.

I downloaded a qemu-0.9.1, compiled it.

A cat /proc/cpuinfo inside qemu doesn't show me vmx nor svm.

Am I forgotting something?

Thanks

Eurolines : Voyagez au meilleur prix : http://www.alinto.com/pub/

#9 lore raw

Try: qemu-system-x86_64

By default, you use "qemu" which is a 32-bit emulator. I think SVM is available only to 64-bit guests. The 64-bit emulator is named:
"qemu-system-x86_64", and don't worry, your CPU will work, despite being 32-bit without SVM. 64-bit part is for guests, not for host.

I'm not sure if your guest OS also needs to be 64-bit, but it better be.

Signature · 1 line
-Alexey Eremenko "Technologov"