From: Max Reitz <mreitz@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
qemu-devel@nongnu.org, Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH] i386/kvm: Fix build with -m32
Date: Mon, 24 Jun 2019 21:26:27 +0200 [thread overview]
Message-ID: <8cfbd3c5-9473-46bf-b59b-b7d7711d636f@redhat.com> (raw)
In-Reply-To: <20190624192108.GL1862@habkost.net>
On 24.06.19 21:21, Eduardo Habkost wrote:
> On Mon, Jun 24, 2019 at 09:02:14PM +0200, Max Reitz wrote:
>> find_next_bit() takes a pointer of type "const unsigned long *", but the
>> first argument passed here is a "uint64_t *". These types are
>> incompatible when compiling qemu with -m32.
>>
>> Just cast it to "const void *", find_next_bit() works fine with any type
>> on little-endian hosts (which x86 is).
>>
>> Fixes: c686193072a47032d83cb4e131dc49ae30f9e5d
>> Signed-off-by: Max Reitz <mreitz@redhat.com>
>
> Why not declare kvm_hyperv_properties.dependencies with the right
> type for bitmaps, using
> unsigned long dependencies[BITS_TO_LONGS(64)]
> ?
How would you (statically) initialize that field, then?
I cannot imagine a reasonable static way that does not invoke the same
“The host must be little-endian, so it’s OK” assumption.
The better question is perhaps, why not use ffsll(). Hm. I don’t know,
maybe I should?
Max
next prev parent reply other threads:[~2019-06-24 19:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-24 19:02 [Qemu-devel] [PATCH] i386/kvm: Fix build with -m32 Max Reitz
2019-06-24 19:21 ` Eduardo Habkost
2019-06-24 19:26 ` Max Reitz [this message]
2019-06-24 19:30 ` Max Reitz
2019-06-24 19:56 ` Eduardo Habkost
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=8cfbd3c5-9473-46bf-b59b-b7d7711d636f@redhat.com \
--to=mreitz@redhat.com \
--cc=ehabkost@redhat.com \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).