Re: [PATCH 13/22] virtio_pci: new, capability-aware driver.

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

 



"Michael S. Tsirkin" <mst@xxxxxxxxxx> writes:
> On Thu, Mar 21, 2013 at 06:59:34PM +1030, Rusty Russell wrote:
>> Differences:
>> 1) Uses 4 pci capabilities to demark common, irq, notify and dev-specific areas.
>> 2) Guest sets queue size, using host-provided maximum.
>> 3) Guest sets queue alignment, rather than ABI-defined 4096.
>> 4) More than 32 feature bits (a lot more!).
...
>> +/* Constants for MSI-X */
>> +/* Use first vector for configuration changes, second and the rest for
>> + * virtqueues Thus, we need at least 2 vectors for MSI. */
>> +enum {
>> +	VP_MSIX_CONFIG_VECTOR = 0,
>> +	VP_MSIX_VQ_VECTOR = 1,
>> +};
>
> In the future, I have a plan to allow one vector only.  To make this
> work without exits for data path VQ, we could make hypervisor set a bit
> in guest memory whenever it wants to signal a configuration change.
> Guest will execute a config write that will make the hypervisor clear
> this register.
>
> I guess this can wait, we are putting too stuff much into this
> new layout patchset already.

Yeah, trying not to boil the ocean... and I'm not sure that reinventing
MSI-X manually is a good idea anyway.

>> +static void vp_reset(struct virtio_device *vdev)
>> +{
>> +	struct virtio_pci_device *vp_dev = to_vp_device(vdev);
>> +	/* 0 status means a reset. */
>> +	iowrite8(0, &vp_dev->common->device_status);
>> +	/* Flush out the status write, and flush in device writes,
>> +	 * including MSi-X interrupts, if any. */
>
> MSI-X ?

Thanks, fixed.

Cheers,
Rusty.
_______________________________________________
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