qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Would virtio support 64 bit address for vring virtqueue


From: Xie, Huawei
Subject: Re: [Qemu-devel] Would virtio support 64 bit address for vring virtqueue?
Date: Wed, 28 Aug 2013 10:16:43 +0000

If this is the case, one possible fix would be:
        Write two continuous 32bit DWORD to combine a 64bit address
        Use the upper 12 bits of PFN val to indicate if it is combined write
In this way, we wouldn't break other virtio driver, register layout and only 
need a few lines of modification.

-----Original Message-----
From: Xie, Huawei 
Sent: Wednesday, August 28, 2013 5:23 PM
To: 'Stefan Hajnoczi'
Cc: address@hidden; address@hidden; Stefan Hajnoczi
Subject: RE: [Qemu-devel] Would virtio support 64 bit address for vring 
virtqueue?

Hi Stefan:
I think you mention the descriptor address? I mean the vring PFN register.
/* A 32-bit r/w PFN for the currently selected queue */
#define VIRTIO_PCI_QUEUE_PFN            8

And the linux driver sample code:
iowrite32(virt_to_phys(info->queue) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT,
                  vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN);

-----Original Message-----
From: Stefan Hajnoczi [mailto:address@hidden 
Sent: Wednesday, August 28, 2013 4:07 PM
To: Xie, Huawei
Cc: address@hidden; address@hidden; Stefan Hajnoczi
Subject: Re: [Qemu-devel] Would virtio support 64 bit address for vring 
virtqueue?

On Wed, Aug 28, 2013 at 03:18:39AM +0000, Xie, Huawei wrote:
> I am developing virtio user space poll mode network driver. We allocate vring 
> physical memory from huge page. On VMs with less than 4GB  memory, it works 
> well.  But on VMs with like 8GB memory, huge page are all allocated from high 
> end memory.
> So would virtio support 64bit address for vring virtqueue?

The vring takes guest physical addresses and the C type is __u64 (see 
/usr/include/linux/virtio_ring.h).  64-bit addresses are fine.

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]