]> xenbits.xensource.com Git - people/liuw/xen.git/commitdiff
x86emul: MSR indexes are only 32 bits wide
authorJan Beulich <jbeulich@suse.com>
Mon, 15 Feb 2016 13:15:12 +0000 (14:15 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 15 Feb 2016 13:15:12 +0000 (14:15 +0100)
... and hence the respective {read,write}_msr() hook parameter doesn't
need to be "unsigned long".

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/emulate.c
xen/arch/x86/x86_emulate/x86_emulate.h

index f5dd1f8cfac50642198f8eb172646a809f9eb4a2..fef790578272aba1af981f101e3e96a331df6ca1 100644 (file)
@@ -966,7 +966,7 @@ static int hvmemul_write_io_discard(
 }
 
 static int hvmemul_write_msr_discard(
-    unsigned long reg,
+    unsigned int reg,
     uint64_t val,
     struct x86_emulate_ctxt *ctxt)
 {
@@ -1439,7 +1439,7 @@ static int hvmemul_write_cr(
 }
 
 static int hvmemul_read_msr(
-    unsigned long reg,
+    unsigned int reg,
     uint64_t *val,
     struct x86_emulate_ctxt *ctxt)
 {
@@ -1447,7 +1447,7 @@ static int hvmemul_read_msr(
 }
 
 static int hvmemul_write_msr(
-    unsigned long reg,
+    unsigned int reg,
     uint64_t val,
     struct x86_emulate_ctxt *ctxt)
 {
index 9e4bca956319fe7b828520134282f2a938a355d5..3a1bb461c31350b2c84f02b2a036432f39c1895f 100644 (file)
@@ -334,7 +334,7 @@ struct x86_emulate_ops
      *  @reg:   [IN ] Register to read.
      */
     int (*read_msr)(
-        unsigned long reg,
+        unsigned int reg,
         uint64_t *val,
         struct x86_emulate_ctxt *ctxt);
 
@@ -343,7 +343,7 @@ struct x86_emulate_ops
      *  @reg:   [IN ] Register to write.
      */
     int (*write_msr)(
-        unsigned long reg,
+        unsigned int reg,
         uint64_t val,
         struct x86_emulate_ctxt *ctxt);