From: Ingo Molnar <mingo@elte.hu>
To: Sasha Levin <levinsasha928@gmail.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>,
KVM devel mailing list <kvm@vger.kernel.org>
Subject: Re: [PATCH] kvm tools: Fix type mismatches on GCC 4.4 on 32-bit systems
Date: Fri, 13 May 2011 12:05:59 +0200 [thread overview]
Message-ID: <20110513100559.GB21022@elte.hu> (raw)
In-Reply-To: <1305277917.25256.2.camel@lappy>
* Sasha Levin <levinsasha928@gmail.com> wrote:
> On Fri, 2011-05-13 at 10:19 +0200, Ingo Molnar wrote:
> > FYI, the tools/kvm build still fails on 32-bit:
> >
> > cc1: warnings being treated as errors
> > qcow.c: In function ‘qcow1_write_sector’:
> > qcow.c:307: error: comparison between signed and unsigned integer expressions
> > make: *** [qcow.o] Error 1
> > make: *** Waiting for unfinished jobs....
> >
> > using:
> >
> > gcc version 4.4.4 20100630 (Red Hat 4.4.4-10) (GCC)
> >
> > The patch below addresses them but i haven't tested it beyond checking that it
> > builds.
> >
> > The double cast of userspace_addr is doubly sad - it highlights our 32-bitness
> > problems which are visible in the guest_pfn_to_host() function as well.
>
> KVM API uses 64-bit addresses no matter the host bitness, so we can't
> really get around doing these sort of casts.
that bit is OK - the KVM ABI has to be for the largest bit width.
Note that this kind of ABI compatibility allows (in theory) to run a 32-bit kvm
binary on a 64-bit kernel, and still everything would work despite hypervisor
user-space being 32-bit.
So the cast to (unsigned long) is fine and clean.
Thanks,
Ingo
prev parent reply other threads:[~2011-05-13 10:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-13 8:19 [PATCH] kvm tools: Fix type mismatches on GCC 4.4 on 32-bit systems Ingo Molnar
2011-05-13 8:27 ` Pekka Enberg
2011-05-13 8:37 ` Ingo Molnar
2011-05-13 9:11 ` Sasha Levin
2011-05-13 10:05 ` Ingo Molnar [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=20110513100559.GB21022@elte.hu \
--to=mingo@elte.hu \
--cc=kvm@vger.kernel.org \
--cc=levinsasha928@gmail.com \
--cc=penberg@cs.helsinki.fi \
/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