* Re: [PATCH] KVM: PPC: Make EPCR a valid field for booke64 and bookehv
@ 2012-12-03 16:47 ` Scott Wood
0 siblings, 0 replies; 9+ messages in thread
From: Scott Wood @ 2012-12-03 16:47 UTC (permalink / raw)
To: Alexander Graf
Cc: kvm-ppc, kvm@vger.kernel.org list, linuxppc-dev, Mihai Caraman
On 12/01/2012 07:58:25 AM, Alexander Graf wrote:
> In BookE, EPCR is defined and valid when either the HV or the 64bit
> category are implemented. Reflect this in the field definition.
>
> Today the only KVM target on 64bit is HV enabled, so there is no
> change in actual source code, but this keeps the code closer to the
> spec and doesn't build up artificial road blocks for a PR KVM
> on 64bit.
[snip]
> Signed-off-by: Alexander Graf <agraf@suse.de>
> ---
> arch/powerpc/include/asm/kvm_host.h | 9 +++++++--
> 1 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/kvm_host.h
> b/arch/powerpc/include/asm/kvm_host.h
> index 62fbd38..3480526 100644
> --- a/arch/powerpc/include/asm/kvm_host.h
> +++ b/arch/powerpc/include/asm/kvm_host.h
> @@ -405,14 +405,19 @@ struct kvm_vcpu_arch {
> #ifdef CONFIG_KVM_BOOKE_HV
> u32 host_mas4;
> u32 host_mas6;
> - u32 shadow_epcr;
> - u32 epcr;
> u32 shadow_msrp;
> u32 eplc;
> u32 epsc;
> u32 oldpir;
> #endif
>
> +#if defined(CONFIG_BOOKE)
> +#if defined(CONFIG_KVM_BOOKE_HV) || defined(CONFIG_64BIT)
> + u32 shadow_epcr;
> + u32 epcr;
> +#endif
> +#endif
On a PR-mode implementation, why would we be have a shadow_epcr? It
would always be set based on the host kernel, just like when running
any other userspace process.
-Scott
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] KVM: PPC: Make EPCR a valid field for booke64 and bookehv
@ 2012-12-03 16:47 ` Scott Wood
0 siblings, 0 replies; 9+ messages in thread
From: Scott Wood @ 2012-12-03 16:47 UTC (permalink / raw)
To: Alexander Graf
Cc: Mihai Caraman, linuxppc-dev, kvm@vger.kernel.org list, kvm-ppc
On 12/01/2012 07:58:25 AM, Alexander Graf wrote:
> In BookE, EPCR is defined and valid when either the HV or the 64bit
> category are implemented. Reflect this in the field definition.
>=20
> Today the only KVM target on 64bit is HV enabled, so there is no
> change in actual source code, but this keeps the code closer to the
> spec and doesn't build up artificial road blocks for a PR KVM
> on 64bit.
[snip]
> Signed-off-by: Alexander Graf <agraf@suse.de>
> ---
> arch/powerpc/include/asm/kvm_host.h | 9 +++++++--
> 1 files changed, 7 insertions(+), 2 deletions(-)
>=20
> diff --git a/arch/powerpc/include/asm/kvm_host.h =20
> b/arch/powerpc/include/asm/kvm_host.h
> index 62fbd38..3480526 100644
> --- a/arch/powerpc/include/asm/kvm_host.h
> +++ b/arch/powerpc/include/asm/kvm_host.h
> @@ -405,14 +405,19 @@ struct kvm_vcpu_arch {
> #ifdef CONFIG_KVM_BOOKE_HV
> u32 host_mas4;
> u32 host_mas6;
> - u32 shadow_epcr;
> - u32 epcr;
> u32 shadow_msrp;
> u32 eplc;
> u32 epsc;
> u32 oldpir;
> #endif
>=20
> +#if defined(CONFIG_BOOKE)
> +#if defined(CONFIG_KVM_BOOKE_HV) || defined(CONFIG_64BIT)
> + u32 shadow_epcr;
> + u32 epcr;
> +#endif
> +#endif
On a PR-mode implementation, why would we be have a shadow_epcr? It =20
would always be set based on the host kernel, just like when running =20
any other userspace process.
-Scott=
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] KVM: PPC: Make EPCR a valid field for booke64 and bookehv
2012-12-03 16:47 ` Scott Wood
(?)
@ 2012-12-03 17:38 ` Alexander Graf
-1 siblings, 0 replies; 9+ messages in thread
From: Alexander Graf @ 2012-12-03 17:38 UTC (permalink / raw)
To: Scott Wood; +Cc: kvm-ppc, kvm@vger.kernel.org list, linuxppc-dev, Mihai Caraman
On 03.12.2012, at 17:47, Scott Wood wrote:
> On 12/01/2012 07:58:25 AM, Alexander Graf wrote:
>> In BookE, EPCR is defined and valid when either the HV or the 64bit
>> category are implemented. Reflect this in the field definition.
>> Today the only KVM target on 64bit is HV enabled, so there is no
>> change in actual source code, but this keeps the code closer to the
>> spec and doesn't build up artificial road blocks for a PR KVM
>> on 64bit.
> [snip]
>> Signed-off-by: Alexander Graf <agraf@suse.de>
>> ---
>> arch/powerpc/include/asm/kvm_host.h | 9 +++++++--
>> 1 files changed, 7 insertions(+), 2 deletions(-)
>> diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h
>> index 62fbd38..3480526 100644
>> --- a/arch/powerpc/include/asm/kvm_host.h
>> +++ b/arch/powerpc/include/asm/kvm_host.h
>> @@ -405,14 +405,19 @@ struct kvm_vcpu_arch {
>> #ifdef CONFIG_KVM_BOOKE_HV
>> u32 host_mas4;
>> u32 host_mas6;
>> - u32 shadow_epcr;
>> - u32 epcr;
>> u32 shadow_msrp;
>> u32 eplc;
>> u32 epsc;
>> u32 oldpir;
>> #endif
>> +#if defined(CONFIG_BOOKE)
>> +#if defined(CONFIG_KVM_BOOKE_HV) || defined(CONFIG_64BIT)
>> + u32 shadow_epcr;
>> + u32 epcr;
>> +#endif
>> +#endif
>
> On a PR-mode implementation, why would we be have a shadow_epcr? It would always be set based on the host kernel, just like when running any other userspace process.
Right - we could simply set MSR_CM. I'll move shadow_epcr back into the HV only bit above.
Alex
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] KVM: PPC: Make EPCR a valid field for booke64 and bookehv
@ 2012-12-03 17:38 ` Alexander Graf
0 siblings, 0 replies; 9+ messages in thread
From: Alexander Graf @ 2012-12-03 17:38 UTC (permalink / raw)
To: Scott Wood; +Cc: kvm-ppc, kvm@vger.kernel.org list, linuxppc-dev, Mihai Caraman
On 03.12.2012, at 17:47, Scott Wood wrote:
> On 12/01/2012 07:58:25 AM, Alexander Graf wrote:
>> In BookE, EPCR is defined and valid when either the HV or the 64bit
>> category are implemented. Reflect this in the field definition.
>> Today the only KVM target on 64bit is HV enabled, so there is no
>> change in actual source code, but this keeps the code closer to the
>> spec and doesn't build up artificial road blocks for a PR KVM
>> on 64bit.
> [snip]
>> Signed-off-by: Alexander Graf <agraf@suse.de>
>> ---
>> arch/powerpc/include/asm/kvm_host.h | 9 +++++++--
>> 1 files changed, 7 insertions(+), 2 deletions(-)
>> diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h
>> index 62fbd38..3480526 100644
>> --- a/arch/powerpc/include/asm/kvm_host.h
>> +++ b/arch/powerpc/include/asm/kvm_host.h
>> @@ -405,14 +405,19 @@ struct kvm_vcpu_arch {
>> #ifdef CONFIG_KVM_BOOKE_HV
>> u32 host_mas4;
>> u32 host_mas6;
>> - u32 shadow_epcr;
>> - u32 epcr;
>> u32 shadow_msrp;
>> u32 eplc;
>> u32 epsc;
>> u32 oldpir;
>> #endif
>> +#if defined(CONFIG_BOOKE)
>> +#if defined(CONFIG_KVM_BOOKE_HV) || defined(CONFIG_64BIT)
>> + u32 shadow_epcr;
>> + u32 epcr;
>> +#endif
>> +#endif
>
> On a PR-mode implementation, why would we be have a shadow_epcr? It would always be set based on the host kernel, just like when running any other userspace process.
Right - we could simply set MSR_CM. I'll move shadow_epcr back into the HV only bit above.
Alex
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] KVM: PPC: Make EPCR a valid field for booke64 and bookehv
@ 2012-12-03 17:38 ` Alexander Graf
0 siblings, 0 replies; 9+ messages in thread
From: Alexander Graf @ 2012-12-03 17:38 UTC (permalink / raw)
To: Scott Wood; +Cc: Mihai Caraman, linuxppc-dev, kvm@vger.kernel.org list, kvm-ppc
On 03.12.2012, at 17:47, Scott Wood wrote:
> On 12/01/2012 07:58:25 AM, Alexander Graf wrote:
>> In BookE, EPCR is defined and valid when either the HV or the 64bit
>> category are implemented. Reflect this in the field definition.
>> Today the only KVM target on 64bit is HV enabled, so there is no
>> change in actual source code, but this keeps the code closer to the
>> spec and doesn't build up artificial road blocks for a PR KVM
>> on 64bit.
> [snip]
>> Signed-off-by: Alexander Graf <agraf@suse.de>
>> ---
>> arch/powerpc/include/asm/kvm_host.h | 9 +++++++--
>> 1 files changed, 7 insertions(+), 2 deletions(-)
>> diff --git a/arch/powerpc/include/asm/kvm_host.h =
b/arch/powerpc/include/asm/kvm_host.h
>> index 62fbd38..3480526 100644
>> --- a/arch/powerpc/include/asm/kvm_host.h
>> +++ b/arch/powerpc/include/asm/kvm_host.h
>> @@ -405,14 +405,19 @@ struct kvm_vcpu_arch {
>> #ifdef CONFIG_KVM_BOOKE_HV
>> u32 host_mas4;
>> u32 host_mas6;
>> - u32 shadow_epcr;
>> - u32 epcr;
>> u32 shadow_msrp;
>> u32 eplc;
>> u32 epsc;
>> u32 oldpir;
>> #endif
>> +#if defined(CONFIG_BOOKE)
>> +#if defined(CONFIG_KVM_BOOKE_HV) || defined(CONFIG_64BIT)
>> + u32 shadow_epcr;
>> + u32 epcr;
>> +#endif
>> +#endif
>=20
> On a PR-mode implementation, why would we be have a shadow_epcr? It =
would always be set based on the host kernel, just like when running any =
other userspace process.
Right - we could simply set MSR_CM. I'll move shadow_epcr back into the =
HV only bit above.
Alex
^ permalink raw reply [flat|nested] 9+ messages in thread