From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Razvan Cojocaru <rcojocaru@bitdefender.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: Should hvm_hw_cpu's sysenter_eip always be zero after xc_domain_hvm_getcontext_partial()?
Date: Fri, 31 Jul 2015 16:13:24 +0100 [thread overview]
Message-ID: <55BB9094.30703@citrix.com> (raw)
In-Reply-To: <55BB8D9A.2070705@bitdefender.com>
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.
~Andrew
next prev parent reply other threads:[~2015-07-31 15:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-31 15:00 Should hvm_hw_cpu's sysenter_eip always be zero after xc_domain_hvm_getcontext_partial()? Razvan Cojocaru
2015-07-31 15:13 ` Andrew Cooper [this message]
2015-07-31 15:30 ` Razvan Cojocaru
2015-07-31 15:36 ` Andrew Cooper
2015-08-11 15:26 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55BB9094.30703@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=rcojocaru@bitdefender.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.