lkml.org 
[lkml]   [2018]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] kvm/x86 : avoid shifting signed 32-bit value by 31 bits
Date

From: Peng Hao <peng.hao2@zte.com.cn>

modify AVIC_LOGICAL_ID_ENTRY_VALID_MASK to unsigned

Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
---
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

\
 
 \ /
  Last update: 2018-10-04 19:47    [W:0.093 / U:7.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site