Skip to content
Commit d14eff1b authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Radim Krčmář
Browse files

KVM: x86: Fix bit shifting in update_intel_pt_cfg



ctl_bitmask in pt_desc is of type u64. When an integer like 0xf is
being left shifted more than 32 bits, the behavior is undefined.

Fix this by adding suffix ULL to integer 0xf.

Addresses-Coverity-ID: 1476095 ("Bad bit shift operation")
Fixes: 6c0f0bba ("KVM: x86: Introduce a function to initialize the PT configuration")
Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: default avatarWei Yang <richardw.yang@linux.intel.com>
Reviewed-by: default avatarLuwei Kang <luwei.kang@intel.com>
Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
parent bfeffd15
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment