Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1273830imm; Thu, 4 Oct 2018 10:48:10 -0700 (PDT) X-Google-Smtp-Source: ACcGV63S0tJ6rec7hyRRLI9towc3LZvvNNQyiAAShYZg3ldeqNMRWa2mwcabOxJS7GPFUEycDiRj X-Received: by 2002:a63:b25e:: with SMTP id t30-v6mr6706365pgo.401.1538675289957; Thu, 04 Oct 2018 10:48:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538675289; cv=none; d=google.com; s=arc-20160816; b=UZ8lsNL1uB1NSDcgLFY3hXpDioaFR+9A293REFTIX9BN5mrbNvhWMjK3PDTHPDAYdc MyakQh8ZB2oU0ObCKkGNrvrefxfEas57u3U1Fqqxr4mZ2HrwYZ5i07fRf8Te4yBiBHK1 t1TXRuqReFdDDiVrwstx+R4lb1nUcQ0jL4OgjRWj6l0s/KVCmH/YxmZMzyep0ej01OpF GPTBxHdd+TJdDL7eCunG18vXriOBzQnvAuIBqUinnF3SAZzy1rMWmQhrkBseUUqM3W60 q6R9VICpX9T4af+MZMBryXjmU6HwinuyKMlMNVdVEE9BFRpQiMRnSIKswHM9R57h+4jU XiHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=yAngs0ZqsmlswxTDNdt+UQoz2frktepb4u5Yw8OPaO0=; b=aCbYjktmOhPdYjA69S3gJeGXfy+UxIx/n5A88RlBXixnDGxgw31UDDYWVz4f1bbwyV O0GeJC+9EqBsQ9MA8tT+eBmsuwxrPxwigHpCTaTjwDrVv00LA1hVP969hLAhuP0R18rp IZ2UAfyZbivSusS+C8FT8WI5LxM8c8eIZyinKuf1LUfBHXgBTYiBQ9HvbEFOeMfby8Mu UuGYOn5W2kQrHwPx7Z5z6+2LK8qvxY3kq3Al0xBTZkBA+K4ej2UAmzBQObzXdR6Ntphy yTg3gZNSVhbgVH/2jfPhOPSPPsYKP+1mTwwY5LY6p/MjlHd30yHRFonRWhAyq0KfY3xU 1vSQ== 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 f5-v6si4656012pgm.440.2018.10.04.10.47.54; Thu, 04 Oct 2018 10:48:09 -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 S1727677AbeJEAmA (ORCPT + 99 others); Thu, 4 Oct 2018 20:42:00 -0400 Received: from mail78-59.sinamail.sina.com.cn ([219.142.78.59]:38564 "HELO mail78-59.sinamail.sina.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1727472AbeJEAmA (ORCPT ); Thu, 4 Oct 2018 20:42:00 -0400 Received: from unknown (HELO localhost.localdomain)([139.204.57.91]) by sina.com with ESMTP id 5BB652280000D8FD; Thu, 5 Oct 2018 01:47:29 +0800 (CST) X-Sender: penghao122@sina.com.cn X-Auth-ID: penghao122@sina.com.cn X-SMAIL-MID: 715275398706 From: Peng Hao To: pbonzini@redhat.com, rkrcmar@redhat.com, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, joro@8bytes.org Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, x86@kernel.org, Peng Hao Subject: [PATCH] kvm/x86 : avoid shifting signed 32-bit value by 31 bits Date: Thu, 4 Oct 2018 13:47:18 -0400 Message-Id: <1538675238-27356-1-git-send-email-penghao122@sina.com.cn> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Hao modify AVIC_LOGICAL_ID_ENTRY_VALID_MASK to unsigned Signed-off-by: Peng Hao --- arch/x86/kvm/svm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index d96092b..bf1ded4 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -262,7 +262,7 @@ struct amd_svm_iommu_ir { }; #define AVIC_LOGICAL_ID_ENTRY_GUEST_PHYSICAL_ID_MASK (0xFF) -#define AVIC_LOGICAL_ID_ENTRY_VALID_MASK (1 << 31) +#define AVIC_LOGICAL_ID_ENTRY_VALID_MASK (1UL << 31) #define AVIC_PHYSICAL_ID_ENTRY_HOST_PHYSICAL_ID_MASK (0xFFULL) #define AVIC_PHYSICAL_ID_ENTRY_BACKING_PAGE_MASK (0xFFFFFFFFFFULL << 12) -- 1.8.3.1