From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp>,
pbonzini@redhat.com, kvm@vger.kernel.org, agraf@suse.de,
borntraeger@de.ibm.com, christoffer.dall@linaro.org,
xiaoguangrong@linux.vnet.ibm.com
Subject: Re: [PATCH 1/2] KVM: Introduce kvm_arch_memslots_updated()
Date: Mon, 8 Jul 2013 12:49:23 +0200 [thread overview]
Message-ID: <20130708124923.675b3a5e@gondolin> (raw)
In-Reply-To: <20130704095315.GD5113@redhat.com>
On Thu, 4 Jul 2013 12:53:15 +0300
Gleb Natapov <gleb@redhat.com> wrote:
> On Thu, Jul 04, 2013 at 01:40:29PM +0900, Takuya Yoshikawa wrote:
> > This is called right after the memslots is updated, i.e. when the result
> > of update_memslots() gets installed in install_new_memslots(). Since
> > the memslots needs to be updated twice when we delete or move a memslot,
> > kvm_arch_commit_memory_region() does not correspond to this exactly.
> >
> > In the following patch, x86 will use this new API to check if the mmio
> > generation has reached its maximum value, in which case mmio sptes need
> > to be flushed out.
> >
> > Signed-off-by: Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp>
> > ---
> > Removed the trailing space after "return old_memslots;" at this chance.
> >
> > arch/arm/kvm/arm.c | 4 ++++
> > arch/ia64/kvm/kvm-ia64.c | 4 ++++
> > arch/mips/kvm/kvm_mips.c | 4 ++++
> > arch/powerpc/kvm/powerpc.c | 4 ++++
> > arch/s390/kvm/kvm-s390.c | 4 ++++
> > arch/x86/kvm/x86.c | 4 ++++
> > include/linux/kvm_host.h | 1 +
> > virt/kvm/kvm_main.c | 5 ++++-
> > 8 files changed, 29 insertions(+), 1 deletion(-)
> > diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> > index e3aae6d..1c1e9de 100644
> > --- a/include/linux/kvm_host.h
> > +++ b/include/linux/kvm_host.h
> > @@ -498,6 +498,7 @@ int __kvm_set_memory_region(struct kvm *kvm,
> > void kvm_arch_free_memslot(struct kvm_memory_slot *free,
> > struct kvm_memory_slot *dont);
> > int kvm_arch_create_memslot(struct kvm_memory_slot *slot, unsigned long npages);
> > +void kvm_arch_memslots_updated(struct kvm *kvm);
> We can define empty function here like this:
> #ifdef __KVM_HAVE_MEMSLOT_UPDATE
> void kvm_arch_memslots_updated(struct kvm *kvm);
> #else
> static void kvm_arch_memslots_updated(struct kvm *kvm)
> {
> }
> #endif
>
> and make x86.c define __KVM_HAVE_MEMSLOT_UPDATE.
>
> But I am fine with your approach too. Do other arch maintainers have any
> preferences here?
I don't really have a strong preference either way, so
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
for the current approach.
next prev parent reply other threads:[~2013-07-08 10:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-04 4:39 [PATCH 0/2] KVM: Introduce kvm_arch_memslots_updated() and use it for x86's mmio optimization Takuya Yoshikawa
2013-07-04 4:40 ` [PATCH 1/2] KVM: Introduce kvm_arch_memslots_updated() Takuya Yoshikawa
2013-07-04 9:53 ` Gleb Natapov
2013-07-04 10:24 ` Alexander Graf
2013-07-08 10:49 ` Cornelia Huck [this message]
2013-07-04 10:28 ` Xiao Guangrong
2013-07-04 4:41 ` [PATCH v2 2/2] KVM: x86: Avoid zapping mmio sptes twice for generation wraparound Takuya Yoshikawa
2013-07-04 10:27 ` Xiao Guangrong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130708124923.675b3a5e@gondolin \
--to=cornelia.huck@de.ibm.com \
--cc=agraf@suse.de \
--cc=borntraeger@de.ibm.com \
--cc=christoffer.dall@linaro.org \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=xiaoguangrong@linux.vnet.ibm.com \
--cc=yoshikawa_takuya_b1@lab.ntt.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox