From: Andrea Arcangeli <aarcange@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Gerd Hoffmann <kraxel@redhat.com>,
qemu-devel@nongnu.org, kvm@vger.kernel.org, avi@redhat.com,
chrisw@redhat.com
Subject: Re: [PATCH 1 of 5] fix cpu_physical_memory len
Date: Fri, 12 Dec 2008 20:26:46 +0100 [thread overview]
Message-ID: <20081212192646.GB30537@random.random> (raw)
In-Reply-To: <4942B650.20609@codemonkey.ws>
On Fri, Dec 12, 2008 at 01:06:56PM -0600, Anthony Liguori wrote:
> Andrea Arcangeli wrote:
>> From: Andrea Arcangeli <aarcange@redhat.com>
>>
>> Be consistent and have length be size_t for all methods.
>>
>
> ram_addr_t would be better than size_t here.
Yes, that is feasible even if the dma api output remains a raw iovec
(as it'll surely bounce, and the bouncing internally can restarts with
unsigned long long length). To explain why it's set to a size_t, it's
just that I didn't think an emulated device would ever attempt a dma
on a >4G region on a 32bit host, and I was suggested to make this
assumption by the current code that can't even handle that on a 64bit
host (I made it possible on a 64bit host, on a 64bit host it makes
some sense as there can really be that much ram allocated). For 32bit
it mostly makes sense for mmio regions but that sounds a real
weirdness to do such a large dma on a mmio region. So I thought
sticking with size_t would less prone for truncation errors and I
could the sanity checking only once (currently you'd get a graceful
driver failure with the submit handler getting an error, if you
attempt that).
But I can change to ram_addr_t if you like. It's up to you!
next prev parent reply other threads:[~2008-12-12 19:26 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-12 18:16 [PATCH 0 of 5] dma api v3 Andrea Arcangeli
2008-12-12 18:16 ` [PATCH 1 of 5] fix cpu_physical_memory len Andrea Arcangeli
2008-12-12 19:06 ` Anthony Liguori
2008-12-12 19:26 ` Andrea Arcangeli [this message]
2008-12-12 18:16 ` [PATCH 2 of 5] add can_dma/post_dma for direct IO Andrea Arcangeli
2008-12-12 19:00 ` [Qemu-devel] " Blue Swirl
2008-12-12 19:18 ` Anthony Liguori
2008-12-12 20:05 ` Blue Swirl
2008-12-12 20:10 ` Anthony Liguori
2008-12-12 19:15 ` Anthony Liguori
2008-12-12 19:37 ` Andrea Arcangeli
2008-12-12 20:09 ` Anthony Liguori
2008-12-12 20:25 ` Gerd Hoffmann
2008-12-12 19:39 ` Anthony Liguori
2008-12-13 9:22 ` [Qemu-devel] " Avi Kivity
2008-12-13 16:45 ` Anthony Liguori
2008-12-13 19:48 ` Avi Kivity
2008-12-13 21:07 ` Anthony Liguori
2008-12-14 6:03 ` Avi Kivity
2008-12-14 19:10 ` Anthony Liguori
2008-12-14 19:49 ` Avi Kivity
2008-12-14 23:08 ` Anthony Liguori
2008-12-15 0:57 ` Paul Brook
2008-12-15 2:09 ` Anthony Liguori
2008-12-15 6:23 ` Avi Kivity
2008-12-15 18:35 ` Blue Swirl
2008-12-15 22:06 ` Anthony Liguori
2008-12-16 9:41 ` Avi Kivity
2008-12-16 16:55 ` Blue Swirl
2008-12-16 17:09 ` Avi Kivity
2008-12-16 17:48 ` Anthony Liguori
2008-12-16 18:11 ` Blue Swirl
2008-12-16 15:57 ` Blue Swirl
2008-12-16 16:29 ` Paul Brook
2008-12-16 16:35 ` Blue Swirl
2008-12-14 17:30 ` Jamie Lokier
2008-12-13 14:39 ` Andrea Arcangeli
2008-12-13 16:46 ` Anthony Liguori
2008-12-13 16:53 ` Andrea Arcangeli
2008-12-13 21:11 ` Anthony Liguori
2008-12-14 16:47 ` Andrea Arcangeli
2008-12-14 17:01 ` Avi Kivity
2008-12-14 17:15 ` Andrea Arcangeli
2008-12-14 19:59 ` Avi Kivity
2008-12-22 16:44 ` [Qemu-devel] " Ian Jackson
2008-12-22 19:44 ` Avi Kivity
2008-12-23 0:03 ` Thiemo Seufer
2008-12-23 1:02 ` Andrea Arcangeli
2008-12-23 17:31 ` Avi Kivity
2008-12-22 19:46 ` Avi Kivity
2009-01-05 10:27 ` Gerd Hoffmann
2008-12-13 22:47 ` Anthony Liguori
2008-12-14 6:07 ` Avi Kivity
2008-12-12 18:16 ` [PATCH 3 of 5] rename dma.c to isa_dma.c Andrea Arcangeli
2008-12-12 18:16 ` [PATCH 4 of 5] dma api Andrea Arcangeli
2008-12-12 18:55 ` [Qemu-devel] " Blue Swirl
2008-12-12 18:16 ` [PATCH 5 of 5] bdrv_aio_readv/writev Andrea Arcangeli
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=20081212192646.GB30537@random.random \
--to=aarcange@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=avi@redhat.com \
--cc=chrisw@redhat.com \
--cc=kraxel@redhat.com \
--cc=kvm@vger.kernel.org \
--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.