diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-10-28 10:54:50 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-10-28 10:54:50 +0000 |
commit | a8b1845a784516e51266e9f33fc3fe5b1e2790d5 (patch) | |
tree | e057fa606799edf4f4fd4af58b5b351ead338549 /xen/arch/x86/x86_emulate | |
parent | 0a7e9c30b5554194b7b3c80ab751f13df0f7607f (diff) | |
download | xen-a8b1845a784516e51266e9f33fc3fe5b1e2790d5.tar.gz xen-a8b1845a784516e51266e9f33fc3fe5b1e2790d5.tar.bz2 xen-a8b1845a784516e51266e9f33fc3fe5b1e2790d5.zip |
Miscellaneous data placement adjustments
Make various data items const or __read_mostly where
possible/reasonable.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/arch/x86/x86_emulate')
-rw-r--r-- | xen/arch/x86/x86_emulate/x86_emulate.c | 22 | ||||
-rw-r--r-- | xen/arch/x86/x86_emulate/x86_emulate.h | 2 |
2 files changed, 12 insertions, 12 deletions
diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c index 3592f0e8f6..3385127e9f 100644 --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -715,7 +715,7 @@ static int read_ulong( unsigned long *val, unsigned int bytes, struct x86_emulate_ctxt *ctxt, - struct x86_emulate_ops *ops) + const struct x86_emulate_ops *ops) { *val = 0; return ops->read(seg, offset, val, bytes, ctxt); @@ -848,7 +848,7 @@ test_cc( static int get_cpl( struct x86_emulate_ctxt *ctxt, - struct x86_emulate_ops *ops) + const struct x86_emulate_ops *ops) { struct segment_register reg; @@ -865,7 +865,7 @@ get_cpl( static int _mode_iopl( struct x86_emulate_ctxt *ctxt, - struct x86_emulate_ops *ops) + const struct x86_emulate_ops *ops) { int cpl = get_cpl(ctxt, ops); if ( cpl == -1 ) @@ -888,7 +888,7 @@ static int ioport_access_check( unsigned int first_port, unsigned int bytes, struct x86_emulate_ctxt *ctxt, - struct x86_emulate_ops *ops) + const struct x86_emulate_ops *ops) { unsigned long iobmp; struct segment_register tr; @@ -933,7 +933,7 @@ static int ioport_access_check( static int in_realmode( struct x86_emulate_ctxt *ctxt, - struct x86_emulate_ops *ops) + const struct x86_emulate_ops *ops) { unsigned long cr0; int rc; @@ -948,7 +948,7 @@ in_realmode( static int in_protmode( struct x86_emulate_ctxt *ctxt, - struct x86_emulate_ops *ops) + const struct x86_emulate_ops *ops) { return !(in_realmode(ctxt, ops) || (ctxt->regs->eflags & EFLG_VM)); } @@ -956,7 +956,7 @@ in_protmode( static int in_longmode( struct x86_emulate_ctxt *ctxt, - struct x86_emulate_ops *ops) + const struct x86_emulate_ops *ops) { uint64_t efer; @@ -972,7 +972,7 @@ realmode_load_seg( enum x86_segment seg, uint16_t sel, struct x86_emulate_ctxt *ctxt, - struct x86_emulate_ops *ops) + const struct x86_emulate_ops *ops) { struct segment_register reg; int rc; @@ -991,7 +991,7 @@ protmode_load_seg( enum x86_segment seg, uint16_t sel, struct x86_emulate_ctxt *ctxt, - struct x86_emulate_ops *ops) + const struct x86_emulate_ops *ops) { struct segment_register desctab, ss, segr; struct { uint32_t a, b; } desc; @@ -1130,7 +1130,7 @@ load_seg( enum x86_segment seg, uint16_t sel, struct x86_emulate_ctxt *ctxt, - struct x86_emulate_ops *ops) + const struct x86_emulate_ops *ops) { if ( (ops->read_segment == NULL) || (ops->write_segment == NULL) ) @@ -1202,7 +1202,7 @@ decode_segment(uint8_t modrm_reg) int x86_emulate( struct x86_emulate_ctxt *ctxt, - struct x86_emulate_ops *ops) + const struct x86_emulate_ops *ops) { /* Shadow copy of register state. Committed on successful emulation. */ struct cpu_user_regs _regs = *ctxt->regs; diff --git a/xen/arch/x86/x86_emulate/x86_emulate.h b/xen/arch/x86/x86_emulate/x86_emulate.h index a43fa3a294..286279f10a 100644 --- a/xen/arch/x86/x86_emulate/x86_emulate.h +++ b/xen/arch/x86/x86_emulate/x86_emulate.h @@ -395,7 +395,7 @@ struct x86_emulate_ctxt int x86_emulate( struct x86_emulate_ctxt *ctxt, - struct x86_emulate_ops *ops); + const struct x86_emulate_ops *ops); /* * Given the 'reg' portion of a ModRM byte, and a register block, return a |