diff options
author | Avi Kivity <avi@redhat.com> | 2011-04-27 06:20:30 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-05-22 08:47:39 -0400 |
commit | 1aa366163b8b69f660cf94fd5062fa44859e4318 (patch) | |
tree | 29d6843cbe1c66a04c11dad24169ec5e1318e53d /arch/x86/include/asm/kvm_emulate.h | |
parent | 0a434bb2bf094f463ca3ca71ac42cea9e423048f (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/asm/kvm_emulate.h')
-rw-r--r-- | arch/x86/include/asm/kvm_emulate.h | 13 |
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 { | |||
164 | int size, unsigned short port, const void *val, | 164 | int size, unsigned short port, const void *val, |
165 | unsigned int count); | 165 | unsigned int count); |
166 | 166 | ||
167 | bool (*get_cached_descriptor)(struct x86_emulate_ctxt *ctxt, | 167 | bool (*get_segment)(struct x86_emulate_ctxt *ctxt, u16 *selector, |
168 | struct desc_struct *desc, u32 *base3, | 168 | struct desc_struct *desc, u32 *base3, int seg); |
169 | int seg); | 169 | void (*set_segment)(struct x86_emulate_ctxt *ctxt, u16 selector, |
170 | void (*set_cached_descriptor)(struct x86_emulate_ctxt *ctxt, | 170 | struct desc_struct *desc, u32 base3, int seg); |
171 | struct desc_struct *desc, u32 base3, | ||
172 | int seg); | ||
173 | u16 (*get_segment_selector)(struct x86_emulate_ctxt *ctxt, int seg); | ||
174 | void (*set_segment_selector)(struct x86_emulate_ctxt *ctxt, | ||
175 | u16 sel, int seg); | ||
176 | unsigned long (*get_cached_segment_base)(struct x86_emulate_ctxt *ctxt, | 171 | unsigned long (*get_cached_segment_base)(struct x86_emulate_ctxt *ctxt, |
177 | int seg); | 172 | int seg); |
178 | void (*get_gdt)(struct x86_emulate_ctxt *ctxt, struct desc_ptr *dt); | 173 | void (*get_gdt)(struct x86_emulate_ctxt *ctxt, struct desc_ptr *dt); |