Skip to contentSkip to conversation

question on KVM run flow on Intel-VT

DISCUSSION MaJia 2 participants 4 messages Apr 22, 2009 KVM

lore
Share & tools
lore

MaJia

author
#0 lore raw

Hi,

I am learning kvm + Intel-VT nowadays. Since I am rookie on both kvm and Intel-VT, I got following questions about run flow of kvm on vmx.

I think the cpu is running in 'vmx non-root' mode when execution flow reach 'vmx_vcpu_run' and the batch of 'asm code' take responsibility of run guest on cpu.

My question is, when and where will the execution flow return to vmx root mode?

Please give me some hint about this point or route me to some documents.

Thanks.
Bruce.

#1 lore raw
Quoted 11 lines · MaJia

Hi,

I am learning kvm + Intel-VT nowadays. Since I am rookie on both kvm and Intel-VT, I got following questions about run flow of kvm on vmx.

I think the cpu is running in 'vmx non-root' mode when execution flow reach 'vmx_vcpu_run' and the batch of 'asm code' take responsibility of run guest on cpu.

My question is, when and where will the execution flow return to vmx root mode?

I may not clarify my question. I mean, when vmexit occur, which caused by executing io instruction from guest, will the cpu switch to vmx root mode? Will the cpu direct goto run 'handle_io' function?

When cpu running in vmx non-root mode, an interrupt occurs, what is the behavior of cpu?

Thanks.
Bruce.

Quoted 5 lines

Please give me some hint about this point or route me to some documents.

Thanks.
Bruce.

#3 lore raw

Hi Greg,

Quoted 7 lines · Gregory Haskins

Hi Bruce,

Quoted 4 lines · Bruce MaJia
Quoted 2 lines · MaJia

Hi,

Quoted 8 lines
Quoted 3 lines
Quoted 3 lines

I am learning kvm + Intel-VT nowadays. Since I am rookie on both kvm and Intel-VT, I got following questions about run flow of kvm on vmx.

The Intel Software Developers Manual, Volume 3B, Chapter 21 is your friend :)

http://download.intel.com/design/processor/manuals/253669.pdf

Thanks for your response.

I actually take a quick glance at the Ch21 of Vol3B. I can found a list in the chapter about 'xxx instruction will cause' vmexit and 'xxx will cause vmexit if reg.xyz == abc' or 'xxx will not cause vmexit on condition zzz'. But I could not find some clarification about:

? What is the cpu mode when vmexit occur.
? What is the behavior of cpu.
? Will it fetch next instruction from fixed phy addr? ? Or will it read next instruction from according vmcs? ? Or the cpu will just follow the standard process to handle interrupt/exception?

Maybe I went too fast and miss some important information. Will you speard a few words to guide me to correct point? Thanks in advance.

Bruce.

Quoted 5 lines

HTH,
-Greg