[PATCH v2 10/16] ARM: KVM: vgic: move the "unlikely" statement for vgic init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Move the "unlikely" statement to indicate that it is the
"not initialized" state of the vgic that is unlikely.

Not that it does anything on ARM...

Signed-off-by: Marc Zyngier <marc.zyngier@xxxxxxx>
---
 arch/arm/kvm/arm.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
index eb19cdc..da668f5 100644
--- a/arch/arm/kvm/arm.c
+++ b/arch/arm/kvm/arm.c
@@ -659,9 +659,12 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run)
 	if (unlikely(vcpu->arch.target < 0))
 		return -ENOEXEC;
 
-	/* Initalize the VGIC before running a vcpu the first time on this VM */
-	if (unlikely(irqchip_in_kernel(vcpu->kvm) &&
-		     !vgic_initialized(vcpu->kvm))) {
+	/*
+	 * Initialize the VGIC before running a vcpu the first time on
+	 * this VM.
+	 */
+	if (irqchip_in_kernel(vcpu->kvm) &&
+	    unlikely(!vgic_initialized(vcpu->kvm))) {
 		ret = kvm_vgic_init(vcpu->kvm);
 		if (ret)
 			return ret;
-- 
1.8.0.1



_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm


[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux