From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark McLoughlin Date: Thu, 06 Nov 2008 10:49:51 +0000 Subject: Re: [PATCH] virtio: Define and use per-architecture "pfn shift" Message-Id: <1225968591.7284.9.camel@blaa> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Hollis Blanchard Cc: rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org, kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, kvm-ppc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, kvm-ia64-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Wed, 2008-11-05 at 22:49 -0600, Hollis Blanchard wrote: > - info->queue = kzalloc(PAGE_ALIGN(vring_size(num,PAGE_SIZE)), GFP_KERNEL); > + vring_bytes = PAGE_ALIGN(vring_size(num, VRING_PAGE_SIZE)); > + info->queue = kzalloc(vring_bytes, GFP_KERNEL); You're still aligning the size to PAGE_SIZE rather than VRING_PAGE_SIZE? But actually, why do we align the size anyway? Also might make sense for vring_init() and vring_size() not to take a pagesize argument and hard-code them to use VRING_PAGE_SIZE. Cheers, Mark.