From: "Christoph Egger" <Christoph.Egger@amd.com>
To: xen-devel@lists.xensource.com
Cc: Keir Fraser <keir@xensource.com>
Subject: Re: RFC: vaddr_t and vsize_t
Date: Wed, 17 Jan 2007 17:21:26 +0100 [thread overview]
Message-ID: <200701171721.27064.Christoph.Egger@amd.com> (raw)
In-Reply-To: <C1D3F60F.7C1A%keir@xensource.com>
On Wednesday 17 January 2007 16:49, Keir Fraser wrote:
> On 17/1/07 15:17, "Christoph Egger" <Christoph.Egger@amd.com> wrote:
> > vaddr_t is used when a virtual address is meant. It is an unsigned
> > integer and its size always matches sizeof(void *).
> > vsize_t is used when the virtual address space is meant. It is an
> > unsigned integer and its size always matches the whole size of the
> > virtual address space.
>
> Is this distinction ever useful?
As long as no architecture is added to Xen which uses ILP rather LP64,
vsize_t is not really needed. For vaddr_t see below.
> The assumption that a pointer fits in a long is rather ingrained into Xen's
> code base. Any attempt to remove that assumption is going to need some big
> patches, and it's really not clear that we ought to care as I'm sure it's
> true for any architecture we can conceive of caring one jot about.
Once an ILP arch comes up, the assumption is no longer true. Until this
happens, noone need to care.
This stuff is about removing a place where programmers can make mistakes.
vaddr_t also avoids void * arithmetics. It should be possible then to use
-Wpointer-arith.
I don't mind if you dislike vsize_t for the above reason. What do you think
about vaddr_t?
Christoph
next prev parent reply other threads:[~2007-01-17 16:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-17 15:17 RFC: vaddr_t and vsize_t Christoph Egger
2007-01-17 15:49 ` Keir Fraser
2007-01-17 16:21 ` Christoph Egger [this message]
2007-01-17 16:51 ` Keir Fraser
2007-01-18 7:13 ` Christoph Egger
2007-01-18 7:31 ` Keir Fraser
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=200701171721.27064.Christoph.Egger@amd.com \
--to=christoph.egger@amd.com \
--cc=keir@xensource.com \
--cc=xen-devel@lists.xensource.com \
/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.