Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 68338
b: refs/heads/master
c: cd0d913
h: refs/heads/master
v: v3
  • Loading branch information
Nguyen Anh Quynh authored and Avi Kivity committed Oct 13, 2007
1 parent 00f6e2b commit 48061a5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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: 81fe96bde7db24c02adf245604f073ea9e8d941a
refs/heads/master: cd0d91379776cb6850c7b11c0a8843ca75967558
8 changes: 6 additions & 2 deletions trunk/drivers/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2285,7 +2285,6 @@ static struct page *kvm_vcpu_nopage(struct vm_area_struct *vma,
unsigned long pgoff;
struct page *page;

*type = VM_FAULT_MINOR;
pgoff = ((address - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
if (pgoff == 0)
page = virt_to_page(vcpu->run);
Expand All @@ -2294,6 +2293,9 @@ static struct page *kvm_vcpu_nopage(struct vm_area_struct *vma,
else
return NOPAGE_SIGBUS;
get_page(page);
if (type != NULL)
*type = VM_FAULT_MINOR;

return page;
}

Expand Down Expand Up @@ -2768,12 +2770,14 @@ static struct page *kvm_vm_nopage(struct vm_area_struct *vma,
unsigned long pgoff;
struct page *page;

*type = VM_FAULT_MINOR;
pgoff = ((address - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
page = gfn_to_page(kvm, pgoff);
if (!page)
return NOPAGE_SIGBUS;
get_page(page);
if (type != NULL)
*type = VM_FAULT_MINOR;

return page;
}

Expand Down

0 comments on commit 48061a5

Please sign in to comment.