diff options
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r-- | arch/x86/kvm/emulate.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 7c8ed560fd41..8228778ace38 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c | |||
@@ -2097,17 +2097,6 @@ static bool emulator_io_permited(struct x86_emulate_ctxt *ctxt, | |||
2097 | return true; | 2097 | return true; |
2098 | } | 2098 | } |
2099 | 2099 | ||
2100 | static u32 get_cached_descriptor_base(struct x86_emulate_ctxt *ctxt, | ||
2101 | struct x86_emulate_ops *ops, | ||
2102 | int seg) | ||
2103 | { | ||
2104 | struct desc_struct desc; | ||
2105 | if (ops->get_cached_descriptor(&desc, seg, ctxt->vcpu)) | ||
2106 | return get_desc_base(&desc); | ||
2107 | else | ||
2108 | return ~0; | ||
2109 | } | ||
2110 | |||
2111 | static void save_state_to_tss16(struct x86_emulate_ctxt *ctxt, | 2100 | static void save_state_to_tss16(struct x86_emulate_ctxt *ctxt, |
2112 | struct x86_emulate_ops *ops, | 2101 | struct x86_emulate_ops *ops, |
2113 | struct tss_segment_16 *tss) | 2102 | struct tss_segment_16 *tss) |
@@ -2383,7 +2372,7 @@ static int emulator_do_task_switch(struct x86_emulate_ctxt *ctxt, | |||
2383 | int ret; | 2372 | int ret; |
2384 | u16 old_tss_sel = ops->get_segment_selector(VCPU_SREG_TR, ctxt->vcpu); | 2373 | u16 old_tss_sel = ops->get_segment_selector(VCPU_SREG_TR, ctxt->vcpu); |
2385 | ulong old_tss_base = | 2374 | ulong old_tss_base = |
2386 | get_cached_descriptor_base(ctxt, ops, VCPU_SREG_TR); | 2375 | ops->get_cached_segment_base(VCPU_SREG_TR, ctxt->vcpu); |
2387 | u32 desc_limit; | 2376 | u32 desc_limit; |
2388 | 2377 | ||
2389 | /* FIXME: old_tss_base == ~0 ? */ | 2378 | /* FIXME: old_tss_base == ~0 ? */ |