summaryrefslogtreecommitdiff
path: root/arch/x86/include
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2011-04-27 13:20:30 +0300
committerAvi Kivity <avi@redhat.com>2011-05-22 08:47:39 -0400
commit1aa366163b8b69f660cf94fd5062fa44859e4318 (patch)
tree29d6843cbe1c66a04c11dad24169ec5e1318e53d /arch/x86/include
parent0a434bb2bf094f463ca3ca71ac42cea9e423048f (diff)
KVM: x86 emulator: consolidate segment accessors
Instead of separate accessors for the segment selector and cached descriptor, use one accessor for both. This simplifies the code somewhat. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/kvm_emulate.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h
index 28114f581fa3..0049211959c0 100644
--- a/arch/x86/include/asm/kvm_emulate.h
+++ b/arch/x86/include/asm/kvm_emulate.h
@@ -164,15 +164,10 @@ struct x86_emulate_ops {
int size, unsigned short port, const void *val,
unsigned int count);
- bool (*get_cached_descriptor)(struct x86_emulate_ctxt *ctxt,
- struct desc_struct *desc, u32 *base3,
- int seg);
- void (*set_cached_descriptor)(struct x86_emulate_ctxt *ctxt,
- struct desc_struct *desc, u32 base3,
- int seg);
- u16 (*get_segment_selector)(struct x86_emulate_ctxt *ctxt, int seg);
- void (*set_segment_selector)(struct x86_emulate_ctxt *ctxt,
- u16 sel, int seg);
+ bool (*get_segment)(struct x86_emulate_ctxt *ctxt, u16 *selector,
+ struct desc_struct *desc, u32 *base3, int seg);
+ void (*set_segment)(struct x86_emulate_ctxt *ctxt, u16 selector,
+ struct desc_struct *desc, u32 base3, int seg);
unsigned long (*get_cached_segment_base)(struct x86_emulate_ctxt *ctxt,
int seg);
void (*get_gdt)(struct x86_emulate_ctxt *ctxt, struct desc_ptr *dt);