All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: KVM: Remove duplicating init code for setting VMID
@ 2016-09-22  8:18 Vladimir Murzin
  2016-09-22 10:02 ` Marc Zyngier
  2016-09-22 11:23 ` Christoffer Dall
  0 siblings, 2 replies; 3+ messages in thread
From: Vladimir Murzin @ 2016-09-22  8:18 UTC (permalink / raw)
  To: kvmarm; +Cc: marc.zyngier

By now both VHE and non-VHE initialisation sequences query supported
VMID size. Lets keep only single instance of this code under
init_common_resources().

Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
 arch/arm/kvm/arm.c |   12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
index 75f130e..85a3f90 100644
--- a/arch/arm/kvm/arm.c
+++ b/arch/arm/kvm/arm.c
@@ -1178,6 +1178,10 @@ static int init_common_resources(void)
 		return -ENOMEM;
 	}
 
+	/* set size of VMID supported by CPU */
+	kvm_vmid_bits = kvm_get_vmid_bits();
+	kvm_info("%d-bit VMID\n", kvm_vmid_bits);
+
 	return 0;
 }
 
@@ -1243,10 +1247,6 @@ static void teardown_hyp_mode(void)
 
 static int init_vhe_mode(void)
 {
-	/* set size of VMID supported by CPU */
-	kvm_vmid_bits = kvm_get_vmid_bits();
-	kvm_info("%d-bit VMID\n", kvm_vmid_bits);
-
 	kvm_info("VHE mode initialized successfully\n");
 	return 0;
 }
@@ -1330,10 +1330,6 @@ static int init_hyp_mode(void)
 		}
 	}
 
-	/* set size of VMID supported by CPU */
-	kvm_vmid_bits = kvm_get_vmid_bits();
-	kvm_info("%d-bit VMID\n", kvm_vmid_bits);
-
 	kvm_info("Hyp mode initialized successfully\n");
 
 	return 0;
-- 
1.7.9.5

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

* Re: [PATCH] arm64: KVM: Remove duplicating init code for setting VMID
  2016-09-22  8:18 [PATCH] arm64: KVM: Remove duplicating init code for setting VMID Vladimir Murzin
@ 2016-09-22 10:02 ` Marc Zyngier
  2016-09-22 11:23 ` Christoffer Dall
  1 sibling, 0 replies; 3+ messages in thread
From: Marc Zyngier @ 2016-09-22 10:02 UTC (permalink / raw)
  To: Vladimir Murzin, kvmarm

On 22/09/16 09:18, Vladimir Murzin wrote:
> By now both VHE and non-VHE initialisation sequences query supported
> VMID size. Lets keep only single instance of this code under
> init_common_resources().
> 
> Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
> ---
>  arch/arm/kvm/arm.c |   12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)

Acked-by: Marc Zyngier <marc.zyngier@arm.com>

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

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

* Re: [PATCH] arm64: KVM: Remove duplicating init code for setting VMID
  2016-09-22  8:18 [PATCH] arm64: KVM: Remove duplicating init code for setting VMID Vladimir Murzin
  2016-09-22 10:02 ` Marc Zyngier
@ 2016-09-22 11:23 ` Christoffer Dall
  1 sibling, 0 replies; 3+ messages in thread
From: Christoffer Dall @ 2016-09-22 11:23 UTC (permalink / raw)
  To: Vladimir Murzin; +Cc: marc.zyngier, kvmarm

On Thu, Sep 22, 2016 at 09:18:01AM +0100, Vladimir Murzin wrote:
> By now both VHE and non-VHE initialisation sequences query supported
> VMID size. Lets keep only single instance of this code under
> init_common_resources().
> 
> Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>

Applied, thanks!
-Christoffer

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

end of thread, other threads:[~2016-09-22 11:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-22  8:18 [PATCH] arm64: KVM: Remove duplicating init code for setting VMID Vladimir Murzin
2016-09-22 10:02 ` Marc Zyngier
2016-09-22 11:23 ` Christoffer Dall

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.