qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Hollis Blanchard <hollisb@us.ibm.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, Avi Kivity <avi@redhat.com>
Subject: [Qemu-devel] Re: [PATCH] Remove TARGET_PAGE_SIZE from virtio interface
Date: Wed, 26 Nov 2008 12:29:50 -0600	[thread overview]
Message-ID: <1227724190.6562.9.camel@localhost.localdomain> (raw)
In-Reply-To: <1227723726-15662-1-git-send-email-hollisb@us.ibm.com>

On Wed, 2008-11-26 at 12:22 -0600, Hollis Blanchard wrote:
> 
> diff --git a/hw/virtio.h b/hw/virtio.h
> index 1df8f83..c23f38c 100644
> --- a/hw/virtio.h
> +++ b/hw/virtio.h
> @@ -47,6 +47,11 @@
>  /* This means don't interrupt guest when buffer consumed. */
>  #define VRING_AVAIL_F_NO_INTERRUPT    1
> 
> +static inline vring_align(unsigned long addr, unsigned long align)
> +{
> +    return (addr + align - 1) & ~(align - 1);
> +}
> +
>  typedef struct VirtQueue VirtQueue;
>  typedef struct VirtIODevice VirtIODevice;

OK, obviously this doesn't need to be named "vring_align". I was going
to just build VIRTIO_PCI_VRING_ALIGN into this function, but in the
future we'll need to accommodate KVM_S390_VIRTIO_RING_ALIGN, so we would
need to pass in a parameter from virtqueue_init(). Of course, I'm not
sure how the S390 code will fit here anyways, since virtio.c is both
virtio ring and virtio PCI.

I haven't found an existing "align" function in qemu though...

-- 
Hollis Blanchard
IBM Linux Technology Center

  reply	other threads:[~2008-11-26 18:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-25 21:57 [Qemu-devel] [PATCH 1/2] Virtio core support Anthony Liguori
2008-11-25 21:57 ` [Qemu-devel] [PATCH 2/2] Virtio block device support Anthony Liguori
2008-11-26 18:24   ` Hollis Blanchard
2008-12-01 20:20   ` Hollis Blanchard
2008-12-01 20:22     ` Anthony Liguori
2008-11-26 18:11 ` [Qemu-devel] [PATCH 1/1] " Hollis Blanchard
2008-11-26 18:17   ` Hollis Blanchard
2008-11-26 18:22 ` [Qemu-devel] [PATCH] Remove TARGET_PAGE_SIZE from virtio interface Hollis Blanchard
2008-11-26 18:29   ` Hollis Blanchard [this message]
2008-12-01 18:19 ` [Qemu-devel] [PATCH] [v2] " Hollis Blanchard
2008-12-04 19:58   ` [Qemu-devel] " Anthony Liguori

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=1227724190.6562.9.camel@localhost.localdomain \
    --to=hollisb@us.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).