diff options
author | Avi Kivity <avi@redhat.com> | 2011-04-27 12:20:30 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-05-22 14:47:39 +0200 |
commit | 1aa366163b8b69f660cf94fd5062fa44859e4318 (patch) | |
tree | 29d6843cbe1c66a04c11dad24169ec5e1318e53d /arch/x86/include | |
parent | KVM: VMX: Avoid reading %rip unnecessarily when handling exceptions (diff) | |
download | linux-1aa366163b8b69f660cf94fd5062fa44859e4318.tar.xz linux-1aa366163b8b69f660cf94fd5062fa44859e4318.zip |
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.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 { 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); |