All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark McLoughlin <markmc@redhat.com>
To: kvm-ia64@vger.kernel.org
Subject: Re: [PATCH] qemu: define and use VIRTIO_PFN_SHIFT
Date: Thu, 06 Nov 2008 10:54:15 +0000	[thread overview]
Message-ID: <1225968855.7284.15.camel@blaa> (raw)

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


WARNING: multiple messages have this Message-ID (diff)
From: Mark McLoughlin <markmc@redhat.com>
To: Hollis Blanchard <hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
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
Subject: Re: [PATCH] qemu: define and use VIRTIO_PFN_SHIFT
Date: Thu, 06 Nov 2008 10:54:15 +0000	[thread overview]
Message-ID: <1225968855.7284.15.camel@blaa> (raw)
In-Reply-To: <43a111ea61b542d3823e.1225946995-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.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


WARNING: multiple messages have this Message-ID (diff)
From: Mark McLoughlin <markmc-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Hollis Blanchard <hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
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
Subject: Re: [PATCH] qemu: define and use VIRTIO_PFN_SHIFT
Date: Thu, 06 Nov 2008 10:54:15 +0000	[thread overview]
Message-ID: <1225968855.7284.15.camel@blaa> (raw)
In-Reply-To: <43a111ea61b542d3823e.1225946995-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.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

             reply	other threads:[~2008-11-06 10:54 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-06 10:54 Mark McLoughlin [this message]
2008-11-06 10:54 ` [PATCH] qemu: define and use VIRTIO_PFN_SHIFT Mark McLoughlin
2008-11-06 10:54 ` Mark McLoughlin
2008-11-06 14:01 ` Anthony Liguori
2008-11-06 14:01   ` Anthony Liguori
2008-11-06 14:01   ` Anthony Liguori
2008-11-06 19:02 ` Hollis Blanchard
2008-11-06 19:02   ` Hollis Blanchard
2008-11-06 19:02   ` Hollis Blanchard
2008-11-06 20:02 ` Anthony Liguori
2008-11-06 20:02   ` Anthony Liguori
2008-11-06 20:02   ` Anthony Liguori
2008-11-07  1:38 ` Zhang, Xiantao
2008-11-07  1:38   ` Zhang, Xiantao
2008-11-07  1:38   ` Zhang, Xiantao
2008-11-07  5:05 ` Hollis Blanchard
2008-11-07  5:05   ` Hollis Blanchard
2008-11-07  5:05   ` Hollis Blanchard
2008-11-10  5:55 ` Zhang, Xiantao
2008-11-10  5:55   ` Zhang, Xiantao
2008-11-10  5:55   ` Zhang, Xiantao
  -- strict thread matches above, loose matches on Subject: below --
2008-11-06 23:27 dynamic virtio page size Hollis Blanchard
2008-11-06 23:27 ` Hollis Blanchard
2008-11-06 23:27 ` Hollis Blanchard
2008-11-06 23:32 ` Hollis Blanchard
2008-11-06 23:32   ` Hollis Blanchard
2008-11-06 23:32   ` Hollis Blanchard
2008-11-06  4:49 [PATCH] qemu: define and use VIRTIO_PFN_SHIFT 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=1225968855.7284.15.camel@blaa \
    --to=markmc@redhat.com \
    --cc=kvm-ia64@vger.kernel.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.