diff options
author | Guo Chao <yan@linux.vnet.ibm.com> | 2012-06-28 03:19:51 -0400 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2012-07-20 14:26:59 -0400 |
commit | fc0586807dc4e307da6d3ba4ed5c927b6d27276c (patch) | |
tree | af4a1ccb05ca9fa7715d225e3b309d69df53209b | |
parent | 4a9699807c491740c4dfe7b6a06703e1d262e802 (diff) |
KVM: x86: Fix typos in emulate.c
Signed-off-by: Guo Chao <yan@linux.vnet.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
-rw-r--r-- | arch/x86/kvm/emulate.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 97d9a9914ba8..85b611e13e84 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c | |||
@@ -642,7 +642,7 @@ static int __linearize(struct x86_emulate_ctxt *ctxt, | |||
642 | if (addr.ea > lim || (u32)(addr.ea + size - 1) > lim) | 642 | if (addr.ea > lim || (u32)(addr.ea + size - 1) > lim) |
643 | goto bad; | 643 | goto bad; |
644 | } else { | 644 | } else { |
645 | /* exapand-down segment */ | 645 | /* expand-down segment */ |
646 | if (addr.ea <= lim || (u32)(addr.ea + size - 1) <= lim) | 646 | if (addr.ea <= lim || (u32)(addr.ea + size - 1) <= lim) |
647 | goto bad; | 647 | goto bad; |
648 | lim = desc.d ? 0xffffffff : 0xffff; | 648 | lim = desc.d ? 0xffffffff : 0xffff; |
@@ -1383,7 +1383,7 @@ static int load_segment_descriptor(struct x86_emulate_ctxt *ctxt, | |||
1383 | err_code = selector & 0xfffc; | 1383 | err_code = selector & 0xfffc; |
1384 | err_vec = GP_VECTOR; | 1384 | err_vec = GP_VECTOR; |
1385 | 1385 | ||
1386 | /* can't load system descriptor into segment selecor */ | 1386 | /* can't load system descriptor into segment selector */ |
1387 | if (seg <= VCPU_SREG_GS && !seg_desc.s) | 1387 | if (seg <= VCPU_SREG_GS && !seg_desc.s) |
1388 | goto exception; | 1388 | goto exception; |
1389 | 1389 | ||
@@ -2398,7 +2398,7 @@ static int load_state_from_tss16(struct x86_emulate_ctxt *ctxt, | |||
2398 | set_segment_selector(ctxt, tss->ds, VCPU_SREG_DS); | 2398 | set_segment_selector(ctxt, tss->ds, VCPU_SREG_DS); |
2399 | 2399 | ||
2400 | /* | 2400 | /* |
2401 | * Now load segment descriptors. If fault happenes at this stage | 2401 | * Now load segment descriptors. If fault happens at this stage |
2402 | * it is handled in a context of new task | 2402 | * it is handled in a context of new task |
2403 | */ | 2403 | */ |
2404 | ret = load_segment_descriptor(ctxt, tss->ldt, VCPU_SREG_LDTR); | 2404 | ret = load_segment_descriptor(ctxt, tss->ldt, VCPU_SREG_LDTR); |
@@ -2640,7 +2640,7 @@ static int emulator_do_task_switch(struct x86_emulate_ctxt *ctxt, | |||
2640 | * | 2640 | * |
2641 | * 1. jmp/call/int to task gate: Check against DPL of the task gate | 2641 | * 1. jmp/call/int to task gate: Check against DPL of the task gate |
2642 | * 2. Exception/IRQ/iret: No check is performed | 2642 | * 2. Exception/IRQ/iret: No check is performed |
2643 | * 3. jmp/call to TSS: Check agains DPL of the TSS | 2643 | * 3. jmp/call to TSS: Check against DPL of the TSS |
2644 | */ | 2644 | */ |
2645 | if (reason == TASK_SWITCH_GATE) { | 2645 | if (reason == TASK_SWITCH_GATE) { |
2646 | if (idt_index != -1) { | 2646 | if (idt_index != -1) { |
@@ -2681,7 +2681,7 @@ static int emulator_do_task_switch(struct x86_emulate_ctxt *ctxt, | |||
2681 | ctxt->eflags = ctxt->eflags & ~X86_EFLAGS_NT; | 2681 | ctxt->eflags = ctxt->eflags & ~X86_EFLAGS_NT; |
2682 | 2682 | ||
2683 | /* set back link to prev task only if NT bit is set in eflags | 2683 | /* set back link to prev task only if NT bit is set in eflags |
2684 | note that old_tss_sel is not used afetr this point */ | 2684 | note that old_tss_sel is not used after this point */ |
2685 | if (reason != TASK_SWITCH_CALL && reason != TASK_SWITCH_GATE) | 2685 | if (reason != TASK_SWITCH_CALL && reason != TASK_SWITCH_GATE) |
2686 | old_tss_sel = 0xffff; | 2686 | old_tss_sel = 0xffff; |
2687 | 2687 | ||