xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Kevin.Mayer@gdata.de
Cc: andrew.cooper3@citrix.com, xen-devel@lists.xen.org
Subject: Re: Xen 4.6.1 crash with altp2m enabledbydefault
Date: Mon, 08 Aug 2016 04:29:17 -0600	[thread overview]
Message-ID: <57A87B1D0200007800103B6D@prv-mh.provo.novell.com> (raw)
In-Reply-To: <5C9C3B9BEF1B354596EAE3D6800D876B2D3222F6@e2.gdata.de>

>>> On 08.08.16 at 11:48, <Kevin.Mayer@gdata.de> wrote:
> vmx_vmenter_helper is not part of the call stack. The address is simply the 
> location of the ud2 to which the 
> __vmwrite(HOST_CR0, v->arch.hvm_vmx.host_cr0);
> In
> static void vmx_fpu_leave(struct vcpu *v)
> jumps.
> There are two vmwrites in vmx_vcpu_update_eptp (called by 
> altp2m_vcpu_destroy):
> __vmwrite(EPT_POINTER, ept_get_eptp(ept));
> __vmwrite(EPTP_INDEX, vcpu_altp2m(v).p2midx);
> 
> And four in vmx_vcpu_update_vmfunc_ve (also called by altp2m_vcpu_destroy)
> __vmwrite(VM_FUNCTION_CONTROL, VMX_VMFUNC_EPTP_SWITCHING);
> __vmwrite(EPTP_LIST_ADDR, virt_to_maddr(d->arch.altp2m_eptp));
> __vmwrite(VIRT_EXCEPTION_INFO, mfn_x(mfn) << PAGE_SHIFT);
> __vmwrite(SECONDARY_VM_EXEC_CONTROL,  
> v->arch.hvm_vmx.secondary_exec_control);
> 
> After the altp2m-part hvm_vcpu_destroy also calls nestedhvm_vcpu_destroy(v), 
> but this code path is executed unconditionally so I assume that the error 
> lies somewhere in the altp2m_vcpu_destroy(v).
> 
> What exactly are the vmx_vmcs_enter / exit required for? I often see the 
> vmx_vmcs_enter; __vmwrite; vmx_vmcs_exit combination. Need the __vmwrites be 
> guarded by an enter / exit ( which Is not the case in the static void 
> vmx_fpu_leave(struct vcpu *v) )?

On code paths where the correct VMCS may not be the current one
it is necessary to frame vmread / vmwrite accordingly.

> Is it possible that the 
> altp2m_vcpu_destroy->vmx_vcpu_update_eptp->vmx_vmcs_exit->vmx_clear_vmcs 
> invalidates the vmcs for the current vcpu?

I certainly can't exclude this possibility.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2016-08-08 10:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-29  7:33 Xen 4.6.1 crash with altp2m enabled by default Kevin.Mayer
2016-07-29  9:57 ` Dario Faggioli
2016-07-29 10:05 ` Andrew Cooper
2016-08-02 11:45   ` Kevin.Mayer
2016-08-02 12:34     ` Jan Beulich
2016-08-03 13:24       ` Kevin.Mayer
2016-08-03 13:54         ` Jan Beulich
2016-08-04 15:08           ` Kevin.Mayer
2016-08-04 15:35             ` Jan Beulich
2016-08-05 12:51               ` Xen 4.6.1 crash with altp2m enabled bydefault Kevin.Mayer
2016-08-05 14:48                 ` Jan Beulich
2016-08-08  9:48                   ` Xen 4.6.1 crash with altp2m enabledbydefault Kevin.Mayer
2016-08-08 10:29                     ` Jan Beulich [this message]
2016-08-19 10:01                       ` Kevin.Mayer
2016-08-22 11:58                         ` Andrew Cooper
2016-08-22 12:22                           ` Kevin.Mayer
2016-09-07  8:35                           ` Kevin.Mayer
2016-09-21 14:18                           ` Kevin.Mayer
2016-09-22 10:13                             ` Jan Beulich
     [not found]                               ` <5C9C3B9BEF1B354596EAE3D6800D876B2DCF7138@e3.gdata.de>
     [not found]                                 ` <57E405970200007800111B26@prv-mh.provo.novell.com>
     [not found]                                   ` <5C9C3B9BEF1B354596EAE3D6800D876B2DCF7254@e3.gdata.de>
2016-09-26  9:20                                     ` Xen 4.6.1 crash with altp2menabledbydefault 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=57A87B1D0200007800103B6D@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=Kevin.Mayer@gdata.de \
    --cc=andrew.cooper3@citrix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).