On 15/05/2018 18:17, Jim Mattson wrote: > Hi Paolo, > > Does it look something like this? > > if ((msr_info->data & reserved_bits) || new_mode == LAPIC_MODE_INVALID) > return 1; > if (!msr_info->host_initiated) { > if (old_mode == LAPIC_MODE_X2APIC && > new_mode == LAPIC_MODE_XAPIC) > return 1; > if (old_mode == LAPIC_MODE_DISABLED && > new_mode == LAPIC_MODE_X2APIC) > return 1; > } Yes, entirely. You can check here: https://git.kernel.org/pub/scm/virt/kvm/kvm.git/commit/?h=next&id=588716494258899389206fa50426e78cc9df89b9 (look at all those digits at the beginning of the commit SHA1). Paolo