[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

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

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 translations will

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

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 translations will

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 that virtualizes the mmu

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 that virtualizes the mmu

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

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 implementation,

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

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 that entry, trying to

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 -- To unsubscribe from this list: send the line

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 software

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

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 implementation,

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 that entry, trying to

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 -- To unsubscribe from this list: send the line

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 software

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

[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