On Fri, Dec 14, 2012 at 5:38 AM, Marc Zyngier <marc.zyngier@xxxxxxx> wrote: > On 13/12/12 21:52, Christoffer Dall wrote: >> >> >> On Thursday, December 6, 2012, Marc Zyngier wrote: >> >> 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 <javascript:;>> >> --- >> 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 fea8fbb..b307d27 100644 >> --- a/arch/arm/kvm/arm.c >> +++ b/arch/arm/kvm/arm.c >> @@ -661,9 +661,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 >> >> >> super nit: this is a sentence that could be followed by a dot '.' :) >> >> >> + */ >> + if (irqchip_in_kernel(vcpu->kvm) && >> + unlikely(!vgic_initialized(vcpu->kvm))) { >> ret = kvm_vgic_init(vcpu->kvm); >> if (ret) >> return ret; >> >> >> hmm, could we move this check to kvm_arch_vcpu_load to reduce the number >> of branches we have at each vmexit? > > This is not in the main loop, but just before. And there is a > kvm_vcpu_load() call for each of the kvm_arch_vcpu_ioctl_run() calls. So > I'm afraid it wouldn't change a thing. > true, too bad. >> >> -- >> 1.8.0.1 >> >> >> >> _______________________________________________ >> kvmarm mailing list >> kvmarm@xxxxxxxxxxxxxxxxxxxxx <javascript:;> >> https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm >> > > > -- > Jazz is not dead. It just smells funny... > _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm