Thread (1 message) 1 message, 1 author, 2007-06-18

Re: [PATCH 1/5] KVM paravirt_ops core infrastructure

From: Anthony Liguori <hidden>
Date: 2007-06-18 12:25:41
Also in: kvm

Avi Kivity wrote:
Anthony Liguori wrote:

quoted
-        nr = vcpu->regs[VCPU_REGS_RBX] & -1u;
-        a0 = vcpu->regs[VCPU_REGS_RAX] & -1u;
+        nr = vcpu->regs[VCPU_REGS_RAX] & -1u;
+        a0 = vcpu->regs[VCPU_REGS_RBX] & -1u;
quoted
- * Each hypercall may have 0-6 parameters.
- *
- * 64-bit hypercall index is in RAX, goes from 0 to __NR_hypercalls-1
- *
- * 64-bit parameters 1-6 are in the standard gcc x86_64 calling 
convention
- * order: RDI, RSI, RDX, RCX, R8, R9.
+ * Each hypercall may have 0-4 parameters.
  *
- * 32-bit index is EBX, parameters are: EAX, ECX, EDX, ESI, EDI, EBP.
- * (the first 3 are according to the gcc regparm calling convention)
+ * 32-bit index is EAX, parameters are: EBX, ECX, EDX, ESI.

What's the motivation for these changes?
If we're queuing hypercalls, then having 4 arguments verses 6 means that 
we can queue 50% more hypercalls in a single page.  Using all six 
arguments clobbers all the GP registers in 32-bit mode too.

Regards,

Anthony Liguori

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help