diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-04 19:58:45 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-04 19:58:45 +0000 |
commit | f46f15bca78946f3debc9eaa6dbf3a9a9e57872d (patch) | |
tree | 57a14424ee023c12c648893eac927871929417a2 /hw/virtio.h | |
parent | 6e02c38dadfe4cf02b0da6135adfd8d9352b90e1 (diff) |
Remove TARGET_PAGE_SIZE from virtio interface (Hollis Blanchard)
TARGET_PAGE_SIZE should only be used internal to qemu, not in guest/host
interfaces. The virtio frontend code in Linux uses two constants (PFN shift
and vring alignment) for the interface, so update qemu to match.
I've tested this with PowerPC KVM and confirmed that it fixes virtio problems
when using non-TARGET_PAGE_SIZE pages in the guest.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5871 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/virtio.h')
-rw-r--r-- | hw/virtio.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/virtio.h b/hw/virtio.h index f04e75f887..8c9cbaf63e 100644 --- a/hw/virtio.h +++ b/hw/virtio.h @@ -48,6 +48,12 @@ struct VirtQueue; +static inline target_phys_addr_t vring_align(target_phys_addr_t addr, + unsigned long align) +{ + return (addr + align - 1) & ~(align - 1); +} + typedef struct VirtQueue VirtQueue; typedef struct VirtIODevice VirtIODevice; |