Re: [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support

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

 



On 06/05/2011 07:03 PM, Christoffer Dall wrote:
>>  +
>>  +       /* Banked FIQ registers r8-r12 */
>>  +       if (reg_num>= 8&&    reg_num<= 12) {
>>  +               if (mode == MODE_FIQ) {
>>  +                       reg_idx = reg_num - 8; /* 0=r8, ..., 4=r12 */
>>  +                       return&(regs->fiq_regs[reg_idx]);
>>  +               } else
>>  +                       return&(regs->usr_regs[reg_num]);
>>  +       }
>
>  You could have a static 2D array indexed by mode and register number,
>  returning an offsetof() into the vcpu structure.

You think it's simpler or faster? I don't quite see the incentive.
It's not going to be called a whole lot given the Virt. Extensions.

Yes (those are mostly unpredictable branches), and clearer as well. But I agree it's a rare-enough path that doesn't need optimizing, certainly not prematurely.

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux