summary refs log tree commit diff stats
path: root/target/i386/tcg/sysemu/svm_helper.c
diff options
context:
space:
mode:
authorLara Lazier <laramglazier@gmail.com>2021-08-12 13:10:56 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2021-08-13 14:31:49 +0200
commit24d84c7e4806da0c362edd2ee76678f15becd17d (patch)
tree7fc4d25d70dc1dc54cd505a7e77005807a004651 /target/i386/tcg/sysemu/svm_helper.c
parent703e8cd6189cf699c8d5c094bc68b5f3afa6ad71 (diff)
downloadfocaccia-qemu-24d84c7e4806da0c362edd2ee76678f15becd17d.tar.gz
focaccia-qemu-24d84c7e4806da0c362edd2ee76678f15becd17d.zip
target/i386: Fixed size of constant for Windows
~0UL has 64 bits on Linux and 32 bits on Windows.

Fixes: https://gitlab.com/qemu-project/qemu/-/issues/512
Reported-by: Volker Rümelin <vr_qemu@t-online.de>
Signed-off-by: Lara Lazier <laramglazier@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210812111056.26926-1-laramglazier@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to '')
-rw-r--r--target/i386/tcg/sysemu/svm_helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/i386/tcg/sysemu/svm_helper.c b/target/i386/tcg/sysemu/svm_helper.c
index e151104b4e..0d549b3d6c 100644
--- a/target/i386/tcg/sysemu/svm_helper.c
+++ b/target/i386/tcg/sysemu/svm_helper.c
@@ -264,7 +264,7 @@ void helper_vmrun(CPUX86State *env, int aflag, int next_eip_addend)
     }
     new_cr3 = x86_ldq_phys(cs, env->vm_vmcb + offsetof(struct vmcb, save.cr3));
     if ((env->efer & MSR_EFER_LMA) &&
-            (new_cr3 & ((~0UL) << cpu->phys_bits))) {
+            (new_cr3 & ((~0ULL) << cpu->phys_bits))) {
         cpu_vmexit(env, SVM_EXIT_ERR, 0, GETPC());
     }
     new_cr4 = x86_ldq_phys(cs, env->vm_vmcb + offsetof(struct vmcb, save.cr4));