* [PATCH] PPC: Adjust memory slot accesses to recent patches
@ 2010-01-03 2:14 Alexander Graf
[not found] ` <1262484867-15681-1-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Graf @ 2010-01-03 2:14 UTC (permalink / raw)
To: kvm; +Cc: Giuseppe Falsetti, kvm-ppc, Marcelo Tosatti
Commit 18657960237322b8f6ba84938d27524634212aaf apparently broke PPC Book3S
compilation. This patch tries to mechanically fix it.
Marcelo, please look over it if I'm doing the right thing.
Signed-off-by: Alexander Graf <agraf@suse.de>
Reported-by: Giuseppe Falsetti <giuseppe@czero.it>
CC: Marcelo Tosatti <mtosatti@redhat.com>
---
arch/powerpc/kvm/book3s.c | 6 +++---
arch/powerpc/kvm/powerpc.c | 17 +++++++++++++----
2 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c
index 803505d..492dcc1 100644
--- a/arch/powerpc/kvm/book3s.c
+++ b/arch/powerpc/kvm/book3s.c
@@ -857,7 +857,7 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm,
int is_dirty = 0;
int r, n;
- down_write(&kvm->slots_lock);
+ mutex_lock(&kvm->slots_lock);
r = kvm_get_dirty_log(kvm, log, &is_dirty);
if (r)
@@ -865,7 +865,7 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm,
/* If nothing is dirty, don't bother messing with page tables. */
if (is_dirty) {
- memslot = &kvm->memslots[log->slot];
+ memslot = &kvm->memslots->memslots[log->slot];
ga = memslot->base_gfn << PAGE_SHIFT;
ga_end = ga + (memslot->npages << PAGE_SHIFT);
@@ -879,7 +879,7 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm,
r = 0;
out:
- up_write(&kvm->slots_lock);
+ mutex_unlock(&kvm->slots_lock);
return r;
}
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index f06cf93..5ba1865 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -165,14 +165,23 @@ long kvm_arch_dev_ioctl(struct file *filp,
return -EINVAL;
}
-int kvm_arch_set_memory_region(struct kvm *kvm,
- struct kvm_userspace_memory_region *mem,
- struct kvm_memory_slot old,
- int user_alloc)
+int kvm_arch_prepare_memory_region(struct kvm *kvm,
+ struct kvm_memory_slot *memslot,
+ struct kvm_memory_slot old,
+ int user_alloc)
{
return 0;
}
+void kvm_arch_commit_memory_region(struct kvm *kvm,
+ struct kvm_userspace_memory_region *mem,
+ struct kvm_memory_slot old,
+ int user_alloc)
+{
+ return;
+}
+
+
void kvm_arch_flush_shadow(struct kvm *kvm)
{
}
--
1.6.0.2
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <1262484867-15681-1-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>]
* Re: [PATCH] PPC: Adjust memory slot accesses to recent patches [not found] ` <1262484867-15681-1-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org> @ 2010-01-05 18:34 ` Marcelo Tosatti 2010-01-05 19:35 ` Tapio Tallgren 1 sibling, 0 replies; 3+ messages in thread From: Marcelo Tosatti @ 2010-01-05 18:34 UTC (permalink / raw) To: Alexander Graf; +Cc: kvm-u79uwXL29TY76Z2rM5mHXA, Giuseppe Falsetti, kvm-ppc On Sun, Jan 03, 2010 at 03:14:27AM +0100, Alexander Graf wrote: > Commit 18657960237322b8f6ba84938d27524634212aaf apparently broke PPC Book3S > compilation. This patch tries to mechanically fix it. > > Marcelo, please look over it if I'm doing the right thing. > > Signed-off-by: Alexander Graf <agraf-l3A5Bk7waGM@public.gmane.org> > Reported-by: Giuseppe Falsetti <giuseppe-qgsxNw1iPWg@public.gmane.org> > CC: Marcelo Tosatti <mtosatti-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Yes, this is right. Applied, thanks. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] PPC: Adjust memory slot accesses to recent patches [not found] ` <1262484867-15681-1-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org> 2010-01-05 18:34 ` Marcelo Tosatti @ 2010-01-05 19:35 ` Tapio Tallgren 1 sibling, 0 replies; 3+ messages in thread From: Tapio Tallgren @ 2010-01-05 19:35 UTC (permalink / raw) To: Alexander Graf, kvm-u79uwXL29TY76Z2rM5mHXA, Giuseppe Falsetti, kvm-ppc, Marcelo Tosatti On 2010-01-03, Alexander Graf <agraf-l3A5Bk7waGM@public.gmane.org> wrote: > Commit 18657960237322b8f6ba84938d27524634212aaf apparently broke PPC Book3S > compilation. This patch tries to mechanically fix it. > > Marcelo, please look over it if I'm doing the right thing. > > Signed-off-by: Alexander Graf <agraf-l3A5Bk7waGM@public.gmane.org> > Reported-by: Giuseppe Falsetti <giuseppe-qgsxNw1iPWg@public.gmane.org> > CC: Marcelo Tosatti <mtosatti-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > --- > arch/powerpc/kvm/book3s.c | 6 +++--- > arch/powerpc/kvm/powerpc.c | 17 +++++++++++++---- > 2 files changed, 16 insertions(+), 7 deletions(-) > > diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c > index 803505d..492dcc1 100644 > --- a/arch/powerpc/kvm/book3s.c > +++ b/arch/powerpc/kvm/book3s.c > @@ -857,7 +857,7 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, > int is_dirty = 0; > int r, n; > > - down_write(&kvm->slots_lock); > + mutex_lock(&kvm->slots_lock); > > r = kvm_get_dirty_log(kvm, log, &is_dirty); > if (r) > @@ -865,7 +865,7 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, > > /* If nothing is dirty, don't bother messing with page tables. */ > if (is_dirty) { > - memslot = &kvm->memslots[log->slot]; > + memslot = &kvm->memslots->memslots[log->slot]; > > ga = memslot->base_gfn << PAGE_SHIFT; > ga_end = ga + (memslot->npages << PAGE_SHIFT); > @@ -879,7 +879,7 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, > > r = 0; > out: > - up_write(&kvm->slots_lock); > + mutex_unlock(&kvm->slots_lock); > return r; > } > > diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c > index f06cf93..5ba1865 100644 > --- a/arch/powerpc/kvm/powerpc.c > +++ b/arch/powerpc/kvm/powerpc.c > @@ -165,14 +165,23 @@ long kvm_arch_dev_ioctl(struct file *filp, > return -EINVAL; > } > > -int kvm_arch_set_memory_region(struct kvm *kvm, > - struct kvm_userspace_memory_region *mem, > - struct kvm_memory_slot old, > - int user_alloc) > +int kvm_arch_prepare_memory_region(struct kvm *kvm, > + struct kvm_memory_slot *memslot, > + struct kvm_memory_slot old, > + int user_alloc) > { > return 0; > } > > +void kvm_arch_commit_memory_region(struct kvm *kvm, > + struct kvm_userspace_memory_region *mem, > + struct kvm_memory_slot old, > + int user_alloc) > +{ > + return; > +} > + > + > void kvm_arch_flush_shadow(struct kvm *kvm) > { > } > -- > 1.6.0.2 > > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- Sent from my mobile device -Tapio ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-01-05 19:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-03 2:14 [PATCH] PPC: Adjust memory slot accesses to recent patches Alexander Graf
[not found] ` <1262484867-15681-1-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2010-01-05 18:34 ` Marcelo Tosatti
2010-01-05 19:35 ` Tapio Tallgren
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox