From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Subject: [PATCH 0/6] HVM Emulation and trap injection fixes
Date: Tue, 23 Sep 2014 16:03:25 +0100 [thread overview]
Message-ID: <1411484611-31027-1-git-send-email-andrew.cooper3@citrix.com> (raw)
This series covers issues discovered during the analysis of XSAs 105 and 106.
Patch 1 makes fixes to the SYS{CALL,ENTER,EXIT} emulation
Patches 2-4 provide support to inject software events from the emulator
Patch 5 introduces HVM Forced Emulation Prefix support to aid testing
Patch 6 is misc cleanup to svm_inject_trap()
As part of developing the software event injection emulation (and reverse
engineering AMD's behaviour), I developed a unit test.
The unit test tests:
* icebp (0xf1)
* int $1 (0xcd 0x01)
* int3 (0xcc)
* int $3 (0xcd 0x03)
In the following setups:
* Regular instruction
* Regular instruction with a redundant addr32 (0x67) prefix
* Forced emulation prefix
* Forced eumation and redundant addr32 prefix
Under the following conditions:
* Ring0, all perms ok
* Ring0, descriptor not present
* Ring3, all perms ok
* Ring3, descriptor not present
* Ring3, dpl=0
Verifying that the correct exception occurs with correct eip and error code
(when appropriate).
Given some TUITs I hope to upstream a framework for unit testing in this fashion.
Andrew Cooper (5):
x86/emulate: Provide further information about software events
x86/hvm: Don't discard the SW/HW event distinction from the emulator
x86/emulate: Support for emulating software event injection
x86/hvm: Forced Emulation Prefix for debug builds of Xen
x86/svm: Misc cleanup
Jan Beulich (1):
x86emul: fix SYSCALL/SYSENTER/SYSEXIT emulation
docs/misc/xen-command-line.markdown | 11 ++
xen/arch/x86/hvm/emulate.c | 50 ++++++--
xen/arch/x86/hvm/hvm.c | 5 +
xen/arch/x86/hvm/io.c | 2 +-
xen/arch/x86/hvm/svm/svm.c | 77 ++++++++++--
xen/arch/x86/hvm/vmx/realmode.c | 14 +--
xen/arch/x86/hvm/vmx/vmx.c | 18 ++-
xen/arch/x86/mm.c | 2 +
xen/arch/x86/mm/shadow/common.c | 1 +
xen/arch/x86/x86_emulate/x86_emulate.c | 203 +++++++++++++++++++++++---------
xen/arch/x86/x86_emulate/x86_emulate.h | 19 +++
xen/include/asm-x86/hvm/emulate.h | 5 +-
xen/include/asm-x86/hvm/hvm.h | 5 +
13 files changed, 326 insertions(+), 86 deletions(-)
--
1.7.10.4
next reply other threads:[~2014-09-23 15:03 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-23 15:03 Andrew Cooper [this message]
2014-09-23 15:03 ` [PATCH 1/6] x86emul: fix SYSCALL/SYSENTER/SYSEXIT emulation Andrew Cooper
2014-09-23 15:03 ` [PATCH 2/6] x86/emulate: Provide further information about software events Andrew Cooper
2014-09-23 15:03 ` [PATCH 3/6] x86/hvm: Don't discard the SW/HW event distinction from the emulator Andrew Cooper
2014-09-25 20:57 ` Tian, Kevin
2014-09-26 20:12 ` Boris Ostrovsky
2014-09-23 15:03 ` [PATCH 4/6] x86/emulate: Support for emulating software event injection Andrew Cooper
2014-09-23 22:24 ` Aravind Gopalakrishnan
2014-09-24 9:22 ` Andrew Cooper
2014-09-24 13:01 ` Boris Ostrovsky
2014-09-24 13:04 ` Andrew Cooper
2014-09-24 13:24 ` Boris Ostrovsky
2014-09-24 14:20 ` Andrew Cooper
2014-09-26 20:13 ` Boris Ostrovsky
2014-09-26 21:09 ` Aravind Gopalakrishnan
2014-09-23 15:03 ` [PATCH 5/6] x86/hvm: Forced Emulation Prefix for debug builds of Xen Andrew Cooper
2014-09-23 15:27 ` Jan Beulich
2014-09-23 16:09 ` [PATCH v2 " Andrew Cooper
2014-09-23 16:21 ` Jan Beulich
2014-09-25 21:04 ` Tian, Kevin
2014-09-23 18:20 ` Boris Ostrovsky
2014-09-23 18:23 ` Andrew Cooper
2014-09-23 20:17 ` Boris Ostrovsky
2014-09-24 12:56 ` Andrew Cooper
2014-09-26 20:14 ` Boris Ostrovsky
2014-09-23 15:03 ` [PATCH 6/6] x86/svm: Misc cleanup Andrew Cooper
2014-09-26 20:15 ` Boris Ostrovsky
2014-09-23 15:19 ` [PATCH 0/6] HVM Emulation and trap injection fixes 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=1411484611-31027-1-git-send-email-andrew.cooper3@citrix.com \
--to=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).