Re: [PATCH 08/18] KVM/MIPS32-VZ: Entry point for trampolining to the guest and trap handlers.

2013-05-28 Thread Paolo Bonzini
Il 19/05/2013 07:47, Sanjay Lal ha scritto:
> - Add support for the MIPS VZ-ASE
> - Whitespace fixes
> 
> Signed-off-by: Sanjay Lal 
> ---
>  arch/mips/kvm/kvm_locore.S | 1088 
> +++-
>  1 file changed, 573 insertions(+), 515 deletions(-)

This is unreadable, can you split the whitespace fixes?

Paolo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 08/18] KVM/MIPS32-VZ: Entry point for trampolining to the guest and trap handlers.

2013-05-18 Thread Sanjay Lal
- Add support for the MIPS VZ-ASE
- Whitespace fixes

Signed-off-by: Sanjay Lal 
---
 arch/mips/kvm/kvm_locore.S | 1088 +++-
 1 file changed, 573 insertions(+), 515 deletions(-)

diff --git a/arch/mips/kvm/kvm_locore.S b/arch/mips/kvm/kvm_locore.S
index dca2aa6..936171f 100644
--- a/arch/mips/kvm/kvm_locore.S
+++ b/arch/mips/kvm/kvm_locore.S
@@ -1,13 +1,13 @@
 /*
-* This file is subject to the terms and conditions of the GNU General Public
-* License.  See the file "COPYING" in the main directory of this archive
-* for more details.
-*
-* Main entry point for the guest, exception handling.
-*
-* Copyright (C) 2012  MIPS Technologies, Inc.  All rights reserved.
-* Authors: Sanjay Lal 
-*/
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Main entry point for the guest, exception handling.
+ *
+ * Copyright (C) 2012  MIPS Technologies, Inc. All rights reserved.
+ * Authors: Sanjay Lal 
+ */
 
 #include 
 #include 
@@ -16,39 +16,40 @@
 #include 
 #include 
 
+#ifdef CONFIG_KVM_MIPS_VZ
+#include 
+#endif
 
-#define _C_LABEL(x) x
-#define MIPSX(name) mips32_ ## name
-#define CALLFRAME_SIZ   32
+#define _C_LABEL(x)x
+#define MIPSX(name)mips32_ ## name
+#define CALLFRAME_SIZ  32
 
 /*
  * VECTOR
  *  exception vector entrypoint
  */
-#define VECTOR(x, regmask)  \
-.ent_C_LABEL(x),0;  \
-EXPORT(x);
+#define VECTOR(x, regmask) \
+   .ent_C_LABEL(x),0;  \
+   EXPORT(x);
 
-#define VECTOR_END(x)  \
-EXPORT(x);
+#define VECTOR_END(x)  \
+   EXPORT(x);
 
 /* Overload, Danger Will Robinson!! */
-#define PT_HOST_ASIDPT_BVADDR
-#define PT_HOST_USERLOCAL   PT_EPC
+#define PT_HOST_USERLOCAL  PT_EPC
 
-#define CP0_DDATA_LO$28,3
-#define CP0_EBASE   $15,1
-
-#define CP0_INTCTL  $12,1
-#define CP0_SRSCTL  $12,2
-#define CP0_SRSMAP  $12,3
-#define CP0_HWRENA  $7,0
+#define CP0_DDATA_LO   $28,3
+#define CP0_EBASE  $15,1
+#define CP0_INTCTL $12,1
+#define CP0_SRSCTL $12,2
+#define CP0_SRSMAP $12,3
+#define CP0_HWRENA $7,0
 
 /* Resume Flags */
-#define RESUME_FLAG_HOST(1<<1)  /* Resume host? */
+#define RESUME_FLAG_HOST   (1<<1)  /* Resume host? */
 
-#define RESUME_GUEST0
-#define RESUME_HOST RESUME_FLAG_HOST
+#define RESUME_GUEST   0
+#define RESUME_HOSTRESUME_FLAG_HOST
 
 /*
  * __kvm_mips_vcpu_run: entry point to the guest
@@ -57,172 +58,188 @@
  */
 
 FEXPORT(__kvm_mips_vcpu_run)
-.setpush
-.setnoreorder
-.setnoat
-
-/* k0/k1 not being used in host kernel context */
-   addiu   k1,sp, -PT_SIZE
-LONG_S $0, PT_R0(k1)
-LONG_S $1, PT_R1(k1)
-LONG_S $2, PT_R2(k1)
-LONG_S $3, PT_R3(k1)
-
-LONG_S $4, PT_R4(k1)
-LONG_S $5, PT_R5(k1)
-LONG_S $6, PT_R6(k1)
-LONG_S $7, PT_R7(k1)
-
-LONG_S $8,  PT_R8(k1)
-LONG_S $9,  PT_R9(k1)
-LONG_S $10, PT_R10(k1)
-LONG_S $11, PT_R11(k1)
-LONG_S $12, PT_R12(k1)
-LONG_S $13, PT_R13(k1)
-LONG_S $14, PT_R14(k1)
-LONG_S $15, PT_R15(k1)
-LONG_S $16, PT_R16(k1)
-LONG_S $17, PT_R17(k1)
-
-LONG_S $18, PT_R18(k1)
-LONG_S $19, PT_R19(k1)
-LONG_S $20, PT_R20(k1)
-LONG_S $21, PT_R21(k1)
-LONG_S $22, PT_R22(k1)
-LONG_S $23, PT_R23(k1)
-LONG_S $24, PT_R24(k1)
-LONG_S $25, PT_R25(k1)
+   .setpush
+   .setnoreorder
+   .setnoat
+
+   /* k0/k1 not being used in host kernel context */
+   addiu   k1,sp, -PT_SIZE
+   LONG_S  $0, PT_R0(k1)
+   LONG_S  $1, PT_R1(k1)
+   LONG_S  $2, PT_R2(k1)
+   LONG_S  $3, PT_R3(k1)
+   LONG_S  $4, PT_R4(k1)
+   LONG_S  $5, PT_R5(k1)
+   LONG_S  $6, PT_R6(k1)
+   LONG_S  $7, PT_R7(k1)
+   LONG_S  $8, PT_R8(k1)
+   LONG_S  $9, PT_R9(k1)
+   LONG_S  $10, PT_R10(k1)
+   LONG_S  $11, PT_R11(k1)
+   LONG_S  $12, PT_R12(k1)
+   LONG_S  $13, PT_R13(k1)
+   LONG_S  $14, PT_R14(k1)
+   LONG_S  $15, PT_R15(k1)
+   LONG_S  $16, PT_R16(k1)
+   LONG_S  $17, PT_R17(k1)
+   LONG_S  $18, PT_R18(k1)
+   LONG_S  $19, PT_R19(k1)
+   LONG_S  $20, PT_R20(k1)
+   LONG_S  $21, PT_R21(k1)
+   LONG_S  $22, PT_R22(k1)
+   LONG_S  $23, PT_R23(k1)
+   LONG_S  $24, PT_R24(k1)
+   LONG_S  $25, PT_R25(k1)
 
/* XXXKYMA k0/k1 not saved, not being used if we got here through an 
ioctl() */