From: Paolo Bonzini <pbonzini@redhat.com>
To: Lara Lazier <laramglazier@gmail.com>, qemu-devel@nongnu.org
Cc: "Volker Rümelin" <vr_qemu@t-online.de>
Subject: Re: [PATCH] target/i386: Fixed size of constant for Windows
Date: Thu, 12 Aug 2021 19:48:39 +0200 [thread overview]
Message-ID: <af0ddb50-c353-4661-07d1-61b0d7039fae@redhat.com> (raw)
In-Reply-To: <20210812111056.26926-1-laramglazier@gmail.com>
On 12/08/21 13:10, Lara Lazier wrote:
> ~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>
> ---
> target/i386/tcg/sysemu/misc_helper.c | 2 +-
> target/i386/tcg/sysemu/svm_helper.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/target/i386/tcg/sysemu/misc_helper.c b/target/i386/tcg/sysemu/misc_helper.c
> index 0a7a58ca9a..91b0fc916b 100644
> --- a/target/i386/tcg/sysemu/misc_helper.c
> +++ b/target/i386/tcg/sysemu/misc_helper.c
> @@ -97,7 +97,7 @@ void helper_write_crN(CPUX86State *env, int reg, target_ulong t0)
> break;
> case 3:
> if ((env->efer & MSR_EFER_LMA) &&
> - (t0 & ((~0UL) << env_archcpu(env)->phys_bits))) {
> + (t0 & ((~0ULL) << env_archcpu(env)->phys_bits))) {
> cpu_vmexit(env, SVM_EXIT_ERR, 0, GETPC());
> }
> if (!(env->efer & MSR_EFER_LMA)) {
> diff --git a/target/i386/tcg/sysemu/svm_helper.c b/target/i386/tcg/sysemu/svm_helper.c
> index 3891f4e4a8..42cd5053e5 100644
> --- a/target/i386/tcg/sysemu/svm_helper.c
> +++ b/target/i386/tcg/sysemu/svm_helper.c
> @@ -290,7 +290,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));
>
Queued, thanks.
Paolo
prev parent reply other threads:[~2021-08-12 17:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-12 11:10 [PATCH] target/i386: Fixed size of constant for Windows Lara Lazier
2021-08-12 11:37 ` [PATCH-for-6.1?] " Philippe Mathieu-Daudé
2021-08-12 12:54 ` Peter Maydell
2021-08-12 12:58 ` Philippe Mathieu-Daudé
2021-08-12 17:48 ` Paolo Bonzini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=af0ddb50-c353-4661-07d1-61b0d7039fae@redhat.com \
--to=pbonzini@redhat.com \
--cc=laramglazier@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=vr_qemu@t-online.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).