Files
linux/drivers
Laurent Vivier ff593e5abe KVM: VMX: Let gcc to choose which registers to save (i386)
This patch lets GCC to determine which registers to save when we
switch to/from a VCPU in the case of intel i386.

* Original code saves following registers:

    eax, ebx, ecx, edx, edi, esi, ebp (using popa)

* Patched code:

  - informs GCC that we modify following registers
    using the clobber description:

    ebx, edi, rsi

  - doesn't save eax because it is an output operand (vmx->fail)

  - cannot put ecx in clobber description because it is an input operand,
    but as we modify it and we want to keep its value (vcpu), we must
    save it (pop/push)

  - ebp is saved (pop/push) because GCC seems to ignore its use the clobber
    description.

  - edx is saved (pop/push) because it is reserved by GCC (REGPARM) and
    cannot be put in the clobber description.

  - line "mov (%%esp), %3 \n\t" has been removed because %3
    is ecx and ecx is restored just after.

Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
Signed-off-by: Avi Kivity <avi@qumranet.com>
2008-01-30 17:52:56 +02:00
..
2008-01-30 13:34:07 +01:00
2008-01-11 18:29:22 -06:00
2008-01-28 13:21:30 +00:00
2007-12-31 23:11:11 +00:00
2008-01-27 18:14:47 +01:00
2007-12-23 12:54:37 -08:00
2008-01-28 23:21:18 +01:00
2008-01-24 20:40:43 -08:00
2008-01-28 13:21:38 +00:00
2008-01-30 13:34:07 +01:00