public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: arm/arm64: remove kvm_vgic_*early_init() functions
@ 2016-07-05 13:50 Andre Przywara
  2016-07-05 14:02 ` Auger Eric
  2016-07-26 12:43 ` Christoffer Dall
  0 siblings, 2 replies; 3+ messages in thread
From: Andre Przywara @ 2016-07-05 13:50 UTC (permalink / raw)
  To: Marc Zyngier, Christoffer Dall; +Cc: kvmarm, kvm

kvm_vgic_early_init() and kvm_vgic_vcpu_early_init() were only used
with the old VGIC, on the new VGIC these functions do nothing.
Follow the comment in vgic-init.c and remove those functions and
their calls.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 arch/arm/kvm/arm.c            |  2 --
 include/kvm/arm_vgic.h        |  2 --
 virt/kvm/arm/vgic/vgic-init.c | 30 +-----------------------------
 3 files changed, 1 insertion(+), 33 deletions(-)

diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
index c74483f..6aa0acd 100644
--- a/arch/arm/kvm/arm.c
+++ b/arch/arm/kvm/arm.c
@@ -126,7 +126,6 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
 	if (ret)
 		goto out_free_stage2_pgd;
 
-	kvm_vgic_early_init(kvm);
 	kvm_timer_init(kvm);
 
 	/* Mark the initial VMID generation invalid */
@@ -254,7 +253,6 @@ out:
 
 void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu)
 {
-	kvm_vgic_vcpu_early_init(vcpu);
 }
 
 void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu)
diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h
index 1264037..2c641cc 100644
--- a/include/kvm/arm_vgic.h
+++ b/include/kvm/arm_vgic.h
@@ -196,10 +196,8 @@ struct vgic_cpu {
 };
 
 int kvm_vgic_addr(struct kvm *kvm, unsigned long type, u64 *addr, bool write);
-void kvm_vgic_early_init(struct kvm *kvm);
 int kvm_vgic_create(struct kvm *kvm, u32 type);
 void kvm_vgic_destroy(struct kvm *kvm);
-void kvm_vgic_vcpu_early_init(struct kvm_vcpu *vcpu);
 void kvm_vgic_vcpu_destroy(struct kvm_vcpu *vcpu);
 int kvm_vgic_map_resources(struct kvm *kvm);
 int kvm_vgic_hyp_init(void);
diff --git a/virt/kvm/arm/vgic/vgic-init.c b/virt/kvm/arm/vgic/vgic-init.c
index a1442f7..c94dc55 100644
--- a/virt/kvm/arm/vgic/vgic-init.c
+++ b/virt/kvm/arm/vgic/vgic-init.c
@@ -23,40 +23,12 @@
 #include "vgic.h"
 
 /*
- * Initialization rules: there are multiple stages to the vgic
- * initialization, both for the distributor and the CPU interfaces.
- *
- * Distributor:
- *
- * - kvm_vgic_early_init(): initialization of static data that doesn't
- *   depend on any sizing information or emulation type. No allocation
- *   is allowed there.
- *
+ * Initialization rules for the distributor:
  * - vgic_init(): allocation and initialization of the generic data
  *   structures that depend on sizing information (number of CPUs,
  *   number of interrupts). Also initializes the vcpu specific data
  *   structures. Can be executed lazily for GICv2.
- *
- * CPU Interface:
- *
- * - kvm_vgic_cpu_early_init(): initialization of static data that
- *   doesn't depend on any sizing information or emulation type. No
- *   allocation is allowed there.
- */
-
-/* EARLY INIT */
-
-/*
- * Those 2 functions should not be needed anymore but they
- * still are called from arm.c
  */
-void kvm_vgic_early_init(struct kvm *kvm)
-{
-}
-
-void kvm_vgic_vcpu_early_init(struct kvm_vcpu *vcpu)
-{
-}
 
 /* CREATION */
 
-- 
2.9.0

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

* Re: [PATCH] KVM: arm/arm64: remove kvm_vgic_*early_init() functions
  2016-07-05 13:50 [PATCH] KVM: arm/arm64: remove kvm_vgic_*early_init() functions Andre Przywara
@ 2016-07-05 14:02 ` Auger Eric
  2016-07-26 12:43 ` Christoffer Dall
  1 sibling, 0 replies; 3+ messages in thread
From: Auger Eric @ 2016-07-05 14:02 UTC (permalink / raw)
  To: Andre Przywara, Marc Zyngier, Christoffer Dall; +Cc: kvmarm, kvm

Hi Andre,

On 05/07/2016 15:50, Andre Przywara wrote:
> kvm_vgic_early_init() and kvm_vgic_vcpu_early_init() were only used
> with the old VGIC, on the new VGIC these functions do nothing.
> Follow the comment in vgic-init.c and remove those functions and
> their calls.
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  arch/arm/kvm/arm.c            |  2 --
>  include/kvm/arm_vgic.h        |  2 --
>  virt/kvm/arm/vgic/vgic-init.c | 30 +-----------------------------
>  3 files changed, 1 insertion(+), 33 deletions(-)
> 
> diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
> index c74483f..6aa0acd 100644
> --- a/arch/arm/kvm/arm.c
> +++ b/arch/arm/kvm/arm.c
> @@ -126,7 +126,6 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
>  	if (ret)
>  		goto out_free_stage2_pgd;
>  
> -	kvm_vgic_early_init(kvm);
>  	kvm_timer_init(kvm);
>  
>  	/* Mark the initial VMID generation invalid */
> @@ -254,7 +253,6 @@ out:
>  
>  void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu)
>  {
> -	kvm_vgic_vcpu_early_init(vcpu);
>  }
>  
>  void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu)
> diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h
> index 1264037..2c641cc 100644
> --- a/include/kvm/arm_vgic.h
> +++ b/include/kvm/arm_vgic.h
> @@ -196,10 +196,8 @@ struct vgic_cpu {
>  };
>  
>  int kvm_vgic_addr(struct kvm *kvm, unsigned long type, u64 *addr, bool write);
> -void kvm_vgic_early_init(struct kvm *kvm);
>  int kvm_vgic_create(struct kvm *kvm, u32 type);
>  void kvm_vgic_destroy(struct kvm *kvm);
> -void kvm_vgic_vcpu_early_init(struct kvm_vcpu *vcpu);
>  void kvm_vgic_vcpu_destroy(struct kvm_vcpu *vcpu);
>  int kvm_vgic_map_resources(struct kvm *kvm);
>  int kvm_vgic_hyp_init(void);
> diff --git a/virt/kvm/arm/vgic/vgic-init.c b/virt/kvm/arm/vgic/vgic-init.c
> index a1442f7..c94dc55 100644
> --- a/virt/kvm/arm/vgic/vgic-init.c
> +++ b/virt/kvm/arm/vgic/vgic-init.c
> @@ -23,40 +23,12 @@
>  #include "vgic.h"
>  
>  /*
> - * Initialization rules: there are multiple stages to the vgic
> - * initialization, both for the distributor and the CPU interfaces.
> - *
> - * Distributor:
> - *
> - * - kvm_vgic_early_init(): initialization of static data that doesn't
> - *   depend on any sizing information or emulation type. No allocation
> - *   is allowed there.
> - *
> + * Initialization rules for the distributor:
>   * - vgic_init(): allocation and initialization of the generic data
>   *   structures that depend on sizing information (number of CPUs,
>   *   number of interrupts). Also initializes the vcpu specific data
>   *   structures. Can be executed lazily for GICv2.
> - *
> - * CPU Interface:
> - *
> - * - kvm_vgic_cpu_early_init(): initialization of static data that
> - *   doesn't depend on any sizing information or emulation type. No
> - *   allocation is allowed there.
> - */
> -
> -/* EARLY INIT */
> -
> -/*
> - * Those 2 functions should not be needed anymore but they
> - * still are called from arm.c
>   */
> -void kvm_vgic_early_init(struct kvm *kvm)
> -{
> -}
> -
> -void kvm_vgic_vcpu_early_init(struct kvm_vcpu *vcpu)
> -{
> -}
>  
>  /* CREATION */
>  
> 
Reviewed-by: Eric Auger <eric.auger@redhat.com>

Eric

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

* Re: [PATCH] KVM: arm/arm64: remove kvm_vgic_*early_init() functions
  2016-07-05 13:50 [PATCH] KVM: arm/arm64: remove kvm_vgic_*early_init() functions Andre Przywara
  2016-07-05 14:02 ` Auger Eric
@ 2016-07-26 12:43 ` Christoffer Dall
  1 sibling, 0 replies; 3+ messages in thread
From: Christoffer Dall @ 2016-07-26 12:43 UTC (permalink / raw)
  To: Andre Przywara; +Cc: Marc Zyngier, Eric Auger, kvmarm, kvm

On Tue, Jul 05, 2016 at 02:50:43PM +0100, Andre Przywara wrote:
> kvm_vgic_early_init() and kvm_vgic_vcpu_early_init() were only used
> with the old VGIC, on the new VGIC these functions do nothing.
> Follow the comment in vgic-init.c and remove those functions and
> their calls.
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>

Acked-by: Christoffer Dall <christoffer.dall@linaro.org>

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

end of thread, other threads:[~2016-07-26 12:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-05 13:50 [PATCH] KVM: arm/arm64: remove kvm_vgic_*early_init() functions Andre Przywara
2016-07-05 14:02 ` Auger Eric
2016-07-26 12:43 ` Christoffer Dall

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