From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
Xen-devel <xen-devel@lists.xen.org>
Cc: Kevin Tian <kevin.tian@intel.com>, Wei Liu <wei.liu2@citrix.com>,
Jan Beulich <JBeulich@suse.com>,
George Dunlap <george.dunlap@eu.citrix.com>,
Tim Deegan <tim@xen.org>, Paul Durrant <paul.durrant@citrix.com>,
Jun Nakajima <jun.nakajima@intel.com>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Subject: Re: [PATCH v2 for-4.7 5/5] x86/hvm: Fix invalidation for emulated invlpg instructions
Date: Mon, 9 May 2016 15:39:13 -0400 [thread overview]
Message-ID: <5730E761.40800@oracle.com> (raw)
In-Reply-To: <1462818472-14225-6-git-send-email-andrew.cooper3@citrix.com>
On 05/09/2016 02:27 PM, Andrew Cooper wrote:
> hap_invlpg() is reachable from the instruction emulator, which means
> introspection and tests using hvm_fep can end up here. As such, crashing the
> domain is not an appropriate action to take.
>
> Fixing this involves rearranging the callgraph.
>
> paging_invlpg() is now the central entry point. It first checks for the
> non-canonical NOP case, and calls ino the paging subsystem. If a real flush
> is needed, it will call the appropriate handler for the vcpu. This allows the
> PV callsites of paging_invlpg() to be simplified.
>
> The sole user of hvm_funcs.invlpg_intercept() is altered to use
> paging_invlpg() instead, allowing the .invlpg_intercept() hook to be removed.
>
> For both VMX and SVM, the existing $VENDOR_invlpg_intercept() is split in
> half. $VENDOR_invlpg_intercept() stays as the intercept handler only (which
> just calls paging_invlpg()), and new $VENDOR_invlpg() functions do the
> ASID/VPID management. These later functions are made available in hvm_funcs
> for paging_invlpg() to use.
>
> As a result, correct ASID/VPID management occurs for the hvmemul path, even if
> it did not originate from an real hardware intercept.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-05-09 19:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-09 18:27 [PATCH v2 for-4.7 0/5] Fixes for invlpg handling for HVM guests Andrew Cooper
2016-05-09 18:27 ` [PATCH v2 for-4.7 1/5] x86/hvm: Always return the linear address from hvm_virtual_to_linear_addr() Andrew Cooper
2016-05-09 18:27 ` [PATCH v2 for-4.7 2/5] x86/hvm: Raise #SS faults for %ss-based segmentation violations Andrew Cooper
2016-05-10 7:39 ` Jan Beulich
2016-05-10 7:40 ` Andrew Cooper
2016-05-09 18:27 ` [PATCH v2 for-4.7 3/5] x86/hvm: Correct the emulated interaction of invlpg with segments Andrew Cooper
2016-05-09 18:27 ` [PATCH v2 for-4.7 4/5] x86/svm: Don't unconditionally use a new ASID in svm_invlpg_intercept() Andrew Cooper
2016-05-09 19:35 ` Boris Ostrovsky
2016-05-09 18:27 ` [PATCH v2 for-4.7 5/5] x86/hvm: Fix invalidation for emulated invlpg instructions Andrew Cooper
2016-05-09 19:39 ` Boris Ostrovsky [this message]
2016-05-10 7:51 ` Jan Beulich
2016-05-10 10:15 ` Andrew Cooper
2016-05-10 10:41 ` Andrew Cooper
2016-05-10 11:02 ` Jan Beulich
2016-05-10 11:03 ` Andrew Cooper
2016-05-10 8:50 ` George Dunlap
2016-05-11 6:42 ` Tian, Kevin
2016-05-10 9:52 ` [PATCH v2 for-4.7 0/5] Fixes for invlpg handling for HVM guests Wei Liu
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=5730E761.40800@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.com \
--cc=paul.durrant@citrix.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=tim@xen.org \
--cc=wei.liu2@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 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.