From patchwork Thu Jan 15 08:44:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 5637691 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F1C409F2ED for ; Thu, 15 Jan 2015 08:46:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1BB7620149 for ; Thu, 15 Jan 2015 08:45:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3F4492011B for ; Thu, 15 Jan 2015 08:45:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752057AbbAOIpA (ORCPT ); Thu, 15 Jan 2015 03:45:00 -0500 Received: from mail.skyhub.de ([78.46.96.112]:54568 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751175AbbAOIo7 (ORCPT ); Thu, 15 Jan 2015 03:44:59 -0500 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alien8.de; s=alien8; t=1421311497; bh=aV8T/5PwZSoL0tA+Mt8fEhFAvAAz5EAfoQLcZ26SyiA=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type: Content-Transfer-Encoding; b=ejoYALqTS9WWyiwms6dSE3PkodsSlOWJjevGu kjOqul174KrFsk9f7w66JdcI84HXqffg4e/DQGE77s9THO8m6oHPzhhd0Kfo4w2fvDB YhOELDtFR7yhXqyYRRhFysITy+CVgI6fA6Jwv74Y5I782sur/7uzuSrYlM2vl6xBgHY = Received: from mail.skyhub.de ([127.0.0.1]) by localhost (door.skyhub.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id dFWNgV4Va7KD; Thu, 15 Jan 2015 09:44:56 +0100 (CET) Received: from pd.tnic (p5DDC562D.dip0.t-ipconnect.de [93.220.86.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id B0C6C1D9558; Thu, 15 Jan 2015 09:44:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alien8.de; s=alien8; t=1421311496; bh=aV8T/5PwZSoL0tA+Mt8fEhFAvAAz5EAfoQLcZ26SyiA=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type: Content-Transfer-Encoding; b=MwR5hrdzAxoV7Sp2E3OVfAOTlX5oJ3Wc6NbSa l5NZEf7ySSEWpH7PzZ70KDUAV/1nlI1hKa1KUDPw2ke76RGQOPfRm5mFzDUuf1KdLcW iyfB0AHPwgrHD3qn9lmorExan5U3DdVvn4AmIrDVAi0Ezq7oAqk9BsLwWDY8QrrLCJs = Received: by pd.tnic (Postfix, from userid 1000) id 2587C103602; Thu, 15 Jan 2015 09:44:56 +0100 (CET) From: Borislav Petkov To: KVM Cc: LKML Subject: [PATCH] kvm: Fix CR3_PCID_INVD type on 32-bit Date: Thu, 15 Jan 2015 09:44:56 +0100 Message-Id: <1421311496-18028-1-git-send-email-bp@alien8.de> X-Mailer: git-send-email 2.2.0.33.gc18b867 MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_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: Borislav Petkov arch/x86/kvm/emulate.c: In function ‘check_cr_write’: arch/x86/kvm/emulate.c:3552:4: warning: left shift count >= width of type rsvd = CR3_L_MODE_RESERVED_BITS & ~CR3_PCID_INVD; happens because sizeof(UL) on 32-bit is 4 bytes but we shift it 63 bits to the left. Signed-off-by: Borislav Petkov --- arch/x86/include/asm/kvm_host.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index d89c6b828c96..a8d07a060136 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -51,7 +51,7 @@ | X86_CR0_NW | X86_CR0_CD | X86_CR0_PG)) #define CR3_L_MODE_RESERVED_BITS 0xFFFFFF0000000000ULL -#define CR3_PCID_INVD (1UL << 63) +#define CR3_PCID_INVD BIT_64(63) #define CR4_RESERVED_BITS \ (~(unsigned long)(X86_CR4_VME | X86_CR4_PVI | X86_CR4_TSD | X86_CR4_DE\ | X86_CR4_PSE | X86_CR4_PAE | X86_CR4_MCE \