Linux KVM/arm64 development list
 help / color / mirror / Atom feed
* [PATCH] kvmtool/arm: add support for vGICv3 and vITS
@ 2016-11-02 11:56 Vladimir Murzin
  2016-11-02 12:18 ` Andre Przywara
  0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Murzin @ 2016-11-02 11:56 UTC (permalink / raw)
  To: kvmarm; +Cc: marc.zyngier, andre.przywara

KVM/arm got support for vGICv3 and vITS recently, so make use of it.

Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---

This patch is against its/v8 branch at [1]

[1] git://www.linux-arm.org/kvmtool.git

 arm/aarch32/arm-cpu.c              |    2 +-
 arm/aarch32/include/kvm/kvm-arch.h |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arm/aarch32/arm-cpu.c b/arm/aarch32/arm-cpu.c
index 27a8e17..16bba55 100644
--- a/arm/aarch32/arm-cpu.c
+++ b/arm/aarch32/arm-cpu.c
@@ -12,7 +12,7 @@ static void generate_fdt_nodes(void *fdt, struct kvm *kvm)
 {
 	int timer_interrupts[4] = {13, 14, 11, 10};
 
-	gic__generate_fdt_nodes(fdt, IRQCHIP_GICV2);
+	gic__generate_fdt_nodes(fdt, kvm->cfg.arch.irqchip);
 	timer__generate_fdt_nodes(fdt, kvm, timer_interrupts);
 }
 
diff --git a/arm/aarch32/include/kvm/kvm-arch.h b/arm/aarch32/include/kvm/kvm-arch.h
index 1632e3c..99231f6 100644
--- a/arm/aarch32/include/kvm/kvm-arch.h
+++ b/arm/aarch32/include/kvm/kvm-arch.h
@@ -1,8 +1,8 @@
 #ifndef KVM__KVM_ARCH_H
 #define KVM__KVM_ARCH_H
 
-#define ARM_GIC_DIST_SIZE	0x1000
-#define ARM_GIC_CPUI_SIZE	0x2000
+#define ARM_GIC_DIST_SIZE	0x100000
+#define ARM_GIC_CPUI_SIZE	0x200000
 
 #define ARM_KERN_OFFSET(...)	0x8000
 
-- 
1.7.9.5

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

* Re: [PATCH] kvmtool/arm: add support for vGICv3 and vITS
  2016-11-02 11:56 [PATCH] kvmtool/arm: add support for vGICv3 and vITS Vladimir Murzin
@ 2016-11-02 12:18 ` Andre Przywara
  2016-11-02 13:16   ` Vladimir Murzin
  0 siblings, 1 reply; 3+ messages in thread
From: Andre Przywara @ 2016-11-02 12:18 UTC (permalink / raw)
  To: Vladimir Murzin, kvmarm; +Cc: marc.zyngier

Hi Vladimir,

thanks for looking at this.

....

On 02/11/16 11:56, Vladimir Murzin wrote:
> KVM/arm got support for vGICv3 and vITS recently, so make use of it.
> 
> Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
> ---
> 
> This patch is against its/v8 branch at [1]
> 
> [1] git://www.linux-arm.org/kvmtool.git
> 
>  arm/aarch32/arm-cpu.c              |    2 +-
>  arm/aarch32/include/kvm/kvm-arch.h |    4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arm/aarch32/arm-cpu.c b/arm/aarch32/arm-cpu.c
> index 27a8e17..16bba55 100644
> --- a/arm/aarch32/arm-cpu.c
> +++ b/arm/aarch32/arm-cpu.c
> @@ -12,7 +12,7 @@ static void generate_fdt_nodes(void *fdt, struct kvm *kvm)
>  {
>  	int timer_interrupts[4] = {13, 14, 11, 10};
>  
> -	gic__generate_fdt_nodes(fdt, IRQCHIP_GICV2);
> +	gic__generate_fdt_nodes(fdt, kvm->cfg.arch.irqchip);
>  	timer__generate_fdt_nodes(fdt, kvm, timer_interrupts);
>  }
>  
> diff --git a/arm/aarch32/include/kvm/kvm-arch.h b/arm/aarch32/include/kvm/kvm-arch.h
> index 1632e3c..99231f6 100644
> --- a/arm/aarch32/include/kvm/kvm-arch.h
> +++ b/arm/aarch32/include/kvm/kvm-arch.h
> @@ -1,8 +1,8 @@
>  #ifndef KVM__KVM_ARCH_H
>  #define KVM__KVM_ARCH_H
>  
> -#define ARM_GIC_DIST_SIZE	0x1000
> -#define ARM_GIC_CPUI_SIZE	0x2000
> +#define ARM_GIC_DIST_SIZE	0x100000
> +#define ARM_GIC_CPUI_SIZE	0x200000

Is there a spare 0 in there? I guess 64K & 128K are sufficient and we
don't need 1MB and 2MB, respectively?

Given that you meant this the #define's for both aarch32 and aarch64 are
now the same, so we can remove the definition above and in the
respective aarch64 header file and put them into arm-common/kvm-arch.h
instead.

Cheers,
Andre.

>  
>  #define ARM_KERN_OFFSET(...)	0x8000
>  
> 

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

* Re: [PATCH] kvmtool/arm: add support for vGICv3 and vITS
  2016-11-02 12:18 ` Andre Przywara
@ 2016-11-02 13:16   ` Vladimir Murzin
  0 siblings, 0 replies; 3+ messages in thread
From: Vladimir Murzin @ 2016-11-02 13:16 UTC (permalink / raw)
  To: Andre Przywara, kvmarm; +Cc: marc.zyngier

Hi Andre,

On 02/11/16 12:18, Andre Przywara wrote:
> Hi Vladimir,
> 
> thanks for looking at this.
> 
> ....
> 
> On 02/11/16 11:56, Vladimir Murzin wrote:
>> KVM/arm got support for vGICv3 and vITS recently, so make use of it.
>>
>> Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
>> ---
>>
>> This patch is against its/v8 branch at [1]
>>
>> [1] git://www.linux-arm.org/kvmtool.git
>>
>>  arm/aarch32/arm-cpu.c              |    2 +-
>>  arm/aarch32/include/kvm/kvm-arch.h |    4 ++--
>>  2 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/arm/aarch32/arm-cpu.c b/arm/aarch32/arm-cpu.c
>> index 27a8e17..16bba55 100644
>> --- a/arm/aarch32/arm-cpu.c
>> +++ b/arm/aarch32/arm-cpu.c
>> @@ -12,7 +12,7 @@ static void generate_fdt_nodes(void *fdt, struct kvm *kvm)
>>  {
>>  	int timer_interrupts[4] = {13, 14, 11, 10};
>>  
>> -	gic__generate_fdt_nodes(fdt, IRQCHIP_GICV2);
>> +	gic__generate_fdt_nodes(fdt, kvm->cfg.arch.irqchip);
>>  	timer__generate_fdt_nodes(fdt, kvm, timer_interrupts);
>>  }
>>  
>> diff --git a/arm/aarch32/include/kvm/kvm-arch.h b/arm/aarch32/include/kvm/kvm-arch.h
>> index 1632e3c..99231f6 100644
>> --- a/arm/aarch32/include/kvm/kvm-arch.h
>> +++ b/arm/aarch32/include/kvm/kvm-arch.h
>> @@ -1,8 +1,8 @@
>>  #ifndef KVM__KVM_ARCH_H
>>  #define KVM__KVM_ARCH_H
>>  
>> -#define ARM_GIC_DIST_SIZE	0x1000
>> -#define ARM_GIC_CPUI_SIZE	0x2000
>> +#define ARM_GIC_DIST_SIZE	0x100000
>> +#define ARM_GIC_CPUI_SIZE	0x200000
> 
> Is there a spare 0 in there? I guess 64K & 128K are sufficient and we
> don't need 1MB and 2MB, respectively?

Fat fingers :( Thanks for spotting this!

> 
> Given that you meant this the #define's for both aarch32 and aarch64 are
> now the same, so we can remove the definition above and in the
> respective aarch64 header file and put them into arm-common/kvm-arch.h
> instead.

Sending v2 shortly.

Cheers
Vladimir

> 
> Cheers,
> Andre.
> 
>>  
>>  #define ARM_KERN_OFFSET(...)	0x8000
>>  
>>
> 

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

end of thread, other threads:[~2016-11-02 13:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-02 11:56 [PATCH] kvmtool/arm: add support for vGICv3 and vITS Vladimir Murzin
2016-11-02 12:18 ` Andre Przywara
2016-11-02 13:16   ` Vladimir Murzin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox