xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] x86/vvmx: correctly emulate VMREAD and VMWRITE
@ 2017-02-06 14:57 Sergey Dyasli
  2017-02-06 14:57 ` [PATCH v2 1/4] x86/vmx: introduce vmwrite_safe() Sergey Dyasli
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: Sergey Dyasli @ 2017-02-06 14:57 UTC (permalink / raw)
  To: xen-devel
  Cc: Andrew Cooper, Kevin Tian, Jan Beulich, Jun Nakajima,
	Sergey Dyasli

Currently, emulation of vmread and vmwrite for a guest leads to BUG()
in cases when actual VMREAD or VMWRITE ends up in VMfail due to invalid
arguments.  The goal of this patch series is to prevent the BUG() from
happening and report any kind of VMfail back to the guest, just like
it would be done by H/W.

v1 --> v2:
* Removed "ASM_FLAG_OUT" from tools/tests/x86_emulator/x86_emulate.h
* Replaced "~0UL" with "~0" for VMX_INSN_FAIL_INVALID
* Removed double underscore prefix from vmwrite_safe() and vmread_safe()
* Replaced "setb --> setc" and "sete --> setz"
* Removed "fail_" prefix from "invalid" and "valid" asm constraints
* Added "\t" to asm
* Added unlikely() for checking fail conditions
* Moved "ASM_FLAG_OUT" from lib.h to asm_defns.h

Sergey Dyasli (4):
  x86/vmx: introduce vmwrite_safe()
  x86/vmx: improve vmread_safe()
  x86/vvmx: correctly emulate VMWRITE
  x86/vvmx: correctly emulate VMREAD

 xen/arch/x86/hvm/vmx/vmcs.c        | 20 +++++++----
 xen/arch/x86/hvm/vmx/vvmx.c        | 46 +++++++++++++++++++-----
 xen/include/asm-x86/asm_defns.h    |  6 ++++
 xen/include/asm-x86/hvm/vmx/vmcs.h |  6 ++--
 xen/include/asm-x86/hvm/vmx/vmx.h  | 72 +++++++++++++++++++++++++-------------
 xen/include/asm-x86/hvm/vmx/vvmx.h | 11 ++++--
 6 files changed, 117 insertions(+), 44 deletions(-)

-- 
2.9.3


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

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

end of thread, other threads:[~2017-02-07 16:47 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-06 14:57 [PATCH v2 0/4] x86/vvmx: correctly emulate VMREAD and VMWRITE Sergey Dyasli
2017-02-06 14:57 ` [PATCH v2 1/4] x86/vmx: introduce vmwrite_safe() Sergey Dyasli
2017-02-07  6:31   ` Tian, Kevin
2017-02-07 11:09   ` Jan Beulich
2017-02-07 11:59     ` Andrew Cooper
2017-02-07 13:18       ` Jan Beulich
2017-02-07 15:06     ` Sergey Dyasli
2017-02-07 15:22       ` Andrew Cooper
2017-02-07 16:22       ` Jan Beulich
2017-02-07 16:34         ` Andrew Cooper
2017-02-07 16:47           ` Jan Beulich
2017-02-06 14:57 ` [PATCH v2 2/4] x86/vmx: improve vmread_safe() Sergey Dyasli
2017-02-07  6:32   ` Tian, Kevin
2017-02-06 14:57 ` [PATCH v2 3/4] x86/vvmx: correctly emulate VMWRITE Sergey Dyasli
2017-02-07  6:37   ` Tian, Kevin
2017-02-06 14:57 ` [PATCH v2 4/4] x86/vvmx: correctly emulate VMREAD Sergey Dyasli
2017-02-07  6:52   ` Tian, Kevin
2017-02-07 15:56     ` Sergey Dyasli
2017-02-06 15:19 ` [PATCH v2 0/4] x86/vvmx: correctly emulate VMREAD and VMWRITE Andrew Cooper

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