Re: [PATCH 16/22] virtio_pci: use separate notification offsets for each vq.

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

 



On Thu, Mar 21, 2013 at 12:13:00PM +0200, Michael S. Tsirkin wrote:
> On Thu, Mar 21, 2013 at 06:59:37PM +1030, Rusty Russell wrote:
> > (MST, is this what you were thinking?)
> 
> Almost.
> 
> Three points:
> 
> 1. this is still an offset in BAR so for KVM we are still forced to use
> an IO BAR.  I would like an option for hypervisor to simply say "Do IO
> to this fixed address for this VQ". Then virtio can avoid using IO BARs
> completely.
> 
> 2.  for a real virtio device, offset is only 16 bit, using a 32 bit
> offset in a memory BAR giving each VQ a separate 4K page would allow
> priveledge separation where e.g. RXVQ/TXVQ are passed through to
> hardware but CVQ is handled by the hypervisor.
> 
> 3. last thing - (1) applies to ISR reads as well.
> 
> So I had in mind a structure like:
> 
> 	struct vq_notify {
> 		u32 offset;
> 		u16 data;
> 		u16 flags;
> 	}
> 
> enum vq_notify_flags {
> 	VQ_NOTIFY_BAR0,
> 	VQ_NOTIFY_BAR1,
> 	VQ_NOTIFY_BAR2,
> 	VQ_NOTIFY_BAR3,
> 	VQ_NOTIFY_BAR4,
> 	VQ_NOTIFY_BAR5,
> 	VQ_NOTIFY_FIXED_IOPORT,
> }
> 
> And then to notify a vq we write a given data at given offset
> or into a given port for VQ_NOTIFY_FIXED_IOPORT.
> 
> Only point 1 is really important for me though, I can be
> flexible on the rest of it.

So the minimal change on top of this patch, would be adding a FIXED
option to BIR and reporting data and not just offset for queue_notify
(so it can include device info if we share same address between
devices).

-- 
MST
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux