]> xenbits.xensource.com Git - xen.git/commitdiff
x86emul: constify write_segment() register pointer
authorJan Beulich <jbeulich@suse.com>
Fri, 9 Dec 2016 11:06:51 +0000 (12:06 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 9 Dec 2016 11:06:51 +0000 (12:06 +0100)
Since I stumbled across this while looking for further constification
opportunities, also correct the insn_fetch() related comment.

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

index ebd59edb63ec6cf64c51c14a0e5eae465b49aae3..ed5ff91ce00d26bd63b49b72132f04c6e6fa9587 100644 (file)
@@ -1439,7 +1439,7 @@ static int hvmemul_read_segment(
 
 static int hvmemul_write_segment(
     enum x86_segment seg,
-    struct segment_register *reg,
+    const struct segment_register *reg,
     struct x86_emulate_ctxt *ctxt)
 {
     struct hvm_emulate_ctxt *hvmemul_ctxt =
index adbfe2a6207b9a67a6da2e6838d96f82d2d53a93..468047364caf4b953ebc6182d01963bc02be6bbb 100644 (file)
@@ -200,7 +200,10 @@ struct x86_emulate_ops
 
     /*
      * insn_fetch: Emulate fetch from instruction byte stream.
-     *  Parameters are same as for 'read'. @seg is always x86_seg_cs.
+     *  Except for @bytes, all parameters are the same as for 'read'.
+     *  @bytes: Access length (0 <= @bytes < 16, with zero meaning
+     *  "validate address only").
+     *  @seg is always x86_seg_cs.
      */
     int (*insn_fetch)(
         enum x86_segment seg,
@@ -306,7 +309,7 @@ struct x86_emulate_ops
      */
     int (*write_segment)(
         enum x86_segment seg,
-        struct segment_register *reg,
+        const struct segment_register *reg,
         struct x86_emulate_ctxt *ctxt);
 
     /*