On Tue, Dec 28, 2021 at 10:29:35AM +0000, Marc Zyngier wrote: > > > + for (i = 0; vm_mode_default == NUM_VM_MODES && i < NUM_VM_MODES; i++) { > > > + if (guest_modes[i].supported && guest_modes[i].enabled) > > > + vm_mode_default = i; > > > > Since we don't have a 'break' here, this picks the last supported size > > (of the guest_modes list), not the first, as the comment implies it should > > do. > > This is checked in the for() loop condition, and the first matching > mode will cause the loop to terminate. This is the same check that > avoids scanning for a mode when VM_MODE_P40V48_4K is selected. > Ah, of course, sorry for the noise. Reviewed-by: Andrew Jones <drjones@xxxxxxxxxx>