diff options
author | Thomas Huth <thuth@redhat.com> | 2020-06-16 12:59:40 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-06-16 08:29:34 -0400 |
commit | 4b74c718c57d1697e3228e2c699b0fe9c1d24e97 (patch) | |
tree | 4bf919ef627f5661edffdd4b694019ef447cb26e | |
parent | 31e68df7c38220f4144a45b8e3d1663f6348ee7e (diff) | |
download | kvm-unit-tests-4b74c718c57d1697e3228e2c699b0fe9c1d24e97.tar.gz |
x86/pmu: Fix compilation on 32-bit hosts
When building for 32-bit hosts, the compiler currently complains:
x86/pmu.c: In function 'check_gp_counters_write_width':
x86/pmu.c:490:30: error: left shift count >= width of type
Use the correct suffix to avoid this problem.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20200616105940.2907-1-thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | x86/pmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -487,7 +487,7 @@ static void do_unsupported_width_counter_write(void *index) static void check_gp_counters_write_width(void) { u64 val_64 = 0xffffff0123456789ull; - u64 val_32 = val_64 & ((1ul << 32) - 1); + u64 val_32 = val_64 & ((1ull << 32) - 1); u64 val_max_width = val_64 & ((1ul << eax.split.bit_width) - 1); int i; |