From: Ingo Molnar <mingo@elte.hu>
To: Sasha Levin <levinsasha928@gmail.com>
Cc: penberg@kernel.org, asias.hejun@gmail.com,
prasadjoshi124@gmail.com, avi@redhat.com, gorcunov@gmail.com,
kvm@vger.kernel.org
Subject: Re: [PATCH 2/3 V2] kvm tools: Prevent PFN wraparound
Date: Wed, 11 May 2011 13:15:59 +0200 [thread overview]
Message-ID: <20110511111559.GD18521@elte.hu> (raw)
In-Reply-To: <1305086951-31698-2-git-send-email-levinsasha928@gmail.com>
* Sasha Levin <levinsasha928@gmail.com> wrote:
> +++ b/tools/kvm/include/kvm/virtio.h
> @@ -36,6 +36,11 @@ static inline bool virt_queue__available(struct virt_queue *vq)
> return vq->vring.avail->idx != vq->last_avail_idx;
> }
>
> +static inline void *guest_pfn_to_host(struct kvm *kvm, u32 pfn)
> +{
> + return guest_flat_to_host(kvm, (unsigned long)pfn << 12);
> +}
We should at minimum document that on 32-bit hosts this will clip things at
4GB.
Documenting such things helps, in case someone ventures into fixing this
limitation in the future.
Thanks,
Ingo
next prev parent reply other threads:[~2011-05-11 15:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-11 4:09 [PATCH 1/3] kvm tools: Add memory gap for larger RAM sizes Sasha Levin
2011-05-11 4:09 ` [PATCH 2/3 V2] kvm tools: Prevent PFN wraparound Sasha Levin
2011-05-11 11:15 ` Ingo Molnar [this message]
2011-05-11 4:09 ` [PATCH 3/3] kvm tools: Use definitions from kernel headers Sasha Levin
2011-05-11 10:59 ` Ingo Molnar
2011-05-11 7:15 ` [PATCH 1/3] kvm tools: Add memory gap for larger RAM sizes Ingo Molnar
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=20110511111559.GD18521@elte.hu \
--to=mingo@elte.hu \
--cc=asias.hejun@gmail.com \
--cc=avi@redhat.com \
--cc=gorcunov@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=levinsasha928@gmail.com \
--cc=penberg@kernel.org \
--cc=prasadjoshi124@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox