From patchwork Sat Jan 4 17:59:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 3434191 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8C8BB9F2E9 for ; Sat, 4 Jan 2014 17:59:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9E5022015D for ; Sat, 4 Jan 2014 17:59:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D7CFD20160 for ; Sat, 4 Jan 2014 17:59:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754733AbaADR7f (ORCPT ); Sat, 4 Jan 2014 12:59:35 -0500 Received: from mout.web.de ([212.227.15.3]:61597 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754410AbaADR7d (ORCPT ); Sat, 4 Jan 2014 12:59:33 -0500 Received: from mchn199C.home ([95.157.58.223]) by smtp.web.de (mrweb004) with ESMTPSA (Nemesis) id 0LdalO-1VZpjy1h8E-00im7C for ; Sat, 04 Jan 2014 18:59:32 +0100 From: Jan Kiszka To: Gleb Natapov , Paolo Bonzini , Marcelo Tosatti Cc: kvm Subject: [PATCH 04/13] VMX: Fix return label in fault-triggering handlers Date: Sat, 4 Jan 2014 18:59:10 +0100 Message-Id: <59793077f3173bfa9f211c38617d288611f3a11f.1388858359.git.jan.kiszka@web.de> X-Mailer: git-send-email 1.8.1.1.298.ge7eed54 In-Reply-To: References: In-Reply-To: References: X-Provags-ID: V03:K0:kHBn3kSMivZEpZIQg2bNf8zPmKAj3trzIYSLsJWIlGCGHQGYGZp 7JNobu+8O4jR2pXDhKwSuJzhiNhc1Jy3sz5tYfy/6qrAilOTt1mCISstEj278jjrScPfktG +t/y4UzEFyrRhBWILKve6BwlKLHX8uAEJfO+zrB0ob60vOoNBf56PLg56HVNMUeMAnNrLSG JunKjI4BoYm4i5R0vs1Zg== Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jan Kiszka Some compiler versions (seen with gcc 4.8.1) move the resume label after the return statement which, of course, causes sever problems. Signed-off-by: Jan Kiszka --- x86/vmx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x86/vmx.c b/x86/vmx.c index a475aec..f9d5493 100644 --- a/x86/vmx.c +++ b/x86/vmx.c @@ -563,7 +563,7 @@ static void do_vmxon_off(void) vmx_on(); vmx_off(); resume: - return; + barrier(); } static void do_write_feature_control(void) @@ -572,7 +572,7 @@ static void do_write_feature_control(void) barrier(); wrmsr(MSR_IA32_FEATURE_CONTROL, 0); resume: - return; + barrier(); } static int test_vmx_feature_control(void)