[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/7] dataplane: add virtqueue vring code
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 3/7] dataplane: add virtqueue vring code |
Date: |
Thu, 15 Nov 2012 16:37:35 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1 |
Il 15/11/2012 16:19, Stefan Hajnoczi ha scritto:
> +/* Map target physical address to host address
> + */
> +static inline void *phys_to_host(Vring *vring, hwaddr phys)
> +{
> + /* Adjust for 3.6-4 GB PCI memory range */
> + if (phys >= 0x100000000) {
> + phys -= 0x100000000 - 0xe0000000;
> + } else if (phys >= 0xe0000000) {
> + fprintf(stderr, "phys_to_host bad physical address in "
> + "PCI range %#lx\n", phys);
> + exit(1);
> + }
> + return vring->phys_mem_zero_host_ptr + phys;
> +}
> +
Hmm, perhaps *this* is not quite ready. :)
What we want is lockless address_space_map. We're not far from it, but
not there either.
Can you add, at least for now, a weak function that does a 1:1 mapping,
and override it with the above code in hw/pc.c? The prototype then would be
static inline void *dataplane_phys_to_host(void *base, hwaddr phys)
{
}
or something like that.
Paolo
- [Qemu-devel] [PATCH 0/7] virtio: virtio-blk data plane, Stefan Hajnoczi, 2012/11/15
- [Qemu-devel] [PATCH 3/7] dataplane: add virtqueue vring code, Stefan Hajnoczi, 2012/11/15
- [Qemu-devel] [PATCH 4/7] dataplane: add event loop, Stefan Hajnoczi, 2012/11/15
- [Qemu-devel] [PATCH 5/7] dataplane: add Linux AIO request queue, Stefan Hajnoczi, 2012/11/15
- [Qemu-devel] [PATCH 7/7] virtio-blk: add x-data-plane=on|off performance feature, Stefan Hajnoczi, 2012/11/15