On 30/01/2015 17:57, Radim Krčmář wrote: > As optimizations go, we could drop the "&" on cid as "cid < 16" is > checked later, so mode=4 practically does nothing ... Not the best for > future bugs, but still pretty safe -- only x2APIC can set a value that > would require the "&" and it can't have valid XAPIC mode, so u32 still > protects us enough. > > *cid = ldr >> mode; > *lid = ldr & ((1 << mode) - 1); > > Which is probably faster a solution where we don't shuffle switch cases > to jump to x2APIC first. A comparison is at the very bottom [2]. > > Would that be ok in v2? Yes, this is okay. Thanks for looking at it! Paolo -- 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