From: Pierre Morel <pmorel@linux.vnet.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 0/7] int128: reparing broken 128 bit memory calculations
Date: Tue, 10 Nov 2015 10:08:53 +0100 [thread overview]
Message-ID: <5641B425.8060304@linux.vnet.ibm.com> (raw)
In-Reply-To: <56408FA8.60602@redhat.com>
On 11/09/2015 01:20 PM, Paolo Bonzini wrote:
>
> On 09/11/2015 13:01, Pierre Morel wrote:
>>>> This leads to have UINT64_MAX represented with {1, 0} instead of
>>>> {0, UINT64_MAX} while {1, 0} is 2^64. This again leads to have
>>>> unnecessary and obfuscating transformations with int128_2_64() to
>>>> test for UINT64_MAX and return {1,0} in memory_region_init()
>>>> while using inverse translation test{1,0} and return UINT64_MAX
>>>> in memory_region_size()>>
>>> Yes, the use of UINT64_MAX for 2^64 is a hack, but it is unrelated to
>>> the signedness of Int128.
>> OK, we agree it is a hack,
>> but sorry, I should have missed something,
>> because I do not understand what this hack is useful for.
> It's used in the size argument of memory_region_init*, so that it can
> remain an uint64_t. The size is usually small (up to 2^40, say) unless
> it is 2^64 meaning "the whole address space". The latter case is
> covered by UINT64_MAX.
>
> Paolo
>
OK, I understand, thanks for having taking time for me.
To sum-up size is a size :-) and not an offset in memory.
Size of UINT64_MAX does not exist but we can live without it, having
a description for "whole address space", 2^64, can be useful.
Even there may be other solutions like taking 0 for 2^64,
if a memory size of 0 has no meaning,
but it could be misleading too.
So I do not see better solution for this interesting problematic.
next prev parent reply other threads:[~2015-11-10 9:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-05 16:18 [Qemu-devel] [PATCH 0/7] int128: reparing broken 128 bit memory calculations Pierre Morel
2015-11-05 16:18 ` [Qemu-devel] [PATCH 1/7] int128: use unsigned 128 bit arithmetic Pierre Morel
2015-11-05 16:18 ` [Qemu-devel] [PATCH 2/7] memory: modify memory size for an unsigned 128bit int Pierre Morel
2015-11-05 16:18 ` [Qemu-devel] [PATCH 3/7] 128bit: adapt core files for unsigned 128bits Pierre Morel
2015-11-05 16:18 ` [Qemu-devel] [PATCH 4/7] 128bit: adapt sparc mmu_helper for UInt128 Pierre Morel
2015-11-05 16:18 ` [Qemu-devel] [PATCH 5/7] 128bit: adapt VFIO for UInt128 arithmetic Pierre Morel
2015-11-05 16:18 ` [Qemu-devel] [PATCH 6/7] 128bit: adapt Virtio " Pierre Morel
2015-11-05 16:18 ` [Qemu-devel] [PATCH 7/7] 128bits: some HW components use 128bit arithmetic Pierre Morel
2015-11-05 16:32 ` [Qemu-devel] [PATCH 0/7] int128: reparing broken 128 bit memory calculations Paolo Bonzini
2015-11-06 8:36 ` Pierre Morel
2015-11-06 16:33 ` Paolo Bonzini
[not found] ` <56408B28.8070408@linux.vnet.ibm.com>
2015-11-09 12:20 ` Paolo Bonzini
2015-11-10 9:08 ` Pierre Morel [this message]
2015-11-10 12:12 ` Pierre Morel
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=5641B425.8060304@linux.vnet.ibm.com \
--to=pmorel@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.