Skip to content

Commit

Permalink
KVM: MMU: Fix is_empty_shadow_page() check
Browse files Browse the repository at this point in the history
The check is only looking at one of two possible empty ptes.

Signed-off-by: Avi Kivity <avi@qumranet.com>
  • Loading branch information
Avi Kivity committed Jun 6, 2008
1 parent ebb0e62 commit 3c91551
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kvm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ static int is_empty_shadow_page(u64 *spt)
u64 *end;

for (pos = spt, end = pos + PAGE_SIZE / sizeof(u64); pos != end; pos++)
if (*pos != shadow_trap_nonpresent_pte) {
if (is_shadow_present_pte(*pos)) {
printk(KERN_ERR "%s: %p %llx\n", __func__,
pos, *pos);
return 0;
Expand Down

0 comments on commit 3c91551

Please sign in to comment.