Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp742378imm; Thu, 13 Sep 2018 07:07:02 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY1AaG/7s4hRs2V+P6Z6kKpgivGhD8p9hGXJhmx/gdK0E3pgrgBhE1m/Y1AUFPqRkIayzOt X-Received: by 2002:a63:8543:: with SMTP id u64-v6mr7599348pgd.248.1536847622161; Thu, 13 Sep 2018 07:07:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536847622; cv=none; d=google.com; s=arc-20160816; b=M436VBErVZ/BSjincKIflQiCTjfqkDNecpalaaxWGj0mJYJ0WEXwWUGWCMRBpPZkcY j/7B4Ft+tsvCIy1SWtDpbdmtXNghT6hVtbOlsMqxBqQK5ZoJYBTxCHitjgOacEdEf9tS Gcn5PmomiI+Pk1jiB3DwM0yBdq+xTeFh/LRCIQXQH2tbSM/BN8aoTDrb8UAV1vFilY2C f7kfHaIQD0gJmCg9ARjamdwe8ydAy+yz2PNLGAw29RKzMz5L4+X9jMm/4Y6nStfhH/Hs QmV0GCM23bWb7acr3vxu5lKl7LyzGVNUDD8QrMlLcGTTX6DndvFwXGYnx1ZD3BYrWIHg 5KUw== 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=xuqSEC1bVpXDHQgbC7sno/yfnub8l1QaF2mjN13fFdw=; b=Nr51b34L/bCmzQEBhkeM1hv3dka+TOmlIhg5nGiQKW7s9T/dQq0Rh6FoUcTYDP0YYo DUhvKsDi19PD3A/p9Rm+W8rhs9PwG9YET69Yd8GE25biPk5gFLDpvGbWUhG0tyUlb7aa K4BHrYprZcOc/8F0gkkD2O+0eE2gGWiHl61YeaXh+dT2531OmfghhDBzbv/ric6TIFBS mliwudnNU1nS06ffr0yy33cHRkhAlC60gbOHHyE0OP/IAQKhsLboHgIEJp8IPPi/bALH gPwrpHztGzjp8/ejIiJH322wjqRYOoMVLIIk93YtCWQtPWtY9/enD3wk2aVxLFzQewDG 5PFA== 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 5-v6si4218540plt.342.2018.09.13.07.06.41; Thu, 13 Sep 2018 07:07:02 -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 S1732075AbeIMTQI (ORCPT + 99 others); Thu, 13 Sep 2018 15:16:08 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:35606 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731264AbeIMTQH (ORCPT ); Thu, 13 Sep 2018 15:16:07 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 98D5FD3B; Thu, 13 Sep 2018 14:06:27 +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.18 195/197] x86: kvm: avoid unused variable warning Date: Thu, 13 Sep 2018 15:32:24 +0200 Message-Id: <20180913131849.356446411@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913131841.568116777@linuxfoundation.org> References: <20180913131841.568116777@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.18-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 @@ -6516,14 +6516,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); }