public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* mm_pages_next() question
@ 2009-03-29 12:24 Avi Kivity
  2009-03-31 16:18 ` Marcelo Tosatti
  0 siblings, 1 reply; 4+ messages in thread
From: Avi Kivity @ 2009-03-29 12:24 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: KVM list

> static int mmu_pages_next(struct kvm_mmu_pages *pvec,
>                           struct mmu_page_path *parents,
>                           int i)
> {
>         int n;
>
>         for (n = i+1; n < pvec->nr; n++) {
>                 struct kvm_mmu_page *sp = pvec->page[n].sp;
>
>                 if (sp->role.level == PT_PAGE_TABLE_LEVEL) {
>                         parents->idx[0] = pvec->page[n].idx;
>                         return n;
>                 }
>
>                 parents->parent[sp->role.level-2] = sp;
>                 parents->idx[sp->role.level-1] = pvec->page[n].idx;
>         }
>
>         return n;
> }

Do we need to break out of the loop if we switch parents during the loop 
(since that will give us a different mmu_page_path)?  Or are callers 
careful to only pass pvecs which belong to the same shadow page?

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-01 17:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-29 12:24 mm_pages_next() question Avi Kivity
2009-03-31 16:18 ` Marcelo Tosatti
2009-04-01  8:40   ` Avi Kivity
2009-04-01 17:15     ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox