xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v8 0/2] Singlestep unimplemented x86emul instructions
@ 2017-08-08 18:06 Petre Pircalabu
  2017-08-08 18:06 ` [PATCH v8 1/2] x86emul: New return code for unimplemented instruction Petre Pircalabu
  2017-08-08 18:06 ` [PATCH v8 2/2] x86/monitor: Notify monitor if an emulation fails Petre Pircalabu
  0 siblings, 2 replies; 10+ messages in thread
From: Petre Pircalabu @ 2017-08-08 18:06 UTC (permalink / raw)
  To: xen-devel
  Cc: Petre Pircalabu, kevin.tian, sstabellini, wei.liu2, jun.nakajima,
	rcojocaru, George.Dunlap, andrew.cooper3, ian.jackson, tim,
	paul.durrant, tamas, jbeulich

This patchset implements a new way of handling the instructions unimplemented
in x86emul. Instead of inserting a hardware exception the monitor will
be notified and it will to try to single-step the faulty instruction using the
real processor and then resume execution of the normal instruction flow.

---
Changed since v1:
  * Removed the emulation kind check when calling hvm_inject_hw_exception

Changed since v2:
  * Removed a file added by mistake

Changed since v3:
  * Removed extra stray line
  * Added the _enabled suffix to the emul_unhandleable monitor option

Changed since v4
  * Fixed return expression of hvm_monitor_emul_unhandleable handle
  monitor_traps failures.
  * Removed stray parantheses.

Changed since v5:
  * Removed unnecessary "else" when calling hvm_monitor_emul_unhandleable.
  * Added extra line in arch_monitor_domctl_event.

Changed since v6:
  * add the distinction between unimplemented instructions and emulation failures.
  * changed "emul_unhandleable" event name to "emul_unimplemented"

Changed since v7:
  * Add "fall-through" comments to the switch statements (coverity)
  * Added X86EMUL_UNIMPLEMENTED to X86EMUL_UNHANDLEABLE checks the in functions
  referencing x86_emulate.
  * Improved comment describing X86EMUL_UNIMPLEMENTED.


Petre Pircalabu (2):
  x86emul: New return code for unimplemented instruction
  x86/monitor: Notify monitor if an emulation fails.

 tools/libxc/include/xenctrl.h          |  2 ++
 tools/libxc/xc_monitor.c               | 14 ++++++++++++++
 xen/arch/x86/hvm/emulate.c             |  8 ++++++++
 xen/arch/x86/hvm/io.c                  |  2 ++
 xen/arch/x86/hvm/monitor.c             | 17 +++++++++++++++++
 xen/arch/x86/hvm/vmx/realmode.c        |  2 +-
 xen/arch/x86/mm/shadow/multi.c         |  2 +-
 xen/arch/x86/monitor.c                 | 13 +++++++++++++
 xen/arch/x86/x86_emulate/x86_emulate.c |  8 ++++----
 xen/arch/x86/x86_emulate/x86_emulate.h |  6 ++++++
 xen/include/asm-x86/domain.h           |  1 +
 xen/include/asm-x86/hvm/monitor.h      |  1 +
 xen/include/asm-x86/monitor.h          |  3 ++-
 xen/include/public/domctl.h            |  1 +
 xen/include/public/vm_event.h          |  2 ++
 15 files changed, 75 insertions(+), 7 deletions(-)

-- 
2.7.4


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-08-31  7:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-08 18:06 [PATCH v8 0/2] Singlestep unimplemented x86emul instructions Petre Pircalabu
2017-08-08 18:06 ` [PATCH v8 1/2] x86emul: New return code for unimplemented instruction Petre Pircalabu
2017-08-09  8:11   ` Paul Durrant
2017-08-22  8:09   ` Jan Beulich
2017-08-30 17:06     ` Petre Ovidiu PIRCALABU
2017-08-31  7:36       ` Jan Beulich
2017-08-08 18:06 ` [PATCH v8 2/2] x86/monitor: Notify monitor if an emulation fails Petre Pircalabu
2017-08-08 18:25   ` Tamas K Lengyel
2017-08-09  7:03   ` Wei Liu
2017-08-22  8:10   ` Jan Beulich

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).