WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH] vmx-x86_64-byte.patch

To: "Li, Chengyuan" <chengyuan.li@xxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] vmx-x86_64-byte.patch
From: Leendert van Doorn <leendert@xxxxxxxxxxxxxx>
Date: Sun, 11 Sep 2005 06:38:53 -0400
Cc: "Mallick, Asit K" <asit.k.mallick@xxxxxxxxx>, leendert@xxxxxxxxxxxxxxxxxxxxx, leendert@xxxxxxxxxxxxxx, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sun, 11 Sep 2005 15:34:36 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: Your message of "Sun, 11 Sep 2005 19:30:20 +0800." <59D45D057E9702469E5775CBB56411F15FC8F0@pdsmsx406>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# The byte size is handled in set_reg_value(), but not in __set_reg_value(), =
# and it's true that there is a bug in set_reg_value().
# I've send a patch for this bug:

Yes, that fixes the problem, our patches crossed. I saw Keir already
integrated my patch and while it is harmless, it is redundant and
here is the diff to take it out.

The patch also addresses some indent problems and aligns instructions
up with the rest of the block.

<ON SOAPBOX>
While on this topic, and I know I'm starting a religious war, could we
get some agreement over the prefered indent/coding style for Xen? It
is currently a hotchpotch of styles, sometimes even within the same
function. I don't have a strong preference for the style (the
Linux kernel style seems appropriate given the amount of Linux code
that's incorporated), as long as it is consistent.
<OFF SOAPBOX>

        Leendert

Signed-Off-By: Leendert van Doorn <leendert@xxxxxxxxxxxxxx>

diff -r 21cbdb20ff4c xen/arch/x86/vmx_io.c
--- a/xen/arch/x86/vmx_io.c     Sun Sep 11 09:28:21 2005
+++ b/xen/arch/x86/vmx_io.c     Sun Sep 11 11:23:38 2005
@@ -198,7 +198,6 @@
 static inline void __set_reg_value(unsigned long *reg, int size, long value)
 {
     switch (size) {
-        case BYTE:
         case BYTE_64:
             *reg &= ~0xFF;
             *reg |= (value & 0xFF);
diff -r 21cbdb20ff4c xen/arch/x86/vmx_platform.c
--- a/xen/arch/x86/vmx_platform.c       Sun Sep 11 09:28:21 2005
+++ b/xen/arch/x86/vmx_platform.c       Sun Sep 11 11:23:38 2005
@@ -55,7 +55,6 @@
 static inline long __get_reg_value(unsigned long reg, int size)
 {
     switch(size) {
-        case BYTE:
         case BYTE_64:
             return (char)(reg & 0xFF);
         case WORD:
@@ -90,10 +89,11 @@
                 return (char)((regs->rdx & 0xFF00) >> 8);
        case 7: /* %bh */
                 return (char)((regs->rbx & 0xFF00) >> 8);
-            default:
+       default:
            printf("Error: (get_reg_value) Invalid index value\n"); 
-                domain_crash_synchronous();
+           domain_crash_synchronous();
         }
+       /* NOTREACHED */
     }
 
     switch (index) {
@@ -114,8 +114,8 @@
         case 14: return __get_reg_value(regs->r14, size);
         case 15: return __get_reg_value(regs->r15, size);
         default:
-       printf("Error: (get_reg_value) Invalid index value\n"); 
-            domain_crash_synchronous();
+           printf("Error: (get_reg_value) Invalid index value\n"); 
+           domain_crash_synchronous();
     }
 }
 #elif defined (__i386__)


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>