Re: RFC: vfio interface for platform devices

2013-07-16 Thread Scott Wood
On 07/16/2013 04:51:12 PM, Yoder Stuart-B08248 wrote: 3. VFIO_DEVICE_GET_REGION_INFO No changes needed, except perhaps adding a new flag. Freescale has some devices with regions that must be mapped cacheable. While I don't object to making the information available to the

Re: RFC: vfio interface for platform devices

2013-07-16 Thread Scott Wood
On 07/16/2013 05:41:04 PM, Yoder Stuart-B08248 wrote: -Original Message- From: Wood Scott-B07421 Sent: Tuesday, July 16, 2013 5:01 PM To: Yoder Stuart-B08248 Cc: Wood Scott-B07421; Alex Williamson; Alexander Graf; Bhushan Bharat-R65777; Sethi Varun-B16395;

Re: [PATCH 3/5] booke: define reset and shutdown hcalls

2013-07-16 Thread Scott Wood
On 07/16/2013 01:35:55 AM, Gleb Natapov wrote: On Mon, Jul 15, 2013 at 01:17:33PM -0500, Scott Wood wrote: On 07/15/2013 06:30:20 AM, Gleb Natapov wrote: There is no much sense to share hypercalls between architectures. There is zero probability x86 will implement those for instance

Re: [PATCH 5/5] powerpc: using reset hcall when kvm,has-reset

2013-07-16 Thread Scott Wood
On 07/16/2013 06:21:51 PM, Alexander Graf wrote: On 16.07.2013, at 00:23, Scott Wood wrote: Still, I'm not sure what sort of error you're thinking of. If the guest didn't support the hcall mechanism we would have returned from the function by that point. In fact, seeing kvm,has-reset

Re: [PATCH 5/5] powerpc: using reset hcall when kvm,has-reset

2013-07-16 Thread Scott Wood
On 07/16/2013 06:26:40 PM, Scott Wood wrote: On 07/16/2013 06:21:51 PM, Alexander Graf wrote: On 16.07.2013, at 00:23, Scott Wood wrote: Still, I'm not sure what sort of error you're thinking of. If the guest didn't support the hcall mechanism we would have returned from the function

Re: RFC: vfio interface for platform devices

2013-07-16 Thread Scott Wood
On 07/16/2013 04:51:12 PM, Yoder Stuart-B08248 wrote: 3. VFIO_DEVICE_GET_REGION_INFO No changes needed, except perhaps adding a new flag. Freescale has some devices with regions that must be mapped cacheable. While I don't object to making the information available to the

Re: RFC: vfio interface for platform devices

2013-07-16 Thread Scott Wood
On 07/16/2013 05:41:04 PM, Yoder Stuart-B08248 wrote: -Original Message- From: Wood Scott-B07421 Sent: Tuesday, July 16, 2013 5:01 PM To: Yoder Stuart-B08248 Cc: Wood Scott-B07421; Alex Williamson; Alexander Graf; Bhushan Bharat-R65777; Sethi Varun-B16395;

Re: [PATCH 3/5] booke: define reset and shutdown hcalls

2013-07-16 Thread Scott Wood
On 07/16/2013 01:35:55 AM, Gleb Natapov wrote: On Mon, Jul 15, 2013 at 01:17:33PM -0500, Scott Wood wrote: On 07/15/2013 06:30:20 AM, Gleb Natapov wrote: There is no much sense to share hypercalls between architectures. There is zero probability x86 will implement those for instance

Re: [PATCH 5/5] powerpc: using reset hcall when kvm,has-reset

2013-07-16 Thread Scott Wood
On 07/16/2013 06:21:51 PM, Alexander Graf wrote: On 16.07.2013, at 00:23, Scott Wood wrote: Still, I'm not sure what sort of error you're thinking of. If the guest didn't support the hcall mechanism we would have returned from the function by that point. In fact, seeing kvm,has-reset

Re: [PATCH 5/5] powerpc: using reset hcall when kvm,has-reset

2013-07-16 Thread Scott Wood
On 07/16/2013 06:26:40 PM, Scott Wood wrote: On 07/16/2013 06:21:51 PM, Alexander Graf wrote: On 16.07.2013, at 00:23, Scott Wood wrote: Still, I'm not sure what sort of error you're thinking of. If the guest didn't support the hcall mechanism we would have returned from the function

Re: [PATCH 2/5] booke: exit to guest userspace for unimplemented hcalls in kvm

2013-07-15 Thread Scott Wood
On 07/15/2013 06:11:16 AM, Bharat Bhushan wrote: Exit to guest user space if kvm does not implement the hcall. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/kvm/booke.c | 47 +-- arch/powerpc/kvm/powerpc.c |1 +

Re: [PATCH 3/5] booke: define reset and shutdown hcalls

2013-07-15 Thread Scott Wood
On 07/15/2013 06:30:20 AM, Gleb Natapov wrote: On Mon, Jul 15, 2013 at 04:41:17PM +0530, Bharat Bhushan wrote: KVM_HC_VM_RESET: Requests that the virtual machine be reset. KVM_HC_VM_SHUTDOWN: Requests that the virtual machine be powered-off/halted. These hcalls are handled by guest

Re: [PATCH 5/5] powerpc: using reset hcall when kvm,has-reset

2013-07-15 Thread Scott Wood
On 07/15/2013 10:16:41 AM, Bhushan Bharat-R65777 wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Monday, July 15, 2013 8:40 PM To: Bhushan Bharat-R65777 Cc: kvm@vger.kernel.org; kvm-...@vger.kernel.org; Wood Scott-B07421; Yoder Stuart-B08248

Re: [PATCH 5/5] powerpc: using reset hcall when kvm,has-reset

2013-07-15 Thread Scott Wood
On 07/15/2013 03:28:46 PM, Alexander Graf wrote: On 15.07.2013, at 20:21, Scott Wood wrote: On 07/15/2013 10:16:41 AM, Bhushan Bharat-R65777 wrote: + printk(error: system reset returned with error %ld\n, ret); So we should fall back to the normal reset handler here. Do you

Re: [PATCH 5/5] powerpc: using reset hcall when kvm,has-reset

2013-07-15 Thread Scott Wood
On 07/15/2013 03:55:08 PM, Alexander Graf wrote: On 15.07.2013, at 22:52, Scott Wood wrote: On 07/15/2013 03:28:46 PM, Alexander Graf wrote: On 15.07.2013, at 20:21, Scott Wood wrote: On 07/15/2013 10:16:41 AM, Bhushan Bharat-R65777 wrote: + printk(error: system reset returned

Re: [PATCH 2/5] booke: exit to guest userspace for unimplemented hcalls in kvm

2013-07-15 Thread Scott Wood
On 07/15/2013 06:11:16 AM, Bharat Bhushan wrote: Exit to guest user space if kvm does not implement the hcall. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/kvm/booke.c | 47 +-- arch/powerpc/kvm/powerpc.c |1 +

Re: [PATCH 3/5] booke: define reset and shutdown hcalls

2013-07-15 Thread Scott Wood
On 07/15/2013 06:30:20 AM, Gleb Natapov wrote: On Mon, Jul 15, 2013 at 04:41:17PM +0530, Bharat Bhushan wrote: KVM_HC_VM_RESET: Requests that the virtual machine be reset. KVM_HC_VM_SHUTDOWN: Requests that the virtual machine be powered-off/halted. These hcalls are handled by guest

Re: [PATCH 2/2] KVM: PPC: Book3E: Emulate MCSRR0/1 SPR and rfmci instruction

2013-07-10 Thread Scott Wood
On 07/10/2013 05:23:36 AM, Alexander Graf wrote: On 10.07.2013, at 00:26, Scott Wood wrote: On 07/09/2013 05:00:26 PM, Alexander Graf wrote: It'll also be more flexible at the same time. You could take the logs and actually check what's going on to debug issues that you're encountering

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: [v1][PATCH 1/1] KVM: PPC: disable preemption when using hard_irq_disable()

2013-07-10 Thread Scott Wood
On 07/10/2013 01:02:19 AM, Tiejun Chen wrote: We should ensure the preemption cannot occur while calling get_paca() insdide hard_irq_disable(), otherwise the paca_struct may be the wrong one just after. And btw, we may update timing stats in this case. The soft-ee mechanism depends on

[PATCH 0/3] kvm/ppc: fixes/cleanup

2013-07-10 Thread Scott Wood
These are the remaining patches from the set of 8 that was originally posted for 3.10, but which weren't deemed urgent enough for that. Scott Wood (3): kvm/ppc: Call trace_hardirqs_on before entry kvm/ppc: IRQ disabling cleanup kvm/ppc/booke: Don't call kvm_guest_enter twice arch/powerpc

[PATCH 3/3] kvm/ppc/booke: Don't call kvm_guest_enter twice

2013-07-10 Thread Scott Wood
kvm_guest_enter() was already called by kvmppc_prepare_to_enter(). Don't call it again. Signed-off-by: Scott Wood scottw...@freescale.com --- arch/powerpc/kvm/booke.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index aa3bc36..57c1462

[PATCH 1/3] kvm/ppc: Call trace_hardirqs_on before entry

2013-07-10 Thread Scott Wood
() to kvm_fix_ee_before_entry() to reflect that this function now has a role on 32-bit as well. Signed-off-by: Scott Wood scottw...@freescale.com --- arch/powerpc/include/asm/kvm_ppc.h | 11 --- arch/powerpc/kvm/book3s_pr.c | 4 ++-- arch/powerpc/kvm/booke.c | 4 ++-- arch/powerpc/kvm

[PATCH 2/3] kvm/ppc: IRQ disabling cleanup

2013-07-10 Thread Scott Wood
caller do it. Also move the IRQ enabling on heavyweight exit into kvmppc_prepare_to_enter(). Signed-off-by: Scott Wood scottw...@freescale.com --- arch/powerpc/include/asm/kvm_ppc.h | 6 ++ arch/powerpc/kvm/book3s_pr.c | 12 +++- arch/powerpc/kvm/booke.c | 11

Re: [PATCH 2/3] kvm/ppc: IRQ disabling cleanup

2013-07-10 Thread Scott Wood
On 07/10/2013 06:04:53 PM, Alexander Graf wrote: On 11.07.2013, at 01:01, Benjamin Herrenschmidt wrote: On Thu, 2013-07-11 at 00:57 +0200, Alexander Graf wrote: #ifdef CONFIG_PPC64 + /* + * To avoid races, the caller must have gone directly from having + * interrupts

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: Emulate MCSRR0/1 SPR and rfmci instruction

2013-07-10 Thread Scott Wood
On 07/10/2013 05:23:36 AM, Alexander Graf wrote: On 10.07.2013, at 00:26, Scott Wood wrote: On 07/09/2013 05:00:26 PM, Alexander Graf wrote: It'll also be more flexible at the same time. You could take the logs and actually check what's going on to debug issues that you're encountering

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: [v1][PATCH 1/1] KVM: PPC: disable preemption when using hard_irq_disable()

2013-07-10 Thread Scott Wood
On 07/10/2013 01:02:19 AM, Tiejun Chen wrote: We should ensure the preemption cannot occur while calling get_paca() insdide hard_irq_disable(), otherwise the paca_struct may be the wrong one just after. And btw, we may update timing stats in this case. The soft-ee mechanism depends on

[PATCH 3/3] kvm/ppc/booke: Don't call kvm_guest_enter twice

2013-07-10 Thread Scott Wood
kvm_guest_enter() was already called by kvmppc_prepare_to_enter(). Don't call it again. Signed-off-by: Scott Wood scottw...@freescale.com --- arch/powerpc/kvm/booke.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index aa3bc36..57c1462

[PATCH 2/3] kvm/ppc: IRQ disabling cleanup

2013-07-10 Thread Scott Wood
caller do it. Also move the IRQ enabling on heavyweight exit into kvmppc_prepare_to_enter(). Signed-off-by: Scott Wood scottw...@freescale.com --- arch/powerpc/include/asm/kvm_ppc.h | 6 ++ arch/powerpc/kvm/book3s_pr.c | 12 +++- arch/powerpc/kvm/booke.c | 11

[PATCH 1/3] kvm/ppc: Call trace_hardirqs_on before entry

2013-07-10 Thread Scott Wood
() to kvm_fix_ee_before_entry() to reflect that this function now has a role on 32-bit as well. Signed-off-by: Scott Wood scottw...@freescale.com --- arch/powerpc/include/asm/kvm_ppc.h | 11 --- arch/powerpc/kvm/book3s_pr.c | 4 ++-- arch/powerpc/kvm/booke.c | 4 ++-- arch/powerpc/kvm

Re: [PATCH 2/3] kvm/ppc: IRQ disabling cleanup

2013-07-10 Thread Scott Wood
On 07/10/2013 06:04:53 PM, Alexander Graf wrote: On 11.07.2013, at 01:01, Benjamin Herrenschmidt wrote: On Thu, 2013-07-11 at 00:57 +0200, Alexander Graf wrote: #ifdef CONFIG_PPC64 + /* + * To avoid races, the caller must have gone directly from having + * interrupts

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-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: Emulate MCSRR0/1 SPR and rfmci instruction

2013-07-09 Thread Scott Wood
On 07/08/2013 01:45:58 PM, Alexander Graf wrote: On 03.07.2013, at 15:30, Mihai Caraman wrote: Some guests are making use of return from machine check instruction to do crazy things even though the 64-bit kernel doesn't handle yet this interrupt. Emulate MCSRR0/1 SPR and rfmci instruction

Re: [PATCH 2/2] KVM: PPC: Book3E: Emulate MCSRR0/1 SPR and rfmci instruction

2013-07-09 Thread Scott Wood
On 07/09/2013 12:46:32 PM, Alexander Graf wrote: On 07/09/2013 07:16 PM, Scott Wood wrote: On 07/08/2013 01:45:58 PM, Alexander Graf wrote: On 03.07.2013, at 15:30, Mihai Caraman wrote: Some guests are making use of return from machine check instruction to do crazy things even though

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: Emulate MCSRR0/1 SPR and rfmci instruction

2013-07-09 Thread Scott Wood
On 07/09/2013 04:49:32 PM, Alexander Graf wrote: On 09.07.2013, at 20:29, Scott Wood wrote: On 07/09/2013 12:46:32 PM, Alexander Graf wrote: On 07/09/2013 07:16 PM, Scott Wood wrote: On 07/08/2013 01:45:58 PM, Alexander Graf wrote: On 03.07.2013, at 15:30, Mihai Caraman wrote: Some

Re: [PATCH 2/2] KVM: PPC: Book3E: Emulate MCSRR0/1 SPR and rfmci instruction

2013-07-09 Thread Scott Wood
On 07/09/2013 05:00:26 PM, Alexander Graf wrote: On 09.07.2013, at 23:54, Scott Wood wrote: On 07/09/2013 04:49:32 PM, Alexander Graf wrote: Not sure I understand. What the timing stats do is that they measure the time between [exit ... entry], right? We'd do the same thing, just all

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-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: Emulate MCSRR0/1 SPR and rfmci instruction

2013-07-09 Thread Scott Wood
On 07/08/2013 01:45:58 PM, Alexander Graf wrote: On 03.07.2013, at 15:30, Mihai Caraman wrote: Some guests are making use of return from machine check instruction to do crazy things even though the 64-bit kernel doesn't handle yet this interrupt. Emulate MCSRR0/1 SPR and rfmci instruction

Re: [PATCH 2/2] KVM: PPC: Book3E: Emulate MCSRR0/1 SPR and rfmci instruction

2013-07-09 Thread Scott Wood
On 07/09/2013 12:46:32 PM, Alexander Graf wrote: On 07/09/2013 07:16 PM, Scott Wood wrote: On 07/08/2013 01:45:58 PM, Alexander Graf wrote: On 03.07.2013, at 15:30, Mihai Caraman wrote: Some guests are making use of return from machine check instruction to do crazy things even though

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: Emulate MCSRR0/1 SPR and rfmci instruction

2013-07-09 Thread Scott Wood
On 07/09/2013 04:49:32 PM, Alexander Graf wrote: On 09.07.2013, at 20:29, Scott Wood wrote: On 07/09/2013 12:46:32 PM, Alexander Graf wrote: On 07/09/2013 07:16 PM, Scott Wood wrote: On 07/08/2013 01:45:58 PM, Alexander Graf wrote: On 03.07.2013, at 15:30, Mihai Caraman wrote: Some

Re: [PATCH 2/2] KVM: PPC: Book3E: Emulate MCSRR0/1 SPR and rfmci instruction

2013-07-09 Thread Scott Wood
On 07/09/2013 05:00:26 PM, Alexander Graf wrote: On 09.07.2013, at 23:54, Scott Wood wrote: On 07/09/2013 04:49:32 PM, Alexander Graf wrote: Not sure I understand. What the timing stats do is that they measure the time between [exit ... entry], right? We'd do the same thing, just all

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 3/6] KVM: PPC: Book3E: Increase FPU laziness

2013-07-03 Thread Scott Wood
On 07/03/2013 10:11:50 AM, Alexander Graf wrote: On 03.07.2013, at 15:55, Caraman Mihai Claudiu-B02008 wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Wednesday, July 03, 2013 4:45 PM To: Caraman Mihai Claudiu-B02008 Cc: kvm-...@vger.kernel.org;

Re: [PATCH 3/6] KVM: PPC: Book3E: Increase FPU laziness

2013-07-03 Thread Scott Wood
On 07/03/2013 11:59:45 AM, Alexander Graf wrote: On 03.07.2013, at 17:41, Caraman Mihai Claudiu-B02008 wrote: Increase FPU laziness by calling kvmppc_load_guest_fp() just before returning to guest instead of each sched in. Without this improvement an interrupt may also claim floting

Re: [PATCH 3/6] KVM: PPC: Book3E: Increase FPU laziness

2013-07-03 Thread Scott Wood
On 07/03/2013 07:42:36 AM, Mihai Caraman wrote: Increase FPU laziness by calling kvmppc_load_guest_fp() just before returning to guest instead of each sched in. Without this improvement an interrupt may also claim floting point corrupting guest state. Signed-off-by: Mihai Caraman

Re: [PATCH 3/6] KVM: PPC: Book3E: Increase FPU laziness

2013-07-03 Thread Scott Wood
On 07/03/2013 12:23:16 PM, Alexander Graf wrote: On 03.07.2013, at 19:18, Scott Wood wrote: On 07/03/2013 07:42:36 AM, Mihai Caraman wrote: Increase FPU laziness by calling kvmppc_load_guest_fp() just before returning to guest instead of each sched in. Without this improvement

Re: [PATCH 2/6] KVM: PPC: Book3E: Refactor SPE/FP exit handling

2013-07-03 Thread Scott Wood
On 07/03/2013 10:13:57 AM, Alexander Graf wrote: On 03.07.2013, at 15:53, Caraman Mihai Claudiu-B02008 wrote: -#ifdef CONFIG_SPE case BOOKE_INTERRUPT_SPE_ALTIVEC_UNAVAIL: { - if (vcpu-arch.shared-msr MSR_SPE) - kvmppc_vcpu_enable_spe(vcpu); - else

Re: [RFC PATCH 5/6] KVM: PPC: Book3E: Add ONE_REG AltiVec support

2013-07-03 Thread Scott Wood
On 07/03/2013 07:11:52 AM, Caraman Mihai Claudiu-B02008 wrote: -Original Message- From: Wood Scott-B07421 Sent: Wednesday, June 05, 2013 1:40 AM To: Caraman Mihai Claudiu-B02008 Cc: kvm-...@vger.kernel.org; kvm@vger.kernel.org; linuxppc- d...@lists.ozlabs.org; Caraman Mihai

Re: [PATCH 4/6] KVM: PPC: Book3E: Add AltiVec support

2013-07-03 Thread Scott Wood
On 07/03/2013 12:07:30 PM, Alexander Graf wrote: On 03.07.2013, at 18:49, Caraman Mihai Claudiu-B02008 wrote: Do we need to do this even when the guest doesn't use Altivec? Can't we just load it on demand then once we fault? This code path really should only be a prefetch enable when

Re: [PATCH 3/6] KVM: PPC: Book3E: Increase FPU laziness

2013-07-03 Thread Scott Wood
On 07/03/2013 07:42:36 AM, Mihai Caraman wrote: Increase FPU laziness by calling kvmppc_load_guest_fp() just before returning to guest instead of each sched in. Without this improvement an interrupt may also claim floting point corrupting guest state. Signed-off-by: Mihai Caraman

Re: [PATCH 4/6] KVM: PPC: Book3E: Add AltiVec support

2013-07-03 Thread Scott Wood
On 07/03/2013 07:42:37 AM, Mihai Caraman wrote: Add KVM Book3E AltiVec support. KVM Book3E FPU support gracefully reuse host infrastructure so follow the same approach for AltiVec. Signed-off-by: Mihai Caraman mihai.cara...@freescale.com --- arch/powerpc/kvm/booke.c | 72

Re: [PATCH 2/6] KVM: PPC: Book3E: Refactor SPE/FP exit handling

2013-07-03 Thread Scott Wood
On 07/03/2013 01:42:12 PM, Alexander Graf wrote: On 03.07.2013, at 20:28, Scott Wood wrote: On 07/03/2013 10:13:57 AM, Alexander Graf wrote: There is no chip that supports SPE and HV at the same time. So we'll never hit this anyway, since kvmppc_supports_spe() always returns false on HV

Re: RFC: vfio interface for platform devices

2013-07-03 Thread Scott Wood
On 07/02/2013 08:07:53 PM, Alexander Graf wrote: On 03.07.2013, at 01:25, Yoder Stuart-B08248 wrote: 8. Open Issues -how to handle cases where VFIO is requested to handle a device where the valid, mappable range for a region is less than a page size. See example above where an

Re: PPC: RFC: proposal for VM reset shutdown hcall (v4)

2013-07-03 Thread Scott Wood
On 07/03/2013 02:32:07 PM, Alexander Graf wrote: On 03.07.2013, at 21:29, Yoder Stuart-B08248 wrote: Version 4 changes -clarified that KVM zeros the upper half of the struct fields if the VM is not in 64-bit mode

Re: [PATCH 2/2] KVM: PPC: Book3E: Add LRAT error exception handler

2013-07-03 Thread Scott Wood
On 07/03/2013 11:56:06 AM, Mihai Caraman wrote: With LRAT (Logical to Real Address Translation) error exception handler in kernel KVM needs to add the counterpart otherwise will break the build. Signed-off-by: Mihai Caraman mihai.cara...@freescale.com ---

Re: [PATCH 1/2] powerpc/booke64: Add LRAT error exception handler

2013-07-03 Thread Scott Wood
On 07/03/2013 11:56:05 AM, Mihai Caraman wrote: @@ -1410,6 +1423,7 @@ _GLOBAL(setup_doorbell_ivors) _GLOBAL(setup_ehv_ivors) SET_IVOR(40, 0x300) /* Embedded Hypervisor System Call */ SET_IVOR(41, 0x320) /* Embedded Hypervisor Privilege */ + SET_IVOR(42, 0x340) /* LRAT

Re: [PATCH 2/2] KVM: PPC: Book3E: Add LRAT error exception handler

2013-07-03 Thread Scott Wood
On 07/03/2013 04:42:40 PM, Alexander Graf wrote: On 03.07.2013, at 22:16, Scott Wood wrote: On 07/03/2013 11:56:06 AM, Mihai Caraman wrote: With LRAT (Logical to Real Address Translation) error exception handler in kernel KVM needs to add the counterpart otherwise will break the build

Re: RFC: vfio interface for platform devices

2013-07-03 Thread Scott Wood
On 07/02/2013 06:25:59 PM, Yoder Stuart-B08248 wrote: The write-up below is the first draft of a proposal for how the kernel can expose platform devices to user space using vfio. In short, I'm proposing a new ioctl VFIO_DEVICE_GET_DEVTREE_INFO which allows user space to correlate regions and

Re: RFC: vfio interface for platform devices (v2)

2013-07-03 Thread Scott Wood
On 07/03/2013 05:53:09 PM, Alex Williamson wrote: Seems like it should work. My only API concern with this model of appending structs is that a user needs to know the size of each struct even if they don't otherwise care about it in order to step over it. In that case, it might be better to

Re: [PATCH 3/6] KVM: PPC: Book3E: Increase FPU laziness

2013-07-03 Thread Scott Wood
On 07/03/2013 11:59:45 AM, Alexander Graf wrote: On 03.07.2013, at 17:41, Caraman Mihai Claudiu-B02008 wrote: Increase FPU laziness by calling kvmppc_load_guest_fp() just before returning to guest instead of each sched in. Without this improvement an interrupt may also claim floting

Re: [PATCH 3/6] KVM: PPC: Book3E: Increase FPU laziness

2013-07-03 Thread Scott Wood
On 07/03/2013 07:42:36 AM, Mihai Caraman wrote: Increase FPU laziness by calling kvmppc_load_guest_fp() just before returning to guest instead of each sched in. Without this improvement an interrupt may also claim floting point corrupting guest state. Signed-off-by: Mihai Caraman

Re: [PATCH 3/6] KVM: PPC: Book3E: Increase FPU laziness

2013-07-03 Thread Scott Wood
On 07/03/2013 12:23:16 PM, Alexander Graf wrote: On 03.07.2013, at 19:18, Scott Wood wrote: On 07/03/2013 07:42:36 AM, Mihai Caraman wrote: Increase FPU laziness by calling kvmppc_load_guest_fp() just before returning to guest instead of each sched in. Without this improvement

Re: [PATCH 2/6] KVM: PPC: Book3E: Refactor SPE/FP exit handling

2013-07-03 Thread Scott Wood
On 07/03/2013 10:13:57 AM, Alexander Graf wrote: On 03.07.2013, at 15:53, Caraman Mihai Claudiu-B02008 wrote: -#ifdef CONFIG_SPE case BOOKE_INTERRUPT_SPE_ALTIVEC_UNAVAIL: { - if (vcpu-arch.shared-msr MSR_SPE) - kvmppc_vcpu_enable_spe(vcpu); - else

Re: [RFC PATCH 5/6] KVM: PPC: Book3E: Add ONE_REG AltiVec support

2013-07-03 Thread Scott Wood
On 07/03/2013 07:11:52 AM, Caraman Mihai Claudiu-B02008 wrote: -Original Message- From: Wood Scott-B07421 Sent: Wednesday, June 05, 2013 1:40 AM To: Caraman Mihai Claudiu-B02008 Cc: kvm-ppc@vger.kernel.org; k...@vger.kernel.org; linuxppc- d...@lists.ozlabs.org; Caraman Mihai

Re: [PATCH 3/6] KVM: PPC: Book3E: Increase FPU laziness

2013-07-03 Thread Scott Wood
On 07/03/2013 07:42:36 AM, Mihai Caraman wrote: Increase FPU laziness by calling kvmppc_load_guest_fp() just before returning to guest instead of each sched in. Without this improvement an interrupt may also claim floting point corrupting guest state. Signed-off-by: Mihai Caraman

Re: [PATCH 4/6] KVM: PPC: Book3E: Add AltiVec support

2013-07-03 Thread Scott Wood
On 07/03/2013 07:42:37 AM, Mihai Caraman wrote: Add KVM Book3E AltiVec support. KVM Book3E FPU support gracefully reuse host infrastructure so follow the same approach for AltiVec. Signed-off-by: Mihai Caraman mihai.cara...@freescale.com --- arch/powerpc/kvm/booke.c | 72

Re: RFC: vfio interface for platform devices

2013-07-03 Thread Scott Wood
On 07/02/2013 08:07:53 PM, Alexander Graf wrote: On 03.07.2013, at 01:25, Yoder Stuart-B08248 wrote: 8. Open Issues -how to handle cases where VFIO is requested to handle a device where the valid, mappable range for a region is less than a page size. See example above where an

Re: PPC: RFC: proposal for VM reset shutdown hcall (v4)

2013-07-03 Thread Scott Wood
On 07/03/2013 02:32:07 PM, Alexander Graf wrote: On 03.07.2013, at 21:29, Yoder Stuart-B08248 wrote: Version 4 changes -clarified that KVM zeros the upper half of the struct fields if the VM is not in 64-bit mode

Re: [PATCH 2/2] KVM: PPC: Book3E: Add LRAT error exception handler

2013-07-03 Thread Scott Wood
On 07/03/2013 11:56:06 AM, Mihai Caraman wrote: With LRAT (Logical to Real Address Translation) error exception handler in kernel KVM needs to add the counterpart otherwise will break the build. Signed-off-by: Mihai Caraman mihai.cara...@freescale.com ---

Re: [PATCH 1/2] powerpc/booke64: Add LRAT error exception handler

2013-07-03 Thread Scott Wood
On 07/03/2013 11:56:05 AM, Mihai Caraman wrote: @@ -1410,6 +1423,7 @@ _GLOBAL(setup_doorbell_ivors) _GLOBAL(setup_ehv_ivors) SET_IVOR(40, 0x300) /* Embedded Hypervisor System Call */ SET_IVOR(41, 0x320) /* Embedded Hypervisor Privilege */ + SET_IVOR(42, 0x340) /* LRAT

Re: RFC: vfio interface for platform devices

2013-07-03 Thread Scott Wood
On 07/02/2013 06:25:59 PM, Yoder Stuart-B08248 wrote: The write-up below is the first draft of a proposal for how the kernel can expose platform devices to user space using vfio. In short, I'm proposing a new ioctl VFIO_DEVICE_GET_DEVTREE_INFO which allows user space to correlate regions and

Re: RFC: vfio interface for platform devices (v2)

2013-07-03 Thread Scott Wood
On 07/03/2013 05:53:09 PM, Alex Williamson wrote: Seems like it should work. My only API concern with this model of appending structs is that a user needs to know the size of each struct even if they don't otherwise care about it in order to step over it. In that case, it might be better to

Re: RFC: proposal for VM reset shutdown hcall (v2)

2013-07-02 Thread Scott Wood
On 07/02/2013 10:33:58 AM, Yoder Stuart-B08248 wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Tuesday, July 02, 2013 10:23 AM To: Yoder Stuart-B08248 Cc: Bhushan Bharat-R65777; Wood Scott-B07421; kvm@vger.kernel.org list; kvm-...@vger.kernel.org

Re: RFC: proposal for VM reset shutdown hcall (v3)

2013-07-02 Thread Scott Wood
On 07/02/2013 05:08:02 PM, Yoder Stuart-B08248 wrote: KVM_EXIT_EPAPR_HCALL exit definition /* KVM_EXIT_EPAPR_HCALL */ struct { __u64 nr; __u64

Re: RFC: proposal for VM reset shutdown hcall (v2)

2013-07-02 Thread Scott Wood
On 07/02/2013 10:33:58 AM, Yoder Stuart-B08248 wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Tuesday, July 02, 2013 10:23 AM To: Yoder Stuart-B08248 Cc: Bhushan Bharat-R65777; Wood Scott-B07421; k...@vger.kernel.org list; kvm-ppc@vger.kernel.org

Re: RFC: proposal for VM reset shutdown hcall (v3)

2013-07-02 Thread Scott Wood
On 07/02/2013 05:08:02 PM, Yoder Stuart-B08248 wrote: KVM_EXIT_EPAPR_HCALL exit definition /* KVM_EXIT_EPAPR_HCALL */ struct { __u64 nr; __u64

Re: RFC: proposal for VM reset hcall

2013-07-01 Thread Scott Wood
On 07/01/2013 10:56:54 AM, Yoder Stuart-B08248 wrote: For the e500 PV platform we need a VM reset mechanisms. Hypercall: KVM_HC_VM_RESET Description: Requests that the virtual machine be reset. The hcall takes no arguments. If successful the hcall does not

Re: RFC: proposal for VM reset hcall

2013-07-01 Thread Scott Wood
On 07/01/2013 12:28:34 PM, Yoder Stuart-B08248 wrote: -Original Message- From: Wood Scott-B07421 Sent: Monday, July 01, 2013 11:49 AM To: Yoder Stuart-B08248 Cc: Alexander Graf; Wood Scott-B07421; Bhushan Bharat-R65777; kvm@vger.kernel.org Subject: Re: RFC: proposal for VM

Re: RFC: proposal for VM reset shutdown hcall

2013-07-01 Thread Scott Wood
On 07/01/2013 06:05:55 PM, Yoder Stuart-B08248 wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Monday, July 01, 2013 6:01 PM To: Yoder Stuart-B08248 Cc: Bhushan Bharat-R65777; Wood Scott-B07421; kvm@vger.kernel.org list; kvm-...@vger.kernel.org

Re: [PATCH 1/2] powerpc/booke64: Use common defines for AltiVec interrupts numbers

2013-07-01 Thread Scott Wood
On 07/01/2013 07:18:21 PM, Alexander Graf wrote: On 01.07.2013, at 17:35, Mihai Caraman wrote: On Book3E some SPE/FP/AltiVec interrupts share the same number. Use common defines to indentify these numbers. So why didn't this happen from the beginning? Ask Kumar. Why the change? So we

Re: [PATCH 1/2] powerpc/booke64: Use common defines for AltiVec interrupts numbers

2013-07-01 Thread Scott Wood
On 07/01/2013 07:18:21 PM, Alexander Graf wrote: On 01.07.2013, at 17:35, Mihai Caraman wrote: On Book3E some SPE/FP/AltiVec interrupts share the same number. Use common defines to indentify these numbers. So why didn't this happen from the beginning? Ask Kumar. Why the change? So we

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-06-27 Thread Scott Wood
On 06/27/2013 12:02:36 AM, Alexey Kardashevskiy wrote: +/* + * The KVM guest can be backed with 16MB pages. + * In this case, we cannot do page counting from the real mode + * as the compound pages are used - they are linked in a list + * with pointers as virtual addresses which are inaccessible

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-06-27 Thread Scott Wood
On 06/27/2013 12:02:36 AM, Alexey Kardashevskiy wrote: +/* + * The KVM guest can be backed with 16MB pages. + * In this case, we cannot do page counting from the real mode + * as the compound pages are used - they are linked in a list + * with pointers as virtual addresses which are inaccessible

[PATCH v2] kvm/ppc/booke: Delay kvmppc_lazy_ee_enable

2013-06-11 Thread Scott Wood
-by: Scott Wood scottw...@freescale.com --- Rebased without patches 5 and 6 in the previous patchset. arch/powerpc/kvm/booke.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 5cd7ad0..1a1b511 100644 --- a/arch/powerpc

[PATCH v2] kvm/ppc/booke: Delay kvmppc_lazy_ee_enable

2013-06-11 Thread Scott Wood
-by: Scott Wood scottw...@freescale.com --- Rebased without patches 5 and 6 in the previous patchset. arch/powerpc/kvm/booke.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 5cd7ad0..1a1b511 100644 --- a/arch/powerpc

Re: [PATCH 0/8] kvm/ppc: fixes for 3.10

2013-06-10 Thread Scott Wood
On 06/09/2013 03:09:21 AM, Gleb Natapov wrote: On Thu, Jun 06, 2013 at 07:16:28PM -0500, Scott Wood wrote: Most of these have been posted before, but I grouped them together as there are some contextual dependencies between them. Gleb/Paolo: As Alex doesn't appear to be back yet, can you

Re: [PATCH 0/8] kvm/ppc: fixes for 3.10

2013-06-10 Thread Scott Wood
On 06/09/2013 03:09:21 AM, Gleb Natapov wrote: On Thu, Jun 06, 2013 at 07:16:28PM -0500, Scott Wood wrote: Most of these have been posted before, but I grouped them together as there are some contextual dependencies between them. Gleb/Paolo: As Alex doesn't appear to be back yet, can you

Re: [RFC PATCH 0/6] KVM: PPC: Book3E: AltiVec support

2013-06-06 Thread Scott Wood
On 06/06/2013 04:42:44 AM, Caraman Mihai Claudiu-B02008 wrote: This looks like a bit much for 3.10 (certainly, subject lines like refactor and enhance and add support aren't going to make Linus happy given that we're past rc4) so I think we should apply

[PATCH 6/8] kvm/ppc: IRQ disabling cleanup

2013-06-06 Thread Scott Wood
caller do it. Also move the IRQ enabling on heavyweight exit into kvmppc_prepare_to_enter(). Signed-off-by: Scott Wood scottw...@freescale.com --- arch/powerpc/include/asm/kvm_ppc.h |6 ++ arch/powerpc/kvm/book3s_pr.c | 12 +++- arch/powerpc/kvm/booke.c | 11

[PATCH 3/8] kvm/ppc/booke: Hold srcu lock when calling gfn functions

2013-06-06 Thread Scott Wood
KVM core expects arch code to acquire the srcu lock when calling gfn_to_memslot and similar functions. Signed-off-by: Scott Wood scottw...@freescale.com --- arch/powerpc/kvm/44x_tlb.c |5 + arch/powerpc/kvm/booke.c|7 +++ arch/powerpc/kvm/e500_mmu.c |5 + 3 files

<    1   2   3   4   5   6   7   8   9   10   >