diff mbox

[2/2] kvm tools: arm: add support for ARM Cortex-A7

Message ID 1380303532-4460-3-git-send-email-jonathan.austin@arm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jonathan Austin Sept. 27, 2013, 5:38 p.m. UTC
The Cortex-A7 is very similar to the Cortex-A15 and as such there is very
little extra infrastructure required for KVM tool to be able to create
A7-guests.

This patch adds the basic support and allows booting of A7 guests on A7
hosts. It depends on Cortex-A7 support patches posted recently to the kvmarm
list.

Signed-off-by: Jonathan Austin <jonathan.austin@arm.com>
---
 tools/kvm/arm/aarch32/arm-cpu.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Comments

Will Deacon Sept. 30, 2013, 9:38 a.m. UTC | #1
On Fri, Sep 27, 2013 at 06:38:52PM +0100, Jonathan Austin wrote:
> The Cortex-A7 is very similar to the Cortex-A15 and as such there is very
> little extra infrastructure required for KVM tool to be able to create
> A7-guests.
> 
> This patch adds the basic support and allows booting of A7 guests on A7
> hosts. It depends on Cortex-A7 support patches posted recently to the kvmarm
> list.
> 
> Signed-off-by: Jonathan Austin <jonathan.austin@arm.com>
> ---
>  tools/kvm/arm/aarch32/arm-cpu.c |    9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/kvm/arm/aarch32/arm-cpu.c b/tools/kvm/arm/aarch32/arm-cpu.c
> index 8817d2a..71b98fe 100644
> --- a/tools/kvm/arm/aarch32/arm-cpu.c
> +++ b/tools/kvm/arm/aarch32/arm-cpu.c
> @@ -28,8 +28,15 @@ static struct kvm_arm_target target_cortex_a15 = {
>  	.init		= arm_cpu__vcpu_init,
>  };
>  
> +static struct kvm_arm_target target_cortex_a7 = {
> +	.id		= KVM_ARM_TARGET_CORTEX_A7,
> +	.compatible	= "arm,cortex-a7",
> +	.init		= arm_cpu__vcpu_init,
> +};
> +
>  static int arm_cpu__core_init(struct kvm *kvm)
>  {
> -	return kvm_cpu__register_kvm_arm_target(&target_cortex_a15);
> +	return (kvm_cpu__register_kvm_arm_target(&target_cortex_a15) ||
> +		kvm_cpu__register_kvm_arm_target(&target_cortex_a7));

  Acked-by: Will Deacon <will.deacon@arm.com>

However, we should hold off applying this to kvmtool until
KVM_ARM_TARGET_CORTEX_A7 is defined in the kernel sources which it is
shipped with. Do you have an ETA on this change going into the mainline
kernel?

(in the meantime, I'm happy to stage stuff in my kvmtool/arm tree).

Will
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Pekka Enberg Sept. 30, 2013, 11:23 a.m. UTC | #2
On Mon, Sep 30, 2013 at 12:38 PM, Will Deacon <will.deacon@arm.com> wrote:
> However, we should hold off applying this to kvmtool until
> KVM_ARM_TARGET_CORTEX_A7 is defined in the kernel sources which it is
> shipped with. Do you have an ETA on this change going into the mainline
> kernel?
>
> (in the meantime, I'm happy to stage stuff in my kvmtool/arm tree).

OK, I'll just wait for you or someone else to resend at a later time.

                           Pekka
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Christoffer Dall Sept. 30, 2013, 1:26 p.m. UTC | #3
On 30 September 2013 05:38, Will Deacon <will.deacon@arm.com> wrote:
> On Fri, Sep 27, 2013 at 06:38:52PM +0100, Jonathan Austin wrote:
>> The Cortex-A7 is very similar to the Cortex-A15 and as such there is very
>> little extra infrastructure required for KVM tool to be able to create
>> A7-guests.
>>
>> This patch adds the basic support and allows booting of A7 guests on A7
>> hosts. It depends on Cortex-A7 support patches posted recently to the kvmarm
>> list.
>>
>> Signed-off-by: Jonathan Austin <jonathan.austin@arm.com>
>> ---
>>  tools/kvm/arm/aarch32/arm-cpu.c |    9 ++++++++-
>>  1 file changed, 8 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/kvm/arm/aarch32/arm-cpu.c b/tools/kvm/arm/aarch32/arm-cpu.c
>> index 8817d2a..71b98fe 100644
>> --- a/tools/kvm/arm/aarch32/arm-cpu.c
>> +++ b/tools/kvm/arm/aarch32/arm-cpu.c
>> @@ -28,8 +28,15 @@ static struct kvm_arm_target target_cortex_a15 = {
>>       .init           = arm_cpu__vcpu_init,
>>  };
>>
>> +static struct kvm_arm_target target_cortex_a7 = {
>> +     .id             = KVM_ARM_TARGET_CORTEX_A7,
>> +     .compatible     = "arm,cortex-a7",
>> +     .init           = arm_cpu__vcpu_init,
>> +};
>> +
>>  static int arm_cpu__core_init(struct kvm *kvm)
>>  {
>> -     return kvm_cpu__register_kvm_arm_target(&target_cortex_a15);
>> +     return (kvm_cpu__register_kvm_arm_target(&target_cortex_a15) ||
>> +             kvm_cpu__register_kvm_arm_target(&target_cortex_a7));
>
>   Acked-by: Will Deacon <will.deacon@arm.com>
>
> However, we should hold off applying this to kvmtool until
> KVM_ARM_TARGET_CORTEX_A7 is defined in the kernel sources which it is
> shipped with. Do you have an ETA on this change going into the mainline
> kernel?
>
I plan to merge during next merge window.

-Christoffer
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Peter Maydell Sept. 30, 2013, 1:36 p.m. UTC | #4
On 30 September 2013 22:26, Christoffer Dall
<christoffer.dall@linaro.org> wrote:
> On 30 September 2013 05:38, Will Deacon <will.deacon@arm.com> wrote:
>> However, we should hold off applying this to kvmtool until
>> KVM_ARM_TARGET_CORTEX_A7 is defined in the kernel sources which it is
>> shipped with. Do you have an ETA on this change going into the mainline
>> kernel?
>>
> I plan to merge during next merge window.

Reminder, after cpu-host, please :-)

-- PMM
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Christoffer Dall Sept. 30, 2013, 1:54 p.m. UTC | #5
On Mon, Sep 30, 2013 at 10:36:20PM +0900, Peter Maydell wrote:
> On 30 September 2013 22:26, Christoffer Dall
> <christoffer.dall@linaro.org> wrote:
> > On 30 September 2013 05:38, Will Deacon <will.deacon@arm.com> wrote:
> >> However, we should hold off applying this to kvmtool until
> >> KVM_ARM_TARGET_CORTEX_A7 is defined in the kernel sources which it is
> >> shipped with. Do you have an ETA on this change going into the mainline
> >> kernel?
> >>
> > I plan to merge during next merge window.
> 
> Reminder, after cpu-host, please :-)
> 
Yes, plan to merge that one too, I have to re-read Anup's final patch
series later today, but I don't anticipate any more problems there.

Marc?

-Christoffer
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Marc Zyngier Sept. 30, 2013, 2 p.m. UTC | #6
On 30/09/13 14:54, Christoffer Dall wrote:
> On Mon, Sep 30, 2013 at 10:36:20PM +0900, Peter Maydell wrote:
>> On 30 September 2013 22:26, Christoffer Dall
>> <christoffer.dall@linaro.org> wrote:
>>> On 30 September 2013 05:38, Will Deacon <will.deacon@arm.com> wrote:
>>>> However, we should hold off applying this to kvmtool until
>>>> KVM_ARM_TARGET_CORTEX_A7 is defined in the kernel sources which it is
>>>> shipped with. Do you have an ETA on this change going into the mainline
>>>> kernel?
>>>>
>>> I plan to merge during next merge window.
>>
>> Reminder, after cpu-host, please :-)
>>
> Yes, plan to merge that one too, I have to re-read Anup's final patch
> series later today, but I don't anticipate any more problems there.
> 
> Marc?

Still need to go through the patches, but it hopefully should be OK this
time.

	M.
Will Deacon Oct. 7, 2013, 6:06 p.m. UTC | #7
On Mon, Sep 30, 2013 at 02:26:16PM +0100, Christoffer Dall wrote:
> On 30 September 2013 05:38, Will Deacon <will.deacon@arm.com> wrote:
> > On Fri, Sep 27, 2013 at 06:38:52PM +0100, Jonathan Austin wrote:
> >> The Cortex-A7 is very similar to the Cortex-A15 and as such there is very
> >> little extra infrastructure required for KVM tool to be able to create
> >> A7-guests.
> >>
> >> This patch adds the basic support and allows booting of A7 guests on A7
> >> hosts. It depends on Cortex-A7 support patches posted recently to the kvmarm
> >> list.
> >>
> >> Signed-off-by: Jonathan Austin <jonathan.austin@arm.com>

[...]

> > However, we should hold off applying this to kvmtool until
> > KVM_ARM_TARGET_CORTEX_A7 is defined in the kernel sources which it is
> > shipped with. Do you have an ETA on this change going into the mainline
> > kernel?
> >
> I plan to merge during next merge window.

Great! Any chance you could publish them in your kvm-arm-next branch please?

Will
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Christoffer Dall Oct. 11, 2013, 6:18 p.m. UTC | #8
On Mon, Oct 07, 2013 at 07:06:06PM +0100, Will Deacon wrote:
> On Mon, Sep 30, 2013 at 02:26:16PM +0100, Christoffer Dall wrote:
> > On 30 September 2013 05:38, Will Deacon <will.deacon@arm.com> wrote:
> > > On Fri, Sep 27, 2013 at 06:38:52PM +0100, Jonathan Austin wrote:
> > >> The Cortex-A7 is very similar to the Cortex-A15 and as such there is very
> > >> little extra infrastructure required for KVM tool to be able to create
> > >> A7-guests.
> > >>
> > >> This patch adds the basic support and allows booting of A7 guests on A7
> > >> hosts. It depends on Cortex-A7 support patches posted recently to the kvmarm
> > >> list.
> > >>
> > >> Signed-off-by: Jonathan Austin <jonathan.austin@arm.com>
> 
> [...]
> 
> > > However, we should hold off applying this to kvmtool until
> > > KVM_ARM_TARGET_CORTEX_A7 is defined in the kernel sources which it is
> > > shipped with. Do you have an ETA on this change going into the mainline
> > > kernel?
> > >
> > I plan to merge during next merge window.
> 
> Great! Any chance you could publish them in your kvm-arm-next branch please?
> 
Working on it, need to test them first, hopefully this weekend!
Otherwise Monday.

-Christoffer
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/tools/kvm/arm/aarch32/arm-cpu.c b/tools/kvm/arm/aarch32/arm-cpu.c
index 8817d2a..71b98fe 100644
--- a/tools/kvm/arm/aarch32/arm-cpu.c
+++ b/tools/kvm/arm/aarch32/arm-cpu.c
@@ -28,8 +28,15 @@  static struct kvm_arm_target target_cortex_a15 = {
 	.init		= arm_cpu__vcpu_init,
 };
 
+static struct kvm_arm_target target_cortex_a7 = {
+	.id		= KVM_ARM_TARGET_CORTEX_A7,
+	.compatible	= "arm,cortex-a7",
+	.init		= arm_cpu__vcpu_init,
+};
+
 static int arm_cpu__core_init(struct kvm *kvm)
 {
-	return kvm_cpu__register_kvm_arm_target(&target_cortex_a15);
+	return (kvm_cpu__register_kvm_arm_target(&target_cortex_a15) ||
+		kvm_cpu__register_kvm_arm_target(&target_cortex_a7));
 }
 core_init(arm_cpu__core_init);