Re: [patch 3/3] KVM: move postcommit flush to x86, as mmio sptes are x86 specific

Marcelo Tosatti
2012-08-28T20:44:00Z

On Tue, Aug 28, 2012 at 09:30:24AM +0900, Takuya Yoshikawa wrote:
> On Mon, 27 Aug 2012 16:06:01 -0300
> Marcelo Tosatti <mtosatti@redhat.com> wrote:
>
> > > Any explanation why (old.base_gfn != new.base_gfn) case can be
> > > omitted?
> >
> > (old.base_gfn != new.base_gfn) check covers the cases
> >
> > 1. old.base_gfn = 0, new.base_gfn = !0 (slot creation)
> >
> > and
> >
> > x != 0, y != 0, x != y.
> > 2. old.base_gfn = x, new.base_gfn = y (gpa base change)
> >
> > Patch 2 covers case 2, so its only necessary to cover case
> > 1 here.
> >
> > Makes sense?
>
> Yes.
>
> But didn't you change the flush in the if block modified by patch 2
> to kvm_arch_flush_shadow_memslot()?
>
> Although current implementation flushes everything, this may trigger
> problem when we change it.
>
> Takuya

Yay, thanks.