23 Feb, 2021

2 commits

  • Signed-off-by: Jason Wang
    Link: https://lore.kernel.org/r/20210104065503.199631-17-jasowang@redhat.com

    Including a bugfix:

    virtio: don't prompt CONFIG_VIRTIO_PCI_MODERN

    Cc: Arnd Bergmann
    Cc: Anders Roxell
    Cc: Guenter Roeck
    Reported-by: Naresh Kamboju
    Fixes: 86b87c9d858b6 ("virtio-pci: introduce modern device module")
    Signed-off-by: Jason Wang
    Acked-by: Arnd Bergmann
    Link: https://lore.kernel.org/r/20210223061905.422659-2-jasowang@redhat.com
    Signed-off-by: Michael S. Tsirkin

    Jason Wang
     
  • This patch splits out the virtio-pci modern device only attributes
    into another structure. While at it, a dedicated probe method for
    modern only attributes is introduced. This may help for split the
    logic into a dedicated module.

    Signed-off-by: Jason Wang
    Link: https://lore.kernel.org/r/20210104065503.199631-3-jasowang@redhat.com
    Signed-off-by: Michael S. Tsirkin

    Jason Wang
     

24 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this work is licensed under the terms of the gnu gpl version 2 or
    later see the copying file in the top level directory

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 6 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Richard Fontana
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190520075210.858783702@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

12 Aug, 2018

1 commit

  • Make vp_set_vq_affinity() take a cpumask instead of taking a single CPU.

    If there are fewer queues than cores, queue affinity should be able to
    map to multiple cores.

    Link: https://patchwork.ozlabs.org/patch/948149/
    Suggested-by: Willem de Bruijn
    Signed-off-by: Caleb Raitto
    Acked-by: Gonglei
    Signed-off-by: David S. Miller

    Caleb Raitto
     

03 May, 2017

1 commit

  • Allows maintaining extra context per vq. For ease of use, passing in
    NULL is legal and disables the feature for all vqs.

    Includes fixes by Christian for s390, acked by Cornelia.

    Signed-off-by: Christian Borntraeger
    Acked-by: Cornelia Huck
    Signed-off-by: Michael S. Tsirkin

    Michael S. Tsirkin
     

11 Apr, 2017

3 commits

  • This reverts commit 5c34d002dcc7a6dd665a19d098b4f4cd5501ba1a.

    Conflicts:
    drivers/virtio/virtio_pci_common.c

    The cleanup seems to be one of the changes that broke
    hybernation for some users. We are still not sure why
    but revert helps.

    This reverts the cleanup changes but keeps the affinity support.

    Tested-by: Mike Galbraith
    Signed-off-by: Michael S. Tsirkin

    Michael S. Tsirkin
     
  • This reverts commit 07ec51480b5eb1233f8c1b0f5d7a7c8d1247c507.

    Conflicts:
    drivers/virtio/virtio_pci_common.c

    Unfortunately the idea does not work with threadirqs
    as more than 32 queues can then map to a single interrupts.

    Further, the cleanup seems to be one of the changes that broke
    hybernation for some users. We are still not sure why
    but revert helps.

    This reverts the cleanup changes but keeps the affinity support.

    Tested-by: Mike Galbraith
    Signed-off-by: Michael S. Tsirkin

    Michael S. Tsirkin
     
  • This reverts commit 53a020c661741f3b87ad3ac6fa545088aaebac9b.

    The cleanup seems to be one of the changes that broke
    hybernation for some users. We are still not sure why
    but revert helps.

    Tested-by: Mike Galbraith
    Signed-off-by: Michael S. Tsirkin

    Michael S. Tsirkin
     

28 Feb, 2017

5 commits

  • This basically passed up the pci_irq_get_affinity information through
    virtio through an optional get_vq_affinity method. It is only implemented
    by the PCI backend for now, and only when we use per-virtqueue IRQs.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Jason Wang
    Signed-off-by: Michael S. Tsirkin

    Christoph Hellwig
     
  • Add a struct irq_affinity pointer to the find_vqs methods, which if set
    is used to tell the PCI layer to create the MSI-X vectors for our I/O
    virtqueues with the proper affinity from the start. Compared to after
    the fact affinity hints this gives us an instantly working setup and
    allows to allocate the irq descritors node-local and avoid interconnect
    traffic. Last but not least this will allow blk-mq queues are created
    based on the interrupt affinity for storage drivers.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Jason Wang
    Signed-off-by: Michael S. Tsirkin

    Christoph Hellwig
     
  • Signed-off-by: Christoph Hellwig
    Reviewed-by: Jason Wang
    Signed-off-by: Michael S. Tsirkin

    Christoph Hellwig
     
  • This lets IRQ layer handle dispatching IRQs to separate handlers for the
    case where we don't have per-VQ MSI-X vectors, and allows us to greatly
    simplify the code based on the assumption that we always have interrupt
    vector 0 (legacy INTx or config interrupt for MSI-X) available, and
    any other interrupt is request/freed throught the VQ, even if the
    actual interrupt line might be shared in some cases.

    This allows removing a great deal of variables keeping track of the
    interrupt state in struct virtio_pci_device, as we can now simply walk the
    list of VQs and deal with per-VQ interrupt handlers there, and only treat
    vector 0 special.

    Additionally clean up the VQ allocation code to properly unwind on error
    instead of having a single global cleanup label, which is error prone,
    and in this case also leads to more code.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Michael S. Tsirkin

    Christoph Hellwig
     
  • We don't really need struct virtio_pci_vq_info, as most field in there
    are redundant:

    - the vq backpointer is not strictly neede to start with
    - the entry in the vqs list is not needed - the generic virtqueue already
    has list, we only need to check if it has a callback to get the same
    semantics
    - we can use a simple array to look up the MSI-X vec if needed.
    - That simple array now also duoble serves to replace the per_vq_vectors
    flag

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Michael S. Tsirkin

    Christoph Hellwig
     

16 Dec, 2016

1 commit


02 Mar, 2016

1 commit

  • This switches to vring_create_virtqueue, simplifying the driver and
    adding DMA API support.

    This fixes virtio-pci on platforms and busses that have IOMMUs. This
    will break the experimental QEMU Q35 IOMMU support until QEMU is
    fixed. In exchange, it fixes physical virtio hardware as well as
    virtio-pci running under Xen.

    Signed-off-by: Andy Lutomirski
    Signed-off-by: Michael S. Tsirkin

    Andy Lutomirski
     

13 Jan, 2016

1 commit

  • checkpatch.pl wants arrays of strings declared as follows:

    static const char * const names[] = { "vq-1", "vq-2", "vq-3" };

    Currently the find_vqs() function takes a const char *names[] argument
    so passing checkpatch.pl's const char * const names[] results in a
    compiler error due to losing the second const.

    This patch adjusts the find_vqs() prototype and updates all virtio
    transports. This makes it possible for virtio_balloon.c, virtio_input.c,
    virtgpu_kms.c, and virtio_rpmsg_bus.c to use the checkpatch.pl-friendly
    type.

    Signed-off-by: Stefan Hajnoczi
    Signed-off-by: Michael S. Tsirkin
    Acked-by: Bjorn Andersson

    Stefan Hajnoczi
     

24 Jun, 2015

1 commit


21 Jan, 2015

4 commits


06 Jan, 2015

1 commit


14 Dec, 2014

1 commit


12 Dec, 2014

1 commit


10 Dec, 2014

1 commit