Re: [PATCH 2/2] KVM: PPC: Book3E: Get vcpu's last instruction for emulation

2013-07-10 Thread Alexander Graf
On 10.07.2013, at 02:06, Scott Wood wrote: On 07/09/2013 04:44:24 PM, Alexander Graf wrote: On 09.07.2013, at 20:46, Scott Wood wrote: I suspect that tlbsx is faster, or at worst similar. And unlike comparing tlbsx to lwepx (not counting a fix for the threading problem), we don't

Re: [PATCH 2/2] KVM: PPC: Book3E: Get vcpu's last instruction for emulation

2013-07-10 Thread Alexander Graf
On 10.07.2013, at 02:12, Scott Wood wrote: On 07/09/2013 04:45:10 PM, Alexander Graf wrote: On 28.06.2013, at 11:20, Mihai Caraman wrote: + /* Get page size */ + if (MAS0_GET_TLBSEL(mfspr(SPRN_MAS0)) == 0) + psize_shift = PAGE_SHIFT; + else + psize_shift =

Re: [PATCH 2/2] KVM: PPC: Book3E: Get vcpu's last instruction for emulation

2013-07-10 Thread Scott Wood
On 07/10/2013 05:18:10 AM, Alexander Graf wrote: On 10.07.2013, at 02:12, Scott Wood wrote: On 07/09/2013 04:45:10 PM, Alexander Graf wrote: On 28.06.2013, at 11:20, Mihai Caraman wrote: + /* Get page size */ + if (MAS0_GET_TLBSEL(mfspr(SPRN_MAS0)) == 0) + psize_shift =

Re: [PATCH 2/2] KVM: PPC: Book3E: Get vcpu's last instruction for emulation

2013-07-10 Thread Scott Wood
On 07/10/2013 05:15:09 AM, Alexander Graf wrote: On 10.07.2013, at 02:06, Scott Wood wrote: On 07/09/2013 04:44:24 PM, Alexander Graf wrote: On 09.07.2013, at 20:46, Scott Wood wrote: I suspect that tlbsx is faster, or at worst similar. And unlike comparing tlbsx to lwepx (not counting

Re: [PATCH 2/2] KVM: PPC: Book3E: Get vcpu's last instruction for emulation

2013-07-10 Thread Alexander Graf
On 10.07.2013, at 20:37, Scott Wood wrote: On 07/10/2013 05:18:10 AM, Alexander Graf wrote: On 10.07.2013, at 02:12, Scott Wood wrote: On 07/09/2013 04:45:10 PM, Alexander Graf wrote: On 28.06.2013, at 11:20, Mihai Caraman wrote: + /* Get page size */ + if

Re: [PATCH 2/2] KVM: PPC: Book3E: Get vcpu's last instruction for emulation

2013-07-10 Thread Alexander Graf
On 10.07.2013, at 20:42, Scott Wood wrote: On 07/10/2013 05:15:09 AM, Alexander Graf wrote: On 10.07.2013, at 02:06, Scott Wood wrote: On 07/09/2013 04:44:24 PM, Alexander Graf wrote: On 09.07.2013, at 20:46, Scott Wood wrote: I suspect that tlbsx is faster, or at worst similar. And

Re: [PATCH 2/2] KVM: PPC: Book3E: Get vcpu's last instruction for emulation

2013-07-10 Thread Scott Wood
On 07/10/2013 05:50:01 PM, Alexander Graf wrote: On 10.07.2013, at 20:42, Scott Wood wrote: On 07/10/2013 05:15:09 AM, Alexander Graf wrote: On 10.07.2013, at 02:06, Scott Wood wrote: On 07/09/2013 04:44:24 PM, Alexander Graf wrote: On 09.07.2013, at 20:46, Scott Wood wrote: I suspect

Re: [PATCH 2/2] KVM: PPC: Book3E: Get vcpu's last instruction for emulation

2013-07-10 Thread Alexander Graf
On 11.07.2013, at 02:15, Scott Wood wrote: On 07/10/2013 05:50:01 PM, Alexander Graf wrote: On 10.07.2013, at 20:42, Scott Wood wrote: On 07/10/2013 05:15:09 AM, Alexander Graf wrote: On 10.07.2013, at 02:06, Scott Wood wrote: On 07/09/2013 04:44:24 PM, Alexander Graf wrote: On

Re: [PATCH 2/2] KVM: PPC: Book3E: Get vcpu's last instruction for emulation

2013-07-09 Thread Scott Wood
On 07/08/2013 08:39:05 AM, Alexander Graf wrote: On 28.06.2013, at 11:20, Mihai Caraman wrote: lwepx faults needs to be handled by KVM and this implies additional code in DO_KVM macro to identify the source of the exception originated from host context. This requires to check the

Re: [PATCH 2/2] KVM: PPC: Book3E: Get vcpu's last instruction for emulation

2013-07-09 Thread Alexander Graf
On 07/09/2013 07:13 PM, Scott Wood wrote: On 07/08/2013 08:39:05 AM, Alexander Graf wrote: On 28.06.2013, at 11:20, Mihai Caraman wrote: lwepx faults needs to be handled by KVM and this implies additional code in DO_KVM macro to identify the source of the exception originated from host

Re: [PATCH 2/2] KVM: PPC: Book3E: Get vcpu's last instruction for emulation

2013-07-09 Thread Scott Wood
On 07/09/2013 12:44:32 PM, Alexander Graf wrote: On 07/09/2013 07:13 PM, Scott Wood wrote: On 07/08/2013 08:39:05 AM, Alexander Graf wrote: On 28.06.2013, at 11:20, Mihai Caraman wrote: lwepx faults needs to be handled by KVM and this implies additional code in DO_KVM macro to identify

Re: [PATCH 2/2] KVM: PPC: Book3E: Get vcpu's last instruction for emulation

2013-07-09 Thread Alexander Graf
On 09.07.2013, at 20:46, Scott Wood wrote: On 07/09/2013 12:44:32 PM, Alexander Graf wrote: On 07/09/2013 07:13 PM, Scott Wood wrote: On 07/08/2013 08:39:05 AM, Alexander Graf wrote: On 28.06.2013, at 11:20, Mihai Caraman wrote: lwepx faults needs to be handled by KVM and this implies

Re: [PATCH 2/2] KVM: PPC: Book3E: Get vcpu's last instruction for emulation

2013-07-09 Thread Alexander Graf
On 28.06.2013, at 11:20, Mihai Caraman wrote: lwepx faults needs to be handled by KVM and this implies additional code in DO_KVM macro to identify the source of the exception originated from host context. This requires to check the Exception Syndrome Register (ESR[EPID]) and External PID

Re: [PATCH 2/2] KVM: PPC: Book3E: Get vcpu's last instruction for emulation

2013-07-09 Thread Scott Wood
On 07/09/2013 04:44:24 PM, Alexander Graf wrote: On 09.07.2013, at 20:46, Scott Wood wrote: I suspect that tlbsx is faster, or at worst similar. And unlike comparing tlbsx to lwepx (not counting a fix for the threading problem), we don't already have code to search the guest TLB, so

Re: [PATCH 2/2] KVM: PPC: Book3E: Get vcpu's last instruction for emulation

2013-07-09 Thread Scott Wood
On 07/09/2013 04:45:10 PM, Alexander Graf wrote: On 28.06.2013, at 11:20, Mihai Caraman wrote: + /* Get page size */ + if (MAS0_GET_TLBSEL(mfspr(SPRN_MAS0)) == 0) + psize_shift = PAGE_SHIFT; + else + psize_shift = MAS1_GET_TSIZE(mas1) + 10; + + mas7_mas3 = (((u64)

Re: [PATCH 2/2] KVM: PPC: Book3E: Get vcpu's last instruction for emulation

2013-07-08 Thread Alexander Graf
On 28.06.2013, at 11:20, Mihai Caraman wrote: lwepx faults needs to be handled by KVM and this implies additional code in DO_KVM macro to identify the source of the exception originated from host context. This requires to check the Exception Syndrome Register (ESR[EPID]) and External PID

[PATCH 2/2] KVM: PPC: Book3E: Get vcpu's last instruction for emulation

2013-06-28 Thread Mihai Caraman
lwepx faults needs to be handled by KVM and this implies additional code in DO_KVM macro to identify the source of the exception originated from host context. This requires to check the Exception Syndrome Register (ESR[EPID]) and External PID Load Context Register (EPLC[EGS]) for DTB_MISS, DSI and

[PATCH 2/2] KVM: PPC: Book3E: Get vcpu's last instruction for emulation

2013-06-06 Thread Mihai Caraman
lwepx faults needs to be handled by KVM and this implies additional code in DO_KVM macro to identify the source of the exception originated in host context. This requires to check the Exception Syndrome Register (ESR[EPID]) and External PID Load Context Register (EPLC[EGS]) for DTB_MISS, DSI and