Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 197640
b: refs/heads/master
c: 254d4d4
h: refs/heads/master
v: v3
  • Loading branch information
Gleb Natapov authored and Avi Kivity committed Apr 25, 2010
1 parent eee66d7 commit dfce38e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 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: d6ab1ed44627c91d0a857a430b7ec4ed8648c7a5
refs/heads/master: 254d4d48a56925622a5592ad590a738735b66135
4 changes: 3 additions & 1 deletion trunk/arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ unsigned long segment_base(u16 selector)
unsigned long table_base;
unsigned long v;

if (selector == 0)
if (!(selector & ~3))
return 0;

native_store_gdt(&gdt);
Expand All @@ -239,6 +239,8 @@ unsigned long segment_base(u16 selector)
if (selector & 4) { /* from ldt */
u16 ldt_selector = kvm_read_ldt();

if (!(ldt_selector & ~3))
return 0;
table_base = segment_base(ldt_selector);
}
d = (struct desc_struct *)(table_base + (selector & ~7));
Expand Down

0 comments on commit dfce38e

Please sign in to comment.