Re: [PATCH] KVM: PPC: Implement extension to report number of memslots

2015-10-26 Thread Scott Wood
On Mon, 2015-10-26 at 16:15 +1100, Paul Mackerras wrote: > On Fri, Oct 16, 2015 at 08:41:31AM +0200, Thomas Huth wrote: > > Yes, we'll likely need this soon! 32 slots are not enough... > > Would anyone object if I raised the limit for PPC to 512 slots? > Would that cause problems on embedded PPC,

Re: [PATCH] KVM: PPC: Implement extension to report number of memslots

2015-10-26 Thread Scott Wood
On Mon, 2015-10-26 at 16:15 +1100, Paul Mackerras wrote: > On Fri, Oct 16, 2015 at 08:41:31AM +0200, Thomas Huth wrote: > > Yes, we'll likely need this soon! 32 slots are not enough... > > Would anyone object if I raised the limit for PPC to 512 slots? > Would that cause problems on embedded PPC,

Re: [PATCH] KVM: PPC: e500: fix couple of shift operations on 64 bits

2015-10-01 Thread Scott Wood
On Thu, 2015-10-01 at 15:58 +0300, Laurentiu Tudor wrote: > Fix couple of cases where we shift left a 32-bit > value thus might get truncated results on 64-bit > targets. > > Signed-off-by: Laurentiu Tudor <laurentiu.tu...@freescale.com> > Suggested-by: Scott Wood &

Re: [PATCH] KVM: PPC: e500: fix couple of shift operations on 64 bits

2015-10-01 Thread Scott Wood
On Thu, 2015-10-01 at 15:58 +0300, Laurentiu Tudor wrote: > Fix couple of cases where we shift left a 32-bit > value thus might get truncated results on 64-bit > targets. > > Signed-off-by: Laurentiu Tudor <laurentiu.tu...@freescale.com> > Suggested-by: Scott Wood &

Re: [PATCH 1/2] KVM: PPC: e6500: Handle LRAT error exception

2015-09-30 Thread Scott Wood
On Wed, 2015-09-30 at 14:27 +0300, Laurentiu Tudor wrote: > On 09/30/2015 01:32 PM, Laurentiu Tudor wrote: > > On 09/25/2015 03:10 AM, Scott Wood wrote: > > > On Thu, 2015-09-24 at 16:11 +0300, Laurentiu Tudor wrote: > > [snip] > > > > > b/arch/powerpc/kv

Re: [PATCH][v2] KVM: PPC: e500: Emulate TMCFG0 TMRN register

2015-09-28 Thread Scott Wood
+ > arch/powerpc/kvm/e500_emulate.c| 19 +++ > 2 files changed, 24 insertions(+) Acked-by: Scott Wood <scotttw...@freescale.com> -Scott -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majord...@vg

Re: [PATCH][v2] KVM: PPC: e500: Emulate TMCFG0 TMRN register

2015-09-28 Thread Scott Wood
+ > arch/powerpc/kvm/e500_emulate.c| 19 +++ > 2 files changed, 24 insertions(+) Acked-by: Scott Wood <scotttw...@freescale.com> -Scott -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] KVM: PPC: e6500: support powers of 2K TLB1 sizes

2015-09-25 Thread Scott Wood
On Fri, 2015-09-25 at 17:30 +0300, Laurentiu Tudor wrote: > On 09/24/2015 11:23 PM, Scott Wood wrote: > > On Thu, 2015-09-24 at 15:57 +0300, Laurentiu Tudor wrote: > > > Book-E MMUv2 present in e6500 cores supports > > > powers of 2K page sizes while older MMUv1 core

Re: [PATCH] KVM: PPC: e6500: support powers of 2K TLB1 sizes

2015-09-24 Thread Scott Wood
On Thu, 2015-09-24 at 15:57 +0300, Laurentiu Tudor wrote: > Book-E MMUv2 present in e6500 cores supports > powers of 2K page sizes while older MMUv1 cores > support only powers of 4K page sizes, or in other > words the LSB of TSIZE on MMUv1 is always 0. > Thus, on MMUv2 we must not strip the LSB.

Re: [PATCH] KVM: PPC: e500: Emulate TMCFG0 TMRN register

2015-09-24 Thread Scott Wood
On Thu, 2015-09-24 at 09:56 +0300, Laurentiu Tudor wrote: > Emulate TMCFG0 TMRN register exposing one HW thread per vcpu. > > Signed-off-by: Mihai Caraman > [laurentiu.tu...@freescale.com: rebased on latest kernel, > use define instead of hardcoded value] >

Re: [PATCH] powerpc/e6500: add TMCFG0 register definition

2015-09-24 Thread Scott Wood
++ > 1 file changed, 6 insertions(+) Acked-by: Scott Wood <scottw...@freescale.com> -Scott -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 15/19] KVM: PPC: e500: fix handling local_sid_lookup result

2015-09-24 Thread Scott Wood
rpc/kvm/e500.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Acked-by: Scott Wood <scottw...@freescale.com> -Scott -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 15/19] KVM: PPC: e500: fix handling local_sid_lookup result

2015-09-24 Thread Scott Wood
rpc/kvm/e500.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Acked-by: Scott Wood <scottw...@freescale.com> -Scott -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/2] KVM: PPC: e6500: Handle LRAT error exception

2015-09-24 Thread Scott Wood
On Thu, 2015-09-24 at 16:11 +0300, Laurentiu Tudor wrote: > diff --git a/arch/powerpc/kvm/bookehv_interrupts.S > b/arch/powerpc/kvm/bookehv_interrupts.S > index 81bd8a07..1e9fa2a 100644 > --- a/arch/powerpc/kvm/bookehv_interrupts.S > +++ b/arch/powerpc/kvm/bookehv_interrupts.S > @@ -62,6 +62,7 @@

Re: [PATCH] powerpc/e500: move qemu machine spec together with the rest

2015-09-14 Thread Scott Wood
On Mon, 2015-09-14 at 16:17 +0300, Laurentiu Tudor wrote: > On 09/10/2015 02:01 AM, Scott Wood wrote: > > On Fri, 2015-09-04 at 15:46 +0300, Laurentiu Tudor wrote: > > > This way we get rid of an entire file with mostly > > > duplicated code plus a Kconfig option that y

Re: [PATCH] powerpc/e500: move qemu machine spec together with the rest

2015-09-14 Thread Scott Wood
On Mon, 2015-09-14 at 16:14 +0200, Alexander Graf wrote: > > Am 14.09.2015 um 15:17 schrieb Laurentiu Tudor <b10...@freescale.com>: > > > > > On 09/10/2015 02:01 AM, Scott Wood wrote: > > > > On Fri, 2015-09-04 at 15:46 +0300, Laurentiu Tudor wrote: > &

Re: [PATCH] powerpc/e500: move qemu machine spec together with the rest

2015-09-09 Thread Scott Wood
On Fri, 2015-09-04 at 15:46 +0300, Laurentiu Tudor wrote: > This way we get rid of an entire file with mostly > duplicated code plus a Kconfig option that you always > had to take care to check it in order for kvm to work. > > Signed-off-by: Laurentiu Tudor > --- >

Re: [PATCH v5 1/2] perf,kvm/ppc: Add kvm_perf.h for powerpc

2015-07-31 Thread Scott Wood
[Added KVM lists and a couple relevant people] On Fri, 2015-07-31 at 14:25 +0530, Hemant Kumar wrote: On 07/30/2015 03:52 AM, Scott Wood wrote: On Wed, 2015-07-29 at 16:07 +0530, Hemant Kumar wrote: Hi Scott, On 07/17/2015 01:40 AM, Scott Wood wrote: On Thu, 2015-07-16 at 21:18

Re: [PATCH v5 1/2] perf,kvm/ppc: Add kvm_perf.h for powerpc

2015-07-31 Thread Scott Wood
[Added KVM lists and a couple relevant people] On Fri, 2015-07-31 at 14:25 +0530, Hemant Kumar wrote: On 07/30/2015 03:52 AM, Scott Wood wrote: On Wed, 2015-07-29 at 16:07 +0530, Hemant Kumar wrote: Hi Scott, On 07/17/2015 01:40 AM, Scott Wood wrote: On Thu, 2015-07-16 at 21:18

Re: [RFC PATCH 6/6] powerpc/kvm: change the condition of identifying hugetlb vm

2015-07-07 Thread Scott Wood
On Tue, 2015-07-07 at 16:05 +0800, wenwei tao wrote: Hi Scott I understand what you said. I will use the function 'is_vm_hugetlb_page()' to hide the bit combinations according to your comments in the next version of patch set. But for the situation like below, there isn't an obvious

Re: [RFC PATCH 6/6] powerpc/kvm: change the condition of identifying hugetlb vm

2015-07-07 Thread Scott Wood
On Tue, 2015-07-07 at 16:05 +0800, wenwei tao wrote: Hi Scott I understand what you said. I will use the function 'is_vm_hugetlb_page()' to hide the bit combinations according to your comments in the next version of patch set. But for the situation like below, there isn't an obvious

Re: [RFC PATCH 6/6] powerpc/kvm: change the condition of identifying hugetlb vm

2015-07-06 Thread Scott Wood
On Fri, 2015-07-03 at 16:47 +0800, wenwei tao wrote: Hi Scott Thank you for your comments. Kernel already has that function: is_vm_hugetlb_page() , but the original code didn't use it, in order to keep the coding style of the original code, I didn't use it either. For the sentence

Re: [RFC PATCH 6/6] powerpc/kvm: change the condition of identifying hugetlb vm

2015-07-06 Thread Scott Wood
On Fri, 2015-07-03 at 16:47 +0800, wenwei tao wrote: Hi Scott Thank you for your comments. Kernel already has that function: is_vm_hugetlb_page() , but the original code didn't use it, in order to keep the coding style of the original code, I didn't use it either. For the sentence

Re: [RFC PATCH 6/6] powerpc/kvm: change the condition of identifying hugetlb vm

2015-07-02 Thread Scott Wood
On Wed, 2015-06-10 at 14:27 +0800, Wenwei Tao wrote: Hugetlb VMAs are not mergeable, that means a VMA couldn't have VM_HUGETLB and VM_MERGEABLE been set in the same time. So we use VM_HUGETLB to indicate new mergeable VMAs. Because of that a VMA which has VM_HUGETLB been set is a hugetlb

Re: [RFC PATCH 6/6] powerpc/kvm: change the condition of identifying hugetlb vm

2015-07-02 Thread Scott Wood
On Wed, 2015-06-10 at 14:27 +0800, Wenwei Tao wrote: Hugetlb VMAs are not mergeable, that means a VMA couldn't have VM_HUGETLB and VM_MERGEABLE been set in the same time. So we use VM_HUGETLB to indicate new mergeable VMAs. Because of that a VMA which has VM_HUGETLB been set is a hugetlb

Re: [PATCH][RFC] KVM: PPC: fix suspicious use of conditional operator

2015-05-22 Thread Scott Wood
)); vcpu-arch.shared-mas2 = MAS2_EPN; vcpu-arch.shared-mas2 |= vcpu-arch.shared-mas4 Reviewed-by: Scott Wood scottw...@freescale.com Please send as non-RFC. -Scott -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord

Re: [PATCH][RFC] KVM: PPC: fix suspicious use of conditional operator

2015-05-22 Thread Scott Wood
)); vcpu-arch.shared-mas2 = MAS2_EPN; vcpu-arch.shared-mas2 |= vcpu-arch.shared-mas4 Reviewed-by: Scott Wood scottw...@freescale.com Please send as non-RFC. -Scott -- To unsubscribe from this list: send the line unsubscribe kvm-ppc in the body of a message to majord

Re: [PATCH] KVM: PPC: check for lookup_linux_ptep() returning NULL

2015-05-21 Thread Scott Wood
...@freescale.com Signed-off-by: Laurentiu Tudor laurentiu.tu...@freescale.com Cc: Scott Wood scottw...@freescale.com --- based on https://github.com/agraf/linux-2.6.git kvm-ppc-next arch/powerpc/kvm/e500_mmu_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Scott Wood scottw

Re: [PATCH] KVM: PPC: check for lookup_linux_ptep() returning NULL

2015-05-21 Thread Scott Wood
...@freescale.com Signed-off-by: Laurentiu Tudor laurentiu.tu...@freescale.com Cc: Scott Wood scottw...@freescale.com --- based on https://github.com/agraf/linux-2.6.git kvm-ppc-next arch/powerpc/kvm/e500_mmu_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Scott Wood scottw

Re: [PATCH 1/1] KVM: PPC: Book3S: correct width in XER handling

2015-05-20 Thread Scott Wood
On Wed, 2015-05-20 at 15:26 +1000, Sam Bobroff wrote: In 64 bit kernels, the Fixed Point Exception Register (XER) is a 64 bit field (e.g. in kvm_regs and kvm_vcpu_arch) and in most places it is accessed as such. This patch corrects places where it is accessed as a 32 bit field by a 64 bit

Re: [RFC PATCH] KVM: introduce kvm_check_device

2015-01-07 Thread Scott Wood
On Wed, 2015-01-07 at 10:55 +, Andre Przywara wrote: Hi Scott, thanks for looking at the patch. On 06/01/15 20:52, Scott Wood wrote: Out of curiosity, why do you need to test it from inside the kernel but outside kvm_main.c? I need it from arch/arm/kvm/arm.c or alternatively virt

Re: [RFC PATCH] KVM: introduce kvm_check_device

2015-01-07 Thread Scott Wood
On Wed, 2015-01-07 at 18:11 +, Andre Przywara wrote: On 07/01/15 17:45, Scott Wood wrote: On Wed, 2015-01-07 at 10:55 +, Andre Przywara wrote: Hi Scott, thanks for looking at the patch. On 06/01/15 20:52, Scott Wood wrote: Out of curiosity, why do you need to test it from

Re: [RFC PATCH] KVM: introduce kvm_check_device

2015-01-06 Thread Scott Wood
On Tue, 2015-01-06 at 16:12 +, Andre Przywara wrote: While we can easily register and unregister KVM devices, there is currently no easy way of checking whether a device has been registered. Introduce kvm_check_device() for that purpose and use it in two existing functions. Also change

Re: [PATCH] KVM: PPC: Convert openpic lock to raw_spinlock

2014-09-12 Thread Scott Wood
On Fri, 2014-09-12 at 09:12 -0500, Purcareata Bogdan-B43198 wrote: -Original Message- From: Wood Scott-B07421 Sent: Thursday, September 11, 2014 9:19 PM To: Purcareata Bogdan-B43198 Cc: kvm-...@vger.kernel.org; kvm@vger.kernel.org Subject: Re: [PATCH] KVM: PPC: Convert openpic

Re: [PATCH] KVM: PPC: Convert openpic lock to raw_spinlock

2014-09-12 Thread Scott Wood
On Fri, 2014-09-12 at 09:12 -0500, Purcareata Bogdan-B43198 wrote: -Original Message- From: Wood Scott-B07421 Sent: Thursday, September 11, 2014 9:19 PM To: Purcareata Bogdan-B43198 Cc: kvm-ppc@vger.kernel.org; k...@vger.kernel.org Subject: Re: [PATCH] KVM: PPC: Convert openpic

Re: [PATCH] KVM: PPC: Convert openpic lock to raw_spinlock

2014-09-11 Thread Scott Wood
On Thu, 2014-09-11 at 15:25 -0400, Bogdan Purcareata wrote: This patch enables running intensive I/O workloads, e.g. netperf, in a guest deployed on a RT host. No change for !RT kernels. The openpic spinlock becomes a sleeping mutex on a RT system. This no longer guarantees that EPR is

Re: [PATCH] KVM: PPC: Convert openpic lock to raw_spinlock

2014-09-11 Thread Scott Wood
On Thu, 2014-09-11 at 15:25 -0400, Bogdan Purcareata wrote: This patch enables running intensive I/O workloads, e.g. netperf, in a guest deployed on a RT host. No change for !RT kernels. The openpic spinlock becomes a sleeping mutex on a RT system. This no longer guarantees that EPR is

Re: [PATCH v4] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-08-27 Thread Scott Wood
On Wed, 2014-08-27 at 13:23 +0200, Alexander Graf wrote: On 13.08.14 11:09, Bharat Bhushan wrote: This patch emulates debug registers and debug exception to support guest using debug resource. This enables running gdb/kgdb etc in guest. On BOOKE architecture we cannot share debug

Re: [PATCH v4] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-08-27 Thread Scott Wood
On Wed, 2014-08-27 at 13:23 +0200, Alexander Graf wrote: On 13.08.14 11:09, Bharat Bhushan wrote: This patch emulates debug registers and debug exception to support guest using debug resource. This enables running gdb/kgdb etc in guest. On BOOKE architecture we cannot share debug

Re: [PATCH v2 1/2] powerpc/booke: Restrict SPE exception handlers to e200/e500 cores

2014-08-20 Thread Scott Wood
__stup_ivors and __setup_cpu functions. Signed-off-by: Mihai Caraman mihai.cara...@freescale.com Cc: Scott Wood scottw...@freescale.com Cc: Alexander Graf ag...@suse.de --- v2: - use CONFIG_PPC_E500MC without CONFIG_E500 - use elif defined() arch/powerpc/kernel/cpu_setup_fsl_booke.S | 12

Re: [PATCH v2 2/2] powerpc/booke: Revert SPE/AltiVec common defines for interrupt numbers

2014-08-20 Thread Scott Wood
exclusively. As Alexander Graf suggested, this will improve code readability especially in KVM. Use distinct defines to identify SPE/AltiVec interrupt numbers, reverting c58ce397 and 6b310fc5 patches that added common defines. Signed-off-by: Mihai Caraman mihai.cara...@freescale.com Cc: Scott Wood

Re: [PATCH 7/7 v3] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-08-12 Thread Scott Wood
On Tue, 2014-08-12 at 02:36 -0500, Bhushan Bharat-R65777 wrote: -Original Message- From: Wood Scott-B07421 Sent: Tuesday, August 12, 2014 5:30 AM To: Bhushan Bharat-R65777 Cc: ag...@suse.de; kvm-...@vger.kernel.org; kvm@vger.kernel.org; Yoder Stuart- B08248 Subject: Re:

Re: [PATCH 7/7 v3] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-08-12 Thread Scott Wood
On Tue, 2014-08-12 at 02:36 -0500, Bhushan Bharat-R65777 wrote: -Original Message- From: Wood Scott-B07421 Sent: Tuesday, August 12, 2014 5:30 AM To: Bhushan Bharat-R65777 Cc: ag...@suse.de; kvm-ppc@vger.kernel.org; k...@vger.kernel.org; Yoder Stuart- B08248 Subject: Re:

Re: [PATCH] KVM: PPC: e500mc: Add support for single threaded vcpus on e6500 core

2014-08-11 Thread Scott Wood
On Wed, 2014-08-06 at 19:33 +0300, Mihai Caraman wrote: @@ -390,19 +400,30 @@ static void kvmppc_core_vcpu_free_e500mc(struct kvm_vcpu *vcpu) static int kvmppc_core_init_vm_e500mc(struct kvm *kvm) { - int lpid; + int i, lpid; - lpid = kvmppc_alloc_lpid(); - if

Re: [PATCH] KVM: PPC: e500mc: Add support for single threaded vcpus on e6500 core

2014-08-11 Thread Scott Wood
On Tue, 2014-08-12 at 01:53 +0200, Alexander Graf wrote: Am 12.08.2014 um 01:36 schrieb Scott Wood scottw...@freescale.com: On Wed, 2014-08-06 at 19:33 +0300, Mihai Caraman wrote: @@ -390,19 +400,30 @@ static void kvmppc_core_vcpu_free_e500mc(struct kvm_vcpu *vcpu) static int

Re: [PATCH 7/7 v3] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-08-11 Thread Scott Wood
On Wed, 2014-08-06 at 12:08 +0530, Bharat Bhushan wrote: @@ -1249,6 +1284,7 @@ int kvmppc_subarch_vcpu_init(struct kvm_vcpu *vcpu) setup_timer(vcpu-arch.wdt_timer, kvmppc_watchdog_func, (unsigned long)vcpu); + kvmppc_clear_dbsr(); return 0; This could use

Re: [PATCH 1/2] powerpc/booke: Restrict SPE exception handlers to e200/e500 cores

2014-08-11 Thread Scott Wood
On Wed, 2014-08-06 at 11:39 +0300, Mihai Caraman wrote: SPE exception handlers are now defined for 32-bit e500mc cores even though SPE unit is not present and CONFIG_SPE is undefined. Restrict SPE exception handlers to e200/e500 cores adding CONFIG_SPE_POSSIBLE and consequently guard

Re: [PATCH] KVM: PPC: e500mc: Add support for single threaded vcpus on e6500 core

2014-08-11 Thread Scott Wood
On Wed, 2014-08-06 at 19:33 +0300, Mihai Caraman wrote: @@ -390,19 +400,30 @@ static void kvmppc_core_vcpu_free_e500mc(struct kvm_vcpu *vcpu) static int kvmppc_core_init_vm_e500mc(struct kvm *kvm) { - int lpid; + int i, lpid; - lpid = kvmppc_alloc_lpid(); - if

Re: [PATCH] KVM: PPC: e500mc: Add support for single threaded vcpus on e6500 core

2014-08-11 Thread Scott Wood
On Tue, 2014-08-12 at 01:53 +0200, Alexander Graf wrote: Am 12.08.2014 um 01:36 schrieb Scott Wood scottw...@freescale.com: On Wed, 2014-08-06 at 19:33 +0300, Mihai Caraman wrote: @@ -390,19 +400,30 @@ static void kvmppc_core_vcpu_free_e500mc(struct kvm_vcpu *vcpu) static int

Re: [PATCH 7/7 v3] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-08-11 Thread Scott Wood
On Wed, 2014-08-06 at 12:08 +0530, Bharat Bhushan wrote: @@ -1249,6 +1284,7 @@ int kvmppc_subarch_vcpu_init(struct kvm_vcpu *vcpu) setup_timer(vcpu-arch.wdt_timer, kvmppc_watchdog_func, (unsigned long)vcpu); + kvmppc_clear_dbsr(); return 0; This could use

Re: [PATCH 5/5 v2] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-08-05 Thread Scott Wood
On Mon, 2014-08-04 at 22:41 -0500, Bhushan Bharat-R65777 wrote: -Original Message- From: Wood Scott-B07421 Sent: Tuesday, August 05, 2014 4:23 AM To: Bhushan Bharat-R65777 Cc: ag...@suse.de; kvm-...@vger.kernel.org; kvm@vger.kernel.org; Yoder Stuart- B08248 Subject: Re:

Re: [PATCH 5/5 v2] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-08-05 Thread Scott Wood
On Mon, 2014-08-04 at 22:41 -0500, Bhushan Bharat-R65777 wrote: -Original Message- From: Wood Scott-B07421 Sent: Tuesday, August 05, 2014 4:23 AM To: Bhushan Bharat-R65777 Cc: ag...@suse.de; kvm-ppc@vger.kernel.org; k...@vger.kernel.org; Yoder Stuart- B08248 Subject: Re:

Re: [PATCH 4/5] KVM: PPC: BOOKE: Clear guest dbsr in userspace exit KVM_EXIT_DEBUG

2014-08-04 Thread Scott Wood
On Mon, 2014-08-04 at 13:22 +0530, Bharat Bhushan wrote: Dbsr is not visible to userspace and we do not think any need to expose this to userspace because: Userspace cannot inject debug interrupt to guest (as this does not know guest ability to handle debug interrupt), so userspace will

Re: [PATCH 5/5 v2] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-08-04 Thread Scott Wood
On Mon, 2014-08-04 at 13:32 +0530, Bharat Bhushan wrote: @@ -735,7 +745,27 @@ static int kvmppc_handle_debug(struct kvm_run *run, struct kvm_vcpu *vcpu) struct debug_reg *dbg_reg = (vcpu-arch.shadow_dbg_reg); u32 dbsr = vcpu-arch.dbsr; - /* Clear guest dbsr

Re: [PATCH 4/5] KVM: PPC: BOOKE: Clear guest dbsr in userspace exit KVM_EXIT_DEBUG

2014-08-04 Thread Scott Wood
On Mon, 2014-08-04 at 22:33 -0500, Bhushan Bharat-R65777 wrote: -Original Message- From: Wood Scott-B07421 Sent: Tuesday, August 05, 2014 4:17 AM To: Bhushan Bharat-R65777 Cc: ag...@suse.de; kvm-...@vger.kernel.org; kvm@vger.kernel.org; Yoder Stuart- B08248 Subject: Re:

Re: [PATCH 4/5] KVM: PPC: BOOKE: Clear guest dbsr in userspace exit KVM_EXIT_DEBUG

2014-08-04 Thread Scott Wood
On Mon, 2014-08-04 at 13:22 +0530, Bharat Bhushan wrote: Dbsr is not visible to userspace and we do not think any need to expose this to userspace because: Userspace cannot inject debug interrupt to guest (as this does not know guest ability to handle debug interrupt), so userspace will

Re: [PATCH 5/5 v2] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-08-04 Thread Scott Wood
On Mon, 2014-08-04 at 13:32 +0530, Bharat Bhushan wrote: @@ -735,7 +745,27 @@ static int kvmppc_handle_debug(struct kvm_run *run, struct kvm_vcpu *vcpu) struct debug_reg *dbg_reg = (vcpu-arch.shadow_dbg_reg); u32 dbsr = vcpu-arch.dbsr; - /* Clear guest dbsr

Re: [PATCH 4/5] KVM: PPC: BOOKE: Clear guest dbsr in userspace exit KVM_EXIT_DEBUG

2014-08-04 Thread Scott Wood
On Mon, 2014-08-04 at 22:33 -0500, Bhushan Bharat-R65777 wrote: -Original Message- From: Wood Scott-B07421 Sent: Tuesday, August 05, 2014 4:17 AM To: Bhushan Bharat-R65777 Cc: ag...@suse.de; kvm-ppc@vger.kernel.org; k...@vger.kernel.org; Yoder Stuart- B08248 Subject: Re:

Re: [PATCH 6/6] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-08-01 Thread Scott Wood
On Fri, 2014-08-01 at 04:34 -0500, Bhushan Bharat-R65777 wrote: on dbsr write emulation, deque the debug interrupt even if DBSR_IDE is set. case SPRN_DBSR: vcpu-arch.dbsr = ~spr_val; if (!(vcpu-arch.dbsr ~DBSR_IDE))

Re: [PATCH 6/6] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-08-01 Thread Scott Wood
On Fri, 2014-08-01 at 04:34 -0500, Bhushan Bharat-R65777 wrote: on dbsr write emulation, deque the debug interrupt even if DBSR_IDE is set. case SPRN_DBSR: vcpu-arch.dbsr = ~spr_val; if (!(vcpu-arch.dbsr ~DBSR_IDE))

Re: [PATCH 6/6] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-07-31 Thread Scott Wood
On Thu, 2014-07-31 at 01:15 -0500, Bhushan Bharat-R65777 wrote: -Original Message- From: Wood Scott-B07421 Sent: Thursday, July 31, 2014 8:18 AM To: Bhushan Bharat-R65777 Cc: ag...@suse.de; kvm-...@vger.kernel.org; kvm@vger.kernel.org; Yoder Stuart- B08248 Subject: Re:

Re: [PATCH 6/6] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-07-31 Thread Scott Wood
On Thu, 2014-07-31 at 01:15 -0500, Bhushan Bharat-R65777 wrote: -Original Message- From: Wood Scott-B07421 Sent: Thursday, July 31, 2014 8:18 AM To: Bhushan Bharat-R65777 Cc: ag...@suse.de; kvm-ppc@vger.kernel.org; k...@vger.kernel.org; Yoder Stuart- B08248 Subject: Re:

Re: [PATCH 1/6] KVM: PPC: BOOKE: No need to set DBCR0_EDM in guest visible register

2014-07-30 Thread Scott Wood
On Wed, 2014-07-30 at 00:21 -0500, Bhushan Bharat-R65777 wrote: -Original Message- From: Wood Scott-B07421 Sent: Tuesday, July 29, 2014 3:22 AM To: Bhushan Bharat-R65777 Cc: ag...@suse.de; kvm-...@vger.kernel.org; kvm@vger.kernel.org; Yoder Stuart- B08248 Subject: Re:

Re: [PATCH 1/6] KVM: PPC: BOOKE: No need to set DBCR0_EDM in guest visible register

2014-07-30 Thread Scott Wood
On Wed, 2014-07-30 at 12:57 -0500, Bhushan Bharat-R65777 wrote: -Original Message- From: Wood Scott-B07421 Sent: Wednesday, July 30, 2014 11:18 PM To: Bhushan Bharat-R65777 Cc: ag...@suse.de; kvm-...@vger.kernel.org; kvm@vger.kernel.org; Yoder Stuart- B08248 Subject: Re:

Re: [PATCH 6/6] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-07-30 Thread Scott Wood
On Wed, 2014-07-30 at 01:43 -0500, Bhushan Bharat-R65777 wrote: -Original Message- From: Wood Scott-B07421 Sent: Tuesday, July 29, 2014 3:58 AM To: Bhushan Bharat-R65777 Cc: ag...@suse.de; kvm-...@vger.kernel.org; kvm@vger.kernel.org; Yoder Stuart- B08248 Subject: Re:

Re: [PATCH 1/6] KVM: PPC: BOOKE: No need to set DBCR0_EDM in guest visible register

2014-07-30 Thread Scott Wood
On Wed, 2014-07-30 at 00:21 -0500, Bhushan Bharat-R65777 wrote: -Original Message- From: Wood Scott-B07421 Sent: Tuesday, July 29, 2014 3:22 AM To: Bhushan Bharat-R65777 Cc: ag...@suse.de; kvm-ppc@vger.kernel.org; k...@vger.kernel.org; Yoder Stuart- B08248 Subject: Re:

Re: [PATCH 1/6] KVM: PPC: BOOKE: No need to set DBCR0_EDM in guest visible register

2014-07-30 Thread Scott Wood
On Wed, 2014-07-30 at 12:57 -0500, Bhushan Bharat-R65777 wrote: -Original Message- From: Wood Scott-B07421 Sent: Wednesday, July 30, 2014 11:18 PM To: Bhushan Bharat-R65777 Cc: ag...@suse.de; kvm-ppc@vger.kernel.org; k...@vger.kernel.org; Yoder Stuart- B08248 Subject:

Re: [PATCH 6/6] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-07-30 Thread Scott Wood
On Wed, 2014-07-30 at 01:43 -0500, Bhushan Bharat-R65777 wrote: -Original Message- From: Wood Scott-B07421 Sent: Tuesday, July 29, 2014 3:58 AM To: Bhushan Bharat-R65777 Cc: ag...@suse.de; kvm-ppc@vger.kernel.org; k...@vger.kernel.org; Yoder Stuart- B08248 Subject: Re:

Re: [PATCH 6/6] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-07-29 Thread Scott Wood
On Tue, 2014-07-29 at 16:06 +0200, Alexander Graf wrote: On 29.07.14 00:33, Scott Wood wrote: On Mon, 2014-07-28 at 16:04 +0200, Alexander Graf wrote: On 11.07.14 10:39, Bharat Bhushan wrote: This patch emulates debug registers and debug exception to support guest using debug resource

Re: [PATCH 6/6] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-07-29 Thread Scott Wood
On Tue, 2014-07-29 at 16:06 +0200, Alexander Graf wrote: On 29.07.14 00:33, Scott Wood wrote: On Mon, 2014-07-28 at 16:04 +0200, Alexander Graf wrote: On 11.07.14 10:39, Bharat Bhushan wrote: This patch emulates debug registers and debug exception to support guest using debug resource

Re: [PATCH 1/6] KVM: PPC: BOOKE: No need to set DBCR0_EDM in guest visible register

2014-07-28 Thread Scott Wood
On Fri, 2014-07-11 at 14:08 +0530, Bharat Bhushan wrote: This is not used and even I do not remember why this was added in first place. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/kvm/booke.c | 2 -- 1 file changed, 2 deletions(-) diff --git

Re: [PATCH 2/6] KVM: PPC: BOOKE: Force MSR_DE in rfci if guest is under debug

2014-07-28 Thread Scott Wood
On Fri, 2014-07-11 at 14:08 +0530, Bharat Bhushan wrote: When userspace (QEMU) is using the debug resource to debug guest then we want MSR_DE to be always set. This patch adds missing MSR_DE setting in rfci instruction. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com ---

Re: [PATCH 5/6] KVM: PPC: BOOKE: Allow guest to change MSR_DE

2014-07-28 Thread Scott Wood
On Fri, 2014-07-11 at 14:09 +0530, Bharat Bhushan wrote: When userspace is debugging guest then MSR_DE is always set and MSRP_DEP is set so that guest cannot change MSR_DE. Guest debug resources are not yet emulated, So there seems no reason we should stop guest controlling MSR_DE. Also a

Re: [PATCH 6/6] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-07-28 Thread Scott Wood
On Fri, 2014-07-11 at 14:09 +0530, Bharat Bhushan wrote: This patch emulates debug registers and debug exception to support guest using debug resource. This enables running gdb/kgdb etc in guest. On BOOKE architecture we cannot share debug resources between QEMU and guest because: When

Re: [PATCH 6/6] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-07-28 Thread Scott Wood
On Mon, 2014-07-28 at 16:04 +0200, Alexander Graf wrote: On 11.07.14 10:39, Bharat Bhushan wrote: This patch emulates debug registers and debug exception to support guest using debug resource. This enables running gdb/kgdb etc in guest. On BOOKE architecture we cannot share debug

Re: [PATCH 1/6 v2] KVM: PPC: Book3E: Use common defines for SPE/FP/AltiVec int numbers

2014-07-28 Thread Scott Wood
On Mon, 2014-07-28 at 03:54 -0500, Caraman Mihai Claudiu-B02008 wrote: -Original Message- From: Wood Scott-B07421 Sent: Saturday, July 26, 2014 3:11 AM To: Caraman Mihai Claudiu-B02008 Cc: Alexander Graf; kvm-...@vger.kernel.org; kvm@vger.kernel.org;

Re: [PATCH 1/6] KVM: PPC: BOOKE: No need to set DBCR0_EDM in guest visible register

2014-07-28 Thread Scott Wood
On Fri, 2014-07-11 at 14:08 +0530, Bharat Bhushan wrote: This is not used and even I do not remember why this was added in first place. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/kvm/booke.c | 2 -- 1 file changed, 2 deletions(-) diff --git

Re: [PATCH 2/6] KVM: PPC: BOOKE: Force MSR_DE in rfci if guest is under debug

2014-07-28 Thread Scott Wood
On Fri, 2014-07-11 at 14:08 +0530, Bharat Bhushan wrote: When userspace (QEMU) is using the debug resource to debug guest then we want MSR_DE to be always set. This patch adds missing MSR_DE setting in rfci instruction. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com ---

Re: [PATCH 5/6] KVM: PPC: BOOKE: Allow guest to change MSR_DE

2014-07-28 Thread Scott Wood
On Fri, 2014-07-11 at 14:09 +0530, Bharat Bhushan wrote: When userspace is debugging guest then MSR_DE is always set and MSRP_DEP is set so that guest cannot change MSR_DE. Guest debug resources are not yet emulated, So there seems no reason we should stop guest controlling MSR_DE. Also a

Re: [PATCH 6/6] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-07-28 Thread Scott Wood
On Fri, 2014-07-11 at 14:09 +0530, Bharat Bhushan wrote: This patch emulates debug registers and debug exception to support guest using debug resource. This enables running gdb/kgdb etc in guest. On BOOKE architecture we cannot share debug resources between QEMU and guest because: When

Re: [PATCH 6/6] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-07-28 Thread Scott Wood
On Mon, 2014-07-28 at 16:04 +0200, Alexander Graf wrote: On 11.07.14 10:39, Bharat Bhushan wrote: This patch emulates debug registers and debug exception to support guest using debug resource. This enables running gdb/kgdb etc in guest. On BOOKE architecture we cannot share debug

Re: [PATCH 1/6 v2] KVM: PPC: Book3E: Use common defines for SPE/FP/AltiVec int numbers

2014-07-28 Thread Scott Wood
On Mon, 2014-07-28 at 03:54 -0500, Caraman Mihai Claudiu-B02008 wrote: -Original Message- From: Wood Scott-B07421 Sent: Saturday, July 26, 2014 3:11 AM To: Caraman Mihai Claudiu-B02008 Cc: Alexander Graf; kvm-ppc@vger.kernel.org; k...@vger.kernel.org;

Re: [PATCH 1/6 v2] KVM: PPC: Book3E: Use common defines for SPE/FP/AltiVec int numbers

2014-07-25 Thread Scott Wood
On Thu, 2014-07-24 at 04:16 -0500, Caraman Mihai Claudiu-B02008 wrote: Scott, Alex's request to define SPE handlers only for e500v2 implies changes in 32-bit FSL kernel to have exclusive configurations for e200/e500v2 and e500mc/e5500. We would probably need something like this, what's your

[PATCH] powerpc/e6500: Work around erratum A-008139

2014-07-25 Thread Scott Wood
code, TID clearing has been moved from tlb_miss_kernel_e6500 until after the SMT section. Signed-off-by: Scott Wood scottw...@freescale.com --- arch/powerpc/mm/tlb_low_64e.S | 68 +++ 1 file changed, 56 insertions(+), 12 deletions(-) diff --git a/arch

Re: [PATCH 1/6 v2] KVM: PPC: Book3E: Use common defines for SPE/FP/AltiVec int numbers

2014-07-25 Thread Scott Wood
On Thu, 2014-07-24 at 04:16 -0500, Caraman Mihai Claudiu-B02008 wrote: Scott, Alex's request to define SPE handlers only for e500v2 implies changes in 32-bit FSL kernel to have exclusive configurations for e200/e500v2 and e500mc/e5500. We would probably need something like this, what's your

[PATCH] powerpc/e6500: Work around erratum A-008139

2014-07-25 Thread Scott Wood
code, TID clearing has been moved from tlb_miss_kernel_e6500 until after the SMT section. Signed-off-by: Scott Wood scottw...@freescale.com --- arch/powerpc/mm/tlb_low_64e.S | 68 +++ 1 file changed, 56 insertions(+), 12 deletions(-) diff --git a/arch

Re: [PATCH] kvm: ppc: booke: Restore SPRG3 when entering guest

2014-07-17 Thread Scott Wood
On Thu, 2014-07-17 at 18:29 +0200, Alexander Graf wrote: On 17.07.14 18:27, Alexander Graf wrote: On 17.07.14 18:24, bharat.bhus...@freescale.com wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Thursday, July 17, 2014 9:41 PM To: Bhushan

Re: [PATCH] kvm: ppc: booke: Restore SPRG3 when entering guest

2014-07-17 Thread Scott Wood
On Fri, 2014-07-18 at 02:33 +0200, Alexander Graf wrote: On 18.07.14 02:28, Scott Wood wrote: On Thu, 2014-07-17 at 18:29 +0200, Alexander Graf wrote: On 17.07.14 18:27, Alexander Graf wrote: On 17.07.14 18:24, bharat.bhus...@freescale.com wrote: -Original Message- From

Re: [PATCH] kvm: ppc: booke: Restore SPRG3 when entering guest

2014-07-17 Thread Scott Wood
On Fri, 2014-07-18 at 02:37 +0200, Alexander Graf wrote: On 18.07.14 02:36, Scott Wood wrote: On Fri, 2014-07-18 at 02:33 +0200, Alexander Graf wrote: On 18.07.14 02:28, Scott Wood wrote: On Thu, 2014-07-17 at 18:29 +0200, Alexander Graf wrote: On 17.07.14 18:27, Alexander Graf wrote

Re: [PATCH 1/6 v2] kvm: ppc: bookehv: Added wrapper macros for shadow registers

2014-07-17 Thread Scott Wood
On Thu, 2014-07-17 at 17:01 +0530, Bharat Bhushan wrote: There are shadow registers like, GSPRG[0-3], GSRR0, GSRR1 etc on BOOKE-HV and these shadow registers are guest accessible. So these shadow registers needs to be updated on BOOKE-HV. This patch adds new macro for get/set helper of shadow

Re: [PATCH] kvm: ppc: booke: Restore SPRG3 when entering guest

2014-07-17 Thread Scott Wood
On Fri, 2014-07-18 at 02:33 +0200, Alexander Graf wrote: On 18.07.14 02:28, Scott Wood wrote: On Thu, 2014-07-17 at 18:29 +0200, Alexander Graf wrote: On 17.07.14 18:27, Alexander Graf wrote: On 17.07.14 18:24, bharat.bhus...@freescale.com wrote: -Original Message- From

Re: [PATCH] kvm: ppc: booke: Restore SPRG3 when entering guest

2014-07-17 Thread Scott Wood
On Fri, 2014-07-18 at 02:37 +0200, Alexander Graf wrote: On 18.07.14 02:36, Scott Wood wrote: On Fri, 2014-07-18 at 02:33 +0200, Alexander Graf wrote: On 18.07.14 02:28, Scott Wood wrote: On Thu, 2014-07-17 at 18:29 +0200, Alexander Graf wrote: On 17.07.14 18:27, Alexander Graf wrote

Re: [PATCH 1/6 v2] kvm: ppc: bookehv: Added wrapper macros for shadow registers

2014-07-17 Thread Scott Wood
On Thu, 2014-07-17 at 17:01 +0530, Bharat Bhushan wrote: There are shadow registers like, GSPRG[0-3], GSRR0, GSRR1 etc on BOOKE-HV and these shadow registers are guest accessible. So these shadow registers needs to be updated on BOOKE-HV. This patch adds new macro for get/set helper of shadow

Re: [RFC PATCH 2/4] KVM: PPC: Book3E: Handle LRAT error exception

2014-07-07 Thread Scott Wood
On Fri, 2014-07-04 at 10:15 +0200, Alexander Graf wrote: On 03.07.14 16:45, Mihai Caraman wrote: diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index a192975..ab1077f 100644 --- a/arch/powerpc/kvm/booke.c +++ b/arch/powerpc/kvm/booke.c @@ -1286,6 +1286,46 @@ int

Re: [RFC PATCH 3/4] KVM: PPC: e500: TLB emulation for IND entries

2014-07-07 Thread Scott Wood
On Thu, 2014-07-03 at 17:45 +0300, Mihai Caraman wrote: Handle indirect entries (IND) in TLB emulation code. Translation size of IND entries differ from the size of referred Page Tables (Linux guests now use IND of 2MB for 4KB PTs) and this require careful tweak of the existing logic. TLB

Re: [RFC PATCH 2/4] KVM: PPC: Book3E: Handle LRAT error exception

2014-07-07 Thread Scott Wood
On Fri, 2014-07-04 at 10:15 +0200, Alexander Graf wrote: On 03.07.14 16:45, Mihai Caraman wrote: diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index a192975..ab1077f 100644 --- a/arch/powerpc/kvm/booke.c +++ b/arch/powerpc/kvm/booke.c @@ -1286,6 +1286,46 @@ int

Re: [RFC PATCH 3/4] KVM: PPC: e500: TLB emulation for IND entries

2014-07-07 Thread Scott Wood
On Thu, 2014-07-03 at 17:45 +0300, Mihai Caraman wrote: Handle indirect entries (IND) in TLB emulation code. Translation size of IND entries differ from the size of referred Page Tables (Linux guests now use IND of 2MB for 4KB PTs) and this require careful tweak of the existing logic. TLB

Re: [PATCH 1/6 v2] KVM: PPC: Book3E: Use common defines for SPE/FP/AltiVec int numbers

2014-07-03 Thread Scott Wood
On Thu, 2014-07-03 at 10:25 -0500, Caraman Mihai Claudiu-B02008 wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Thursday, July 03, 2014 3:21 PM To: Caraman Mihai Claudiu-B02008; kvm-...@vger.kernel.org Cc: kvm@vger.kernel.org;

Re: [PATCH 1/6 v2] KVM: PPC: Book3E: Use common defines for SPE/FP/AltiVec int numbers

2014-07-03 Thread Scott Wood
On Thu, 2014-07-03 at 17:15 -0500, Scott Wood wrote: On Thu, 2014-07-03 at 10:25 -0500, Caraman Mihai Claudiu-B02008 wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Thursday, July 03, 2014 3:21 PM To: Caraman Mihai Claudiu-B02008; kvm

Re: [PATCH 1/6 v2] KVM: PPC: Book3E: Use common defines for SPE/FP/AltiVec int numbers

2014-07-03 Thread Scott Wood
On Fri, 2014-07-04 at 00:35 +0200, Alexander Graf wrote: On 04.07.14 00:31, Scott Wood wrote: On Thu, 2014-07-03 at 17:15 -0500, Scott Wood wrote: On Thu, 2014-07-03 at 10:25 -0500, Caraman Mihai Claudiu-B02008 wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de

  1   2   3   4   5   6   7   8   9   10   >