[PATCH 1/2] KVM: PPC: Add generic hpte management functions

2010-06-30 Thread Alexander Graf
Currently the shadow paging code keeps an array of entries it knows about. Whenever the guest invalidates an entry, we loop through that entry, trying to invalidate matching parts. While this is a really simple implementation, it is probably the most ineffective one possible. So instead, let's kee

Re: [PATCH 1/2] KVM: PPC: Add generic hpte management functions

2010-06-27 Thread Benjamin Herrenschmidt
On Sun, 2010-06-27 at 10:53 +0300, Avi Kivity wrote: > On 06/27/2010 01:58 AM, Benjamin Herrenschmidt wrote: > > > >> Then mmu intensive loads can expect to be slow. > >> > > Well, depends. ppc64 indeed requires the hash to be managed by the > > hypervisor, so inserting or invalidating transl

Re: [PATCH 1/2] KVM: PPC: Add generic hpte management functions

2010-06-27 Thread Avi Kivity
On 06/27/2010 01:58 AM, Benjamin Herrenschmidt wrote: Then mmu intensive loads can expect to be slow. Well, depends. ppc64 indeed requires the hash to be managed by the hypervisor, so inserting or invalidating translations will mean a roundtrip to the hypervisor, though there are ways at

Re: [PATCH 1/2] KVM: PPC: Add generic hpte management functions

2010-06-26 Thread Benjamin Herrenschmidt
On Tue, 2010-06-22 at 15:20 +0300, Avi Kivity wrote: > On 06/22/2010 03:14 PM, Alexander Graf wrote: > > Avi Kivity wrote: > > > >> On 06/22/2010 03:10 PM, Alexander Graf wrote: > >> > >>> If you have more performance hints, I'll gladly take them :). > >>> > >>> > >> Using a cpu t

Re: [PATCH 1/2] KVM: PPC: Add generic hpte management functions

2010-06-22 Thread Avi Kivity
On 06/22/2010 03:14 PM, Alexander Graf wrote: Avi Kivity wrote: On 06/22/2010 03:10 PM, Alexander Graf wrote: If you have more performance hints, I'll gladly take them :). Using a cpu that virtualizes the mmu in hardware helps tremendously. PPC never does that. Even

Re: [PATCH 1/2] KVM: PPC: Add generic hpte management functions

2010-06-22 Thread Alexander Graf
Avi Kivity wrote: > On 06/22/2010 03:10 PM, Alexander Graf wrote: >> If you have more performance hints, I'll gladly take them :). >> > > Using a cpu that virtualizes the mmu in hardware helps tremendously. > PPC never does that. Even with the virtualization extensions the MMU is still softwar

Re: [PATCH 1/2] KVM: PPC: Add generic hpte management functions

2010-06-22 Thread Avi Kivity
On 06/22/2010 03:10 PM, Alexander Graf wrote: If you have more performance hints, I'll gladly take them :). Using a cpu that virtualizes the mmu in hardware helps tremendously. -- error compiling committee.c: too many arguments to function ___ L

Re: [PATCH 1/2] KVM: PPC: Add generic hpte management functions

2010-06-22 Thread Alexander Graf
Avi Kivity wrote: > On 06/22/2010 03:04 PM, Alexander Graf wrote: >> Avi Kivity wrote: >> >>> On 06/21/2010 04:44 PM, Alexander Graf wrote: >>> Currently the shadow paging code keeps an array of entries it knows about. Whenever the guest invalidates an entry, we loop through

Re: [PATCH 1/2] KVM: PPC: Add generic hpte management functions

2010-06-22 Thread Avi Kivity
On 06/22/2010 03:04 PM, Alexander Graf wrote: Avi Kivity wrote: On 06/21/2010 04:44 PM, Alexander Graf wrote: Currently the shadow paging code keeps an array of entries it knows about. Whenever the guest invalidates an entry, we loop through that entry, trying to invalidate matching p

Re: [PATCH 1/2] KVM: PPC: Add generic hpte management functions

2010-06-22 Thread Alexander Graf
Avi Kivity wrote: > On 06/21/2010 04:44 PM, Alexander Graf wrote: >> Currently the shadow paging code keeps an array of entries it knows >> about. >> Whenever the guest invalidates an entry, we loop through that entry, >> trying to invalidate matching parts. >> >> While this is a really simple impl

Re: [PATCH 1/2] KVM: PPC: Add generic hpte management functions

2010-06-22 Thread Avi Kivity
On 06/21/2010 04:44 PM, Alexander Graf wrote: Currently the shadow paging code keeps an array of entries it knows about. Whenever the guest invalidates an entry, we loop through that entry, trying to invalidate matching parts. While this is a really simple implementation, it is probably the most

[PATCH 1/2] KVM: PPC: Add generic hpte management functions

2010-06-21 Thread Alexander Graf
Currently the shadow paging code keeps an array of entries it knows about. Whenever the guest invalidates an entry, we loop through that entry, trying to invalidate matching parts. While this is a really simple implementation, it is probably the most ineffective one possible. So instead, let's kee