virtio, pci, pc: cleanups, features
The following changes since commit 8c1ecb590497b0349c550607db923972b37f6963:
Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-next-280519-2' into staging (2019-05-28 17:38:32 +0100)
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 df7cafdeb68b6572fa81d2be9a1910547c4dfafc:
bios-tables-test: list all tables that differ (2019-06-03 08:05:43 -0400)
----------------------------------------------------------------
virtio, pci, pc: cleanups, features
stricter rules for acpi tables: we now fail
on any difference that isn't whitelisted.
vhost-scsi migration.
some cleanups all over the place
----------------------------------------------------------------
David Gibson (3):
pcie: Simplify pci_adjust_config_limit()
pci: Make is_bridge a bool
pci: Fold pci_get_bus_devfn() into its sole caller
Igor Mammedov (1):
docs: smbios: remove family=x from type2 entry description
Jie Wang (3):
vhost: remove the dead code
vhost: fix incorrect print type
vhost: fix memory leak in vhost_user_scsi_realize
Liran Alon (1):
vhost-scsi: Allow user to enable migration
Michael S. Tsirkin (2):
bios-tables-test: add diff allowed list
bios-tables-test: list all tables that differ
Nir Weiner (2):
vhost-scsi: The vhost backend should be stopped when the VM is not running
vhost-scsi: Add VMState descriptor
Wei Yang (2):
hw/acpi: Consolidate build_mcfg to pci.c
acpi: pci: use build_append_foo() API to construct MCFG
default-configs/i386-softmmu.mak | 1 + include/hw/acpi/acpi-defs.h | 18 ------ include/hw/acpi/pci.h | 1 + include/hw/pci/pci.h | 3 +- include/hw/pci/pci_bus.h | 8 ++- include/hw/virtio/vhost-scsi-common.h | 1 + tests/bios-tables-test-allowed-diff.h | 1 + hw/acpi/pci.c | 61 ++++++++++++++++++++ hw/arm/virt-acpi-build.c | 17 ------ hw/i386/acpi-build.c | 18 +----- hw/pci-bridge/dec.c | 4 +- hw/pci-bridge/i82801b11.c | 2 +- hw/pci-bridge/pci_bridge_dev.c | 2 +- hw/pci-bridge/pcie_pci_bridge.c | 2 +- hw/pci-bridge/pcie_root_port.c | 2 +- hw/pci-bridge/simba.c | 2 +- hw/pci-bridge/xio3130_downstream.c | 2 +- hw/pci-bridge/xio3130_upstream.c | 2 +- hw/pci/pci.c | 101 +++++++++++++++++----------------- hw/pci/pci_host.c | 13 +---- hw/ppc/spapr_pci.c | 34 ++++-------- hw/scsi/vhost-scsi.c | 57 +++++++++++++++---- hw/scsi/vhost-user-scsi.c | 3 + hw/virtio/vhost.c | 3 +- tests/bios-tables-test.c | 23 +++++++- hw/acpi/Kconfig | 4 ++ hw/acpi/Makefile.objs | 1 + hw/arm/Kconfig | 1 + qemu-options.hx | 2 +- 29 files changed, 226 insertions(+), 163 deletions(-) create mode 100644 tests/bios-tables-test-allowed-diff.h create mode 100644 hw/acpi/pci.c
[Qemu-devel] [PULL v2 10/14] bios-tables-test: add diff allowed list
Expected table change is then handled like this:
1. add table to diff allowed list
2. change generating code (can be combined with 1)
3. maintainer runs a script to update expected + blows away allowed diff list
--- tests/bios-tables-test-allowed-diff.h | 1 + tests/bios-tables-test.c | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 tests/bios-tables-test-allowed-diff.h
tests/bios-tables-test-allowed-diff.h new file +1 -0
@@ -0,0 +1 @@ +/* List of comma-separated changed AML files to ignore */
tests/bios-tables-test.c +18 -1
@@ -342,6 +342,22 @@ try_again:return exp_tables; } +static bool test_acpi_find_diff_allowed (AcpiSdtTable *sdt) +{ +const gchar *allowed_diff_file[] = { +#include "bios-tables-test-allowed-diff.h" +NULL + }; +const gchar **f; + +for (f = allowed_diff_file; *f; ++f) { +if (!g_strcmp0 (sdt->aml_file, *f)) { +return true; + } + } +return false; +} +/* test the list of tables in @data->tables against reference tables */ static void test_acpi_asl (test_data *data) {
@@ -396,7 +412,8 @@ static void test_acpi_asl(test_data *data) "see ASL difference."); } } - } + } +g_assert (test_acpi_find_diff_allowed (exp_sdt)); }g_string_free (asl, true);g_string_free (exp_asl, true);
Signature · 1 line
MST
[Qemu-devel] [PULL v2 14/14] bios-tables-test: list all tables that differ
In reply to Michael S. TsirkinFail after comparing all tables: this way
user gets the full list of tables that need
to be updated or whitelisted.
--- tests/bios-tables-test.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
tests/bios-tables-test.c +4 -2
@@ -364,7 +364,7 @@ static void test_acpi_asl(test_data *data)int i;AcpiSdtTable *sdt, *exp_sdt;test_data exp_data; -gboolean exp_err, err; +gboolean exp_err, err, all_tables_match = true;memset (&exp_data,0 ,sizeof (exp_data)); exp_data.tables =load_expected_aml (data);
@@ -413,11 +413,13 @@ static void test_acpi_asl(test_data *data) } } } -g_assert (test_acpi_find_diff_allowed (exp_sdt)); + all_tables_match = all_tables_match && +test_acpi_find_diff_allowed (exp_sdt); }g_string_free (asl, true);g_string_free (exp_asl, true); } +g_assert (all_tables_match);free_test_data (&exp_data); }
Signature · 1 line
MST
Quoted 19 lines · Michael S. Tsirkin
The following changes since commit
8c1ecb590497b0349c550607db923972b37f6963:Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-next-280519-2' into staging (2019-05-28 17:38:32 +0100)
are available in the Git repository at:
git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.gittags/for_upstreamfor you to fetch changes up to
df7cafdeb68b6572fa81d2be9a1910547c4dfafc:bios-tables-test: list all tables that differ (2019-06-03 08:05:43 -0400)
----------------------------------------------------------------
virtio, pci, pc: cleanups, featuresstricter rules for acpi tables: we now fail
on any difference that isn't whitelisted.
Quoted 7 lines
vhost-scsi migration.
some cleanups all over the place
Signed-off-by Michael S. Tsirkin <[email protected]>----------------------------------------------------------------
Hi; I'm afraid this fails 'make check' on my aarch32 build:
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' Looking for expected file 'tests/data/acpi/pc/APIC' Using expected file 'tests/data/acpi/pc/APIC' Looking for expected file 'tests/data/acpi/pc/HPET' Using expected file 'tests/data/acpi/pc/HPET' Looking for expected file 'tests/data/acpi/pc/FACS' Using expected file 'tests/data/acpi/pc/FACS' Looking for expected file 'tests/data/acpi/pc/DSDT' Using expected file 'tests/data/acpi/pc/DSDT' PASS 1 bios-tables-test /i386/acpi/piix4
Looking for expected file 'tests/data/acpi/q35/FACP'
Using expected file 'tests/data/acpi/q35/FACP'
Looking for expected file 'tests/data/acpi/q35/APIC'
Using expected file 'tests/data/acpi/q35/APIC'
Looking for expected file 'tests/data/acpi/q35/HPET'
Using expected file 'tests/data/acpi/q35/HPET'
Looking for expected file 'tests/data/acpi/q35/MCFG'
Using expected file 'tests/data/acpi/q35/MCFG'
Looking for expected file 'tests/data/acpi/q35/FACS'
Using expected file 'tests/data/acpi/q35/FACS'
Looking for expected file 'tests/data/acpi/q35/DSDT'
Using expected file 'tests/data/acpi/q35/DSDT'
acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-NKUU2Z.dsl, aml:/tmp/aml-UERV2Z], Expected [asl:/tmp/asl-3ITW2Z.dsl, aml:tests/data/acpi/q35/DSDT].
acpi-test: Warning. not showing difference since no diff utility is specified. Set 'DIFF' environment variable to a preferred diff utility and run 'make V=1 check' again to see ASL difference.** ERROR:/home/peter.maydell/qemu/tests/bios-tables-test.c:422:test_acpi_asl:
assertion failed: (all_tables_match)
Aborted
ERROR - too few tests run (expected 15, got 1) /home/peter.maydell/qemu/tests/Makefile.include:884: recipe for target 'check-qtest-i386' failed
This is the only 32-bit host I test on, so it may be a generic 32-bit host problem rather than arm-specific.
thanks
-- PMM
Quoted 74 lines · Peter Maydell
Quoted 19 lines · Michael S. Tsirkin
The following changes since commit
8c1ecb590497b0349c550607db923972b37f6963:Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-next-280519-2' into staging (2019-05-28 17:38:32 +0100)
are available in the Git repository at:
git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.gittags/for_upstreamfor you to fetch changes up to
df7cafdeb68b6572fa81d2be9a1910547c4dfafc:bios-tables-test: list all tables that differ (2019-06-03 08:05:43 -0400)
----------------------------------------------------------------
virtio, pci, pc: cleanups, featuresstricter rules for acpi tables: we now fail
on any difference that isn't whitelisted.Quoted 7 lines
vhost-scsi migration.
some cleanups all over the place
Signed-off-by Michael S. Tsirkin <[email protected]>----------------------------------------------------------------
Hi; I'm afraid this fails 'make check' on my aarch32 build:
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' Looking for expected file 'tests/data/acpi/pc/APIC' Using expected file 'tests/data/acpi/pc/APIC' Looking for expected file 'tests/data/acpi/pc/HPET' Using expected file 'tests/data/acpi/pc/HPET' Looking for expected file 'tests/data/acpi/pc/FACS' Using expected file 'tests/data/acpi/pc/FACS' Looking for expected file 'tests/data/acpi/pc/DSDT' Using expected file 'tests/data/acpi/pc/DSDT' PASS 1 bios-tables-test /i386/acpi/piix4
Looking for expected file 'tests/data/acpi/q35/FACP'
Using expected file 'tests/data/acpi/q35/FACP'
Looking for expected file 'tests/data/acpi/q35/APIC'
Using expected file 'tests/data/acpi/q35/APIC'
Looking for expected file 'tests/data/acpi/q35/HPET'
Using expected file 'tests/data/acpi/q35/HPET'
Looking for expected file 'tests/data/acpi/q35/MCFG'
Using expected file 'tests/data/acpi/q35/MCFG'
Looking for expected file 'tests/data/acpi/q35/FACS'
Using expected file 'tests/data/acpi/q35/FACS'
Looking for expected file 'tests/data/acpi/q35/DSDT'
Using expected file 'tests/data/acpi/q35/DSDT'
acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-NKUU2Z.dsl, aml:/tmp/aml-UERV2Z], Expected [asl:/tmp/asl-3ITW2Z.dsl, aml:tests/data/acpi/q35/DSDT].
acpi-test: Warning. not showing difference since no diff utility is specified. Set 'DIFF' environment variable to a preferred diff utility and run 'make V=1 check' again to see ASL difference.** ERROR:/home/peter.maydell/qemu/tests/bios-tables-test.c:422:test_acpi_asl:
assertion failed: (all_tables_match)
Aborted
ERROR - too few tests run (expected 15, got 1)/home/peter.maydell/qemu/tests/Makefile.include:884: recipe for target 'check-qtest-i386' failed
Quoted 5 lines
This is the only 32-bit host I test on, so it may be a generic 32-bit host problem rather than arm-specific.
thanks
-- PMM
I see. I can drop this patch for now, but I suspect this means this host always produced warning and possibly that the tables are all wrong.
Could you send me the actual and expected files please? Preferably both dsl and binary.
Signature · 1 line
MST
Quoted 5 lines · Michael S. Tsirkin
I see. I can drop this patch for now, but I suspect this means this host always produced warning and possibly that the tables are all wrong.
Could you send me the actual and expected files please? Preferably both dsl and binary.
Sure, if you can give me commands to run to do that.
thanks
-- PMM
Quoted 11 lines · Peter Maydell
Quoted 5 lines · Michael S. Tsirkin
I see. I can drop this patch for now, but I suspect this means this host always produced warning and possibly that the tables are all wrong.
Could you send me the actual and expected files please? Preferably both dsl and binary.Sure, if you can give me commands to run to do that.
thanks
-- PMM
They are produced as part of the test.
So we have:
acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-NKUU2Z.dsl, aml:/tmp/aml-UERV2Z], Expected [asl:/tmp/asl-3ITW2Z.dsl, aml:tests/data/acpi/q35/DSDT].
You would do something like:
tar cvzf tests.tgz /tmp/asl-NKUU2Z.dsl /tmp/aml-UERV2Z /tmp/asl-3ITW2Z.dsl tests/data/acpi/q35/DSDT
And then send the tarball.
Signature · 1 line
MST