* [PATCH] arm64: KVM: Enable minimalistic support for Thunder
@ 2015-06-26 19:51 Tirumalesh Chalamarla
2015-06-29 8:53 ` Marc Zyngier
0 siblings, 1 reply; 6+ messages in thread
From: Tirumalesh Chalamarla @ 2015-06-26 19:51 UTC (permalink / raw)
To: kvmarm
Cc: linux-arm-kernel, linux-kernel, rrichter, will.deacon,
andre.przywara, Tirumalesh Chalamarla
In order to allow KVM to run on Thunder implementations, add the
minimal support required.
Signed-off-by: Tirumalesh Chalamarla <tchalamarla@caviumnetworks.com>
---
arch/arm64/include/asm/cputype.h | 3 +++
arch/arm64/include/uapi/asm/kvm.h | 3 ++-
arch/arm64/kvm/guest.c | 6 ++++++
arch/arm64/kvm/sys_regs_generic_v8.c | 2 ++
4 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/include/asm/cputype.h b/arch/arm64/include/asm/cputype.h
index a84ec60..f603dcd 100644
--- a/arch/arm64/include/asm/cputype.h
+++ b/arch/arm64/include/asm/cputype.h
@@ -63,6 +63,7 @@
((partnum) << MIDR_PARTNUM_SHIFT))
#define ARM_CPU_IMP_ARM 0x41
+#define ARM_CPU_IMP_CAVIUM 0x43
#define ARM_CPU_IMP_APM 0x50
#define ARM_CPU_PART_AEM_V8 0xD0F
@@ -72,6 +73,8 @@
#define APM_CPU_PART_POTENZA 0x000
+#define ARM_CPU_PART_THUNDER 0x0A1
+
#define ID_AA64MMFR0_BIGENDEL0_SHIFT 16
#define ID_AA64MMFR0_BIGENDEL0_MASK (0xf << ID_AA64MMFR0_BIGENDEL0_SHIFT)
#define ID_AA64MMFR0_BIGENDEL0(mmfr0) \
diff --git a/arch/arm64/include/uapi/asm/kvm.h b/arch/arm64/include/uapi/asm/kvm.h
index d268320..6c4c556 100644
--- a/arch/arm64/include/uapi/asm/kvm.h
+++ b/arch/arm64/include/uapi/asm/kvm.h
@@ -59,8 +59,9 @@ struct kvm_regs {
#define KVM_ARM_TARGET_CORTEX_A57 2
#define KVM_ARM_TARGET_XGENE_POTENZA 3
#define KVM_ARM_TARGET_CORTEX_A53 4
+#define KVM_ARM_TARGET_CAVIUM_THUNDER 5
-#define KVM_ARM_NUM_TARGETS 5
+#define KVM_ARM_NUM_TARGETS 6
/* KVM_ARM_SET_DEVICE_ADDR ioctl id encoding */
#define KVM_ARM_DEVICE_TYPE_SHIFT 0
diff --git a/arch/arm64/kvm/guest.c b/arch/arm64/kvm/guest.c
index 9535bd5..3751f37 100644
--- a/arch/arm64/kvm/guest.c
+++ b/arch/arm64/kvm/guest.c
@@ -291,6 +291,12 @@ int __attribute_const__ kvm_target_cpu(void)
return KVM_ARM_TARGET_XGENE_POTENZA;
};
break;
+ case ARM_CPU_IMP_CAVIUM:
+ switch (part_number) {
+ case ARM_CPU_PART_THUNDER:
+ return KVM_ARM_TARGET_CAVIUM_THUNDER;
+ };
+ break;
};
return -EINVAL;
diff --git a/arch/arm64/kvm/sys_regs_generic_v8.c b/arch/arm64/kvm/sys_regs_generic_v8.c
index 475fd29..0e48ee8 100644
--- a/arch/arm64/kvm/sys_regs_generic_v8.c
+++ b/arch/arm64/kvm/sys_regs_generic_v8.c
@@ -94,6 +94,8 @@ static int __init sys_reg_genericv8_init(void)
&genericv8_target_table);
kvm_register_target_sys_reg_table(KVM_ARM_TARGET_XGENE_POTENZA,
&genericv8_target_table);
+ kvm_register_target_sys_reg_table(KVM_ARM_TARGET_CAVIUM_THUNDER,
+ &genericv8_target_table);
return 0;
}
--
2.1.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64: KVM: Enable minimalistic support for Thunder
2015-06-26 19:51 [PATCH] arm64: KVM: Enable minimalistic support for Thunder Tirumalesh Chalamarla
@ 2015-06-29 8:53 ` Marc Zyngier
2015-06-29 17:06 ` Chalamarla, Tirumalesh
0 siblings, 1 reply; 6+ messages in thread
From: Marc Zyngier @ 2015-06-29 8:53 UTC (permalink / raw)
To: Tirumalesh Chalamarla, kvmarm
Cc: andre.przywara, will.deacon, linux-kernel, rrichter,
linux-arm-kernel, Christoffer Dall, Suzuki Poulose
On 26/06/15 20:51, Tirumalesh Chalamarla wrote:
> In order to allow KVM to run on Thunder implementations, add the
> minimal support required.
>
> Signed-off-by: Tirumalesh Chalamarla <tchalamarla@caviumnetworks.com>
CCing the KVM/ARM maintainers should be the first course of action.
Also, you may want to try Suzuki's patch instead:
http://www.spinics.net/lists/kvm/msg117703.html
Constantly adding new CPUs without providing any insight as to how they
should be emulated only brings churn, and not much benefit.
Thanks,
M.
--
Jazz is not dead. It just smells funny...
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64: KVM: Enable minimalistic support for Thunder
2015-06-29 8:53 ` Marc Zyngier
@ 2015-06-29 17:06 ` Chalamarla, Tirumalesh
2015-06-29 17:11 ` Marc Zyngier
0 siblings, 1 reply; 6+ messages in thread
From: Chalamarla, Tirumalesh @ 2015-06-29 17:06 UTC (permalink / raw)
To: Marc Zyngier
Cc: kvmarm, andre.przywara, will.deacon, linux-kernel, rrichter,
linux-arm-kernel, Christoffer Dall, Suzuki Poulose
> On Jun 29, 2015, at 1:53 AM, Marc Zyngier <marc.zyngier@arm.com> wrote:
>
> On 26/06/15 20:51, Tirumalesh Chalamarla wrote:
>> In order to allow KVM to run on Thunder implementations, add the
>> minimal support required.
>>
>> Signed-off-by: Tirumalesh Chalamarla <tchalamarla@caviumnetworks.com>
>
> CCing the KVM/ARM maintainers should be the first course of action.
>
thanks.
> Also, you may want to try Suzuki's patch instead:
>
> http://www.spinics.net/lists/kvm/msg117703.html
>
will try with this.
> Constantly adding new CPUs without providing any insight as to how they
> should be emulated only brings churn, and not much benefit.
>
we are not planning(at this point) to emulate Thunder with QEMU/others.
> Thanks,
>
> M.
> --
> Jazz is not dead. It just smells funny...
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64: KVM: Enable minimalistic support for Thunder
2015-06-29 17:06 ` Chalamarla, Tirumalesh
@ 2015-06-29 17:11 ` Marc Zyngier
2015-06-29 17:17 ` Peter Maydell
2015-07-16 17:40 ` Chalamarla, Tirumalesh
0 siblings, 2 replies; 6+ messages in thread
From: Marc Zyngier @ 2015-06-29 17:11 UTC (permalink / raw)
To: Chalamarla, Tirumalesh
Cc: kvmarm, Andre Przywara, Will Deacon, linux-kernel, rrichter,
linux-arm-kernel, Christoffer Dall, Suzuki Poulose
On 29/06/15 18:06, Chalamarla, Tirumalesh wrote:
>
>> On Jun 29, 2015, at 1:53 AM, Marc Zyngier <marc.zyngier@arm.com> wrote:
>>
>> On 26/06/15 20:51, Tirumalesh Chalamarla wrote:
>>> In order to allow KVM to run on Thunder implementations, add the
>>> minimal support required.
>>>
>>> Signed-off-by: Tirumalesh Chalamarla <tchalamarla@caviumnetworks.com>
>>
>> CCing the KVM/ARM maintainers should be the first course of action.
>>
> thanks.
>
>> Also, you may want to try Suzuki's patch instead:
>>
>> http://www.spinics.net/lists/kvm/msg117703.html
>>
> will try with this.
>
>> Constantly adding new CPUs without providing any insight as to how they
>> should be emulated only brings churn, and not much benefit.
>>
> we are not planning(at this point) to emulate Thunder with QEMU/others.
Fair enough. If cross-cpu VM migration is none of your concern, then
Suzuki's patch should be enough.
Thanks,
M.
--
Jazz is not dead. It just smells funny...
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64: KVM: Enable minimalistic support for Thunder
2015-06-29 17:11 ` Marc Zyngier
@ 2015-06-29 17:17 ` Peter Maydell
2015-07-16 17:40 ` Chalamarla, Tirumalesh
1 sibling, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2015-06-29 17:17 UTC (permalink / raw)
To: Marc Zyngier
Cc: Chalamarla, Tirumalesh, Andre Przywara, Will Deacon,
linux-kernel, rrichter, kvmarm, linux-arm-kernel
On 29 June 2015 at 18:11, Marc Zyngier <marc.zyngier@arm.com> wrote:
> On 29/06/15 18:06, Chalamarla, Tirumalesh wrote:
>>
>>> On Jun 29, 2015, at 1:53 AM, Marc Zyngier <marc.zyngier@arm.com> wrote:
>>> Constantly adding new CPUs without providing any insight as to how they
>>> should be emulated only brings churn, and not much benefit.
>>>
>> we are not planning(at this point) to emulate Thunder with QEMU/others.
>
> Fair enough. If cross-cpu VM migration is none of your concern, then
> Suzuki's patch should be enough.
"Emulate with QEMU" is a completely different thing from
"support cross-cpu VM migration" !
-- PMM
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64: KVM: Enable minimalistic support for Thunder
2015-06-29 17:11 ` Marc Zyngier
2015-06-29 17:17 ` Peter Maydell
@ 2015-07-16 17:40 ` Chalamarla, Tirumalesh
1 sibling, 0 replies; 6+ messages in thread
From: Chalamarla, Tirumalesh @ 2015-07-16 17:40 UTC (permalink / raw)
To: Marc Zyngier
Cc: Chalamarla, Tirumalesh, kvmarm, Andre Przywara, Will Deacon,
linux-kernel, rrichter, linux-arm-kernel, Christoffer Dall,
Suzuki Poulose
the discussion on the generic cpu seems to be stuck, is there a possibility to take this patch. so that Thunder has a chance to run some KVM.
Thanks,
Tirumalesh.
> On Jun 29, 2015, at 10:11 AM, Marc Zyngier <marc.zyngier@arm.com> wrote:
>
> On 29/06/15 18:06, Chalamarla, Tirumalesh wrote:
>>
>>> On Jun 29, 2015, at 1:53 AM, Marc Zyngier <marc.zyngier@arm.com> wrote:
>>>
>>> On 26/06/15 20:51, Tirumalesh Chalamarla wrote:
>>>> In order to allow KVM to run on Thunder implementations, add the
>>>> minimal support required.
>>>>
>>>> Signed-off-by: Tirumalesh Chalamarla <tchalamarla@caviumnetworks.com>
>>>
>>> CCing the KVM/ARM maintainers should be the first course of action.
>>>
>> thanks.
>>
>>> Also, you may want to try Suzuki's patch instead:
>>>
>>> http://www.spinics.net/lists/kvm/msg117703.html
>>>
>> will try with this.
>>
>>> Constantly adding new CPUs without providing any insight as to how they
>>> should be emulated only brings churn, and not much benefit.
>>>
>> we are not planning(at this point) to emulate Thunder with QEMU/others.
>
> Fair enough. If cross-cpu VM migration is none of your concern, then
> Suzuki's patch should be enough.
>
> Thanks,
>
> M.
> --
> Jazz is not dead. It just smells funny...
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-07-16 17:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-26 19:51 [PATCH] arm64: KVM: Enable minimalistic support for Thunder Tirumalesh Chalamarla
2015-06-29 8:53 ` Marc Zyngier
2015-06-29 17:06 ` Chalamarla, Tirumalesh
2015-06-29 17:11 ` Marc Zyngier
2015-06-29 17:17 ` Peter Maydell
2015-07-16 17:40 ` Chalamarla, Tirumalesh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).