* [PATCH] KVM: PPC: Remove obsolete kvmppc_mmu_find_pte
@ 2010-06-21 13:25 Alexander Graf
2010-06-22 12:04 ` Avi Kivity
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Graf @ 2010-06-21 13:25 UTC (permalink / raw)
To: kvm-ppc; +Cc: linuxppc-dev, kvm
Initially we had to search for pte entries to invalidate them. Since
the logic has improved since then, we can just get rid of the search
function.
Signed-off-by: Alexander Graf <agraf@suse.de>
---
arch/powerpc/include/asm/kvm_book3s.h | 1 -
arch/powerpc/kvm/book3s_32_mmu_host.c | 20 --------------------
arch/powerpc/kvm/book3s_64_mmu_host.c | 20 --------------------
3 files changed, 0 insertions(+), 41 deletions(-)
diff --git a/arch/powerpc/include/asm/kvm_book3s.h b/arch/powerpc/include/asm/kvm_book3s.h
index 6f74d93..4e99559 100644
--- a/arch/powerpc/include/asm/kvm_book3s.h
+++ b/arch/powerpc/include/asm/kvm_book3s.h
@@ -115,7 +115,6 @@ extern void kvmppc_mmu_book3s_32_init(struct kvm_vcpu *vcpu);
extern int kvmppc_mmu_map_page(struct kvm_vcpu *vcpu, struct kvmppc_pte *pte);
extern int kvmppc_mmu_map_segment(struct kvm_vcpu *vcpu, ulong eaddr);
extern void kvmppc_mmu_flush_segments(struct kvm_vcpu *vcpu);
-extern struct kvmppc_pte *kvmppc_mmu_find_pte(struct kvm_vcpu *vcpu, u64 ea, bool data);
extern int kvmppc_ld(struct kvm_vcpu *vcpu, ulong *eaddr, int size, void *ptr, bool data);
extern int kvmppc_st(struct kvm_vcpu *vcpu, ulong *eaddr, int size, void *ptr, bool data);
extern void kvmppc_book3s_queue_irqprio(struct kvm_vcpu *vcpu, unsigned int vec);
diff --git a/arch/powerpc/kvm/book3s_32_mmu_host.c b/arch/powerpc/kvm/book3s_32_mmu_host.c
index 37779a5..904f5ac 100644
--- a/arch/powerpc/kvm/book3s_32_mmu_host.c
+++ b/arch/powerpc/kvm/book3s_32_mmu_host.c
@@ -151,26 +151,6 @@ void kvmppc_mmu_pte_pflush(struct kvm_vcpu *vcpu, ulong pa_start, ulong pa_end)
}
}
-struct kvmppc_pte *kvmppc_mmu_find_pte(struct kvm_vcpu *vcpu, u64 ea, bool data)
-{
- int i;
- u64 guest_vp;
-
- guest_vp = vcpu->arch.mmu.ea_to_vp(vcpu, ea, false);
- for (i=0; i<vcpu->arch.hpte_cache_offset; i++) {
- struct hpte_cache *pte;
-
- pte = &vcpu->arch.hpte_cache[i];
- if (!pte->host_va)
- continue;
-
- if (pte->pte.vpage == guest_vp)
- return &pte->pte;
- }
-
- return NULL;
-}
-
static int kvmppc_mmu_hpte_cache_next(struct kvm_vcpu *vcpu)
{
if (vcpu->arch.hpte_cache_offset == HPTEG_CACHE_NUM)
diff --git a/arch/powerpc/kvm/book3s_64_mmu_host.c b/arch/powerpc/kvm/book3s_64_mmu_host.c
index 5d0e281..4ccdde1 100644
--- a/arch/powerpc/kvm/book3s_64_mmu_host.c
+++ b/arch/powerpc/kvm/book3s_64_mmu_host.c
@@ -133,26 +133,6 @@ void kvmppc_mmu_pte_pflush(struct kvm_vcpu *vcpu, ulong pa_start, ulong pa_end)
}
}
-struct kvmppc_pte *kvmppc_mmu_find_pte(struct kvm_vcpu *vcpu, u64 ea, bool data)
-{
- int i;
- u64 guest_vp;
-
- guest_vp = vcpu->arch.mmu.ea_to_vp(vcpu, ea, false);
- for (i=0; i<vcpu->arch.hpte_cache_offset; i++) {
- struct hpte_cache *pte;
-
- pte = &vcpu->arch.hpte_cache[i];
- if (!pte->host_va)
- continue;
-
- if (pte->pte.vpage == guest_vp)
- return &pte->pte;
- }
-
- return NULL;
-}
-
static int kvmppc_mmu_hpte_cache_next(struct kvm_vcpu *vcpu)
{
if (vcpu->arch.hpte_cache_offset == HPTEG_CACHE_NUM)
--
1.6.0.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] KVM: PPC: Remove obsolete kvmppc_mmu_find_pte
2010-06-21 13:25 [PATCH] KVM: PPC: Remove obsolete kvmppc_mmu_find_pte Alexander Graf
@ 2010-06-22 12:04 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2010-06-22 12:04 UTC (permalink / raw)
To: Alexander Graf; +Cc: linuxppc-dev, kvm, kvm-ppc
On 06/21/2010 04:25 PM, Alexander Graf wrote:
> Initially we had to search for pte entries to invalidate them. Since
> the logic has improved since then, we can just get rid of the search
> function.
>
>
Applied, thanks.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-22 12:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-21 13:25 [PATCH] KVM: PPC: Remove obsolete kvmppc_mmu_find_pte Alexander Graf
2010-06-22 12:04 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).