[Qemu-devel] [PULL v2 00/49] pci, pc, virtio: fixes, features

Michael S. Tsirkin posted 49 patches 6 years, 9 months ago
Only 48 patches received!
docs/specs/ivshmem-spec.txt       |   8 +-
docs/specs/tpm.txt                | 104 +++++
default-configs/virtio.mak        |   3 +-
hw/tpm/tpm_ppi.h                  |  46 +++
hw/virtio/virtio-pci.h            | 234 -----------
include/hw/acpi/acpi-defs.h       |  13 +-
include/hw/acpi/tpm.h             |  21 +
include/hw/pci/pcie.h             |   2 +
include/hw/qdev-core.h            |   3 +
include/hw/virtio/virtio-net.h    |  83 ++++
include/net/eth.h                 |   2 +
include/qemu/compiler.h           |  15 +
tests/acpi-utils.h                |  44 +--
block/sheepdog.c                  |   2 +-
hw/acpi/core.c                    |  12 +-
hw/acpi/memory_hotplug.c          |  10 +-
hw/acpi/tpm.c                     | 459 +++++++++++++++++++++
hw/block/vhost-user-blk.c         |   7 +-
hw/core/machine.c                 |   7 +-
hw/display/virtio-gpu-pci.c       |  14 +
hw/display/virtio-vga.c           |   1 +
hw/i386/acpi-build.c              |  29 +-
hw/i386/pc_piix.c                 |   1 -
hw/misc/edu.c                     |   1 +
hw/misc/ivshmem.c                 | 210 +---------
hw/net/virtio-net.c               | 667 ++++++++++++++++++++++++++++++-
hw/pci/msix.c                     |   2 +-
hw/pci/pcie.c                     |  25 +-
hw/pci/pcie_port.c                |   1 +
hw/scsi/vhost-scsi.c              |   3 +-
hw/scsi/vhost-user-scsi.c         |   3 +-
hw/tpm/tpm_crb.c                  |  13 +
hw/tpm/tpm_ppi.c                  |  53 +++
hw/tpm/tpm_tis.c                  |  13 +
hw/virtio/vhost-scsi-pci.c        |  97 +++++
hw/virtio/vhost-user-blk-pci.c    | 103 +++++
hw/virtio/vhost-user-scsi-pci.c   | 103 +++++
hw/virtio/vhost-user.c            |   2 +-
hw/virtio/vhost-vsock-pci.c       |  86 ++++
hw/virtio/virtio-9p-pci.c         |  88 +++++
hw/virtio/virtio-balloon-pci.c    |  95 +++++
hw/virtio/virtio-blk-pci.c        | 100 +++++
hw/virtio/virtio-crypto-pci.c     |  14 +
hw/virtio/virtio-input-host-pci.c |  48 +++
hw/virtio/virtio-input-pci.c      | 157 ++++++++
hw/virtio/virtio-net-pci.c        |  98 +++++
hw/virtio/virtio-pci.c            | 811 +-------------------------------------
hw/virtio/virtio-rng-pci.c        |  88 +++++
hw/virtio/virtio-scsi-pci.c       | 107 +++++
hw/virtio/virtio-serial-pci.c     | 115 ++++++
migration/global_state.c          |  15 +-
qom/object.c                      |   3 +
stubs/tpm.c                       |   5 +
tests/acpi-utils.c                |  35 +-
tests/bios-tables-test.c          | 271 ++++---------
tests/ivshmem-test.c              |  67 ++--
tests/vhost-user-test.c           |   2 +-
tests/vmgenid-test.c              |  64 +--
util/oslib-posix.c                |   8 +-
hw/acpi/Makefile.objs             |   1 +
hw/tpm/Makefile.objs              |   1 +
hw/tpm/trace-events               |   3 +
hw/virtio/Makefile.objs           |  15 +
qemu-deprecated.texi              |   5 -
scripts/device-crash-test         |   1 -
tests/Makefile.include            |  20 +-
tests/data/acpi/pc/DSDT.dimmpxm   | Bin 6790 -> 6784 bytes
tests/data/acpi/pc/DSDT.memhp     | Bin 6496 -> 6490 bytes
tests/data/acpi/q35/DSDT.dimmpxm  | Bin 9474 -> 9468 bytes
tests/data/acpi/q35/DSDT.memhp    | Bin 9180 -> 9174 bytes
tests/data/acpi/q35/DSDT.mmio64   | Bin 8947 -> 8945 bytes
71 files changed, 3101 insertions(+), 1638 deletions(-)
create mode 100644 hw/tpm/tpm_ppi.h
create mode 100644 hw/acpi/tpm.c
create mode 100644 hw/tpm/tpm_ppi.c
create mode 100644 hw/virtio/vhost-scsi-pci.c
create mode 100644 hw/virtio/vhost-user-blk-pci.c
create mode 100644 hw/virtio/vhost-user-scsi-pci.c
create mode 100644 hw/virtio/vhost-vsock-pci.c
create mode 100644 hw/virtio/virtio-9p-pci.c
create mode 100644 hw/virtio/virtio-balloon-pci.c
create mode 100644 hw/virtio/virtio-blk-pci.c
create mode 100644 hw/virtio/virtio-input-host-pci.c
create mode 100644 hw/virtio/virtio-input-pci.c
create mode 100644 hw/virtio/virtio-net-pci.c
create mode 100644 hw/virtio/virtio-rng-pci.c
create mode 100644 hw/virtio/virtio-scsi-pci.c
create mode 100644 hw/virtio/virtio-serial-pci.c
[Qemu-devel] [PULL v2 00/49] pci, pc, virtio: fixes, features
Posted by Michael S. Tsirkin 6 years, 9 months ago
Changes from v1:
- fix an out of tree build by unmangling a patch I mangled when applying
- fix a gcc 8 build by applying philippe's patches


The following changes since commit 89bd861c2b470e3fb45596945509079c72af3ac2:

  Merge remote-tracking branch 'remotes/ehabkost/tags/x86-next-pull-request' into staging (2019-01-14 17:35:00 +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 64ed76db175f7ccb5f47195a7617d0106bf01245:

  migration: Use strnlen() for fixed-size string (2019-01-15 14:56:57 -0500)

----------------------------------------------------------------
pci, pc, virtio: fixes, features

tpm physical presence interface
rsc support in virtio net
ivshmem is removed
misc cleanups and fixes all over the place

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

----------------------------------------------------------------
David Hildenbrand (1):
      pci/pcie: stop plug/unplug if the slot is locked

Dongli Zhang (1):
      msix: make pba size math more uniform

Eduardo Habkost (2):
      globals: Allow global properties to be optional
      virtio: Make disable-legacy/disable-modern compat properties optional

Fei Li (1):
      hw/misc/edu: add msi_uninit() for pci_edu_uninit()

Igor Mammedov (8):
      tests: acpi: use AcpiSdtTable::aml in consistent way
      tests: acpi: make sure FADT is fetched only once
      tests: acpi: simplify rsdt handling
      tests: acpi: reuse fetch_table() for fetching FACS and DSDT
      tests: acpi: reuse fetch_table() in vmgenid-test
      tests: smbios: fetch whole table in one step instead of reading it step by step
      tests: acpi: squash sanitize_fadt_ptrs() into test_acpi_fadt_table()
      tests: acpi: use AcpiSdtTable::aml instead of AcpiSdtTable::header::signature

Jian Wang (1):
      qemu: avoid memory leak while remove disk

Juan Quintela (16):
      virtio: split vhost vsock bits from virtio-pci
      virtio: split virtio input host bits from virtio-pci
      virtio: split virtio input bits from virtio-pci
      virtio: split virtio rng bits from virtio-pci
      virtio: split virtio balloon bits from virtio-pci
      virtio: split virtio 9p bits from virtio-pci
      virtio: split vhost user blk bits from virtio-pci
      virtio: split vhost user scsi bits from virtio-pci
      virtio: split vhost scsi bits from virtio-pci
      virtio: split virtio scsi bits from virtio-pci
      virtio: split virtio blk bits from virtio-pci
      virtio: split virtio net bits from virtio-pci
      virtio: split virtio serial bits from virtio-pci
      virtio: split virtio gpu bits from virtio-pci.h
      virtio: split virtio crypto bits from virtio-pci.h
      virtio: virtio 9p really requires CONFIG_VIRTFS to work

Li Qiang (3):
      tests: vhost-user-test: initialize 'fd' in chr_read
      vhost-user: fix ioeventfd_enabled
      util: check the return value of fcntl in qemu_set_{block, nonblock}

Marc-André Lureau (4):
      tpm: add a "ppi" boolean property
      acpi: add ACPI memory clear interface
      tpm: clear RAM when "memory overwrite" requested
      migration: Fix stringop-truncation warning

Michael S. Tsirkin (1):
      acpi: update expected files

Philippe Mathieu-Daudé (4):
      qemu/compiler: Define QEMU_NONSTRING
      block/sheepdog: Use QEMU_NONSTRING for non NUL-terminated arrays
      hw/acpi: Use QEMU_NONSTRING for non NUL-terminated arrays
      migration: Use strnlen() for fixed-size string

Stefan Berger (3):
      tpm: allocate/map buffer for TPM Physical Presence interface
      acpi: expose TPM/PPI configuration parameters to firmware via fw_cfg
      acpi: build TPM Physical Presence interface

Thomas Huth (1):
      hw/misc/ivshmem: Remove deprecated "ivshmem" legacy device

Yang Zhong (1):
      hw: acpi: Fix memory hotplug AML generation error

Yuri Benditovich (2):
      virtio-net: support RSC v4/v6 tcp traffic for Windows HCK
      virtio-net: changed VIRTIO_NET_F_RSC_EXT to be 61

 docs/specs/ivshmem-spec.txt       |   8 +-
 docs/specs/tpm.txt                | 104 +++++
 default-configs/virtio.mak        |   3 +-
 hw/tpm/tpm_ppi.h                  |  46 +++
 hw/virtio/virtio-pci.h            | 234 -----------
 include/hw/acpi/acpi-defs.h       |  13 +-
 include/hw/acpi/tpm.h             |  21 +
 include/hw/pci/pcie.h             |   2 +
 include/hw/qdev-core.h            |   3 +
 include/hw/virtio/virtio-net.h    |  83 ++++
 include/net/eth.h                 |   2 +
 include/qemu/compiler.h           |  15 +
 tests/acpi-utils.h                |  44 +--
 block/sheepdog.c                  |   2 +-
 hw/acpi/core.c                    |  12 +-
 hw/acpi/memory_hotplug.c          |  10 +-
 hw/acpi/tpm.c                     | 459 +++++++++++++++++++++
 hw/block/vhost-user-blk.c         |   7 +-
 hw/core/machine.c                 |   7 +-
 hw/display/virtio-gpu-pci.c       |  14 +
 hw/display/virtio-vga.c           |   1 +
 hw/i386/acpi-build.c              |  29 +-
 hw/i386/pc_piix.c                 |   1 -
 hw/misc/edu.c                     |   1 +
 hw/misc/ivshmem.c                 | 210 +---------
 hw/net/virtio-net.c               | 667 ++++++++++++++++++++++++++++++-
 hw/pci/msix.c                     |   2 +-
 hw/pci/pcie.c                     |  25 +-
 hw/pci/pcie_port.c                |   1 +
 hw/scsi/vhost-scsi.c              |   3 +-
 hw/scsi/vhost-user-scsi.c         |   3 +-
 hw/tpm/tpm_crb.c                  |  13 +
 hw/tpm/tpm_ppi.c                  |  53 +++
 hw/tpm/tpm_tis.c                  |  13 +
 hw/virtio/vhost-scsi-pci.c        |  97 +++++
 hw/virtio/vhost-user-blk-pci.c    | 103 +++++
 hw/virtio/vhost-user-scsi-pci.c   | 103 +++++
 hw/virtio/vhost-user.c            |   2 +-
 hw/virtio/vhost-vsock-pci.c       |  86 ++++
 hw/virtio/virtio-9p-pci.c         |  88 +++++
 hw/virtio/virtio-balloon-pci.c    |  95 +++++
 hw/virtio/virtio-blk-pci.c        | 100 +++++
 hw/virtio/virtio-crypto-pci.c     |  14 +
 hw/virtio/virtio-input-host-pci.c |  48 +++
 hw/virtio/virtio-input-pci.c      | 157 ++++++++
 hw/virtio/virtio-net-pci.c        |  98 +++++
 hw/virtio/virtio-pci.c            | 811 +-------------------------------------
 hw/virtio/virtio-rng-pci.c        |  88 +++++
 hw/virtio/virtio-scsi-pci.c       | 107 +++++
 hw/virtio/virtio-serial-pci.c     | 115 ++++++
 migration/global_state.c          |  15 +-
 qom/object.c                      |   3 +
 stubs/tpm.c                       |   5 +
 tests/acpi-utils.c                |  35 +-
 tests/bios-tables-test.c          | 271 ++++---------
 tests/ivshmem-test.c              |  67 ++--
 tests/vhost-user-test.c           |   2 +-
 tests/vmgenid-test.c              |  64 +--
 util/oslib-posix.c                |   8 +-
 hw/acpi/Makefile.objs             |   1 +
 hw/tpm/Makefile.objs              |   1 +
 hw/tpm/trace-events               |   3 +
 hw/virtio/Makefile.objs           |  15 +
 qemu-deprecated.texi              |   5 -
 scripts/device-crash-test         |   1 -
 tests/Makefile.include            |  20 +-
 tests/data/acpi/pc/DSDT.dimmpxm   | Bin 6790 -> 6784 bytes
 tests/data/acpi/pc/DSDT.memhp     | Bin 6496 -> 6490 bytes
 tests/data/acpi/q35/DSDT.dimmpxm  | Bin 9474 -> 9468 bytes
 tests/data/acpi/q35/DSDT.memhp    | Bin 9180 -> 9174 bytes
 tests/data/acpi/q35/DSDT.mmio64   | Bin 8947 -> 8945 bytes
 71 files changed, 3101 insertions(+), 1638 deletions(-)
 create mode 100644 hw/tpm/tpm_ppi.h
 create mode 100644 hw/acpi/tpm.c
 create mode 100644 hw/tpm/tpm_ppi.c
 create mode 100644 hw/virtio/vhost-scsi-pci.c
 create mode 100644 hw/virtio/vhost-user-blk-pci.c
 create mode 100644 hw/virtio/vhost-user-scsi-pci.c
 create mode 100644 hw/virtio/vhost-vsock-pci.c
 create mode 100644 hw/virtio/virtio-9p-pci.c
 create mode 100644 hw/virtio/virtio-balloon-pci.c
 create mode 100644 hw/virtio/virtio-blk-pci.c
 create mode 100644 hw/virtio/virtio-input-host-pci.c
 create mode 100644 hw/virtio/virtio-input-pci.c
 create mode 100644 hw/virtio/virtio-net-pci.c
 create mode 100644 hw/virtio/virtio-rng-pci.c
 create mode 100644 hw/virtio/virtio-scsi-pci.c
 create mode 100644 hw/virtio/virtio-serial-pci.c


Re: [Qemu-devel] [PULL v2 00/49] pci, pc, virtio: fixes, features
Posted by Peter Maydell 6 years, 9 months ago
On Tue, 15 Jan 2019 at 20:03, Michael S. Tsirkin <mst@redhat.com> wrote:
>
> Changes from v1:
> - fix an out of tree build by unmangling a patch I mangled when applying
> - fix a gcc 8 build by applying philippe's patches
>
>
> The following changes since commit 89bd861c2b470e3fb45596945509079c72af3ac2:
>
>   Merge remote-tracking branch 'remotes/ehabkost/tags/x86-next-pull-request' into staging (2019-01-14 17:35:00 +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 64ed76db175f7ccb5f47195a7617d0106bf01245:
>
>   migration: Use strnlen() for fixed-size string (2019-01-15 14:56:57 -0500)
>
> ----------------------------------------------------------------
> pci, pc, virtio: fixes, features
>
> tpm physical presence interface
> rsc support in virtio net
> ivshmem is removed
> misc cleanups and fixes all over the place
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>
This fails 'make check' on s390x host:

MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}
QTEST_QEMU_BINARY=i386-softmmu/qemu-system-i386
QTEST_QEMU_IMG=qemu-img tests/bios-tables-test -m=quick -k --tap <
/dev/null | ./scripts/tap-driver.pl --test-name="bios-tables-test"

Looking for expected file 'tests/data/acpi/pc/FACP'
Using expected file 'tests/data/acpi/pc/FACP'
**
ERROR:/home/linux1/qemu/tests/bios-tables-test.c:314:load_expected_aml:
assertion failed: (exp_sdt.aml_len)
ERROR - too few tests run (expected 15, got 0)
Aborted (core dumped)
/home/linux1/qemu/tests/Makefile.include:856: recipe for target
'check-qtest-i386' failed


(all the other build hosts passed)

thanks
-- PMM

Re: [Qemu-devel] [PULL v2 00/49] pci, pc, virtio: fixes, features
Posted by Michael S. Tsirkin 6 years, 9 months ago
On Thu, Jan 17, 2019 at 12:48:22PM +0000, Peter Maydell wrote:
> On Tue, 15 Jan 2019 at 20:03, Michael S. Tsirkin <mst@redhat.com> wrote:
> >
> > Changes from v1:
> > - fix an out of tree build by unmangling a patch I mangled when applying
> > - fix a gcc 8 build by applying philippe's patches
> >
> >
> > The following changes since commit 89bd861c2b470e3fb45596945509079c72af3ac2:
> >
> >   Merge remote-tracking branch 'remotes/ehabkost/tags/x86-next-pull-request' into staging (2019-01-14 17:35:00 +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 64ed76db175f7ccb5f47195a7617d0106bf01245:
> >
> >   migration: Use strnlen() for fixed-size string (2019-01-15 14:56:57 -0500)
> >
> > ----------------------------------------------------------------
> > pci, pc, virtio: fixes, features
> >
> > tpm physical presence interface
> > rsc support in virtio net
> > ivshmem is removed
> > misc cleanups and fixes all over the place
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> >
> This fails 'make check' on s390x host:
> 
> MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}
> QTEST_QEMU_BINARY=i386-softmmu/qemu-system-i386
> QTEST_QEMU_IMG=qemu-img tests/bios-tables-test -m=quick -k --tap <
> /dev/null | ./scripts/tap-driver.pl --test-name="bios-tables-test"
> 
> Looking for expected file 'tests/data/acpi/pc/FACP'
> Using expected file 'tests/data/acpi/pc/FACP'
> **
> ERROR:/home/linux1/qemu/tests/bios-tables-test.c:314:load_expected_aml:
> assertion failed: (exp_sdt.aml_len)
> ERROR - too few tests run (expected 15, got 0)
> Aborted (core dumped)
> /home/linux1/qemu/tests/Makefile.include:856: recipe for target
> 'check-qtest-i386' failed
> 
> 
> (all the other build hosts passed)
> 
> thanks
> -- PMM


Oh. I am pretty sure it's endian-ness :(

Any chance you can quickly test the below?

That would be appreciated ...


diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
index 0bf7164590..a506dcbb29 100644
--- a/tests/bios-tables-test.c
+++ b/tests/bios-tables-test.c
@@ -274,6 +274,7 @@ static GArray *load_expected_aml(test_data *data)
     AcpiSdtTable *sdt;
     GError *error = NULL;
     gboolean ret;
+    gsize aml_len;
 
     GArray *exp_tables = g_array_new(false, true, sizeof(AcpiSdtTable));
     if (getenv("V")) {
@@ -307,7 +308,8 @@ try_again:
             fprintf(stderr, "Using expected file '%s'\n", aml_file);
         }
         ret = g_file_get_contents(aml_file, (gchar **)&exp_sdt.aml,
-                                  (gsize *)&exp_sdt.aml_len, &error);
+                                  &aml_len, &error);
+        exp_sdt.aml_len = aml_len;
         g_assert(ret);
         g_assert_no_error(error);
         g_assert(exp_sdt.aml);

Re: [Qemu-devel] [PULL v2 00/49] pci, pc, virtio: fixes, features
Posted by Peter Maydell 6 years, 9 months ago
On Thu, 17 Jan 2019 at 13:44, Michael S. Tsirkin <mst@redhat.com> wrote:
> Oh. I am pretty sure it's endian-ness :(
>
> Any chance you can quickly test the below?
>
> That would be appreciated ...
>
>
> diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
> index 0bf7164590..a506dcbb29 100644
> --- a/tests/bios-tables-test.c
> +++ b/tests/bios-tables-test.c
> @@ -274,6 +274,7 @@ static GArray *load_expected_aml(test_data *data)
>      AcpiSdtTable *sdt;
>      GError *error = NULL;
>      gboolean ret;
> +    gsize aml_len;
>
>      GArray *exp_tables = g_array_new(false, true, sizeof(AcpiSdtTable));
>      if (getenv("V")) {
> @@ -307,7 +308,8 @@ try_again:
>              fprintf(stderr, "Using expected file '%s'\n", aml_file);
>          }
>          ret = g_file_get_contents(aml_file, (gchar **)&exp_sdt.aml,
> -                                  (gsize *)&exp_sdt.aml_len, &error);
> +                                  &aml_len, &error);
> +        exp_sdt.aml_len = aml_len;
>          g_assert(ret);
>          g_assert_no_error(error);
>          g_assert(exp_sdt.aml);


I can test that once I've finished processing the other pullreq
I'm currently testing... That's not so much an endianness issue
as trying to fit a 64-bit value into a 32-bit field, though.
That cast in the code that is fixed here is an indication of
the bug :-)

thanks
-- PMM

Re: [Qemu-devel] [PULL v2 00/49] pci, pc, virtio: fixes, features
Posted by Michael S. Tsirkin 6 years, 9 months ago
On Thu, Jan 17, 2019 at 02:07:32PM +0000, Peter Maydell wrote:
> On Thu, 17 Jan 2019 at 13:44, Michael S. Tsirkin <mst@redhat.com> wrote:
> > Oh. I am pretty sure it's endian-ness :(
> >
> > Any chance you can quickly test the below?
> >
> > That would be appreciated ...
> >
> >
> > diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
> > index 0bf7164590..a506dcbb29 100644
> > --- a/tests/bios-tables-test.c
> > +++ b/tests/bios-tables-test.c
> > @@ -274,6 +274,7 @@ static GArray *load_expected_aml(test_data *data)
> >      AcpiSdtTable *sdt;
> >      GError *error = NULL;
> >      gboolean ret;
> > +    gsize aml_len;
> >
> >      GArray *exp_tables = g_array_new(false, true, sizeof(AcpiSdtTable));
> >      if (getenv("V")) {
> > @@ -307,7 +308,8 @@ try_again:
> >              fprintf(stderr, "Using expected file '%s'\n", aml_file);
> >          }
> >          ret = g_file_get_contents(aml_file, (gchar **)&exp_sdt.aml,
> > -                                  (gsize *)&exp_sdt.aml_len, &error);
> > +                                  &aml_len, &error);
> > +        exp_sdt.aml_len = aml_len;
> >          g_assert(ret);
> >          g_assert_no_error(error);
> >          g_assert(exp_sdt.aml);
> 
> 
> I can test that once I've finished processing the other pullreq
> I'm currently testing... That's not so much an endianness issue
> as trying to fit a 64-bit value into a 32-bit field, though.
> That cast in the code that is fixed here is an indication of
> the bug :-)
> 
> thanks
> -- PMM

Right but it fits on LE.

-- 
MST

Re: [Qemu-devel] [PULL v2 00/49] pci, pc, virtio: fixes, features
Posted by Peter Maydell 6 years, 9 months ago
On Thu, 17 Jan 2019 at 14:19, Michael S. Tsirkin <mst@redhat.com> wrote:
>
> On Thu, Jan 17, 2019 at 02:07:32PM +0000, Peter Maydell wrote:
> > On Thu, 17 Jan 2019 at 13:44, Michael S. Tsirkin <mst@redhat.com> wrote:
> > > Oh. I am pretty sure it's endian-ness :(
> > >
> > > Any chance you can quickly test the below?
> > >
> > > That would be appreciated ...
> > >
> > >
> > > diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
> > > index 0bf7164590..a506dcbb29 100644
> > > --- a/tests/bios-tables-test.c
> > > +++ b/tests/bios-tables-test.c
> > > @@ -274,6 +274,7 @@ static GArray *load_expected_aml(test_data *data)
> > >      AcpiSdtTable *sdt;
> > >      GError *error = NULL;
> > >      gboolean ret;
> > > +    gsize aml_len;
> > >
> > >      GArray *exp_tables = g_array_new(false, true, sizeof(AcpiSdtTable));
> > >      if (getenv("V")) {
> > > @@ -307,7 +308,8 @@ try_again:
> > >              fprintf(stderr, "Using expected file '%s'\n", aml_file);
> > >          }
> > >          ret = g_file_get_contents(aml_file, (gchar **)&exp_sdt.aml,
> > > -                                  (gsize *)&exp_sdt.aml_len, &error);
> > > +                                  &aml_len, &error);
> > > +        exp_sdt.aml_len = aml_len;
> > >          g_assert(ret);
> > >          g_assert_no_error(error);
> > >          g_assert(exp_sdt.aml);
> >
> >
> > I can test that once I've finished processing the other pullreq
> > I'm currently testing... That's not so much an endianness issue
> > as trying to fit a 64-bit value into a 32-bit field, though.
> > That cast in the code that is fixed here is an indication of
> > the bug :-)

> Right but it fits on LE.

It still doesn't fit, you just don't notice that you've blown
away the following item in the struct. Anyway I'm currently
running the test, which I agree ought to fix things.

thanks
-- PMM

Re: [Qemu-devel] [PULL v2 00/49] pci, pc, virtio: fixes, features
Posted by Michael S. Tsirkin 6 years, 9 months ago
On Thu, Jan 17, 2019 at 02:25:16PM +0000, Peter Maydell wrote:
> On Thu, 17 Jan 2019 at 14:19, Michael S. Tsirkin <mst@redhat.com> wrote:
> >
> > On Thu, Jan 17, 2019 at 02:07:32PM +0000, Peter Maydell wrote:
> > > On Thu, 17 Jan 2019 at 13:44, Michael S. Tsirkin <mst@redhat.com> wrote:
> > > > Oh. I am pretty sure it's endian-ness :(
> > > >
> > > > Any chance you can quickly test the below?
> > > >
> > > > That would be appreciated ...
> > > >
> > > >
> > > > diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
> > > > index 0bf7164590..a506dcbb29 100644
> > > > --- a/tests/bios-tables-test.c
> > > > +++ b/tests/bios-tables-test.c
> > > > @@ -274,6 +274,7 @@ static GArray *load_expected_aml(test_data *data)
> > > >      AcpiSdtTable *sdt;
> > > >      GError *error = NULL;
> > > >      gboolean ret;
> > > > +    gsize aml_len;
> > > >
> > > >      GArray *exp_tables = g_array_new(false, true, sizeof(AcpiSdtTable));
> > > >      if (getenv("V")) {
> > > > @@ -307,7 +308,8 @@ try_again:
> > > >              fprintf(stderr, "Using expected file '%s'\n", aml_file);
> > > >          }
> > > >          ret = g_file_get_contents(aml_file, (gchar **)&exp_sdt.aml,
> > > > -                                  (gsize *)&exp_sdt.aml_len, &error);
> > > > +                                  &aml_len, &error);
> > > > +        exp_sdt.aml_len = aml_len;
> > > >          g_assert(ret);
> > > >          g_assert_no_error(error);
> > > >          g_assert(exp_sdt.aml);
> > >
> > >
> > > I can test that once I've finished processing the other pullreq
> > > I'm currently testing... That's not so much an endianness issue
> > > as trying to fit a 64-bit value into a 32-bit field, though.
> > > That cast in the code that is fixed here is an indication of
> > > the bug :-)
> 
> > Right but it fits on LE.
> 
> It still doesn't fit, you just don't notice that you've blown
> away the following item in the struct.

Oh right. that one just happens to be unused.

> Anyway I'm currently
> running the test, which I agree ought to fix things.
> 
> thanks
> -- PMM

Re: [Qemu-devel] [PULL v2 00/49] pci, pc, virtio: fixes, features
Posted by Peter Maydell 6 years, 9 months ago
On Thu, 17 Jan 2019 at 13:44, Michael S. Tsirkin <mst@redhat.com> wrote:
>
> On Thu, Jan 17, 2019 at 12:48:22PM +0000, Peter Maydell wrote:
> > This fails 'make check' on s390x host:

> Oh. I am pretty sure it's endian-ness :(
>
> Any chance you can quickly test the below?

Yes, that change allows the tests to pass on the s390 box.

thanks
-- PMM

Re: [Qemu-devel] [PULL v2 00/49] pci, pc, virtio: fixes, features
Posted by Michael S. Tsirkin 6 years, 9 months ago
On Thu, Jan 17, 2019 at 04:21:24PM +0000, Peter Maydell wrote:
> On Thu, 17 Jan 2019 at 13:44, Michael S. Tsirkin <mst@redhat.com> wrote:
> >
> > On Thu, Jan 17, 2019 at 12:48:22PM +0000, Peter Maydell wrote:
> > > This fails 'make check' on s390x host:
> 
> > Oh. I am pretty sure it's endian-ness :(
> >
> > Any chance you can quickly test the below?
> 
> Yes, that change allows the tests to pass on the s390 box.
> 
> thanks
> -- PMM

Re-pushed a fixed patch to the same tag.

Igor, in the future pls remember to be conscious of size of integers:
it's not safe to cast uint32_t* to gsize *!

Thanks!

-- 
MST

Re: [Qemu-devel] [PULL v2 00/49] pci, pc, virtio: fixes, features
Posted by Igor Mammedov 6 years, 9 months ago
On Thu, 17 Jan 2019 21:12:53 -0500
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> On Thu, Jan 17, 2019 at 04:21:24PM +0000, Peter Maydell wrote:
> > On Thu, 17 Jan 2019 at 13:44, Michael S. Tsirkin <mst@redhat.com> wrote:  
> > >
> > > On Thu, Jan 17, 2019 at 12:48:22PM +0000, Peter Maydell wrote:  
> > > > This fails 'make check' on s390x host:  
> >   
> > > Oh. I am pretty sure it's endian-ness :(
> > >
> > > Any chance you can quickly test the below?  
> > 
> > Yes, that change allows the tests to pass on the s390 box.
> > 
> > thanks
> > -- PMM  
> 
> Re-pushed a fixed patch to the same tag.
> 
> Igor, in the future pls remember to be conscious of size of integers:
> it's not safe to cast uint32_t* to gsize *!
sure,
Thanks for fixing it up!

> 
> Thanks!
> 


Re: [Qemu-devel] [PULL v2 00/49] pci, pc, virtio: fixes, features
Posted by Peter Maydell 6 years, 9 months ago
On Fri, 18 Jan 2019 at 02:12, Michael S. Tsirkin <mst@redhat.com> wrote:
>
> On Thu, Jan 17, 2019 at 04:21:24PM +0000, Peter Maydell wrote:
> > On Thu, 17 Jan 2019 at 13:44, Michael S. Tsirkin <mst@redhat.com> wrote:
> > >
> > > On Thu, Jan 17, 2019 at 12:48:22PM +0000, Peter Maydell wrote:
> > > > This fails 'make check' on s390x host:
> >
> > > Oh. I am pretty sure it's endian-ness :(
> > >
> > > Any chance you can quickly test the below?
> >
> > Yes, that change allows the tests to pass on the s390 box.
> >
> > thanks
> > -- PMM
>
> Re-pushed a fixed patch to the same tag.

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/4.0
for any user-visible changes.

-- PMM

[Qemu-devel] [PULL v2 44/49] acpi: update expected files
Posted by Michael S. Tsirkin 6 years, 9 months ago
Update expected files affected by:
hw: acpi: Fix memory hotplug AML generation error

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 tests/data/acpi/pc/DSDT.dimmpxm  | Bin 6790 -> 6784 bytes
 tests/data/acpi/pc/DSDT.memhp    | Bin 6496 -> 6490 bytes
 tests/data/acpi/q35/DSDT.dimmpxm | Bin 9474 -> 9468 bytes
 tests/data/acpi/q35/DSDT.memhp   | Bin 9180 -> 9174 bytes
 tests/data/acpi/q35/DSDT.mmio64  | Bin 8947 -> 8945 bytes
 5 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/tests/data/acpi/pc/DSDT.dimmpxm b/tests/data/acpi/pc/DSDT.dimmpxm
index f6ec911b1180a409e61ef8d50279ab6dba7f1bdd..ad2800de672534dc87012f03e27b19671a330083 100644
GIT binary patch
delta 159
zcmZoOZ7}6>33dr-kYZq96xzsD#lz#{6QdU&>=f_o5#T&|qL9euB|H|)jJ}ia@_VZY
z#`_0{F#7_D_)t%mjLa+%{&-g}14dsU0TzjF@}2A_K%~O`0^Sn1Ox&y@n8XPH@s=#v

delta 151
zcmZoLZ8PO^33dr-lVV_CG~CEl#lz&}ySa@gjG57Y@?Cy!HKBO_;1K2|zCbcQ)YBy+
nGfPAu-qp*1afvUG1Pets`A_x{AX@2e0dFbXrf!xKOyUFp_>(Mp

diff --git a/tests/data/acpi/pc/DSDT.memhp b/tests/data/acpi/pc/DSDT.memhp
index e31ef502968b14e2146cb1a1328dc0ce555b1d7f..9e75ac96e15730f245ff6730bd28127ad827119a 100644
GIT binary patch
delta 159
zcmaE0bjyg#CD<h-N|J$raq&j33~nADpBTOPV5fLrj{xV%8w5o*PvW*<X7rtWn$KHB
zFy22ngxMEJ#D{viWMpQE@W;D)88G?+39v|Xlka33ej*jF<@c7rW#VQb0Y6Rvf}Aah

delta 151
zcmca*^uUPACD<h-L6U)i@z6%D3~nYT-_0f5Va$yFlTY(`s|m&X2Zt~(@dc9cp`I=o
nnOPzN@vdG5j7xlhBv>fA$$zpHKha88@_S3+Hgz+PfFCCSaaJu1

diff --git a/tests/data/acpi/q35/DSDT.dimmpxm b/tests/data/acpi/q35/DSDT.dimmpxm
index 3837792dec13c4c77c66b140f68959d86a09de8e..7177116a21969fa3649053ec83a8704b0d84b9c5 100644
GIT binary patch
delta 145
zcmZqj`s2yv66_N4M}>ib@$g126FDXypUn<(Va$xalcy_ss|d#X2Zu2G0*UxgPnV3$
lED`>AS1$ubUmyV%iEi?p%%Mc2!b&A?30x*_zNe(Z1ON^VDcS%4

delta 151
zcmez4+2qCL66_Mfq{_g+_;4eai5!!Y?`8+NFlI*o$<r0R)r8{xgF~2?_yWoJP*0bP
n%q$Uscvmk2#wET$5-b$m<Ug5BiD;#zO5ReqP2GG$Nredj57R8v

diff --git a/tests/data/acpi/q35/DSDT.memhp b/tests/data/acpi/q35/DSDT.memhp
index 8fba0baf79de0239f2630035afeee78f3e7f43c2..0235461391c90d577c3d533c2fd29ce50f1e2981 100644
GIT binary patch
delta 145
zcmccPe$AcBCD<k8nlb|eW6?$~C0QmPpUrx*Va$xalUo(MRRrVxgF~2ofkb?$r%Og=
kmI!~mtCs<zFOUF>L^t_P{zk0AbVY9oTqbTlqbR@x01+4}3IG5A

delta 151
zcmccSe#f25CD<k8jxqxS<HU_zO0rB&zMJ)A!<ZTUC$}nis|m&X2Zt~(@dc9cp`I=o
mnOPzN@vdG5j7xlhBv>fA$$#<};*};VdQ0Ipb@MSr0VV*TS}p_t

diff --git a/tests/data/acpi/q35/DSDT.mmio64 b/tests/data/acpi/q35/DSDT.mmio64
index a058ff2ee31a22a55b5b198bc1531c7f20b243f6..f60ee77fb4d655e77c7ef1e8c205d741cc288939 100644
GIT binary patch
delta 62
zcmezD`q7okCD<k8qY?uHquxd?C0Rzd&APH-%#6O1TNJz{1mpdKLzsPmM0}{HOGajv
Q2!Fh*mjUDEmkL}=0723bn*aa+

delta 64
zcmez9`q`DsCD<k8vl0UX<GqbsO0tX|n{{Qwm>K;iw<vf^3B~&dhcGYk1(NZho-P@g
TSt0`Qu3iR=OEy1O;9>#*lp+(G

-- 
MST