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

Re: [Xen-devel] Should hvm_hw_cpu's sysenter_eip always be zero after xc_domain_hvm_getcontext_partial()?

On 31/07/15 16:00, Razvan Cojocaru wrote:
> Hello,
> It has become apparent that after a succesful
> xc_domain_hvm_getcontext_partial( ..., HVM_SAVE_CODE(CPU), ...) call,
> the sysenter_eip member of struct hvm_hw_cpu is always zero.

How odd.

> Looking in the code, the only two __vmwrite(GUEST_SYSENTER_EIP, ...)
> calls occur in xen/arch/x86/hvm/vmx/vmx.c. One is in
> vmx_msr_write_intercept(), but adding a printk() just after produces no
> output after starting and stopping a guest.

Write interception for that MSR is disabled (if the hardware supports
disabling interception) because it is not interesting.

You can re-enable interception by commenting out the appropriate
vmx_disable_intercept_for_msr() line in construct_vmcs()

> The other is in vmx_vmcs_restore(), which seems to dutifully restore the
> never-set value of zero after a save.
> So this doesn't seem to be actually initialized anywhere. Could somebody
> please recommend the best place to initialize it, and the best value to
> initialize it with? Or maybe you could point out what I'm missing, if
> that's the case?

Are you certain that the guest is actually setting it?  If the guest
never sets it in the first place, 0 will be the expected value.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.