paravirtualization structure
hi,
I have a couple of kvm/kernel newbie questions:
1. What is the sequence of events for a paravirtualization hypercall? I
understand how VMX architecture works, but how does the paravirt fit in? When we make a paravirt sys call we avoid a VMexit, but which address space does the call go to?
2. Is the paravirtualization code included in the 2.6.20 kernel (if so where
is it) or do we still need to apply the patch for it?
I reply would be greatly appreciated. Thanks in advance.
Omar Khan
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Quoted 9 lines · Omar Khan
hi,
I have a couple of kvm/kernel newbie questions:
1. What is the sequence of events for a paravirtualization hypercall? I
understand how VMX architecture works, but how does the paravirt fit in? When we make a paravirt sys call we avoid a VMexit, but which address space does the call go to?
The hypercall sequence does not avoid a vmexit. The guest issues a vmcall instruction, which is trapped and processed by the host.
Quoted 5 lines
2. Is the paravirtualization code included in the 2.6.20 kernel (if so where
is it) or do we still need to apply the patch for it?
The paravirt code is not present in 2.6.20. You can download it using the instructions in http://kvm.qumranet.com/kvmwiki/Code.
Signature · 8 lines
error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Quoted 3 lines · Avi Kivity
The hypercall sequence does not avoid a vmexit. The guest issues a vmcall instruction, which is trapped and processed by the host.
Thanks for replying Avi. In your response
(http://article.gmane.org/gmane.linux.kernel/481457) to the announcement of the KVM paravirtualization patch you said about the cr3 related hypercall that:
"The gain probably comes not only from avoiding the vmentry/vmexit, but also from avoiding the flushing of the global page tlb entries."
Is the vmexit caused by the vmcall more efficient/different than the vmexit that is caused by writing to the cr3 register say.
Thanks
Omar Khan
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Quoted 6 lines
Quoted 3 lines
The hypercall sequence does not avoid a vmexit. The guest issues a vmcall instruction, which is trapped and processed by the host.
Thanks for replying Avi. In your response
(http://article.gmane.org/gmane.linux.kernel/481457) to the
announcement
Quoted 9 lines
of the
KVM paravirtualization patch you said about the cr3 related hypercall that:"The gain probably comes not only from avoiding the vmentry/vmexit, but also
from avoiding the flushing of the global page tlb entries."Is the vmexit caused by the vmcall more efficient/different than the
vmexit
Quoted 2 lines
that
is caused by writing to the cr3 register say.
Theoretically speaking the answer is yes, vmcall is a special instruction that it one and only purpose is the exit from the guest. While mov cr3 instruction might be bound to other actions of the processor and might have more effects on the pipeline, this harder to optimize for vmexit purposes.
Quoted 10 lines
Thanks
Omar Khan
-----------------------------------------------------------------------
--
Quoted 5 lines
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVD
EV
Quoted 4 lines
_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Quoted 7 lines · Dor Laor
Theoretically speaking the answer is yes, vmcall is a special instruction that it one and only purpose is the exit from the guest. While mov cr3 instruction might be bound to other actions of the processor and might have more effects on the pipeline, this harder to optimize for vmexit purposes.
I guess what is confusing me is that the vmcall causes an vmexit in VMX non-root mode (the one in which a paravirtualized guest is operating), but Avi says that
a hypercal (made using a vmcall) 'avoids' a vmentry/vmexit and Ingo comments in
his patch that :
"This utilizes the cr3 filter capability of the hardware - if this works out then no VM exit happens"
NO VM-exits happen. hmmmm... maybe I need to go over the intel manuals more thoroughly, however any hints will be most welcomed.
Thanks
Omar
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Quoted 17 lines · Omar Khan
Quoted 7 lines · Dor Laor
Theoretically speaking the answer is yes, vmcall is a special instruction that it one and only purpose is the exit from the guest. While mov cr3 instruction might be bound to other actions of the processor and might have more effects on the pipeline, this harder to optimize for vmexit purposes.
I guess what is confusing me is that the vmcall causes an vmexit in VMX non-root mode (the one in which a paravirtualized guest is operating), but Avi says that
a hypercal (made using a vmcall) 'avoids' a vmentry/vmexit and Ingo comments in
his patch that :
Quoted 6 lines
"This utilizes the cr3 filter capability of the hardware - if this works out then no VM exit happens"
NO VM-exits happen. hmmmm... maybe I need to go over the intel manuals more thoroughly, however any hints will be most welcomed.
Using the cr3 filter does not involve a hypercall. Instead, it allows the guest to context switch without trapping on the mov %cr3 instruction, by providing a set of pre-prepared cr3s.
Signature · 8 lines
Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Quoted 7 lines
"This utilizes the cr3 filter capability of the hardware - if this works out then no VM exit happens"
NO VM-exits happen. hmmmm... maybe I need to go over the intel manuals more thoroughly, however any hints will be most welcomed.
Hi,
I think you're confused a bit ;)
the cr3 filter is not a hypercall interface. It's a optimization in the hardware that makes it not needed to go to the host (via a vmexit in some form or another) to do a context switch inside the guest... so guest context switches will become a lot faster.
In order for this to work, the guest needs to assist the host a bit, and hence a hypercall interface was needed. Well it's needed anyway going forward for other things such as the paravirtualized block and networking drivers...
I hope this clears up some of what you're asking...
Greetings,
Arjan van de Ven
Signature · 9 lines
if you want to mail me at work (you don't), use arjan (at) linux.intel.com Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV