From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark McLoughlin Subject: Re: [PATCH] qemu: define and use VIRTIO_PFN_SHIFT Date: Thu, 06 Nov 2008 10:54:15 +0000 Message-ID: <1225968855.7284.15.camel@blaa> References: <43a111ea61b542d3823e.1225946995@localhost.localdomain> Reply-To: Mark McLoughlin Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit 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 To: Hollis Blanchard Return-path: In-Reply-To: <43a111ea61b542d3823e.1225946995-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org> Sender: kvm-ppc-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: kvm.vger.kernel.org On Wed, 2008-11-05 at 22:49 -0600, Hollis Blanchard wrote: > diff --git a/qemu/hw/virtio.c b/qemu/hw/virtio.c > --- a/qemu/hw/virtio.c > +++ b/qemu/hw/virtio.c > @@ -56,6 +56,10 @@ > */ > #define wmb() do { } while (0) > > +#define VRING_PAGE_SIZE (1<<12) > + > +#define ALIGN(x, a) (((x)+(a)-1) & ~((a)-1)) Might be better to do: #define VRING_PAGE_SIZE (1<<12) #define VRING_PAGE_MASK ~(VRING_PAGE_SIZE - 1) #define VRING_PAGE_ALIGN(x) (((x) + VRING_PAGE_SIZE - 1) & VRING_PAGE_MASK) Cheers, Mark -- 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