Skip to content

Commit fc05868

Browse files
Guo Chaomatosatti
authored andcommitted
KVM: x86: Fix typos in emulate.c
Signed-off-by: Guo Chao <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
1 parent 4a96998 commit fc05868

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

arch/x86/kvm/emulate.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ static int __linearize(struct x86_emulate_ctxt *ctxt,
642642
if (addr.ea > lim || (u32)(addr.ea + size - 1) > lim)
643643
goto bad;
644644
} else {
645-
/* exapand-down segment */
645+
/* expand-down segment */
646646
if (addr.ea <= lim || (u32)(addr.ea + size - 1) <= lim)
647647
goto bad;
648648
lim = desc.d ? 0xffffffff : 0xffff;
@@ -1383,7 +1383,7 @@ static int load_segment_descriptor(struct x86_emulate_ctxt *ctxt,
13831383
err_code = selector & 0xfffc;
13841384
err_vec = GP_VECTOR;
13851385

1386-
/* can't load system descriptor into segment selecor */
1386+
/* can't load system descriptor into segment selector */
13871387
if (seg <= VCPU_SREG_GS && !seg_desc.s)
13881388
goto exception;
13891389

@@ -2398,7 +2398,7 @@ static int load_state_from_tss16(struct x86_emulate_ctxt *ctxt,
23982398
set_segment_selector(ctxt, tss->ds, VCPU_SREG_DS);
23992399

24002400
/*
2401-
* Now load segment descriptors. If fault happenes at this stage
2401+
* Now load segment descriptors. If fault happens at this stage
24022402
* it is handled in a context of new task
24032403
*/
24042404
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,
26402640
*
26412641
* 1. jmp/call/int to task gate: Check against DPL of the task gate
26422642
* 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
26442644
*/
26452645
if (reason == TASK_SWITCH_GATE) {
26462646
if (idt_index != -1) {
@@ -2681,7 +2681,7 @@ static int emulator_do_task_switch(struct x86_emulate_ctxt *ctxt,
26812681
ctxt->eflags = ctxt->eflags & ~X86_EFLAGS_NT;
26822682

26832683
/* 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 */
26852685
if (reason != TASK_SWITCH_CALL && reason != TASK_SWITCH_GATE)
26862686
old_tss_sel = 0xffff;
26872687

0 commit comments

Comments
 (0)