Skip to content

x86/vvmx: correctly emulate VMREAD and VMWRITE

Sergey Dyasli xen-devel 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 posting 2/23 patches 4 repliesIn review
  2. v2 posting 2/23 patches 13 repliesSuperseded
  3. v4 Latest3 patches 7 repliesIn review
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v3 posting 1/24 patches5 repliesSuperseded
v2 posting 1/24 patches14 repliesSuperseded
v14 patches4 repliesSuperseded

Changes in v4 from the cover letter

* First 2 patches were merged into master
* added "x86/vmx: introduce VMX_INSN_SUCCEED" patch
* added TODO comments into set/get_vvmcs_virtual_safe() based on Andrew's email

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3x86/vmx: introduce VMX_INSN_SUCCEEDxen/arch/x86/hvm/vmx/vvmx.c xen/include/asm-x86/hvm/vmx/vmcs.h xen/include/asm-x86/hvm/vmx/vmx.h+6 -22 replies
2/3x86/vvmx: correctly emulate VMWRITExen/arch/x86/hvm/vmx/vmcs.c xen/arch/x86/hvm/vmx/vvmx.c xen/include/asm-x86/hvm/vmx/vmcs.h +1 more+48 -12 replies
3/3x86/vvmx: correctly emulate VMREADxen/arch/x86/hvm/vmx/vmcs.c xen/arch/x86/hvm/vmx/vvmx.c xen/include/asm-x86/hvm/vmx/vmcs.h +1 more+47 -12 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchJan BeulichKevin Tian
1/3R-b A-b
2/3R-b A-b
3/3R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/3] x86/vvmx: correctly emulate VMREAD and VMWRITE

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.

v3 --> v4:
* First 2 patches were merged into master
* added "x86/vmx: introduce VMX_INSN_SUCCEED" patch
* added TODO comments into set/get_vvmcs_virtual_safe() based on Andrew's email

v2 --> v3:
* vmwrite_safe() and vmread_safe() now return "enum vmx_insn_errno" (32-bit value)
* vmwrite_safe() is changed from always_inline to plain inline
* set_vvmcs_safe() and related functions are added to match get_vvmcs_safe()
* virtual_vmcs_vmwrite_safe() and virtual_vmcs_vmread_safe() are added in order to preserve the old behaviour for existing callers

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 (3):
x86/vmx: introduce VMX_INSN_SUCCEED
x86/vvmx: correctly emulate VMWRITE
x86/vvmx: correctly emulate VMREAD

 xen/arch/x86/hvm/vmx/vmcs.c        | 24 ++++++++++++++++
 xen/arch/x86/hvm/vmx/vvmx.c        | 56 ++++++++++++++++++++++++++++++++++++--
 xen/include/asm-x86/hvm/vmx/vmcs.h |  5 ++++
 xen/include/asm-x86/hvm/vmx/vmx.h  |  4 +--
 xen/include/asm-x86/hvm/vmx/vvmx.h | 16 +++++++++++
 5 files changed, 101 insertions(+), 4 deletions(-)
Signature · 7 lines
2.9.3


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel