Message ID | 1466029476-1780-1-git-send-email-Suravee.Suthikulpanit@amd.com |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp88361qgf; Wed, 15 Jun 2016 15:40:12 -0700 (PDT) X-Received: by 10.98.152.76 with SMTP id q73mr1266787pfd.38.1466030412296; Wed, 15 Jun 2016 15:40:12 -0700 (PDT) Return-Path: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y63si1716786pfy.97.2016.06.15.15.40.08; Wed, 15 Jun 2016 15:40:12 -0700 (PDT) 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; dkim=pass header.i=@amdcloud.onmicrosoft.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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933080AbcFOWkG (ORCPT <rfc822;julien.grall@linaro.org> + 30 others); Wed, 15 Jun 2016 18:40:06 -0400 Received: from mail-bl2on0090.outbound.protection.outlook.com ([65.55.169.90]:43398 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752739AbcFOWkC (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 15 Jun 2016 18:40:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=J2nK+EoZgraV8i3oSlr6Jp/1hPSbuHOZMcmDk9WkiPU=; b=YufVoQjdJiPqSqtcVBlzaqAd/SacNBwFvCHtMCkBcIl70JplW1BD/qmNIlZR9mrqtWmylCNeDsP+QH5zTteB+FDU69MPMQeylOfOMgbmBEIqe9HdV0N9xcp2bx2w9R0h/iAPUrV1sPK+oMWK1cIZgZCPgnm+1uyKX+lgNOIcCZE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Suravee.Suthikulpanit@amd.com; Received: from ssuthiku-cz-dev.amd.com (165.204.77.1) by CY1PR12MB0443.namprd12.prod.outlook.com (10.163.91.21) with Microsoft SMTP Server (TLS) id 15.1.517.8; Wed, 15 Jun 2016 22:24:48 +0000 From: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> To: <linux-kernel@vger.kernel.org>, <kvm@vger.kernel.org>, <pbonzini@redhat.com> CC: <rkrcmar@redhat.com>, <fengguang.wu@intel.com>, <kbuild-all@01.org>, Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>, Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Subject: [PATCH] svm: Do not support AVIC if not CONFIG_X86_LOCAL_APIC Date: Wed, 15 Jun 2016 17:24:36 -0500 Message-ID: <1466029476-1780-1-git-send-email-Suravee.Suthikulpanit@amd.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BY2PR06CA061.namprd06.prod.outlook.com (10.141.250.179) To CY1PR12MB0443.namprd12.prod.outlook.com (10.163.91.21) X-MS-Office365-Filtering-Correlation-Id: 3117d7b3-4941-4b06-78ff-08d3956bdfec X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0443; 2:DR5egjSpU6fzKDUWBXX4ec6W2IcVdTw6BU0ztJENoysu+6V4XwznlrvLMtPY4Dg7m8SU9gbIjZ3JkX4noGm0Qd7L0prYbfOOONgG/8CZ93gd+6B1V6jB/xZsZ1tuBiDobSxewOaZvidRztNGzaSSxsjHztK22zLBa8mqth9SnNxnM29cY80q+Z7a9CXonU84; 3:pA6cUX07i7sBPkP5zooN4rCqnz7HVurYf1hKm+Rk3w9l4eC9f2AHtfBP/yu4MtcybfdITMX6RvHeRo577fRWFsunz/T14hIG7jlgRumJ4y4WOmVVvzWiRaF+ulOPPfIq X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR12MB0443; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0443; 25:/hQCIIvZLeNo+iXrBSrhf57F+H2MET28ec3zcXA52TuYxWw8dqszulzvWqKNV12l/chTn4tzYdJ6ftr4AJtQzeosRFuxQaD9OBp3v4DRMcHFHq4NhRjRwycRnr/fofKxJ2yKq+Yuv5qnvWEEiTCU207uR2/KJ49xXCQlLOZvVRVB12zCBiJdmMj9KS5ZaOj4V6uGmHxHvg9kyE4JMPuOYoqmqSaAHYQczlCBHs8gghslEpo79rWPPurG3uzuWDBHLN/VzPh1U/MchFL5nJxld5MlargleEesIWeBxLm1HHFiPREdHMwaD+js4K40Vz38Zc1JosMrC/LDcSf2gSdXBYEDiYpmhBqe0BKuBVCnFjKn6OSlC3cc7ImlpeJ5NOprZcGEZV8QNKHpW2WkfgFuYzoLM3AGK1I0p+wJ0w0aY4pOLLYt/8lpCXSlxq4YBAQcQ6AUDDmONKtEX/0Rfiaxh5wZ6arE6nWU0MrmfQV/OtiOT6AiI6ik0g34Hybm7jELbHY9477N7+aEGafM85ZElT1XmwUQgVvk2243iUDW6CK8NTGEBFqL6xlfqhD8HG4u2MbZl7FxmWBMYz73g/KgYdQk2NeIz8uQxGoIu/VxISXB+/8EWdITJZdrF7YrTkcycpITTQz9jNwGQHoLEF5Fdvvi4oeoObaTGEtgbgRKMbA86t4gjOUhaEYwGsQocom5f6QSNpoDzwQsZYav7Yy8jnrOxj5FjZ+Hfe+VheX8h5I= X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0443; 20:6juqgPocFAjP/FTTLDi2Q+Xcs82UDddK80TMOJl/77jHyvuwPxWqbHTFfb8/dmuDcQbhYwzgNZBn+Ffrc55NysderxUg5CTSq8zatgXnjM2L1c3hRBHefcgXaOEW6NXmEdWvg4B/6U18E6bUo/I2UM5vxrDsgPnHRewcLkFdu5hlpQKzsVecxjSV0LIamTmkrpRIBoz/QmQfkYcDuE4sJmnhjGaBIfoumRVCb/ER5LUG3bnBQmTRftuoWEsHEQMAIkc4mN+PrSGc4OU2L2+wy8CF8cpirlqkUYHGKt6v1j/jn4L4cIQLLVEyps6tGIpA5zSfrGbUY8Zfi3GOWhnZeDdepWkiMML5DLB7kaX18PY/KcFWcx0yXfVXB08G/B/dROBm/KCYpOibgNpxuIBbnkkh5XTuRffT0hft8oRsD6V0FsCKCI1ghG+S7JJITy82xUvIIRdo9YrlW+r+SAuiw+eMjvXWiZcubRocBPtK664y7IndAKZEKDmwr6QBvpJV; 4:Rxz9Q/D0rwJKdYLXA0dEZNccsSxV2kK3NAZ0mAv6pTIrfgN6H/gv1nHLwCMmRyUixzkdhmzVufOKCcuoz5ohMZ7uZswAAkTPTyQkO9vDMwUt3CHLkEYUnW8j9OXAKCXEv4RPfUNcZZT8ol3Qfd8FD4TwJJSUUvKfB6V+e+NlVn0oACocgVQb25hlopR4SI5Oxs6dxIiBqRKN/PbYtQvYazn9Bp4WCfxs5i1eoUp/vPT98P2kv/5ZULcQ0Dpmj3UrP/3i2xzhoSIe7cpgFdRmJ7/wJ9DI3JdHocMtwPOqdK5bHDtbEXgITQ+gS1IXA3vNVY5vJgWr9NhWOkzi90QEpOE8fC8RyMUZHTgt2/axQJZqO4ubitpHGg5qRt5CkrGMANghPHeaUf2XMcoHa4qR4E6YAWAfZdOnaJaOoZ0at9hK96ScDl7TOYHh6j18RKJE X-Microsoft-Antispam-PRVS: <CY1PR12MB04438030F539D167CC7AEA51F3550@CY1PR12MB0443.namprd12.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026); SRVR:CY1PR12MB0443; BCL:0; PCL:0; RULEID:; SRVR:CY1PR12MB0443; X-Forefront-PRVS: 09749A275C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(189002)(199003)(101416001)(50466002)(53416004)(6116002)(2906002)(5004730100002)(8676002)(81166006)(4326007)(50226002)(2201001)(5008740100001)(97736004)(81156014)(68736007)(3846002)(5003940100001)(229853001)(77096005)(48376002)(19580405001)(19580395003)(47776003)(106356001)(50986999)(189998001)(86362001)(105586002)(42186005)(586003)(92566002)(5001770100001)(36756003)(66066001)(15760500001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR12MB0443; H:ssuthiku-cz-dev.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; CAT:NONE; LANG:en; CAT:NONE; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR12MB0443; 23:jX46f4abveE8ufjDhTddKxomtxp+9JrQr/dmnPJU9?= =?us-ascii?Q?/22zOqme63jYakxy/CYwkt47RCHYOKmNDCqSYa6TS5RSYsKFUtp26mxQvs+J?= =?us-ascii?Q?iUm/DWRZ+Uwa1L7yDDgU4gYhyuxaMbUri0MdJM13BekToI9CLv7WxSbs4KSi?= =?us-ascii?Q?jQENIRNSRlQ+x+vYwtN9lLkRLJ9ZTJ8xJfuceqXq4Kw0wkAEc4rHhOrDzFNP?= =?us-ascii?Q?7aEo18/D/RKvEmvBRVV3iThYgPeZx4WXXKxsyvTq4u0DhdDZVSWvoEYwYYJc?= =?us-ascii?Q?Jf5z0NIi3q+On06lJquG/3bOu9O7FhsSk1A8Xg8KeF4JsMmuwJr6zllV5RXf?= =?us-ascii?Q?Y7ilZGZPsNG8yox+n4+TFYZpNtHDu251zzohrxDfOASOYdI3OTiZf7uXy3h5?= =?us-ascii?Q?gQJsVZWyeGw5f8q9e/r97rAnJYRlsagTBOkwBpBIyauedDxIE+kveRvu9WHn?= =?us-ascii?Q?poZdC3OMWTg6p3na8FHa7oPWw1qMD5hzD8aiTvHCe3RIfLC/tL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IedTFtRrGoCvft/piAIG/ufX5T4dlNndO4P1LyHWhe49+SBNX+9z2V4RQG4L8X5DsuvtHJEvD9m1NN5CmHc7KeEIJ6QV6z94SWz3+q2YqkSXkpOiZ0I+pglGajawXFeQ4sghjru7He78Mw==; 24:9qfmDZry6eekXo3mqepQTfNyDEy3tq2Xyh3i1pZYbOYebQRqWWWsmpt/5tsGS3YIlY+gOMBB1w8C7IOSw1hEkRm9K80TGjBqkGbh9tx1BBg=; 7:gt8lTQBzFy3wC2n9++mzjVqmp1QV7i/b7qPKnQ55Hl/UNxV3Rl/TEYpRUQUwAgh840SD23jDQAqS4nLBW3erewvdue/4GGAFRy7BPVojFgq7T2Y69mcvGxG6L57PXwoRTlETBfD9jHDTyxUvNc6I5zq3K4c3ISOJ/CLVCSm+mi4H1fkw7z26FkgcQQWqyqODbrMrRI2Z4Ltajdi253CYFg== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0443; 20:WjsIpibILH/dvJEpsUHEO9hSfWyxMqCWbj/dfYO/H8qmzK+UruHbBbY4HRGc1ylXLk5MsM5ysRm+SdCjNCES2eTv92U+X9W/YmeOkUVODa7ZQkcERub4wzkXW3hagI/Nf9VPB/UfPLWOv8pOwv4W4IPB7AURMlxuYn/Xr7oTs81YyVkHiF0Ve8dVabyox8bgtFJmBnO5mM+h0vyCc1r2koQKwrYwcLLlS/Rwb78eHWvlocH3b2Tkr9RMhDkSnpkp X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2016 22:24:48.1284 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR12MB0443 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 0d2aa13..1b18b50 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -241,7 +241,9 @@ module_param(nested, int, S_IRUGO); /* enable / disable AVIC */ static int avic; +#ifdef CONFIG_X86_LOCAL_APIC module_param(avic, int, S_IRUGO); +#endif static void svm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0); static void svm_flush_tlb(struct kvm_vcpu *vcpu); @@ -1023,7 +1025,10 @@ static __init int svm_hardware_setup(void) } else kvm_disable_tdp(); - if (avic && (!npt_enabled || !boot_cpu_has(X86_FEATURE_AVIC))) + if (avic) + if (!npt_enabled || + !boot_cpu_has(X86_FEATURE_AVIC) || + !IS_ENABLED(CONFIG_X86_LOCAL_APIC)) avic = false; if (avic) {
Add logic to disable AVIC #ifndef CONFIG_X86_LOCAL_APIC. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> --- arch/x86/kvm/svm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) -- 1.9.1