From: Feng Wu <feng.wu@intel.com>
To: xen-devel@lists.xen.org
Cc: Feng Wu <feng.wu@intel.com>,
tim@xen.org, linux@eikelenboom.it, jbeulich@suse.com,
keir@xen.org
Subject: [PATCH 0/2] x86/HVM: Properly handle SMAP check in certain cases
Date: Tue, 8 Jul 2014 07:18:16 +0800 [thread overview]
Message-ID: <1404775098-6083-1-git-send-email-feng.wu@intel.com> (raw)
This patch set fixs a issue found by Sander Eikelenboom. Here is the log
when this issue occurs:
(d2) Booting from Hard Disk...
(d2) Booting from 0000:7c00
(XEN) irq.c:380: Dom1 callback via changed to Direct Vector 0xf3
(XEN) irq.c:380: Dom2 callback via changed to Direct Vector 0xf3
(XEN) Segment register inaccessible for d1v0
(XEN) (If you see this outside of debugging activity, please report to xen-devel@lists.xenproject.org)
And here is the Xen call trace:
(XEN) [<ffff82d0801dc9c5>] vmx_get_segment_register+0x4d/0x422
(XEN) [<ffff82d0801f4415>] guest_walk_tables_3_levels+0x189/0x520
(XEN) [<ffff82d0802204a8>] hap_p2m_ga_to_gfn_3_levels+0x158/0x2c2
(XEN) [<ffff82d08022062e>] hap_gva_to_gfn_3_levels+0x1c/0x1e
(XEN) [<ffff82d0801ec215>] paging_gva_to_gfn+0xb8/0xce
(XEN) [<ffff82d0801ba88d>] __hvm_copy+0x87/0x354
(XEN) [<ffff82d0801bac7c>] hvm_copy_to_guest_virt_nofault+0x1e/0x20
(XEN) [<ffff82d0801bace5>] copy_to_user_hvm+0x67/0x87
(XEN) [<ffff82d08016237c>] update_runstate_area+0x98/0xfb
(XEN) [<ffff82d0801623f0>] _update_runstate_area+0x11/0x39
(XEN) [<ffff82d0801634db>] context_switch+0x10c3/0x10fa
(XEN) [<ffff82d080126a19>] schedule+0x5a8/0x5da
(XEN) [<ffff82d0801297f9>] __do_softirq+0x81/0x8c
(XEN) [<ffff82d080129852>] do_softirq+0x13/0x15
(XEN) [<ffff82d08015f70a>] idle_loop+0x67/0x77
The root cause of this issue is that the we try to get guest's SS
register via hvm_get_segment_register() between setting 'current'
and reloading the VMCS context for it.
Feng Wu (2):
x86/hvm: Always do SMAP check when updating runstate_guest(v)
x86/hvm: honor guest's option when updating secondary system time for
guest
xen/arch/x86/domain.c | 21 ++++++++++++++++++---
xen/arch/x86/hvm/hvm.c | 2 ++
xen/arch/x86/mm/guest_walk.c | 41 ++++++++++++++++++++++++++++-------------
xen/arch/x86/time.c | 12 +++++++++++-
xen/include/asm-x86/domain.h | 24 ++++++++++++++++++++++--
xen/include/public/vcpu.h | 10 ++++++++++
6 files changed, 91 insertions(+), 19 deletions(-)
--
1.8.3.1
next reply other threads:[~2014-07-07 23:18 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-07 23:18 Feng Wu [this message]
2014-07-07 23:18 ` [PATCH 1/2] x86/hvm: Always do SMAP check when updating runstate_guest(v) Feng Wu
2014-07-08 10:04 ` Andrew Cooper
2014-07-09 1:33 ` Wu, Feng
2014-07-23 12:10 ` Jan Beulich
2014-07-10 10:56 ` Tim Deegan
2014-07-23 12:11 ` Jan Beulich
2014-07-23 12:15 ` Tim Deegan
2014-07-07 23:18 ` [PATCH 2/2] x86/hvm: honor guest's option when updating secondary system time for guest Feng Wu
2014-07-08 10:08 ` Andrew Cooper
2014-07-09 1:39 ` Wu, Feng
2014-07-08 16:13 ` Konrad Rzeszutek Wilk
2014-07-09 1:52 ` Wu, Feng
2014-07-10 11:00 ` Tim Deegan
2014-07-23 12:16 ` Jan Beulich
2014-07-23 12:19 ` Jan Beulich
2014-07-25 4:30 ` Wu, Feng
2014-07-25 7:25 ` Jan Beulich
2014-07-25 7:33 ` Wu, Feng
2014-07-25 7:39 ` Jan Beulich
2014-07-25 8:03 ` Wu, Feng
2014-07-25 8:31 ` Jan Beulich
2014-07-25 8:35 ` Wu, Feng
2014-07-25 8:52 ` Andrew Cooper
2014-07-25 9:17 ` Jan Beulich
2014-07-08 9:56 ` [PATCH 0/2] x86/HVM: Properly handle SMAP check in certain cases Sander Eikelenboom
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=1404775098-6083-1-git-send-email-feng.wu@intel.com \
--to=feng.wu@intel.com \
--cc=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=linux@eikelenboom.it \
--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 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).