From: Rusty Russell <rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org>
To: Hollis Blanchard <hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: aliguori-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org,
markmc-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
xiantao.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kvm-ppc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] [v2] linux: virtio: Standardize virtio's concept of "page size"
Date: Fri, 14 Nov 2008 11:57:21 +1030 [thread overview]
Message-ID: <200811141157.22850.rusty@rustcorp.com.au> (raw)
In-Reply-To: <1226612913.5339.42.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
On Friday 14 November 2008 08:18:33 Hollis Blanchard wrote:
> On Thu, 2008-11-13 at 08:44 +1030, Rusty Russell wrote:
> > Note that I still don't have a balloon patch: want to send me one?
>
> linux: virtio-balloon: avoid implicit use of Linux page size in balloon
> interface
Thanks, applied with following diff:
Use tabs to indent, and put BUILD_BUG_ON pagesize assumption.
Signed-off-by: Rusty Russell <rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org>
diff -r 50e970613233 drivers/virtio/virtio_balloon.c
--- a/drivers/virtio/virtio_balloon.c Fri Nov 14 11:40:38 2008 +1030
+++ b/drivers/virtio/virtio_balloon.c Fri Nov 14 11:41:19 2008 +1030
@@ -58,10 +58,11 @@
static u32 page_to_balloon_pfn(struct page *page)
{
- unsigned long pfn = page_to_pfn(page);
+ unsigned long pfn = page_to_pfn(page);
- /* Convert pfn from Linux page size to balloon page size. */
- return pfn >> (PAGE_SHIFT - VIRTIO_BALLOON_PFN_SHIFT);
+ BUILD_BUG_ON(PAGE_SHIFT < VIRTIO_BALLOON_PFN_SHIFT);
+ /* Convert pfn from Linux page size to balloon page size. */
+ return pfn >> (PAGE_SHIFT - VIRTIO_BALLOON_PFN_SHIFT);
}
static void balloon_ack(struct virtqueue *vq)
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-11-14 1:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <fa3de103a4e7d70354e0.1226360229@localhost.localdomain>
[not found] ` <200811112347.27844.rusty@rustcorp.com.au>
2008-11-11 17:18 ` [PATCH] [v2] linux: virtio: Standardize virtio's concept of "page size" Hollis Blanchard
2008-11-11 17:21 ` Avi Kivity
2008-11-12 12:21 ` Rusty Russell
[not found] ` <200811122251.14159.rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org>
2008-11-12 16:16 ` Hollis Blanchard
2008-11-12 22:14 ` Rusty Russell
2008-11-13 21:48 ` Hollis Blanchard
[not found] ` <1226612913.5339.42.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-11-14 1:27 ` Rusty Russell [this message]
[not found] ` <200811130844.57749.rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org>
2008-11-13 21:49 ` Hollis Blanchard
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=200811141157.22850.rusty@rustcorp.com.au \
--to=rusty-8n+1lvoiyb80n/f98k4iww@public.gmane.org \
--cc=aliguori-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
--cc=hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
--cc=kvm-ppc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=markmc-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=xiantao.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox