Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 197692
b: refs/heads/master
c: ceffb45
h: refs/heads/master
v: v3
  • Loading branch information
Gleb Natapov authored and Avi Kivity committed May 17, 2010
1 parent 4a97bee commit 5c97e35
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 546 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2e873022f511b82a5318c7af179f588f08d68cb9
refs/heads/master: ceffb4597253b2420d2f171d8b1cdf2cd3137989
6 changes: 5 additions & 1 deletion trunk/arch/x86/kvm/emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -2291,6 +2291,7 @@ static int emulator_do_task_switch(struct x86_emulate_ctxt *ctxt,
u16 old_tss_sel = ops->get_segment_selector(VCPU_SREG_TR, ctxt->vcpu);
ulong old_tss_base =
get_cached_descriptor_base(ctxt, ops, VCPU_SREG_TR);
u32 desc_limit;

/* FIXME: old_tss_base == ~0 ? */

Expand All @@ -2311,7 +2312,10 @@ static int emulator_do_task_switch(struct x86_emulate_ctxt *ctxt,
}
}

if (!next_tss_desc.p || desc_limit_scaled(&next_tss_desc) < 0x67) {
desc_limit = desc_limit_scaled(&next_tss_desc);
if (!next_tss_desc.p ||
((desc_limit < 0x67 && (next_tss_desc.type & 8)) ||
desc_limit < 0x2b)) {
kvm_queue_exception_e(ctxt->vcpu, TS_VECTOR,
tss_selector & 0xfffc);
return X86EMUL_PROPAGATE_FAULT;
Expand Down
Loading

0 comments on commit 5c97e35

Please sign in to comment.