diff options
author | Avi Kivity <avi@redhat.com> | 2011-04-20 06:37:53 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-05-22 08:35:20 -0400 |
commit | 4bff1e86ad286d4b3a54902540abeeaf95e64db3 (patch) | |
tree | b2c55a41ec05a43b02da404c784d968276dbc0c6 /arch/x86/include | |
parent | ca1d4a9e772bde0a0b8cda61ee9fdca29f80f361 (diff) |
KVM: x86 emulator: drop vcpu argument from segment/gdt/idt callbacks
Making the emulator caller agnostic.
[Takuya Yoshikawa: fix typo leading to LDT failures]
Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/kvm_emulate.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h index 1348bdf14a43..656046a1bd51 100644 --- a/arch/x86/include/asm/kvm_emulate.h +++ b/arch/x86/include/asm/kvm_emulate.h | |||
@@ -163,15 +163,19 @@ struct x86_emulate_ops { | |||
163 | int size, unsigned short port, const void *val, | 163 | int size, unsigned short port, const void *val, |
164 | unsigned int count); | 164 | unsigned int count); |
165 | 165 | ||
166 | bool (*get_cached_descriptor)(struct desc_struct *desc, u32 *base3, | 166 | bool (*get_cached_descriptor)(struct x86_emulate_ctxt *ctxt, |
167 | int seg, struct kvm_vcpu *vcpu); | 167 | struct desc_struct *desc, u32 *base3, |
168 | void (*set_cached_descriptor)(struct desc_struct *desc, u32 base3, | 168 | int seg); |
169 | int seg, struct kvm_vcpu *vcpu); | 169 | void (*set_cached_descriptor)(struct x86_emulate_ctxt *ctxt, |
170 | u16 (*get_segment_selector)(int seg, struct kvm_vcpu *vcpu); | 170 | struct desc_struct *desc, u32 base3, |
171 | void (*set_segment_selector)(u16 sel, int seg, struct kvm_vcpu *vcpu); | 171 | int seg); |
172 | unsigned long (*get_cached_segment_base)(int seg, struct kvm_vcpu *vcpu); | 172 | u16 (*get_segment_selector)(struct x86_emulate_ctxt *ctxt, int seg); |
173 | void (*get_gdt)(struct desc_ptr *dt, struct kvm_vcpu *vcpu); | 173 | void (*set_segment_selector)(struct x86_emulate_ctxt *ctxt, |
174 | void (*get_idt)(struct desc_ptr *dt, struct kvm_vcpu *vcpu); | 174 | u16 sel, int seg); |
175 | unsigned long (*get_cached_segment_base)(struct x86_emulate_ctxt *ctxt, | ||
176 | int seg); | ||
177 | void (*get_gdt)(struct x86_emulate_ctxt *ctxt, struct desc_ptr *dt); | ||
178 | void (*get_idt)(struct x86_emulate_ctxt *ctxt, struct desc_ptr *dt); | ||
175 | ulong (*get_cr)(int cr, struct kvm_vcpu *vcpu); | 179 | ulong (*get_cr)(int cr, struct kvm_vcpu *vcpu); |
176 | int (*set_cr)(int cr, ulong val, struct kvm_vcpu *vcpu); | 180 | int (*set_cr)(int cr, ulong val, struct kvm_vcpu *vcpu); |
177 | int (*cpl)(struct kvm_vcpu *vcpu); | 181 | int (*cpl)(struct kvm_vcpu *vcpu); |