mbox

[PULL,00/16] virtio, vhost, pci: fixes, features

Message ID 1485297322-10595-1-git-send-email-mst@redhat.com
State New
Headers show

Pull-request

git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream

Message

Michael S. Tsirkin Jan. 24, 2017, 10:36 p.m. UTC
The following changes since commit a9e404600a9bd1e6a26431fc89e5069092e67f14:

  Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20170124' into staging (2017-01-24 17:26:26 +0000)

are available in the git repository at:

  git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream

for you to fetch changes up to b562d945fc840131d290d4bf5af8d6cc3bb98a2b:

  vhost-user: delete chardev on cleanup (2017-01-24 21:49:25 +0200)

----------------------------------------------------------------
virtio, vhost, pci: fixes, features

generic pci root port support
fixes and cleanups all over the place

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Cao jin (3):
      msix: Follow CODING_STYLE
      hcd-xhci: check & correct param before using it
      pci: Convert msix_init() to Error and fix callers

Haozhong Zhang (1):
      hw/i386: check if nvdimm is enabled before plugging

Jason Wang (1):
      intel_iommu: fix and simplify size calculation in process_device_iotlb_desc()

Marc-André Lureau (1):
      vhost-user: delete chardev on cleanup

Marcel Apfelbaum (3):
      hw/pcie: Introduce a base class for PCI Express Root Ports
      hw/ioh3420: derive from PCI Express Root Port base class
      hw/pcie: Introduce Generic PCI Express Root Port

Michael S. Tsirkin (6):
      compiler: drop ; after BUILD_BUG_ON
      compiler: rework BUG_ON using a struct
      compiler: expression version of QEMU_BUILD_BUG_ON
      ARRAY_SIZE: check that argument is an array
      pci: mark ROMs read-only
      vhost: skip ROM sections

Paolo Bonzini (1):
      virtio: make virtio_should_notify static

 default-configs/arm-softmmu.mak    |   1 +
 default-configs/i386-softmmu.mak   |   1 +
 default-configs/x86_64-softmmu.mak |   1 +
 include/hw/pci/msix.h              |   5 +-
 include/hw/pci/pci.h               |   1 +
 include/hw/pci/pcie_port.h         |  19 +++++
 include/hw/virtio/virtio.h         |   1 -
 include/qemu/compiler.h            |  11 ++-
 include/qemu/osdep.h               |   9 +-
 hw/block/nvme.c                    |   2 +-
 hw/i386/intel_iommu.c              |  10 ++-
 hw/i386/pc.c                       |   5 ++
 hw/misc/ivshmem.c                  |   8 +-
 hw/net/e1000e.c                    |   2 +-
 hw/net/rocker/rocker.c             |   4 +-
 hw/net/vmxnet3.c                   |   2 +-
 hw/pci-bridge/gen_pcie_root_port.c |  87 +++++++++++++++++++
 hw/pci-bridge/ioh3420.c            | 121 ++++----------------------
 hw/pci-bridge/pcie_root_port.c     | 171 +++++++++++++++++++++++++++++++++++++
 hw/pci/msix.c                      |  44 ++++++++--
 hw/pci/pci.c                       |   2 +-
 hw/scsi/megasas.c                  |   4 +-
 hw/usb/hcd-xhci.c                  |  41 +++++----
 hw/vfio/pci.c                      |   8 +-
 hw/virtio/vhost.c                  |   3 +-
 hw/virtio/virtio-pci.c             |   4 +-
 hw/virtio/virtio.c                 |   2 +-
 net/vhost-user.c                   |   3 +
 hw/pci-bridge/Makefile.objs        |   1 +
 29 files changed, 416 insertions(+), 157 deletions(-)
 create mode 100644 hw/pci-bridge/gen_pcie_root_port.c
 create mode 100644 hw/pci-bridge/pcie_root_port.c

Comments

Peter Maydell Jan. 25, 2017, 4:36 p.m. UTC | #1
On 24 January 2017 at 22:36, Michael S. Tsirkin <mst@redhat.com> wrote:
> The following changes since commit a9e404600a9bd1e6a26431fc89e5069092e67f14:
>
>   Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20170124' into staging (2017-01-24 17:26:26 +0000)
>
> are available in the git repository at:
>
>   git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream
>
> for you to fetch changes up to b562d945fc840131d290d4bf5af8d6cc3bb98a2b:
>
>   vhost-user: delete chardev on cleanup (2017-01-24 21:49:25 +0200)
>
> ----------------------------------------------------------------
> virtio, vhost, pci: fixes, features
>
> generic pci root port support
> fixes and cleanups all over the place
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

Hi; I'm afraid this fails to build:

/home/pm215/qemu/hw/pci-bridge/gen_pcie_root_port.c:54:9: error:
implicit declaration of function ‘VMSTATE_PCIE_DEVICE’
[-Werror=implicit-function-declaration]
         VMSTATE_PCIE_DEVICE(parent_obj.parent_obj.parent_obj, PCIESlot),
         ^
/home/pm215/qemu/hw/pci-bridge/gen_pcie_root_port.c:54:29: error:
‘parent_obj’ undeclared here (not in a function)
         VMSTATE_PCIE_DEVICE(parent_obj.parent_obj.parent_obj, PCIESlot),
                             ^
/home/pm215/qemu/hw/pci-bridge/gen_pcie_root_port.c:54:63: error:
expected expression before ‘PCIESlot’
         VMSTATE_PCIE_DEVICE(parent_obj.parent_obj.parent_obj, PCIESlot),
                                                               ^

thanks
-- PMM
Marcel Apfelbaum Jan. 25, 2017, 6:02 p.m. UTC | #2
On 01/25/2017 06:36 PM, Peter Maydell wrote:
> On 24 January 2017 at 22:36, Michael S. Tsirkin <mst@redhat.com> wrote:
>> The following changes since commit a9e404600a9bd1e6a26431fc89e5069092e67f14:
>>
>>   Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20170124' into staging (2017-01-24 17:26:26 +0000)
>>
>> are available in the git repository at:
>>
>>   git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream
>>
>> for you to fetch changes up to b562d945fc840131d290d4bf5af8d6cc3bb98a2b:
>>
>>   vhost-user: delete chardev on cleanup (2017-01-24 21:49:25 +0200)
>>
>> ----------------------------------------------------------------
>> virtio, vhost, pci: fixes, features
>>
>> generic pci root port support
>> fixes and cleanups all over the place
>>
>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>
> Hi; I'm afraid this fails to build:
>
> /home/pm215/qemu/hw/pci-bridge/gen_pcie_root_port.c:54:9: error:
> implicit declaration of function ‘VMSTATE_PCIE_DEVICE’
> [-Werror=implicit-function-declaration]
>          VMSTATE_PCIE_DEVICE(parent_obj.parent_obj.parent_obj, PCIESlot),
>          ^
> /home/pm215/qemu/hw/pci-bridge/gen_pcie_root_port.c:54:29: error:
> ‘parent_obj’ undeclared here (not in a function)
>          VMSTATE_PCIE_DEVICE(parent_obj.parent_obj.parent_obj, PCIESlot),
>                              ^
> /home/pm215/qemu/hw/pci-bridge/gen_pcie_root_port.c:54:63: error:
> expected expression before ‘PCIESlot’
>          VMSTATE_PCIE_DEVICE(parent_obj.parent_obj.parent_obj, PCIESlot),
>

Hi Peter,

Strange, I re-based in the same day I posted and compiled just fine...
However, I get the same error using today's master.

I'll fix and re-post the series.

Thanks,
Marcel
                                                                 ^
>
> thanks
> -- PMM
>
Peter Maydell Jan. 25, 2017, 6:08 p.m. UTC | #3
On 25 January 2017 at 18:02, Marcel Apfelbaum
<marcel.apfelbaum@gmail.com> wrote:
> Strange, I re-based in the same day I posted and compiled just fine...
> However, I get the same error using today's master.
>
> I'll fix and re-post the series.

mst has done a rebase of the pull request which I'll retry later.

thanks
-- PMM
Marcel Apfelbaum Jan. 25, 2017, 6:45 p.m. UTC | #4
On 01/25/2017 08:08 PM, Peter Maydell wrote:
> On 25 January 2017 at 18:02, Marcel Apfelbaum
> <marcel.apfelbaum@gmail.com> wrote:
>> Strange, I re-based in the same day I posted and compiled just fine...
>> However, I get the same error using today's master.
>>
>> I'll fix and re-post the series.
>
> mst has done a rebase of the pull request which I'll retry later.
>

Understood, anyway the problem is that commit
20daa90 (PCI/migration merge vmstate_pci_device and vmstate_pcie_device)
removed the VMSTATE_PCIE_DEVICE macro.

I'll re-post anyway and Michael can decide if he tweaks the macro name
or use the updated series.

Thanks,
Marcel


> thanks
> -- PMM
>
Peter Maydell Jan. 25, 2017, 7:24 p.m. UTC | #5
On 25 January 2017 at 18:08, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 25 January 2017 at 18:02, Marcel Apfelbaum
> <marcel.apfelbaum@gmail.com> wrote:
>> Strange, I re-based in the same day I posted and compiled just fine...
>> However, I get the same error using today's master.
>>
>> I'll fix and re-post the series.
>
> mst has done a rebase of the pull request which I'll retry later.

Results:
/home/petmay01/linaro/qemu-for-merges/hw/display/qxl.c: In function
‘qxl_rom_size’:
/home/petmay01/linaro/qemu-for-merges/hw/display/qxl.c:313:20: error:
bit-field ‘<anonymous>’ width not an integer constant
     QEMU_BUILD_BUG_ON(required_rom_size > rom_size);
                    ^

x86-64 linux host; I guess the usage in this file conflicts
with your series' rephrasing of the macro for some versions
of gcc. This is gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609

If I rewrite the build-assert in qxl.c as
    QEMU_BUILD_BUG_ON(sizeof(QXLRom) + sizeof(QXLModes) +
sizeof(qxl_modes) > 8192);
it compiles OK (and the build then runs into the error below).


All the other build hosts fell over like this:

/home/pm215/qemu/hw/pci-bridge/gen_pcie_root_port.c:54:9: error:
implicit declaration of function ‘VMSTATE_PCIE_DEVICE’
[-Werror=implicit-function-declaration]
         VMSTATE_PCIE_DEVICE(parent_obj.parent_obj.parent_obj, PCIESlot),
         ^
/home/pm215/qemu/hw/pci-bridge/gen_pcie_root_port.c:54:29: error:
‘parent_obj’ undeclared here (not in a function)
         VMSTATE_PCIE_DEVICE(parent_obj.parent_obj.parent_obj, PCIESlot),
                             ^
/home/pm215/qemu/hw/pci-bridge/gen_pcie_root_port.c:54:63: error:
expected expression before ‘PCIESlot’
         VMSTATE_PCIE_DEVICE(parent_obj.parent_obj.parent_obj, PCIESlot),

thanks
-- PMM
Michael S. Tsirkin Jan. 25, 2017, 9:57 p.m. UTC | #6
On Wed, Jan 25, 2017 at 07:24:03PM +0000, Peter Maydell wrote:
> On 25 January 2017 at 18:08, Peter Maydell <peter.maydell@linaro.org> wrote:
> > On 25 January 2017 at 18:02, Marcel Apfelbaum
> > <marcel.apfelbaum@gmail.com> wrote:
> >> Strange, I re-based in the same day I posted and compiled just fine...
> >> However, I get the same error using today's master.
> >>
> >> I'll fix and re-post the series.
> >
> > mst has done a rebase of the pull request which I'll retry later.
> 
> Results:
> /home/petmay01/linaro/qemu-for-merges/hw/display/qxl.c: In function
> ‘qxl_rom_size’:
> /home/petmay01/linaro/qemu-for-merges/hw/display/qxl.c:313:20: error:
> bit-field ‘<anonymous>’ width not an integer constant
>      QEMU_BUILD_BUG_ON(required_rom_size > rom_size);
>                     ^
> 
> x86-64 linux host; I guess the usage in this file conflicts
> with your series' rephrasing of the macro for some versions
> of gcc. This is gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609

I guess what happened previously is that gcc did not actually
check this size at all. I posted a patch to rewrite using macros.
Trivial but I still will give maintainer a bit of time to take a look.


> If I rewrite the build-assert in qxl.c as
>     QEMU_BUILD_BUG_ON(sizeof(QXLRom) + sizeof(QXLModes) +
> sizeof(qxl_modes) > 8192);
> it compiles OK (and the build then runs into the error below).
> 
> 
> All the other build hosts fell over like this:
> 
> /home/pm215/qemu/hw/pci-bridge/gen_pcie_root_port.c:54:9: error:
> implicit declaration of function ‘VMSTATE_PCIE_DEVICE’
> [-Werror=implicit-function-declaration]
>          VMSTATE_PCIE_DEVICE(parent_obj.parent_obj.parent_obj, PCIESlot),
>          ^
> /home/pm215/qemu/hw/pci-bridge/gen_pcie_root_port.c:54:29: error:
> ‘parent_obj’ undeclared here (not in a function)
>          VMSTATE_PCIE_DEVICE(parent_obj.parent_obj.parent_obj, PCIESlot),
>                              ^
> /home/pm215/qemu/hw/pci-bridge/gen_pcie_root_port.c:54:63: error:
> expected expression before ‘PCIESlot’
>          VMSTATE_PCIE_DEVICE(parent_obj.parent_obj.parent_obj, PCIESlot),
> 
> thanks
> -- PMM