Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5322811imu; Wed, 26 Dec 2018 00:15:45 -0800 (PST) X-Google-Smtp-Source: ALg8bN62cUHKUILznSHCpYfJ3SecvTAi/CG49wOqoQOAc5pwCTgWVDy98yJW51kTzNwQjEesenUG X-Received: by 2002:a17:902:b18b:: with SMTP id s11mr18874014plr.56.1545812145821; Wed, 26 Dec 2018 00:15:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545812145; cv=none; d=google.com; s=arc-20160816; b=fiKzlnCWVwwbZR6gHtXkHeY6LGm96DusOU0XLooFLb/xZK7mMNo38WK46NZSvZG1Th ji5M+rtaf+cW36j1xOFQjjb6zWWndlkGp1zcwTHOZTT6LVUUXgRJgqyYR7OZ/iQU4a05 cnDLsF8GmSglziULHUK29/UFfSrlEKa1NKeVlyUNAXTJ9kbZLvOvcdGTIl5Fd5BDo9AZ c+ePVoB3Fw84O1BnsP6+kxTHA/1Ra+iaDpHoU65GsKNjnFsnn6Gam0IDy+0RI3exyFrA 1knTxKGcLf0pdOAwSa8sxI12Bf+jf7tGT5DGdOzJJcwnrRzVMtHxTZyH4M5OI36+5r9B urrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=Ji8OfZtUIV8FyU5Ip0oan6FOw6CEGA4odnR8X4Ac6Tg=; b=ct2b7257CcYPTD/nFj7C6bK+5RdlyowiC0CWc1q9ftq81i62WuoKoImgrme0Af4e3/ C2m2C0waQJGx1VUpFkcgpuaRcv1ApwJRTLc66NtR672BDTSH1TXVFVZ99ih80TDsbXA6 Zr9z+VJMomm/oxMphSTvsT+W0rtNWvHRg5508VuZuNDg/p3v2SDYOLcHq+qOh4Y85UBp GHWq0/mi5uRD/OQlidAibbQKsqE3e38HG0178NwzVZqcoNe5pORy9zg/PEkBDYfFQxfs hooxHL1K1XXJ0XHiwciEk5OLinIFPFvc0AJSVnfUzcWjA0AyCCb7VfHDcUX6akQTVdLj FqXA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id d90si8729088pld.148.2018.12.26.00.15.30; Wed, 26 Dec 2018 00:15:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726191AbeLZIMk (ORCPT + 99 others); Wed, 26 Dec 2018 03:12:40 -0500 Received: from mga11.intel.com ([192.55.52.93]:64132 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726001AbeLZIMj (ORCPT ); Wed, 26 Dec 2018 03:12:39 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Dec 2018 00:12:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,400,1539673200"; d="scan'208";a="104759662" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.239.13.104]) by orsmga008.jf.intel.com with ESMTP; 26 Dec 2018 00:12:37 -0800 From: Yang Weijiang To: pbonzini@redhat.com, rkrcmar@redhat.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, mst@redhat.com, yu-cheng.yu@intel.com, yi.z.zhang@intel.com, hjl.tools@gmail.com Cc: Yang Weijiang , Zhang Yi Z Subject: [PATCH v1 1/8] kvm:vmx Introduce CET related VMCS field definitions. Date: Wed, 26 Dec 2018 16:15:25 +0800 Message-Id: <20181226081532.30698-2-weijiang.yang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181226081532.30698-1-weijiang.yang@intel.com> References: <20181226081532.30698-1-weijiang.yang@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org VMX relies on these fields to save/restore CET states for guest and host. They are added here as VMCS placeholders for the function. Signed-off-by: Zhang Yi Z Signed-off-by: Yang Weijiang --- arch/x86/include/asm/vmx.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/x86/include/asm/vmx.h b/arch/x86/include/asm/vmx.h index ade0f153947d..db745a1d49ae 100644 --- a/arch/x86/include/asm/vmx.h +++ b/arch/x86/include/asm/vmx.h @@ -98,6 +98,7 @@ #define VM_EXIT_LOAD_IA32_EFER 0x00200000 #define VM_EXIT_SAVE_VMX_PREEMPTION_TIMER 0x00400000 #define VM_EXIT_CLEAR_BNDCFGS 0x00800000 +#define VM_EXIT_LOAD_HOST_CET_STATE 0x10000000 #define VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR 0x00036dff @@ -109,6 +110,7 @@ #define VM_ENTRY_LOAD_IA32_PAT 0x00004000 #define VM_ENTRY_LOAD_IA32_EFER 0x00008000 #define VM_ENTRY_LOAD_BNDCFGS 0x00010000 +#define VM_ENTRY_LOAD_GUEST_CET_STATE 0x00100000 #define VM_ENTRY_ALWAYSON_WITHOUT_TRUE_MSR 0x000011ff @@ -325,6 +327,9 @@ enum vmcs_field { GUEST_PENDING_DBG_EXCEPTIONS = 0x00006822, GUEST_SYSENTER_ESP = 0x00006824, GUEST_SYSENTER_EIP = 0x00006826, + GUEST_IA32_S_CET = 0x00006828, + GUEST_SSP = 0x0000682a, + GUEST_INT_SSP_TABL = 0x0000682c, HOST_CR0 = 0x00006c00, HOST_CR3 = 0x00006c02, HOST_CR4 = 0x00006c04, @@ -337,6 +342,9 @@ enum vmcs_field { HOST_IA32_SYSENTER_EIP = 0x00006c12, HOST_RSP = 0x00006c14, HOST_RIP = 0x00006c16, + HOST_IA32_S_CET = 0x00006c18, + HOST_SSP = 0x00006c1a, + HOST_INT_SSP_TABL = 0x00006c1c }; /* -- 2.17.1