[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20120621224159.48ce3575e1834d3bdb643fb9@gmail.com>
Date: Thu, 21 Jun 2012 22:41:59 +0900
From: Takuya Yoshikawa <takuya.yoshikawa@...il.com>
To: Avi Kivity <avi@...hat.com>
Cc: Takuya Yoshikawa <yoshikawa.takuya@....ntt.co.jp>,
mtosatti@...hat.com, agraf@...e.de, paulus@...ba.org,
aarcange@...hat.com, kvm@...r.kernel.org, kvm-ppc@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4] KVM: MMU: Make kvm_handle_hva() handle range of
addresses
I should have read this before sending v2...
On Thu, 21 Jun 2012 11:24:59 +0300
Avi Kivity <avi@...hat.com> wrote:
> > 1. Separate rmap_pde from lpage_info->write_count and
> > make this a simple array. (I once tried this.)
> >
>
> This has the potential to increase cache misses, but I don't think it's
> a killer. The separation can simplify other things as well.
Yes, I think so too.
IIRC, write_count and rmap_pde are not used together so often.
> > 2. Use gfn_to_index() and loop over rmap array:
...
> > /* main part */
> > for each level {
> > rmapp = __gfn_to_rmap(gfn_start, level, memslot);
> > for (idx = gfn_to_index(gfn_start, memslot->base_gfn, level);
> > idx < gfn_to_index(gfn_end, memslot->base_gfn, level); idx++) {
> > ...
> > /* loop over rmap array */
> > ret |= handler(kvm, rmapp + idx, data);
> > }
> > }
> >
>
> Probably want idx <= gfn_to_index(gfn_end-1, ...) otherwise we fail on
> small slots.
I was thinking the same thing when making v2.
But I will check the boundary condition again.
(mmu_notifier + memslot + lpage + rmap...) * alignment...
Very confusing.
Thanks,
Takuya
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists