All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3 0/7] s390x/pci: Improve zPCI to cover more cases
@ 2017-11-22 22:05 Pierre Morel
  2017-11-22 22:05 ` [Qemu-devel] [PATCH v3 1/7] s390x/pci: factor out endianess conversion Pierre Morel
                   ` (7 more replies)
  0 siblings, 8 replies; 50+ messages in thread
From: Pierre Morel @ 2017-11-22 22:05 UTC (permalink / raw)
  To: qemu-devel; +Cc: cohuck, agraf, borntraeger, zyimin, pasic

This patch fixes the following BUG:
Even a guest is able to detect virtio_pci device, the init function
the Linux virtio_pci driver will hang because zPCI does not support
the subregions used by virtio_pci.

It follows that right now the PCI support is very limited
(e.g. pass through of a host vfio device)
To enable features like virtio-pci several modifications needs to be
done.

As already stated above, Virtio-PCI uses subregions, which may eventually
be discontinuous inside bars instead of a single flat region often used
by real devices.
The address offset being formerly calculated from the BAR base address
must be adapted to the subregions instead of to the single region.

This patch provides the new calculation for the three kind of BAR
access, zPCI STORE, zPCI LOAD and zPCI STORE BLOCK done by zPCI.

We use the opportunity to
 - enhance the fault detection for zPCI STORE and LOAD,
 - enhance the fault detection and to provide the maximum STORE BLOCK
   block size, maxstbl, for zPCI STORE BLOCK
 - factor out part of the code used to calculate the offset and
   access the BARs,
 - factor out the code for endianess conversion.


Pierre Morel (7):
  s390x/pci: factor out endianess conversion
  s390x/pci: rework PCI STORE
  s390x/pci: rework PCI LOAD
  s390x/pci: rework PCI STORE BLOCK
  s390x/pci: move the memory region read from pcilg
  s390x/pci: move the memory region write from pcistg
  s390x/pci: search for subregion inside the BARs

 hw/s390x/s390-pci-bus.h  |   1 +
 hw/s390x/s390-pci-inst.c | 248 ++++++++++++++++++++++++++++-------------------
 hw/s390x/s390-pci-inst.h |   2 +-
 3 files changed, 151 insertions(+), 100 deletions(-)

-- 
2.7.4

Changelog:

from v2
- rewording of comments, coding style.

from v1
- suppress fallthrough to PCI_ROM_SLOT to handle it in the default case.
- reword most of the patch commit messages
- add comments to the endianness conversion
- reword somme comments inside the patches

^ permalink raw reply	[flat|nested] 50+ messages in thread

end of thread, other threads:[~2017-11-28 17:29 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-22 22:05 [Qemu-devel] [PATCH v3 0/7] s390x/pci: Improve zPCI to cover more cases Pierre Morel
2017-11-22 22:05 ` [Qemu-devel] [PATCH v3 1/7] s390x/pci: factor out endianess conversion Pierre Morel
2017-11-23  8:48   ` Thomas Huth
2017-11-23  9:49     ` Cornelia Huck
2017-11-23 10:01       ` Thomas Huth
2017-11-23 10:08         ` Cornelia Huck
2017-11-23 10:25           ` Thomas Huth
2017-11-23 10:33             ` Cornelia Huck
2017-11-23 11:35               ` [Qemu-devel] [qemu-s390x] " Thomas Huth
2017-11-28 17:28                 ` Michael S. Tsirkin
2017-11-23 12:07               ` [Qemu-devel] " Yi Min Zhao
2017-11-23 12:18                 ` [Qemu-devel] [qemu-s390x] " Thomas Huth
2017-11-24  6:19                   ` Yi Min Zhao
2017-11-25 13:49                     ` Pierre Morel
2017-11-27  6:31                       ` Yi Min Zhao
2017-11-27  6:59                       ` Thomas Huth
2017-11-27  8:22                         ` Pierre Morel
2017-11-27 10:09                         ` Yi Min Zhao
2017-11-27 11:13                           ` Thomas Huth
2017-11-28  6:41                             ` Yi Min Zhao
2017-11-27 11:02                         ` Cornelia Huck
2017-11-27 14:34                           ` Cornelia Huck
2017-11-27 15:24                             ` Pierre Morel
2017-11-27 15:30                               ` Cornelia Huck
2017-11-27 15:53                                 ` Pierre Morel
2017-11-27 16:02                                   ` Cornelia Huck
2017-11-27 16:40                                     ` Pierre Morel
2017-11-28  6:48                                     ` Yi Min Zhao
2017-11-22 22:05 ` [Qemu-devel] [PATCH v3 2/7] s390x/pci: rework PCI STORE Pierre Morel
2017-11-23  9:01   ` Thomas Huth
2017-11-25 10:39     ` Pierre Morel
2017-11-27  6:45       ` Thomas Huth
2017-11-23  9:54   ` Cornelia Huck
2017-11-25 10:37     ` Pierre Morel
2017-11-22 22:05 ` [Qemu-devel] [PATCH v3 3/7] s390x/pci: rework PCI LOAD Pierre Morel
2017-11-22 22:05 ` [Qemu-devel] [PATCH v3 4/7] s390x/pci: rework PCI STORE BLOCK Pierre Morel
2017-11-23  9:26   ` Thomas Huth
2017-11-27  8:17     ` Pierre Morel
2017-11-22 22:05 ` [Qemu-devel] [PATCH v3 5/7] s390x/pci: move the memory region read from pcilg Pierre Morel
2017-11-23  9:32   ` Thomas Huth
2017-11-25 10:40     ` Pierre Morel
2017-11-22 22:05 ` [Qemu-devel] [PATCH v3 6/7] s390x/pci: move the memory region write from pcistg Pierre Morel
2017-11-23  9:36   ` Thomas Huth
2017-11-25 10:40     ` Pierre Morel
2017-11-22 22:05 ` [Qemu-devel] [PATCH v3 7/7] s390x/pci: search for subregion inside the BARs Pierre Morel
2017-11-23  9:54   ` Thomas Huth
2017-11-27  8:10     ` Pierre Morel
2017-11-22 22:38 ` [Qemu-devel] [PATCH v3 0/7] s390x/pci: Improve zPCI to cover more cases no-reply
2017-11-23 10:06   ` Christian Borntraeger
2017-11-23 13:11     ` Fam Zheng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.