Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp723202imm; Thu, 13 Sep 2018 06:51:11 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZXKG0tOAFtRL/J+o5lqEw56nluvb5h2pejbQdHTQDeHvWJCgglb3oxplm/iJpKugcKjb08 X-Received: by 2002:a63:291:: with SMTP id 139-v6mr7111385pgc.365.1536846671287; Thu, 13 Sep 2018 06:51:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536846671; cv=none; d=google.com; s=arc-20160816; b=zCtUrb78s4W2Xt/SO6Tn8h6UBZrMc1hONO56hh3dZeIVPc5pCp5+37avg9tRmhTlcV b4xKGy/eYbRegpGUsXd5lYSGkb+jtQppcAVkEbUDe4IjLoQkjc191eJMmQUa0Hn3bBG2 vzTJQ2pUwcKAVXbml2w7HQM3ki7wNpByfLOfgkfjCI5TvE4h+OAxzO98MsVtjAUbEnfa f/d07C0jai28PB+BnsTiWMROMX96KtqiWYAFPO8OaswUItH1ZthD48MJFwga/qHbqSZo 2Blm56p7Djk+xC2VTftDfJF30dW6RX/SZzEKJDaLaMwdP6yrIhQx+kpWNDC8xiWCzYKA 20YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=SikYSWWffO1mrNNgtsbfn+u4hnIsXsdI8T2WTrhUojE=; b=wYfe4u1YLvk1028VsnOFaj6Xya9n3m3wLYK/nNZ4tnXmiaUFbK/WiDKDsO/w9A3l3g BE9MedlVkJVvfEtKDrp024kDjRXpZ0zKBptXw12oIQH71Tdp2xH5avpWRAHIOMixSHJT sU9Q2/ELlM00aDtGMd2i+m3BPV/rFUlTY/zj1DJVxqThP6sjujJf6EAyjNs0K6qGPaN3 v9Qox7umrYwoEcrhkrnL9txiSJoBJQUm1PXCQ9+lhvNKw69RJTBDw74pELPLoI29WK2K oo+/BYrlwHIwFXf/VuHRjcsOmGp/ViKzaq4zy1NrFdktvcnkcLGquZ3BFSy9TnTyrm42 /7Dw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j8-v6si3834590plk.196.2018.09.13.06.50.56; Thu, 13 Sep 2018 06:51:11 -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; 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 S1730590AbeIMS6l (ORCPT + 99 others); Thu, 13 Sep 2018 14:58:41 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:32992 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728688AbeIMS6k (ORCPT ); Thu, 13 Sep 2018 14:58:40 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id EFF3FCFE; Thu, 13 Sep 2018 13:49:06 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Paolo Bonzini Subject: [PATCH 4.14 111/115] x86: kvm: avoid unused variable warning Date: Thu, 13 Sep 2018 15:32:11 +0200 Message-Id: <20180913131830.111166455@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913131823.327472833@linuxfoundation.org> References: <20180913131823.327472833@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann commit 7288bde1f9df6c1475675419bdd7725ce84dec56 upstream. Removing one of the two accesses of the maxphyaddr variable led to a harmless warning: arch/x86/kvm/x86.c: In function 'kvm_set_mmio_spte_mask': arch/x86/kvm/x86.c:6563:6: error: unused variable 'maxphyaddr' [-Werror=unused-variable] Removing the #ifdef seems to be the nicest workaround, as it makes the code look cleaner than adding another #ifdef. Fixes: 28a1f3ac1d0c ("kvm: x86: Set highest physical address bits in non-present/reserved SPTEs") Signed-off-by: Arnd Bergmann Cc: stable@vger.kernel.org # L1TF Signed-off-by: Paolo Bonzini Signed-off-by: Greg Kroah-Hartman --- arch/x86/kvm/x86.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -6204,14 +6204,12 @@ static void kvm_set_mmio_spte_mask(void) /* Set the present bit. */ mask |= 1ull; -#ifdef CONFIG_X86_64 /* * If reserved bit is not supported, clear the present bit to disable * mmio page fault. */ - if (maxphyaddr == 52) + if (IS_ENABLED(CONFIG_X86_64) && maxphyaddr == 52) mask &= ~1ull; -#endif kvm_mmu_set_mmio_spte_mask(mask, mask); }