@@ -590,6 +590,8 @@ static bool update_transition_efer(struct vcpu_vmx *vmx)
u64 guest_efer;
u64 ignore_bits;
+ printk("%s: efer_offset %d efer %llx\n",
+ __func__, efer_offset, vmx->vcpu.arch.shadow_efer);
if (efer_offset < 0)
return false;
guest_efer = vmx->vcpu.arch.shadow_efer;
@@ -606,10 +608,11 @@ static bool update_transition_efer(struct vcpu_vmx *vmx)
ignore_bits &= ~(u64)EFER_SCE;
#endif
if ((guest_efer & ~ignore_bits) == (host_efer & ~ignore_bits))
- return false;
+ return printk("%s: ignoring all bits\n", __func__), false;
guest_efer &= ~ignore_bits;
guest_efer |= host_efer & ignore_bits;
+ printk("%s: transition efer %llx\n", __func__, guest_efer);
vmx->guest_msrs[efer_offset].data = guest_efer;
return true;
}
@@ -928,8 +931,11 @@ static void setup_msrs(struct vcpu_vmx *vmx)
}
#endif
vmx->msr_offset_efer = index = __find_msr_index(vmx, MSR_EFER);
- if (index >= 0 && update_transition_efer(vmx))
+ if (index >= 0 && update_transition_efer(vmx)) {
+ printk("%s: marking efer for reload\n", __func__);
move_msr_up(vmx, index, save_nmsrs++);
+ } else
+ printk("%s: marking efer for no reload\n", __func__);
vmx->save_nmsrs = save_nmsrs;