All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tian, Kevin" <kevin.tian@intel.com>
To: Razvan Cojocaru <rcojocaru@bitdefender.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Cc: "tamas@tklengyel.com" <tamas@tklengyel.com>,
	"suravee.suthikulpanit@amd.com" <suravee.suthikulpanit@amd.com>,
	"george.dunlap@eu.citrix.com" <george.dunlap@eu.citrix.com>,
	"andrew.cooper3@citrix.com" <andrew.cooper3@citrix.com>,
	"tim@xen.org" <tim@xen.org>,
	"jbeulich@suse.com" <jbeulich@suse.com>,
	"Nakajima, Jun" <jun.nakajima@intel.com>,
	"boris.ostrovsky@oracle.com" <boris.ostrovsky@oracle.com>
Subject: Re: [PATCH V5] x86/hvm: fix domain crash when CR3 has the noflush bit set
Date: Fri, 23 Feb 2018 04:53:17 +0000	[thread overview]
Message-ID: <AADFC41AFE54684AB9EE6CBC0274A5D1910152F1@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1518776535-2951-1-git-send-email-rcojocaru@bitdefender.com>

> From: Razvan Cojocaru [mailto:rcojocaru@bitdefender.com]
> Sent: Friday, February 16, 2018 6:22 PM
> 
> The emulation layers of Xen lack PCID support, and as we only offer
> PCID to HAP guests, all writes to CR3 are handled by hardware,
> except when introspection is involved. Consequently, trying to set
> CR3 when the noflush bit is set in hvm_set_cr3() leads to domain
> crashes. The workaround is to clear the noflush bit in
> hvm_set_cr3(). CR3 values in hvm_monitor_cr() are also sanitized.
> Additionally, a bool parameter now propagates to
> {svm,vmx}_update_guest_cr(), so that no flushes occur when
> the bit was set.

Above message is not very clear for people who didn't follow
previous discussions, e.g. why lacking PCID support in emulation 
layer would lead to domain crash? and why noflush trick can 
avoid the situation? Can you help elaborate it?

btw I didn't see any place setting the new macro 
(X86_CR3_NOFLUSH). just check and clear. 

Thanks
Kevin

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

  parent reply	other threads:[~2018-02-23  4:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-16 10:22 [PATCH V5] x86/hvm: fix domain crash when CR3 has the noflush bit set Razvan Cojocaru
2018-02-16 11:17 ` Jan Beulich
2018-02-19  8:48   ` Razvan Cojocaru
2018-02-19  8:53     ` Jan Beulich
2018-02-19  8:59       ` Razvan Cojocaru
2018-02-23  4:53 ` Tian, Kevin [this message]
2018-02-23  7:29   ` Razvan Cojocaru
2018-02-23  7:31     ` Razvan Cojocaru
2018-02-24  2:35       ` Tian, Kevin
2018-02-27 15:53     ` George Dunlap
2018-02-27 16:19       ` Razvan Cojocaru
2018-02-27 16:26         ` George Dunlap
2018-02-27 17:04           ` Razvan Cojocaru

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=AADFC41AFE54684AB9EE6CBC0274A5D1910152F1@SHSMSX101.ccr.corp.intel.com \
    --to=kevin.tian@intel.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jun.nakajima@intel.com \
    --cc=rcojocaru@bitdefender.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=tamas@tklengyel.com \
    --cc=tim@xen.org \
    --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.