Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1886911pxv; Fri, 2 Jul 2021 15:11:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8AITXjaumW/F9YIfoHzYsqEVVguW7iR/s3AVht3wbklrfeIn17cmhoXXaKCodLqwVliWp X-Received: by 2002:a17:906:dc8f:: with SMTP id cs15mr1953340ejc.94.1625263873659; Fri, 02 Jul 2021 15:11:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625263873; cv=none; d=google.com; s=arc-20160816; b=FoC3Yq5xUOng6Wi9czdxq8wpl+HeQNaak8KChLXaIqjsOZ4+mnZgfCSyJWnL5l0Qv8 08VuVjd59JY4PxjpKnsxnIwnxfbmb3UR4Kpp426aBbWf9NEVt1HZ3vFKa6iXhDCsqIhJ G8QDhxqfchoANE8Ov+NhMhgIEMsnSMlSOnNYWUywWC4hGN27a9frG6XD49oX4yyBfl7G mBH5txRCLanFyKAnZb2EeqCndkdOJWK/qdZUbh/QlB1SiMS5iuBx/G8PYsXeXf0KOxNZ 4T+g+07FI3Y1bqGMSkHEzjkBHCI4MaqSJCZZFq1wZ+LuCMjQtZm/CJpGhnBonM4KdAsG scWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=osSLBMVWMq9agqhLEFassN3bqVb8dMs0pTMFUJb73kE=; b=h6/ttEZ5fLz/ldkfslro0XmHkbDhEdy/du/rQO5i4Smvg5mUX7EOXbRvYvtUZquJ/z YsmxS3NdWfKbZ9YIwZ3gr8eAxCyvwSp07vT/Iqv/cahcusFtLVtaZMzvTrsnCbGtYy+S yM9H/dxDG1YKEss8UN5C9rnH6Ht1/9p+SjsEgJaWqHbyguN0Re5d1BEt/ZaDPOlVuS3i eOciTaxz4rNb6xJFGNdIENJBV/Ic4tERKInRItt9IIDA6MGOeLEd8oOJkwEyTDxMRjNC Ye8JmxdP66Ke2dsvO0csgsL5v52nASdn/NoWDLHI6wnmek7Y2wUSEvMuBPrid1KAZKHA XGnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a6si4382166ejc.745.2021.07.02.15.10.51; Fri, 02 Jul 2021 15:11:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233459AbhGBWJl (ORCPT + 99 others); Fri, 2 Jul 2021 18:09:41 -0400 Received: from mga17.intel.com ([192.55.52.151]:15273 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233272AbhGBWIJ (ORCPT ); Fri, 2 Jul 2021 18:08:09 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10033"; a="189168382" X-IronPort-AV: E=Sophos;i="5.83,320,1616482800"; d="scan'208";a="189168382" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2021 15:05:29 -0700 X-IronPort-AV: E=Sophos;i="5.83,320,1616482800"; d="scan'208";a="642814855" Received: from ls.sc.intel.com (HELO localhost) ([143.183.96.54]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2021 15:05:29 -0700 From: isaku.yamahata@intel.com To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , erdemaktas@google.com, Connor Kuehl , Sean Christopherson , x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: isaku.yamahata@intel.com, isaku.yamahata@gmail.com, Sean Christopherson Subject: [RFC PATCH v2 53/69] KVM: VMX: Define EPT Violation architectural bits Date: Fri, 2 Jul 2021 15:04:59 -0700 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sean Christopherson Define the EPT Violation #VE control bit, #VE info VMCS fields, and the suppress #VE bit for EPT entries. Signed-off-by: Sean Christopherson Signed-off-by: Isaku Yamahata --- arch/x86/include/asm/vmx.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/x86/include/asm/vmx.h b/arch/x86/include/asm/vmx.h index 035dfdafa2c1..132981276a2f 100644 --- a/arch/x86/include/asm/vmx.h +++ b/arch/x86/include/asm/vmx.h @@ -78,6 +78,7 @@ struct vmcs { #define SECONDARY_EXEC_ENCLS_EXITING VMCS_CONTROL_BIT(ENCLS_EXITING) #define SECONDARY_EXEC_RDSEED_EXITING VMCS_CONTROL_BIT(RDSEED_EXITING) #define SECONDARY_EXEC_ENABLE_PML VMCS_CONTROL_BIT(PAGE_MOD_LOGGING) +#define SECONDARY_EXEC_EPT_VIOLATION_VE VMCS_CONTROL_BIT(EPT_VIOLATION_VE) #define SECONDARY_EXEC_PT_CONCEAL_VMX VMCS_CONTROL_BIT(PT_CONCEAL_VMX) #define SECONDARY_EXEC_XSAVES VMCS_CONTROL_BIT(XSAVES) #define SECONDARY_EXEC_MODE_BASED_EPT_EXEC VMCS_CONTROL_BIT(MODE_BASED_EPT_EXEC) @@ -226,6 +227,8 @@ enum vmcs_field { VMREAD_BITMAP_HIGH = 0x00002027, VMWRITE_BITMAP = 0x00002028, VMWRITE_BITMAP_HIGH = 0x00002029, + VE_INFO_ADDRESS = 0x0000202A, + VE_INFO_ADDRESS_HIGH = 0x0000202B, XSS_EXIT_BITMAP = 0x0000202C, XSS_EXIT_BITMAP_HIGH = 0x0000202D, ENCLS_EXITING_BITMAP = 0x0000202E, @@ -509,6 +512,7 @@ enum vmcs_field { #define VMX_EPT_IPAT_BIT (1ull << 6) #define VMX_EPT_ACCESS_BIT (1ull << 8) #define VMX_EPT_DIRTY_BIT (1ull << 9) +#define VMX_EPT_SUPPRESS_VE_BIT (1ull << 63) #define VMX_EPT_RWX_MASK (VMX_EPT_READABLE_MASK | \ VMX_EPT_WRITABLE_MASK | \ VMX_EPT_EXECUTABLE_MASK) -- 2.25.1