All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm/arm64: KVM: Add support for ARMv8 AArch32 execution state
@ 2016-09-23  7:13 ` Alison Wang
  0 siblings, 0 replies; 9+ messages in thread
From: Alison Wang @ 2016-09-23  7:13 UTC (permalink / raw)
  To: christoffer.dall, marc.zyngier, rkrcmar, linux, linux-arm-kernel,
	kvmarm, kvm, linux-kernel
  Cc: jason.jin, alison.wang

The ARMv8 architecture supports two execution state, AArch64 and
AArch32. To support KVM in AArch32 execution state for ARMv8, Cortex-A53
and Cortex-A72 need to be added for target-specific checks.

Signed-off-by: Alison Wang <alison.wang@nxp.com>
---
 arch/arm/include/asm/cputype.h | 2 ++
 arch/arm/kvm/guest.c           | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h
index 754f86f..4f8c632 100644
--- a/arch/arm/include/asm/cputype.h
+++ b/arch/arm/include/asm/cputype.h
@@ -75,6 +75,8 @@
 #define ARM_CPU_PART_CORTEX_A12		0x4100c0d0
 #define ARM_CPU_PART_CORTEX_A17		0x4100c0e0
 #define ARM_CPU_PART_CORTEX_A15		0x4100c0f0
+#define ARM_CPU_PART_CORTEX_A53_AARCH32	0x4100d030
+#define ARM_CPU_PART_CORTEX_A72_AARCH32	0x4100d080
 #define ARM_CPU_PART_MASK		0xff00fff0
 
 /* DEC implemented cores */
diff --git a/arch/arm/kvm/guest.c b/arch/arm/kvm/guest.c
index 9aca920..462a099 100644
--- a/arch/arm/kvm/guest.c
+++ b/arch/arm/kvm/guest.c
@@ -252,6 +252,8 @@ int __attribute_const__ kvm_target_cpu(void)
 {
 	switch (read_cpuid_part()) {
 	case ARM_CPU_PART_CORTEX_A7:
+	case ARM_CPU_PART_CORTEX_A53_AARCH32:
+	case ARM_CPU_PART_CORTEX_A72_AARCH32:
 		return KVM_ARM_TARGET_CORTEX_A7;
 	case ARM_CPU_PART_CORTEX_A15:
 		return KVM_ARM_TARGET_CORTEX_A15;
-- 
2.1.0.27.g96db324

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH] arm/arm64: KVM: Add support for ARMv8 AArch32 execution state
@ 2016-09-23  7:13 ` Alison Wang
  0 siblings, 0 replies; 9+ messages in thread
From: Alison Wang @ 2016-09-23  7:13 UTC (permalink / raw)
  To: christoffer.dall, marc.zyngier, rkrcmar, linux, linux-arm-kernel,
	kvmarm, kvm, linux-kernel
  Cc: jason.jin, alison.wang

The ARMv8 architecture supports two execution state, AArch64 and
AArch32. To support KVM in AArch32 execution state for ARMv8, Cortex-A53
and Cortex-A72 need to be added for target-specific checks.

Signed-off-by: Alison Wang <alison.wang@nxp.com>
---
 arch/arm/include/asm/cputype.h | 2 ++
 arch/arm/kvm/guest.c           | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h
index 754f86f..4f8c632 100644
--- a/arch/arm/include/asm/cputype.h
+++ b/arch/arm/include/asm/cputype.h
@@ -75,6 +75,8 @@
 #define ARM_CPU_PART_CORTEX_A12		0x4100c0d0
 #define ARM_CPU_PART_CORTEX_A17		0x4100c0e0
 #define ARM_CPU_PART_CORTEX_A15		0x4100c0f0
+#define ARM_CPU_PART_CORTEX_A53_AARCH32	0x4100d030
+#define ARM_CPU_PART_CORTEX_A72_AARCH32	0x4100d080
 #define ARM_CPU_PART_MASK		0xff00fff0
 
 /* DEC implemented cores */
diff --git a/arch/arm/kvm/guest.c b/arch/arm/kvm/guest.c
index 9aca920..462a099 100644
--- a/arch/arm/kvm/guest.c
+++ b/arch/arm/kvm/guest.c
@@ -252,6 +252,8 @@ int __attribute_const__ kvm_target_cpu(void)
 {
 	switch (read_cpuid_part()) {
 	case ARM_CPU_PART_CORTEX_A7:
+	case ARM_CPU_PART_CORTEX_A53_AARCH32:
+	case ARM_CPU_PART_CORTEX_A72_AARCH32:
 		return KVM_ARM_TARGET_CORTEX_A7;
 	case ARM_CPU_PART_CORTEX_A15:
 		return KVM_ARM_TARGET_CORTEX_A15;
-- 
2.1.0.27.g96db324

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH] arm/arm64: KVM: Add support for ARMv8 AArch32 execution state
@ 2016-09-23  7:13 ` Alison Wang
  0 siblings, 0 replies; 9+ messages in thread
From: Alison Wang @ 2016-09-23  7:13 UTC (permalink / raw)
  To: linux-arm-kernel

The ARMv8 architecture supports two execution state, AArch64 and
AArch32. To support KVM in AArch32 execution state for ARMv8, Cortex-A53
and Cortex-A72 need to be added for target-specific checks.

Signed-off-by: Alison Wang <alison.wang@nxp.com>
---
 arch/arm/include/asm/cputype.h | 2 ++
 arch/arm/kvm/guest.c           | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h
index 754f86f..4f8c632 100644
--- a/arch/arm/include/asm/cputype.h
+++ b/arch/arm/include/asm/cputype.h
@@ -75,6 +75,8 @@
 #define ARM_CPU_PART_CORTEX_A12		0x4100c0d0
 #define ARM_CPU_PART_CORTEX_A17		0x4100c0e0
 #define ARM_CPU_PART_CORTEX_A15		0x4100c0f0
+#define ARM_CPU_PART_CORTEX_A53_AARCH32	0x4100d030
+#define ARM_CPU_PART_CORTEX_A72_AARCH32	0x4100d080
 #define ARM_CPU_PART_MASK		0xff00fff0
 
 /* DEC implemented cores */
diff --git a/arch/arm/kvm/guest.c b/arch/arm/kvm/guest.c
index 9aca920..462a099 100644
--- a/arch/arm/kvm/guest.c
+++ b/arch/arm/kvm/guest.c
@@ -252,6 +252,8 @@ int __attribute_const__ kvm_target_cpu(void)
 {
 	switch (read_cpuid_part()) {
 	case ARM_CPU_PART_CORTEX_A7:
+	case ARM_CPU_PART_CORTEX_A53_AARCH32:
+	case ARM_CPU_PART_CORTEX_A72_AARCH32:
 		return KVM_ARM_TARGET_CORTEX_A7;
 	case ARM_CPU_PART_CORTEX_A15:
 		return KVM_ARM_TARGET_CORTEX_A15;
-- 
2.1.0.27.g96db324

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] arm/arm64: KVM: Add support for ARMv8 AArch32 execution state
  2016-09-23  7:13 ` Alison Wang
  (?)
@ 2016-09-23  9:25   ` Christoffer Dall
  -1 siblings, 0 replies; 9+ messages in thread
From: Christoffer Dall @ 2016-09-23  9:25 UTC (permalink / raw)
  To: Alison Wang
  Cc: marc.zyngier, rkrcmar, linux, linux-arm-kernel, kvmarm, kvm,
	linux-kernel, jason.jin, alison.wang

On Fri, Sep 23, 2016 at 03:13:25PM +0800, Alison Wang wrote:
> The ARMv8 architecture supports two execution state, AArch64 and
> AArch32. To support KVM in AArch32 execution state for ARMv8, Cortex-A53
> and Cortex-A72 need to be added for target-specific checks.
> 
> Signed-off-by: Alison Wang <alison.wang@nxp.com>
> ---
>  arch/arm/include/asm/cputype.h | 2 ++
>  arch/arm/kvm/guest.c           | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h
> index 754f86f..4f8c632 100644
> --- a/arch/arm/include/asm/cputype.h
> +++ b/arch/arm/include/asm/cputype.h
> @@ -75,6 +75,8 @@
>  #define ARM_CPU_PART_CORTEX_A12		0x4100c0d0
>  #define ARM_CPU_PART_CORTEX_A17		0x4100c0e0
>  #define ARM_CPU_PART_CORTEX_A15		0x4100c0f0
> +#define ARM_CPU_PART_CORTEX_A53_AARCH32	0x4100d030
> +#define ARM_CPU_PART_CORTEX_A72_AARCH32	0x4100d080
>  #define ARM_CPU_PART_MASK		0xff00fff0
>  
>  /* DEC implemented cores */
> diff --git a/arch/arm/kvm/guest.c b/arch/arm/kvm/guest.c
> index 9aca920..462a099 100644
> --- a/arch/arm/kvm/guest.c
> +++ b/arch/arm/kvm/guest.c
> @@ -252,6 +252,8 @@ int __attribute_const__ kvm_target_cpu(void)
>  {
>  	switch (read_cpuid_part()) {
>  	case ARM_CPU_PART_CORTEX_A7:
> +	case ARM_CPU_PART_CORTEX_A53_AARCH32:
> +	case ARM_CPU_PART_CORTEX_A72_AARCH32:

huh?  why are we mapping A53 and A72 cores to an A7 core?

-Christoffer

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] arm/arm64: KVM: Add support for ARMv8 AArch32 execution state
@ 2016-09-23  9:25   ` Christoffer Dall
  0 siblings, 0 replies; 9+ messages in thread
From: Christoffer Dall @ 2016-09-23  9:25 UTC (permalink / raw)
  To: Alison Wang
  Cc: jason.jin, kvm, marc.zyngier, alison.wang, linux, linux-kernel,
	kvmarm, linux-arm-kernel

On Fri, Sep 23, 2016 at 03:13:25PM +0800, Alison Wang wrote:
> The ARMv8 architecture supports two execution state, AArch64 and
> AArch32. To support KVM in AArch32 execution state for ARMv8, Cortex-A53
> and Cortex-A72 need to be added for target-specific checks.
> 
> Signed-off-by: Alison Wang <alison.wang@nxp.com>
> ---
>  arch/arm/include/asm/cputype.h | 2 ++
>  arch/arm/kvm/guest.c           | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h
> index 754f86f..4f8c632 100644
> --- a/arch/arm/include/asm/cputype.h
> +++ b/arch/arm/include/asm/cputype.h
> @@ -75,6 +75,8 @@
>  #define ARM_CPU_PART_CORTEX_A12		0x4100c0d0
>  #define ARM_CPU_PART_CORTEX_A17		0x4100c0e0
>  #define ARM_CPU_PART_CORTEX_A15		0x4100c0f0
> +#define ARM_CPU_PART_CORTEX_A53_AARCH32	0x4100d030
> +#define ARM_CPU_PART_CORTEX_A72_AARCH32	0x4100d080
>  #define ARM_CPU_PART_MASK		0xff00fff0
>  
>  /* DEC implemented cores */
> diff --git a/arch/arm/kvm/guest.c b/arch/arm/kvm/guest.c
> index 9aca920..462a099 100644
> --- a/arch/arm/kvm/guest.c
> +++ b/arch/arm/kvm/guest.c
> @@ -252,6 +252,8 @@ int __attribute_const__ kvm_target_cpu(void)
>  {
>  	switch (read_cpuid_part()) {
>  	case ARM_CPU_PART_CORTEX_A7:
> +	case ARM_CPU_PART_CORTEX_A53_AARCH32:
> +	case ARM_CPU_PART_CORTEX_A72_AARCH32:

huh?  why are we mapping A53 and A72 cores to an A7 core?

-Christoffer

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] arm/arm64: KVM: Add support for ARMv8 AArch32 execution state
@ 2016-09-23  9:25   ` Christoffer Dall
  0 siblings, 0 replies; 9+ messages in thread
From: Christoffer Dall @ 2016-09-23  9:25 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Sep 23, 2016 at 03:13:25PM +0800, Alison Wang wrote:
> The ARMv8 architecture supports two execution state, AArch64 and
> AArch32. To support KVM in AArch32 execution state for ARMv8, Cortex-A53
> and Cortex-A72 need to be added for target-specific checks.
> 
> Signed-off-by: Alison Wang <alison.wang@nxp.com>
> ---
>  arch/arm/include/asm/cputype.h | 2 ++
>  arch/arm/kvm/guest.c           | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h
> index 754f86f..4f8c632 100644
> --- a/arch/arm/include/asm/cputype.h
> +++ b/arch/arm/include/asm/cputype.h
> @@ -75,6 +75,8 @@
>  #define ARM_CPU_PART_CORTEX_A12		0x4100c0d0
>  #define ARM_CPU_PART_CORTEX_A17		0x4100c0e0
>  #define ARM_CPU_PART_CORTEX_A15		0x4100c0f0
> +#define ARM_CPU_PART_CORTEX_A53_AARCH32	0x4100d030
> +#define ARM_CPU_PART_CORTEX_A72_AARCH32	0x4100d080
>  #define ARM_CPU_PART_MASK		0xff00fff0
>  
>  /* DEC implemented cores */
> diff --git a/arch/arm/kvm/guest.c b/arch/arm/kvm/guest.c
> index 9aca920..462a099 100644
> --- a/arch/arm/kvm/guest.c
> +++ b/arch/arm/kvm/guest.c
> @@ -252,6 +252,8 @@ int __attribute_const__ kvm_target_cpu(void)
>  {
>  	switch (read_cpuid_part()) {
>  	case ARM_CPU_PART_CORTEX_A7:
> +	case ARM_CPU_PART_CORTEX_A53_AARCH32:
> +	case ARM_CPU_PART_CORTEX_A72_AARCH32:

huh?  why are we mapping A53 and A72 cores to an A7 core?

-Christoffer

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] arm/arm64: KVM: Add support for ARMv8 AArch32 execution state
  2016-09-23  9:25   ` Christoffer Dall
  (?)
@ 2016-09-23  9:30     ` Marc Zyngier
  -1 siblings, 0 replies; 9+ messages in thread
From: Marc Zyngier @ 2016-09-23  9:30 UTC (permalink / raw)
  To: Christoffer Dall, Alison Wang
  Cc: rkrcmar, linux, linux-arm-kernel, kvmarm, kvm, linux-kernel,
	jason.jin, alison.wang

On 23/09/16 10:25, Christoffer Dall wrote:
> On Fri, Sep 23, 2016 at 03:13:25PM +0800, Alison Wang wrote:
>> The ARMv8 architecture supports two execution state, AArch64 and
>> AArch32. To support KVM in AArch32 execution state for ARMv8, Cortex-A53
>> and Cortex-A72 need to be added for target-specific checks.
>>
>> Signed-off-by: Alison Wang <alison.wang@nxp.com>
>> ---
>>  arch/arm/include/asm/cputype.h | 2 ++
>>  arch/arm/kvm/guest.c           | 2 ++
>>  2 files changed, 4 insertions(+)
>>
>> diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h
>> index 754f86f..4f8c632 100644
>> --- a/arch/arm/include/asm/cputype.h
>> +++ b/arch/arm/include/asm/cputype.h
>> @@ -75,6 +75,8 @@
>>  #define ARM_CPU_PART_CORTEX_A12		0x4100c0d0
>>  #define ARM_CPU_PART_CORTEX_A17		0x4100c0e0
>>  #define ARM_CPU_PART_CORTEX_A15		0x4100c0f0
>> +#define ARM_CPU_PART_CORTEX_A53_AARCH32	0x4100d030
>> +#define ARM_CPU_PART_CORTEX_A72_AARCH32	0x4100d080
>>  #define ARM_CPU_PART_MASK		0xff00fff0
>>  
>>  /* DEC implemented cores */
>> diff --git a/arch/arm/kvm/guest.c b/arch/arm/kvm/guest.c
>> index 9aca920..462a099 100644
>> --- a/arch/arm/kvm/guest.c
>> +++ b/arch/arm/kvm/guest.c
>> @@ -252,6 +252,8 @@ int __attribute_const__ kvm_target_cpu(void)
>>  {
>>  	switch (read_cpuid_part()) {
>>  	case ARM_CPU_PART_CORTEX_A7:
>> +	case ARM_CPU_PART_CORTEX_A53_AARCH32:
>> +	case ARM_CPU_PART_CORTEX_A72_AARCH32:
> 
> huh?  why are we mapping A53 and A72 cores to an A7 core?

Yeah, that's absolutely disgusting. The only sensible thing to do would
be to implement something "generic", just like we have on the 64bit side.

As it stands, this patch falls into the "No way" bucket.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] arm/arm64: KVM: Add support for ARMv8 AArch32 execution state
@ 2016-09-23  9:30     ` Marc Zyngier
  0 siblings, 0 replies; 9+ messages in thread
From: Marc Zyngier @ 2016-09-23  9:30 UTC (permalink / raw)
  To: Christoffer Dall, Alison Wang
  Cc: jason.jin, kvm, alison.wang, linux-kernel, linux, kvmarm,
	linux-arm-kernel

On 23/09/16 10:25, Christoffer Dall wrote:
> On Fri, Sep 23, 2016 at 03:13:25PM +0800, Alison Wang wrote:
>> The ARMv8 architecture supports two execution state, AArch64 and
>> AArch32. To support KVM in AArch32 execution state for ARMv8, Cortex-A53
>> and Cortex-A72 need to be added for target-specific checks.
>>
>> Signed-off-by: Alison Wang <alison.wang@nxp.com>
>> ---
>>  arch/arm/include/asm/cputype.h | 2 ++
>>  arch/arm/kvm/guest.c           | 2 ++
>>  2 files changed, 4 insertions(+)
>>
>> diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h
>> index 754f86f..4f8c632 100644
>> --- a/arch/arm/include/asm/cputype.h
>> +++ b/arch/arm/include/asm/cputype.h
>> @@ -75,6 +75,8 @@
>>  #define ARM_CPU_PART_CORTEX_A12		0x4100c0d0
>>  #define ARM_CPU_PART_CORTEX_A17		0x4100c0e0
>>  #define ARM_CPU_PART_CORTEX_A15		0x4100c0f0
>> +#define ARM_CPU_PART_CORTEX_A53_AARCH32	0x4100d030
>> +#define ARM_CPU_PART_CORTEX_A72_AARCH32	0x4100d080
>>  #define ARM_CPU_PART_MASK		0xff00fff0
>>  
>>  /* DEC implemented cores */
>> diff --git a/arch/arm/kvm/guest.c b/arch/arm/kvm/guest.c
>> index 9aca920..462a099 100644
>> --- a/arch/arm/kvm/guest.c
>> +++ b/arch/arm/kvm/guest.c
>> @@ -252,6 +252,8 @@ int __attribute_const__ kvm_target_cpu(void)
>>  {
>>  	switch (read_cpuid_part()) {
>>  	case ARM_CPU_PART_CORTEX_A7:
>> +	case ARM_CPU_PART_CORTEX_A53_AARCH32:
>> +	case ARM_CPU_PART_CORTEX_A72_AARCH32:
> 
> huh?  why are we mapping A53 and A72 cores to an A7 core?

Yeah, that's absolutely disgusting. The only sensible thing to do would
be to implement something "generic", just like we have on the 64bit side.

As it stands, this patch falls into the "No way" bucket.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] arm/arm64: KVM: Add support for ARMv8 AArch32 execution state
@ 2016-09-23  9:30     ` Marc Zyngier
  0 siblings, 0 replies; 9+ messages in thread
From: Marc Zyngier @ 2016-09-23  9:30 UTC (permalink / raw)
  To: linux-arm-kernel

On 23/09/16 10:25, Christoffer Dall wrote:
> On Fri, Sep 23, 2016 at 03:13:25PM +0800, Alison Wang wrote:
>> The ARMv8 architecture supports two execution state, AArch64 and
>> AArch32. To support KVM in AArch32 execution state for ARMv8, Cortex-A53
>> and Cortex-A72 need to be added for target-specific checks.
>>
>> Signed-off-by: Alison Wang <alison.wang@nxp.com>
>> ---
>>  arch/arm/include/asm/cputype.h | 2 ++
>>  arch/arm/kvm/guest.c           | 2 ++
>>  2 files changed, 4 insertions(+)
>>
>> diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h
>> index 754f86f..4f8c632 100644
>> --- a/arch/arm/include/asm/cputype.h
>> +++ b/arch/arm/include/asm/cputype.h
>> @@ -75,6 +75,8 @@
>>  #define ARM_CPU_PART_CORTEX_A12		0x4100c0d0
>>  #define ARM_CPU_PART_CORTEX_A17		0x4100c0e0
>>  #define ARM_CPU_PART_CORTEX_A15		0x4100c0f0
>> +#define ARM_CPU_PART_CORTEX_A53_AARCH32	0x4100d030
>> +#define ARM_CPU_PART_CORTEX_A72_AARCH32	0x4100d080
>>  #define ARM_CPU_PART_MASK		0xff00fff0
>>  
>>  /* DEC implemented cores */
>> diff --git a/arch/arm/kvm/guest.c b/arch/arm/kvm/guest.c
>> index 9aca920..462a099 100644
>> --- a/arch/arm/kvm/guest.c
>> +++ b/arch/arm/kvm/guest.c
>> @@ -252,6 +252,8 @@ int __attribute_const__ kvm_target_cpu(void)
>>  {
>>  	switch (read_cpuid_part()) {
>>  	case ARM_CPU_PART_CORTEX_A7:
>> +	case ARM_CPU_PART_CORTEX_A53_AARCH32:
>> +	case ARM_CPU_PART_CORTEX_A72_AARCH32:
> 
> huh?  why are we mapping A53 and A72 cores to an A7 core?

Yeah, that's absolutely disgusting. The only sensible thing to do would
be to implement something "generic", just like we have on the 64bit side.

As it stands, this patch falls into the "No way" bucket.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-09-23  9:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-23  7:13 [PATCH] arm/arm64: KVM: Add support for ARMv8 AArch32 execution state Alison Wang
2016-09-23  7:13 ` Alison Wang
2016-09-23  7:13 ` Alison Wang
2016-09-23  9:25 ` Christoffer Dall
2016-09-23  9:25   ` Christoffer Dall
2016-09-23  9:25   ` Christoffer Dall
2016-09-23  9:30   ` Marc Zyngier
2016-09-23  9:30     ` Marc Zyngier
2016-09-23  9:30     ` Marc Zyngier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.