Re: [PATCH 3/5] KVM: PPC: Book3S HV: Improve handling of local vs. global TLB invalidations

2012-11-26 Thread Alexander Graf
On 23.11.2012, at 23:07, Paul Mackerras wrote: On Fri, Nov 23, 2012 at 04:43:03PM +0100, Alexander Graf wrote: On 22.11.2012, at 10:28, Paul Mackerras wrote: - With the possibility of the host paging out guest pages, the use of H_LOCAL by an SMP guest is dangerous since the guest could

Re: [PATCH 3/5] KVM: PPC: Book3S HV: Improve handling of local vs. global TLB invalidations

2012-11-26 Thread Paul Mackerras
On Mon, Nov 26, 2012 at 02:10:33PM +0100, Alexander Graf wrote: On 23.11.2012, at 23:07, Paul Mackerras wrote: On Fri, Nov 23, 2012 at 04:43:03PM +0100, Alexander Graf wrote: On 22.11.2012, at 10:28, Paul Mackerras wrote: - With the possibility of the host paging out guest pages,

Re: [PATCH 3/5] KVM: PPC: Book3S HV: Improve handling of local vs. global TLB invalidations

2012-11-26 Thread Alexander Graf
On 26.11.2012, at 22:48, Paul Mackerras wrote: On Mon, Nov 26, 2012 at 02:10:33PM +0100, Alexander Graf wrote: On 23.11.2012, at 23:07, Paul Mackerras wrote: On Fri, Nov 23, 2012 at 04:43:03PM +0100, Alexander Graf wrote: On 22.11.2012, at 10:28, Paul Mackerras wrote: - With the

Re: [PATCH 3/5] KVM: PPC: Book3S HV: Improve handling of local vs. global TLB invalidations

2012-11-26 Thread Paul Mackerras
On Mon, Nov 26, 2012 at 11:03:19PM +0100, Alexander Graf wrote: On 26.11.2012, at 22:48, Paul Mackerras wrote: On Mon, Nov 26, 2012 at 02:10:33PM +0100, Alexander Graf wrote: On 23.11.2012, at 23:07, Paul Mackerras wrote: On Fri, Nov 23, 2012 at 04:43:03PM +0100, Alexander Graf

Re: [PATCH 3/5] KVM: PPC: Book3S HV: Improve handling of local vs. global TLB invalidations

2012-11-26 Thread Alexander Graf
On 27.11.2012, at 00:16, Paul Mackerras wrote: On Mon, Nov 26, 2012 at 11:03:19PM +0100, Alexander Graf wrote: On 26.11.2012, at 22:48, Paul Mackerras wrote: On Mon, Nov 26, 2012 at 02:10:33PM +0100, Alexander Graf wrote: On 23.11.2012, at 23:07, Paul Mackerras wrote: On Fri, Nov

Re: [PATCH 3/5] KVM: PPC: Book3S HV: Improve handling of local vs. global TLB invalidations

2012-11-26 Thread Alexander Graf
On 23.11.2012, at 23:07, Paul Mackerras wrote: On Fri, Nov 23, 2012 at 04:43:03PM +0100, Alexander Graf wrote: On 22.11.2012, at 10:28, Paul Mackerras wrote: - With the possibility of the host paging out guest pages, the use of H_LOCAL by an SMP guest is dangerous since the guest could

Re: [PATCH 3/5] KVM: PPC: Book3S HV: Improve handling of local vs. global TLB invalidations

2012-11-26 Thread Paul Mackerras
On Mon, Nov 26, 2012 at 02:10:33PM +0100, Alexander Graf wrote: On 23.11.2012, at 23:07, Paul Mackerras wrote: On Fri, Nov 23, 2012 at 04:43:03PM +0100, Alexander Graf wrote: On 22.11.2012, at 10:28, Paul Mackerras wrote: - With the possibility of the host paging out guest pages,

Re: [PATCH 3/5] KVM: PPC: Book3S HV: Improve handling of local vs. global TLB invalidations

2012-11-26 Thread Alexander Graf
On 26.11.2012, at 22:48, Paul Mackerras wrote: On Mon, Nov 26, 2012 at 02:10:33PM +0100, Alexander Graf wrote: On 23.11.2012, at 23:07, Paul Mackerras wrote: On Fri, Nov 23, 2012 at 04:43:03PM +0100, Alexander Graf wrote: On 22.11.2012, at 10:28, Paul Mackerras wrote: - With the

Re: [PATCH 3/5] KVM: PPC: Book3S HV: Improve handling of local vs. global TLB invalidations

2012-11-26 Thread Paul Mackerras
On Mon, Nov 26, 2012 at 11:03:19PM +0100, Alexander Graf wrote: On 26.11.2012, at 22:48, Paul Mackerras wrote: On Mon, Nov 26, 2012 at 02:10:33PM +0100, Alexander Graf wrote: On 23.11.2012, at 23:07, Paul Mackerras wrote: On Fri, Nov 23, 2012 at 04:43:03PM +0100, Alexander Graf

Re: [PATCH 3/5] KVM: PPC: Book3S HV: Improve handling of local vs. global TLB invalidations

2012-11-26 Thread Alexander Graf
On 27.11.2012, at 00:16, Paul Mackerras wrote: On Mon, Nov 26, 2012 at 11:03:19PM +0100, Alexander Graf wrote: On 26.11.2012, at 22:48, Paul Mackerras wrote: On Mon, Nov 26, 2012 at 02:10:33PM +0100, Alexander Graf wrote: On 23.11.2012, at 23:07, Paul Mackerras wrote: On Fri, Nov

Re: [PATCH 3/5] KVM: PPC: Book3S HV: Improve handling of local vs. global TLB invalidations

2012-11-23 Thread Alexander Graf
On 22.11.2012, at 10:28, Paul Mackerras wrote: When we change or remove a HPT (hashed page table) entry, we can do either a global TLB invalidation (tlbie) that works across the whole machine, or a local invalidation (tlbiel) that only affects this core. Currently we do local invalidations

Re: [PATCH 3/5] KVM: PPC: Book3S HV: Improve handling of local vs. global TLB invalidations

2012-11-23 Thread Paul Mackerras
On Fri, Nov 23, 2012 at 04:43:03PM +0100, Alexander Graf wrote: On 22.11.2012, at 10:28, Paul Mackerras wrote: - With the possibility of the host paging out guest pages, the use of H_LOCAL by an SMP guest is dangerous since the guest could possibly retain and use a stale TLB entry

Re: [PATCH 3/5] KVM: PPC: Book3S HV: Improve handling of local vs. global TLB invalidations

2012-11-23 Thread Alexander Graf
On 22.11.2012, at 10:28, Paul Mackerras wrote: When we change or remove a HPT (hashed page table) entry, we can do either a global TLB invalidation (tlbie) that works across the whole machine, or a local invalidation (tlbiel) that only affects this core. Currently we do local invalidations

Re: [PATCH 3/5] KVM: PPC: Book3S HV: Improve handling of local vs. global TLB invalidations

2012-11-23 Thread Paul Mackerras
On Fri, Nov 23, 2012 at 04:43:03PM +0100, Alexander Graf wrote: On 22.11.2012, at 10:28, Paul Mackerras wrote: - With the possibility of the host paging out guest pages, the use of H_LOCAL by an SMP guest is dangerous since the guest could possibly retain and use a stale TLB entry

[PATCH 3/5] KVM: PPC: Book3S HV: Improve handling of local vs. global TLB invalidations

2012-11-22 Thread Paul Mackerras
When we change or remove a HPT (hashed page table) entry, we can do either a global TLB invalidation (tlbie) that works across the whole machine, or a local invalidation (tlbiel) that only affects this core. Currently we do local invalidations if the VM has only one vcpu or if the guest requests