Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753295AbdGXUFI (ORCPT ); Mon, 24 Jul 2017 16:05:08 -0400 Received: from mail-by2nam01on0080.outbound.protection.outlook.com ([104.47.34.80]:6848 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752875AbdGXUDs (ORCPT ); Mon, 24 Jul 2017 16:03:48 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; From: Brijesh Singh To: linux-kernel@vger.kernel.org, x86@kernel.org, kvm@vger.kernel.org Cc: Thomas Gleixner , Borislav Petkov , Joerg Roedel , "Michael S . Tsirkin" , Paolo Bonzini , =?UTF-8?q?=5C=22Radim=20Kr=C4=8Dm=C3=A1=C5=99=5C=22?= , Tom Lendacky , Brijesh Singh Subject: [RFC Part2 PATCH v3 06/26] KVM: SVM: Prepare for new bit definition in nested_ctl Date: Mon, 24 Jul 2017 15:02:43 -0500 Message-Id: <20170724200303.12197-7-brijesh.singh@amd.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170724200303.12197-1-brijesh.singh@amd.com> References: <20170724200303.12197-1-brijesh.singh@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: DM3PR12CA0049.namprd12.prod.outlook.com (10.161.151.17) To BY2PR12MB0145.namprd12.prod.outlook.com (10.162.82.18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9eba1691-187d-47ee-59dc-08d4d2cf0d41 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:BY2PR12MB0145; X-Microsoft-Exchange-Diagnostics: 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8bdT/Is+rAOXcXXYhaL+1sGLqOT/j4S2XJ2G+x5OXxJ0ycVHfo6fHR+VXSev7cgoG4rYsWQeWQyEphlhCP9Glacp8wV4/s4azPFeXeaF/cLlJ9pITPQ8LAoFX9+k2R5SPj1eB0l2zpXqyubVP62loeJKYkE7c9zvy9488erHf/WpYe7UtB1N4Qsr9KzCwI+xev66IqrVF3b73Empjt9TZ3V+5vK9XjhFOz3iS3b1YNb9FdbHaJdPyORnXZkiveQTTBcI30GmgCiasgKzZ0FsoqeT9yM2waFzmYWKfvh46LGoOoi7QCjkydH+Lm3wkpH23s7kM0C+H6liiLkk+VQ+lfVUgu2VGw4TtsbdLSjmGXmYmYO32tn6jgO8buHiq9++QhE8aR+4= X-Microsoft-Exchange-Diagnostics: 1;BY2PR12MB0145;20:ZwcqqKbyResCWmb8q3uVAtDE19ygnjcOkEFBQajXbWrPAnfXKQV5SbiutEIZo9LFNqe9xRUOWLYErCdnGvfnQnPszEt3BcMO2eajwkZRq/c46rPHYCmxM9YxVAc6TNowElkwtDhJ9dYU3ZU/taCbprMZFvpEVtESmta9B2gwnhh1Ih9BBnEkZo9+ubXFZi4DOWVugtFc3P0BCFaU6rcjc5secDnagYj0VPVDrbQPfhos9oKmZG8mSsd1ENFUqZljU6nCFxg71NWpLpGg8E0P1A4gTWDcdkjDR2qzQ/78Z1M/TRaOeEMEqSihjHvYg08r3wLqKi++Sru70T06sdDKbzbs+6hK0K6BI8AaFpQq1BnPtBr2ABmX4BgJQux62z+/PFGsRraeRbqFD5p0S3xVvJNIcHk7ZU4pNIS5tQxNO0sFHpPs0iHXbmM80mf4hgRWqIeRVkEbt4w0AGYQ1qi2rKT8gym8OJKXVCVkfF0gPLYJYxj3uqTOGjnEDY6HMGsG X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(6055026)(6041248)(20161123562025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123564025)(20161123555025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BY2PR12MB0145;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BY2PR12MB0145; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2PR12MB0145;4:EORTqGsV+crpMt0du5A/sF0kmgwXSROrbxYt4JzWhQ?= =?us-ascii?Q?ALxayHHTMx8MS6fGvAoGsinvR45VnngdqvbDyms5OL3qz7PWByR+oHr4geJk?= =?us-ascii?Q?1RnFTshJfnu036T7FR91d9XJX5R4nQANagwMGtWLg8NspcQtHtrFjICslTZG?= =?us-ascii?Q?GmTWY2wN9KSikMq8Z1Yiaxs6oD38dB6SzbFqjaK8TMlqFfAgJHYFCq/IMzfc?= =?us-ascii?Q?8cz6HE5c0UkQntkLt2nvXLETuh1qiPt7IIDS5p+D1/sY49qgTc+SZDWmqG9l?= =?us-ascii?Q?cZMa5ODv5CHPzMdfnnt5Vf1k7UMHWdWfx/hjD6l8XRBRZrrzrp6Gg8WDRLJZ?= =?us-ascii?Q?io4Tk9mmPitoRzGwofpYPL6h/tdbHLqv+/Vfjxl/mX/SZdV1SmxbHe1zZSM2?= =?us-ascii?Q?eoqiLKsLxo+VQCB2aE+USE2OsgemD/BySmjB2t8OllT0ViRRJgdrxQEDRP0f?= =?us-ascii?Q?+rokn6FXFhHxMEwwahVcBkjkOG/vRAB1XcSppehgBKwsvvhnJsl+2ZAsYSqj?= =?us-ascii?Q?i+qWgy4Vm/NKcXNU4sCR+J2v1xRLbJKwoA3wLjGrvVAR0jLgyKUl5duDQIV0?= =?us-ascii?Q?nR1fofVsELmLUb4F42avJigVthz0Ow/p8vaaREqiJ6shtdWLVuVOxrp0Gb4D?= =?us-ascii?Q?sZLE+XMI7xO7Jk+s7GV8XNaIcmyTaTOS22rMKbzTKeHVgSbLPCpM2YpuWzwM?= =?us-ascii?Q?384AYoB1At2ZWqvZIkWQS7jfqk8rtMqtcaO0017nwiArhknR0mXJgIpEfRtF?= =?us-ascii?Q?flHJSwlQG5gfSg19VxiVBNG69S+vT9r9oLPTU8Q/w73M1xxL7z2R/rHnSpLY?= =?us-ascii?Q?pSKwl14niEb18/1TMhpu2TW1YGjPLqv2RSOGGD28GC3C6YcDQb9jVyBczbgA?= =?us-ascii?Q?XBZL7QSghBGiGUnW4F7VaHTpkR4RpF6lxCQarXagGZ1GQ3g3J6O908JlebfN?= =?us-ascii?Q?T7VySXj/2GUqQahQSHeQnzT+4gOw0590QgJqVeQ30sX0NCmytdvIlA0/Oi/X?= =?us-ascii?Q?2ONNQGYH4cq8wgCR0SqPkw2T1GO7huNsd8T4n8C0w312Fe7ui5FZ5WQxrEyd?= =?us-ascii?Q?8GPAkhic5KGEz6YmTEcX/35gERYfKGaDt6x7sQ5xrPZPfKNdxT5lwF/6DCip?= =?us-ascii?Q?0DLSchm1wcfUvZSVyZfkEk6CUYoVKU+DQt95F16D+zVeMhmw+XK7hUxoJIo+?= =?us-ascii?Q?IfMjgpw9Aj3+dyUUUiXq8pIsYiFgJ6AHMA?= X-Forefront-PRVS: 0378F1E47A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(7370300001)(6009001)(39450400003)(39410400002)(39400400002)(39850400002)(39860400002)(39840400002)(189002)(199003)(7350300001)(68736007)(53416004)(105586002)(54906002)(97736004)(50466002)(6486002)(48376002)(2906002)(106356001)(33646002)(6116002)(1076002)(53936002)(3846002)(189998001)(101416001)(6666003)(2950100002)(478600001)(50986999)(76176999)(81156014)(50226002)(38730400002)(47776003)(5003940100001)(86362001)(25786009)(4326008)(36756003)(42186005)(8676002)(81166006)(110136004)(575784001)(5660300001)(66066001)(7736002)(305945005);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR12MB0145;H:ubuntu-010236106000.amd.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2PR12MB0145;23:6QLymU+3AyFl5RW8f6+fMswuEH6PylBNnzmpU6Xla?= =?us-ascii?Q?gD28gwlkzOwM5+D5pCvPbSQbM2Ofl1vEzjj0/JKlWTwDdC3B4DWFtxWF4H9/?= =?us-ascii?Q?jgL2q/C73DHSU5vay0oLT8HcWolXXLwrW2Q5c2+kBTPETo86JszQaBbnu8de?= =?us-ascii?Q?NWHxMya54gkuguc0BzPRDot2iziWA//7/33cKeUxfB+FkUME+ixGfYZj3YhV?= =?us-ascii?Q?ehAw3TkohK3HcTnPFoR69L27ew8bQaYW0wlL3d61hWRgA2ZcBsJKyQmMbcLJ?= =?us-ascii?Q?JTLfu1eVY7usoCl82ZzF3UHshLuY7wTHaBxoX3DN2Rdu89p3p/RHlmXIzh3r?= =?us-ascii?Q?8eunhWJWY5FNe4NCUPpoyREe/sjiVPp6aLZoHs1hV2/fA6e2VmEuZdUYplk3?= =?us-ascii?Q?WzMZ6WyDsdlajRrIEh2UJRt/uQOlpPeDotZhTaTZdvN9CctY5f0pH3FOeasK?= =?us-ascii?Q?JIeO9NGCwnsTmRSRCAHyjZoqBeYK5AfEPzs7MgGwbc+vCdoqhHCrRaV5iuQa?= =?us-ascii?Q?UxJlwMTJ37JSTf1sTjNuTgBfMuxVR6oZqyeytN073KhQzEE6uBqeMUE4P4wT?= =?us-ascii?Q?NmC6kcdpVYiGRzb/cnIBLiiE6pvDpoBPEXpG7SRXYcXOOS7Q+4H0jQZuyldL?= =?us-ascii?Q?mj/pm3hlQB5g98bDjik9X6zUgEicP/IONezkIjBEDd7HXiYkM6Cp+aNMnKJC?= =?us-ascii?Q?vtmjmKTpFA1bIwb9mp0QTIYPPIeD5+gSw8kIP0B4ULe9VfaGbDJQ5GP8OJDg?= =?us-ascii?Q?9mmLXbJ42NxticPTp8gbPxJpM9GArs0h+aK+hqy90SlbyhXGzCLcrqJJdGsP?= =?us-ascii?Q?c7cayxmResFa9VZ3kyq7LX9pYt26BDlAA6AxSHPM6cYRvb2YJqzOYBexCpbr?= =?us-ascii?Q?rkRu2YWob2SU2pXZJzdjLpHmTTwQzSDRy1mjJp3FdtzrKFAQUDb67IDsVkyD?= =?us-ascii?Q?PsxWfXIjomnCCi9YYNDQccvyl0lG0a77RnPaiYOXWyT1RAshUdA+hbKmVBcI?= =?us-ascii?Q?ZB80uRmUe+bJfBf3awLu+y9oi12wcTuWugRrwvykAhpCfEzR/Hquz+6Fwdix?= =?us-ascii?Q?IdRZIgKqI9mZZ5dcMI+14tOUjXnaIQH2qDf03j8gIAFBO0/i88MwqwSWKpq/?= =?us-ascii?Q?lhlY9QghjIzYWVK15O1cNjaE6VaPxgBkvY5tpR0TyK/5EPzHCkNje3qbZpso?= =?us-ascii?Q?uIJRBKtsS6AfDIqsN3gPb9Dwg6s8lWX6VgBH4Mw43Us53/Pe3ciqex0+Cnxu?= =?us-ascii?Q?WZg1MW5MD3RpXVPHGcbngMgAUtfHa81AjlZecGH5PZQO7TcuSlYY0lgBb8qL?= =?us-ascii?B?Zz09?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2PR12MB0145;6:5MC2uDYJSBr+Lo3VoQIS0Mmvv37fPdWgqDgtKINIEo?= =?us-ascii?Q?nBYRwlWb938jddkNeXK1BH6aQe0OVBSk0/S0zKDXE+wH06XHq0qbPEAnFNFb?= =?us-ascii?Q?9mH/+B4ZB3NZFfNACVh6BiNkgyJeQvleUbXt6CFge+gP1luSat71wC8p1R+4?= =?us-ascii?Q?GjpdV21jquM/nFsqcx13ui6LqfpVD285tfJr7hGC/hx4M2J+lE3gHPfctZm2?= =?us-ascii?Q?yom6VtZdU/12+bxKIj3FhEY1FsM5nAsGpAqP0LWNdUC2ZEJOXTje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4/VVLHrGPlyQe2JkO3nVTe+zvWfm+r5BzkuKkhum1DZ/+TdxR7D4G6W7rl68i8zQWgQR2TFntn1cjJBwOKBOyQm00tmOv7FsJQZR9EET6I9588SZFwGCwLUToJTE67IIDLCeg/SHam7cjbWmBrGmFtVt4T4675N+RlG+x/UZH/XqJFrNyUfbOYx37v9RKtcMDw06xNXs/7vUYu7sYod7X8xjEfZbJMm6vEuu1R7159rIGrQ9RRusn0DYQHzbhh0S76umCM+8AnaU/1g5LAe7OnmZVthzfFxtZszR9dWP0nB/9bWgcYbwehEJEPuAv7sdHs= X-Microsoft-Exchange-Diagnostics: 1;BY2PR12MB0145;20:BhwIFf+SGsjJNoKIn8OxmgFavqzKHnAtgq1veKByZUbqG4haTAY0mpWahjvosRMzewRhQP9sa0gmzf08QAnnGEHcfEtPTl5TH/zgxqOcTUWsUmmwAo66fiySSfFvRqgJreGpbpecbGlL/9wJ55/zZ+tW8dULmcNdwlm9gn4xS5spcvP87dBFzrHRsFU69nt3YbKOgLQWzW/+NQDt83JRQ5tAdUJ4dvKmmyKX5UgWrCTEXmKeoyeVfHc1YQYpw6A+ X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2017 20:03:27.9001 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR12MB0145 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2197 Lines: 62 From: Tom Lendacky Currently the nested_ctl variable in the vmcb_control_area structure is used to indicate nested paging support. The nested paging support field is actually defined as bit 0 of the field. In order to support a new feature flag the usage of the nested_ctl and nested paging support must be converted to operate on a single bit. Signed-off-by: Tom Lendacky Signed-off-by: Brijesh Singh --- arch/x86/include/asm/svm.h | 2 ++ arch/x86/kvm/svm.c | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/x86/include/asm/svm.h b/arch/x86/include/asm/svm.h index 58fffe7..a3d9e0b 100644 --- a/arch/x86/include/asm/svm.h +++ b/arch/x86/include/asm/svm.h @@ -139,6 +139,8 @@ struct __attribute__ ((__packed__)) vmcb_control_area { #define SVM_VM_CR_SVM_LOCK_MASK 0x0008ULL #define SVM_VM_CR_SVM_DIS_MASK 0x0010ULL +#define SVM_NESTED_CTL_NP_ENABLE BIT(0) + struct __attribute__ ((__packed__)) vmcb_seg { u16 selector; u16 attrib; diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 06bd902..1cd7c78 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -1296,7 +1296,7 @@ static void init_vmcb(struct vcpu_svm *svm) if (npt_enabled) { /* Setup VMCB for Nested Paging */ - control->nested_ctl = 1; + control->nested_ctl |= SVM_NESTED_CTL_NP_ENABLE; clr_intercept(svm, INTERCEPT_INVLPG); clr_exception_intercept(svm, PF_VECTOR); clr_cr_intercept(svm, INTERCEPT_CR3_READ); @@ -2904,7 +2904,8 @@ static bool nested_vmcb_checks(struct vmcb *vmcb) if (vmcb->control.asid == 0) return false; - if (vmcb->control.nested_ctl && !npt_enabled) + if ((vmcb->control.nested_ctl & SVM_NESTED_CTL_NP_ENABLE) && + !npt_enabled) return false; return true; @@ -2979,7 +2980,7 @@ static bool nested_svm_vmrun(struct vcpu_svm *svm) else svm->vcpu.arch.hflags &= ~HF_HIF_MASK; - if (nested_vmcb->control.nested_ctl) { + if (nested_vmcb->control.nested_ctl & SVM_NESTED_CTL_NP_ENABLE) { kvm_mmu_unload(&svm->vcpu); svm->nested.nested_cr3 = nested_vmcb->control.nested_cr3; nested_svm_init_mmu_context(&svm->vcpu); -- 2.9.4