lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 18 Dec 2017 18:17:38 +0100
From:   Vitaly Kuznetsov <vkuznets@...hat.com>
To:     kvm@...r.kernel.org
Cc:     x86@...nel.org, Paolo Bonzini <pbonzini@...hat.com>,
        Radim Krčmář <rkrcmar@...hat.com>,
        "K. Y. Srinivasan" <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        "Michael Kelley (EOSG)" <Michael.H.Kelley@...rosoft.com>,
        Mohammed Gamal <mmorsy@...hat.com>,
        Cathy Avery <cavery@...hat.com>, Bandan Das <bsd@...hat.com>,
        Roman Kagan <rkagan@...tuozzo.com>,
        linux-kernel@...r.kernel.org, devel@...uxdriverproject.org
Subject: [PATCH RFC 3/7] KVM: nVMX: add I/O exit ECX, ESI, EDI, EIP vmcs12 fields

From: Ladi Prosek <lprosek@...hat.com>

These non-synthetic VMCS fields were not supported by KVM thus far. The
layout is according to Hyper-V TLFS 5.0b, the physical encoding according
to the Intel SDM.

Signed-off-by: Ladi Prosek <lprosek@...hat.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@...hat.com>
---
 arch/x86/include/asm/vmx.h | 4 ++++
 arch/x86/kvm/vmx.c         | 9 ++++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/vmx.h b/arch/x86/include/asm/vmx.h
index 8b6780751132..92a10aa839e6 100644
--- a/arch/x86/include/asm/vmx.h
+++ b/arch/x86/include/asm/vmx.h
@@ -298,6 +298,10 @@ enum vmcs_field {
 	CR3_TARGET_VALUE2               = 0x0000600c,
 	CR3_TARGET_VALUE3               = 0x0000600e,
 	EXIT_QUALIFICATION              = 0x00006400,
+	EXIT_IO_INSTR_ECX               = 0x00006402,
+	EXIT_IO_INSTR_ESI               = 0x00006404,
+	EXIT_IO_INSTR_EDI               = 0x00006406,
+	EXIT_IO_INSTR_EIP               = 0x00006408,
 	GUEST_LINEAR_ADDRESS            = 0x0000640a,
 	GUEST_CR0                       = 0x00006800,
 	GUEST_CR3                       = 0x00006802,
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index cd5f29a57880..f3215b6a0531 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -391,7 +391,10 @@ struct __packed vmcs12 {
 			u32 vmx_instruction_info;
 
 			natural_width exit_qualification;
-			natural_width padding64_3[4];
+			natural_width exit_io_instr_ecx;
+			natural_width exit_io_instr_esi;
+			natural_width exit_io_instr_edi;
+			natural_width exit_io_instr_eip;
 
 			natural_width guest_linear_address;
 			natural_width guest_rsp;
@@ -913,6 +916,10 @@ static const unsigned short vmcs_field_to_offset_table[] = {
 	FIELD(CR3_TARGET_VALUE2, cr3_target_value2),
 	FIELD(CR3_TARGET_VALUE3, cr3_target_value3),
 	FIELD(EXIT_QUALIFICATION, exit_qualification),
+	FIELD(EXIT_IO_INSTR_ECX, exit_io_instr_ecx),
+	FIELD(EXIT_IO_INSTR_ESI, exit_io_instr_esi),
+	FIELD(EXIT_IO_INSTR_EDI, exit_io_instr_edi),
+	FIELD(EXIT_IO_INSTR_EIP, exit_io_instr_eip),
 	FIELD(GUEST_LINEAR_ADDRESS, guest_linear_address),
 	FIELD(GUEST_CR0, guest_cr0),
 	FIELD(GUEST_CR3, guest_cr3),
-- 
2.14.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ