aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-05-22contrib: add vhost-user-inputMarc-André Lureau5-0/+407
Add a vhost-user input backend example, based on virtio-input-host device. It takes an evdev path as argument, and can be associated with a vhost-user-input device via a UNIX socket: $ vhost-user-input -p /dev/input/eventX -s /tmp/vui.sock $ qemu ... -chardev socket,id=vuic,path=/tmp/vui.sock -device vhost-user-input-pci,chardev=vuic This example is intentionally not included in $TOOLS, and not installed by default. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20190514104126.6294-4-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-05-22libvhost-user: fix -Werror=format= on ppc64Marc-André Lureau1-2/+4
That should fix the following warning: /home/pm215/qemu/contrib/libvhost-user/libvhost-user.c: In function ‘vu_set_mem_table_exec_postcopy’: /home/pm215/qemu/contrib/libvhost-user/libvhost-user.c:666:9: error: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘__u64’ [-Werror=format=] DPRINT("%s: region %d: Registered userfault for %llx + %llx\n", ^ /home/pm215/qemu/contrib/libvhost-user/libvhost-user.c:666:9: error: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘__u64’ [-Werror=format=] cc1: all warnings being treated as errors Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20190514104126.6294-3-marcandre.lureau@redhat.com { kraxel: s/PRIu64/PRIx64/ ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-05-22libvhost-user: fix cast warnings on 32 bitsMarc-André Lureau1-3/+3
Fixes warnings: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20190514104126.6294-2-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-05-21Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20190521-3' into stagingPeter Maydell60-163/+3454
s390x update: - have the bios tolerate bootmap signature entries - next chunk of vector instruction support in tcg - a headers update against Linux 5.2-rc1 - add more facilities and gen15 machines to the cpu model # gpg: Signature made Tue 21 May 2019 16:09:35 BST # gpg: using RSA key C3D0D66DC3624FF6A8C018CEDECF6B93C6F02FAF # gpg: issuer "cohuck@redhat.com" # gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>" [unknown] # gpg: aka "Cornelia Huck <huckc@linux.vnet.ibm.com>" [full] # gpg: aka "Cornelia Huck <cornelia.huck@de.ibm.com>" [full] # gpg: aka "Cornelia Huck <cohuck@kernel.org>" [unknown] # gpg: aka "Cornelia Huck <cohuck@redhat.com>" [unknown] # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0 18CE DECF 6B93 C6F0 2FAF * remotes/cohuck/tags/s390x-20190521-3: (55 commits) s390x/cpumodel: wire up 8561 and 8562 as gen15 machines s390x/cpumodel: add gen15 defintions s390x/cpumodel: add Deflate-conversion facility s390x/cpumodel: enhanced sort facility s390x/cpumodel: vector enhancements s390x/cpumodel: msa9 facility s390x/cpumodel: Miscellaneous-Instruction-Extensions Facility 3 s390x/cpumodel: ignore csske for expansion linux headers: update against Linux 5.2-rc1 update-linux-headers: handle new header file s390x/tcg: Implement VECTOR TEST UNDER MASK s390x/tcg: Implement VECTOR SUM ACROSS WORD s390x/tcg: Implement VECTOR SUM ACROSS QUADWORD s390x/tcg: Implement VECTOR SUM ACROSS DOUBLEWORD s390x/tcg: Implement VECTOR SUBTRACT WITH BORROW COMPUTE BORROW INDICATION s390x/tcg: Implement VECTOR SUBTRACT WITH BORROW INDICATION s390x/tcg: Implement VECTOR SUBTRACT COMPUTE BORROW INDICATION s390x/tcg: Implement VECTOR SUBTRACT s390x/tcg: Implement VECTOR SHIFT RIGHT LOGICAL * s390x/tcg: Implement VECTOR SHIFT RIGHT ARITHMETIC ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-05-21s390x/cpumodel: wire up 8561 and 8562 as gen15 machinesChristian Borntraeger1-4/+5
8561 and 8562 will be gen15 machines. There is no name yet, let us use gen15a and gen15b as base name. Later on we can provide aliases with the proper name. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Message-Id: <20190429090250.7648-10-borntraeger@de.ibm.com> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2019-05-21s390x/cpumodel: add gen15 defintionsChristian Borntraeger1-0/+37
add several new features (msa9, sort, deflate, additional vector instructions, new general purpose instructions) to generation 15. Also disable csske and bpb from the default and base models >=15. This will allow to migrate gen15 machines to future machines that do not have these features. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Message-Id: <20190429090250.7648-9-borntraeger@de.ibm.com> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2019-05-21s390x/cpumodel: add Deflate-conversion facilityChristian Borntraeger5-0/+35
add the deflate conversion facility. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Message-Id: <20190429090250.7648-8-borntraeger@de.ibm.com> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2019-05-21s390x/cpumodel: enhanced sort facilityChristian Borntraeger5-0/+39
add the enhanced sort facility. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: David Hildenbrand <david@redhat.com> Message-Id: <20190429090250.7648-7-borntraeger@de.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2019-05-21s390x/cpumodel: vector enhancementsChristian Borntraeger2-0/+4
Add vector enhancements to the cpu model. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: David Hildenbrand <david@redhat.com> Message-Id: <20190429090250.7648-6-borntraeger@de.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2019-05-21s390x/cpumodel: msa9 facilityChristian Borntraeger6-0/+114
Provide the MSA9 facility (stfle.155). This also contains pckmo subfunctions for key wrapping. Keep them in a separate group to disable those as a block if necessary. This is for example needed when disabling key wrapping via the HMC. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Message-Id: <20190429090250.7648-5-borntraeger@de.ibm.com> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2019-05-21s390x/cpumodel: Miscellaneous-Instruction-Extensions Facility 3Christian Borntraeger2-0/+2
Provide the "Miscellaneous-Instruction-Extensions Facility 3" via stfle.61. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: David Hildenbrand <david@redhat.com> Message-Id: <20190429090250.7648-4-borntraeger@de.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2019-05-21s390x/cpumodel: ignore csske for expansionChristian Borntraeger1-0/+2
csske will be removed in a future machine. Ignore it for expanding the cpu model. Otherwise qemu falls back to z9. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Cc: qemu-stable@nongnu.org Reviewed-by: David Hildenbrand <david@redhat.com> Message-Id: <20190429090250.7648-3-borntraeger@de.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2019-05-21linux headers: update against Linux 5.2-rc1Cornelia Huck36-144/+907
commit a188339ca5a396acc588e5851ed7e19f66b0ebd9 Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2019-05-21update-linux-headers: handle new header fileCornelia Huck1-0/+3
We need to copy sve_context.h for aarch64. Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2019-05-21Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into stagingPeter Maydell36-1453/+1890
pci, pc, virtio: features, fixes reconnect for vhost blk tests for UEFI misc other stuff Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Tue 21 May 2019 14:41:32 BST # gpg: using RSA key 281F0DB8D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full] # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" [full] # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67 # Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469 * remotes/mst/tags/for_upstream: (34 commits) tests: acpi: print error unable to dump ACPI table during rebuild tests: acpi: refactor rebuild-expected-aml.sh to dump ACPI tables for a specified list of targets tests: acpi: allow to override default accelerator tests: acpi: ignore SMBIOS tests when UEFI firmware is used tests: acpi: add a way to start tests with UEFI firmware tests: acpi: add acpi_find_rsdp_address_uefi() helper tests: acpi: move boot_sector_init() into x86 tests branch tests: acpi: skip FACS table if board uses hw reduced ACPI profile tests: acpi: fetch X_DSDT if pointer to DSDT is 0 tests: acpi: make pointer to RSDP 64bit tests: acpi: make RSDT test routine handle XSDT tests: acpi: make acpi_fetch_table() take size of fetched table pointer tests: acpi: rename acpi_parse_rsdp_table() into acpi_fetch_rsdp_table() pci: Simplify pci_bus_is_root() pcie: Remove redundant test in pcie_mmcfg_data_{read,write}() libvhost-user: fix bad vu_log_write hw/arm/virt-acpi-build: pass AcpiMcfgInfo to build_mcfg() i386, acpi: remove mcfg_ prefix in AcpiMcfgInfo members hw/arm/virt-acpi-build: remove unnecessary variable mcfg_start do not call vhost_net_cleanup() on running net from char user event ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-05-21tests: acpi: print error unable to dump ACPI table during rebuildIgor Mammedov1-1/+4
Instead of just asserting print the error that lead to assert first. While at it move assert into rebuild branch, which removes redundant check done in case of !rebuild branch is taken (the later is taken care of by g_assert_no_error). Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Wei Yang <richardw.yang@linux.intel.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <1556808723-226478-16-git-send-email-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-05-21tests: acpi: refactor rebuild-expected-aml.sh to dump ACPI tables for a ↵Igor Mammedov1-12/+11
specified list of targets Make initial list contain x86_64. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <1556808723-226478-15-git-send-email-imammedo@redhat.com> Reviewed-by: Wei Yang <richardw.yang@linux.intel.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-05-21Merge remote-tracking branch ↵Peter Maydell118-371/+195
'remotes/huth-gitlab/tags/pull-request-2019-05-21' into staging - qtest patches to get rid of the global_qtest variable in more tests - some iotests patches that have multiple reviews and thus are ready to go # gpg: Signature made Tue 21 May 2019 11:40:31 BST # gpg: using RSA key 2ED9D774FE702DB5 # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full] # gpg: aka "Thomas Huth <thuth@redhat.com>" [full] # gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full] # gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown] # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * remotes/huth-gitlab/tags/pull-request-2019-05-21: tests/qemu-iotests: Remove the "_supported_os Linux" line from many tests cirrus / travis: Add gnu-sed and bash for macOS and FreeBSD tests/qemu-iotests: Do not hard-code the path to bash tests/qemu-iotests/check: Pick a default machine if necessary tests/qemu-iotests/005: Add a sanity check for large sparse file support tests/hd-geo-test: Use qtest_init() instead of qtest_start() tests/device-introspect: Use qtest_init() instead of qtest_start() tests/qom-test: Use qtest_init() instead of qtest_start() tests/numa-test: Use qtest_init() instead of qtest_start() tests/q35-test: Make test independent of global_qtest tests/libqos: Get rid of global_qtest dependency in qvring_init() tests/libqtest: Fix description of qtest_vinitf() and qtest_initf() tests/libqtest: Remove unused global_qtest-related wrapper functions Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-05-21Merge remote-tracking branch 'remotes/xtensa/tags/20190520-xtensa' into stagingPeter Maydell9-1107/+2572
target/xtensa: SR reorganization and options for modern cores Reorganize special register handling to support configurations with conflicting SR definitions. Implement options used by the modern xtensa cores: - memory protection unit; - block prefetch; - exclusive access Add special register definitions and IRQ types for ECC/parity, gather/scatter and IDMA. # gpg: Signature made Mon 20 May 2019 18:53:05 BST # gpg: using RSA key 2B67854B98E5327DCDEB17D851F9CC91F83FA044 # gpg: issuer "jcmvbkbc@gmail.com" # gpg: Good signature from "Max Filippov <filippov@cadence.com>" [unknown] # gpg: aka "Max Filippov <max.filippov@cogentembedded.com>" [full] # gpg: aka "Max Filippov <jcmvbkbc@gmail.com>" [full] # Primary key fingerprint: 2B67 854B 98E5 327D CDEB 17D8 51F9 CC91 F83F A044 * remotes/xtensa/tags/20190520-xtensa: target/xtensa: implement exclusive access option target/xtensa: update list of exception causes target/xtensa: implement block prefetch option opcodes target/xtensa: implement DIWBUI.P opcode target/xtensa: implement MPU option target/xtensa: add parity/ECC option SRs target/xtensa: define IDMA and gather/scatter IRQ types target/xtensa: make internal MMU functions static target/xtensa: get rid of centralized SR properties Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-05-21tests/qemu-iotests: Remove the "_supported_os Linux" line from many testsThomas Huth99-99/+0
A lot of tests run fine on FreeBSD and macOS, too - the limitation to Linux here was likely just copied-and-pasted from other tests. Thus remove the "_supported_os Linux" line from tests that run successful in our CI pipelines on FreeBSD and macOS. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Alex Bennée <alex.bennee@linaro.org> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Message-Id: <20190502084506.8009-6-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-05-21cirrus / travis: Add gnu-sed and bash for macOS and FreeBSDThomas Huth2-2/+3
We are going to enable the qemu-iotests during "make check" again, and for running the iotests, we need bash and gnu-sed. Reviewed-by: Li-Wen Hsu <lwhsu@freebsd.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Message-Id: <20190502084506.8009-5-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-05-21tests/qemu-iotests: Do not hard-code the path to bashThomas Huth5-5/+5
bash is installed in a different directory on non-Linux systems like FreeBSD. Do not hard-code /bin/bash here so that the tests can run there, too. Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Message-Id: <20190502084506.8009-4-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-05-21tests/qemu-iotests/check: Pick a default machine if necessaryThomas Huth1-1/+12
qemu-system-arm, qemu-system-aarch64 and qemu-system-tricore do not have a default machine, so when running the qemu-iotests with such a binary, lots of tests are failing. Fix it by picking a default machine in the "check" script instead. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Message-Id: <20190502084506.8009-3-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-05-21tests/qemu-iotests/005: Add a sanity check for large sparse file supportThomas Huth1-0/+9
"check -raw 005" fails when running on certain filesystems - these do not support such large sparse files. Use the same check as in test 220 to skip the test in this case. Suggested-by: Eric Blake <eblake@redhat.com> Message-Id: <20190502084506.8009-2-thuth@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-05-21tests/hd-geo-test: Use qtest_init() instead of qtest_start()Thomas Huth1-35/+41
qtest_start() + qtest_end() should be avoided, since they use the global_qtest variable that we want to get rid of in the long run. Use qtest_init() and qtest_quit() instead. Message-Id: <20190515174328.16361-7-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-05-21tests/device-introspect: Use qtest_init() instead of qtest_start()Thomas Huth1-39/+46
qtest_start() + qtest_end() should be avoided, since they use the global_qtest variable that we want to get rid of in the long run. Use qtest_init() and qtest_quit() instead. Message-Id: <20190515174328.16361-6-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-05-21tests/qom-test: Use qtest_init() instead of qtest_start()Thomas Huth1-15/+13
qtest_start() + qtest_end() should be avoided, since they use the global_qtest variable that we want to get rid of in the long run. Use qtest_init() and qtest_quit() instead. Message-Id: <20190515174328.16361-5-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-05-21tests/numa-test: Use qtest_init() instead of qtest_start()Thomas Huth1-23/+30
qtest_start() + qtest_end() should be avoided, since they use the global_qtest variable that we want to get rid of in the long run. Use qtest_init() and qtest_quit() instead. Message-Id: <20190515174328.16361-4-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-05-21tests/q35-test: Make test independent of global_qtestThomas Huth1-21/+18
Use a local QTestState variable, so that we can finally get rid of the undesired global_qtest variable in this file, too. Message-Id: <20190515174328.16361-3-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-05-21tests/libqos: Get rid of global_qtest dependency in qvring_init()Thomas Huth4-11/+15
Library functions should not depend on global_qtest functions like writew() and writeq(), so that they can also be used in tests that deal with multiple QTestStates at the same time (like migration tests). Message-Id: <20190515174328.16361-2-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-05-21tests/libqtest: Fix description of qtest_vinitf() and qtest_initf()Thomas Huth1-2/+2
These functions are convenience wrappers of qtest_init() and not of qtest_start(). Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190513154759.24973-1-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-05-21tests/libqtest: Remove unused global_qtest-related wrapper functionsThomas Huth2-118/+1
A bunch of the wrapper functions that use global_qtest are not used anymore. Remove them to avoid that they are used in new code again. Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20190510052239.21947-1-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-05-20tests: acpi: allow to override default acceleratorIgor Mammedov1-3/+5
By default test cases were run with 'kvm:tcg' accelerators to speed up tests execution. While it works for x86, were change of accelerator doesn't affect ACPI tables, the approach doesn't works for ARM usecase though. In arm/virt case, KVM mode requires using 'host' cpu model, which isn't available in TCG mode. That could be worked around with 'max' cpu model, which works both for KVM and TCG. However in KVM mode it is necessary to specify matching GIC version, which also could use 'max' value to automatically pick GIC version suitable for host's CPU. Depending on host cpu type, different GIC versions would be used, which in turn leads to different ACPI tables (APIC) generated. As result while comparing with reference blobs, test would fail if host's GIC version won't match the version on the host where reference blobs where generated. Let's keep testing simple for now and allow ARM tests run in TCG only mode. To do so introduce 'accel' parameter in test configuration, so test case could override default "kvm:tcg" with accelerator of choice. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <1556808723-226478-12-git-send-email-imammedo@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-05-20tests: acpi: ignore SMBIOS tests when UEFI firmware is usedIgor Mammedov1-2/+9
once FW provides a pointer to SMBIOS entry point like it does for RSDP it should be possible to enable this one the same way. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <1556808723-226478-11-git-send-email-imammedo@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-05-20tests: acpi: add a way to start tests with UEFI firmwareIgor Mammedov1-17/+35
For testcase to use UEFI firmware, one needs to provide and specify firmware and varstore blob names in test_data { uefi_fl1, uefi_fl2 } fields respectively and RAM start address plus size where to look for test structure signature. Additionally testcase should specify bootable cdrom image from uefi-boot-images with EFI test utility. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <1556808723-226478-10-git-send-email-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-05-20tests: acpi: add acpi_find_rsdp_address_uefi() helperIgor Mammedov2-0/+46
introduce UEFI specific counterpart to acpi_find_rsdp_address() that will help to find RSDP address when [OA]VMF is used as firmware. It requires guest firmware or other guest app to place 1Mb aligned UefiTestSupport structure (defined in this patch) in RAM with UefiTestSupport::signature_guid set to AB87A6B1-2034-BDA0-71BD-375007757785 For test app details see commit (09a274d82f tests: introduce "uefi-test-tools" with the BiosTablesTest UEFI app) Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Wei Yang <richardw.yang@linux.intel.com> Message-Id: <1556808723-226478-9-git-send-email-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-05-20tests: acpi: move boot_sector_init() into x86 tests branchIgor Mammedov1-4/+5
boot_sector_init() won't be used by arm/virt board, so move it from global scope to x86 branch that uses it. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <1556808723-226478-8-git-send-email-imammedo@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-05-20tests: acpi: skip FACS table if board uses hw reduced ACPI profileIgor Mammedov1-3/+7
If FADT has HW_REDUCED_ACPI flag set, do not attempt to fetch FACS as it's not provided by the board. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Wei Yang <richardw.yang@linux.intel.com> Message-Id: <1556808723-226478-7-git-send-email-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-05-20tests: acpi: fetch X_DSDT if pointer to DSDT is 0Igor Mammedov1-1/+10
that way it would be possible to test a DSDT pointed by 64bit X_DSDT field in FADT. PS: it will allow to enable testing arm/virt board, which sets only newer X_DSDT field. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <1556808723-226478-6-git-send-email-imammedo@redhat.com> Reviewed-by: Wei Yang <richardw.yang@linux.intel.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-05-20tests: acpi: make pointer to RSDP 64bitIgor Mammedov3-8/+6
In case of UEFI, RSDP doesn't have to be located in lowmem, it could be placed at any address. Make sure that test won't break if it is placed above the first 4Gb of address space. PS: While at it cleanup some local variables as we don't really need them. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <1556808723-226478-5-git-send-email-imammedo@redhat.com> Reviewed-by: Wei Yang <richardw.yang@linux.intel.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-05-20tests: acpi: make RSDT test routine handle XSDTIgor Mammedov3-19/+14
If RSDP revision is more than 0 fetch table pointed by XSDT and fallback to legacy RSDT table otherwise. While at it drop unused acpi_get_xsdt_address(). Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <1556808723-226478-4-git-send-email-imammedo@redhat.com> Reviewed-by: Wei Yang <richardw.yang@linux.intel.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-05-20tests: acpi: make acpi_fetch_table() take size of fetched table pointerIgor Mammedov4-11/+13
Currently acpi_fetch_table() assumes 32 bit size of table pointer in ACPI tables. However X_foo variants are 64 bit, prepare acpi_fetch_table() to handle both by adding an argument for addr_ptr pointed entry size. Follow up commits will use that to read XSDT and X_foo entries in ACPI tables. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <1556808723-226478-3-git-send-email-imammedo@redhat.com> Reviewed-by: Wei Yang <richardw.yang@linux.intel.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-05-20tests: acpi: rename acpi_parse_rsdp_table() into acpi_fetch_rsdp_table()Igor Mammedov4-4/+4
so name would reflect what the function does Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Wei Yang <richardw.yang@linux.intel.com> Message-Id: <1556808723-226478-2-git-send-email-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-05-20pci: Simplify pci_bus_is_root()David Gibson5-20/+14
pci_bus_is_root() currently relies on a method in the PCIBusClass. But it's always known if a PCI bus is a root bus when we create it, so using a dynamic method is overkill. This replaces it with an IS_ROOT bit in a new flags field, which is set on root buses and otherwise clear. As a bonus this removes the special is_root logic from pci_expander_bridge, since it already creates its bus as a root bus. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Greg Kurz <groug@kaod.org> Message-Id: <20190424041959.4087-3-david@gibson.dropbear.id.au>
2019-05-20pcie: Remove redundant test in pcie_mmcfg_data_{read,write}()David Gibson1-10/+0
These functions have an explicit test for accesses above the device's config size. But pci_host_config_{read,write}_common() which they're about to call already have checks against the config space limit and do the right thing. So, remove the redundant tests. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20190424041959.4087-2-david@gibson.dropbear.id.au>
2019-05-20libvhost-user: fix bad vu_log_writeLi Feng1-1/+1
Mark dirty as page, the step of each call is 1. Signed-off-by: Li Feng <fengli@smartx.com> Message-Id: <20190420091016.213160-1-fengli@smartx.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-05-20hw/arm/virt-acpi-build: pass AcpiMcfgInfo to build_mcfg()Wei Yang3-12/+45
To build MCFG, two information is necessary: * bus number * base address Abstract these two information to AcpiMcfgInfo so that build_mcfg and build_mcfg_q35 will have the same declaration. Signed-off-by: Wei Yang <richardw.yang@linux.intel.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <20190419003053.8260-5-richardw.yang@linux.intel.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-05-20i386, acpi: remove mcfg_ prefix in AcpiMcfgInfo membersWei Yang1-7/+7
This is obvious the member in AcpiMcfgInfo describe MCFG's property. Remove the mcfg_ prefix. Signed-off-by: Wei Yang <richardw.yang@linux.intel.com> Suggested-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190419003053.8260-4-richardw.yang@linux.intel.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-05-20hw/arm/virt-acpi-build: remove unnecessary variable mcfg_startWei Yang1-3/+1
mcfg_start points to the start of MCFG table and is used in build_header. While this information could be derived from mcfg. This patch removes the unnecessary variable mcfg_start. Signed-off-by: Wei Yang <richardw.yang@linux.intel.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190419003053.8260-3-richardw.yang@linux.intel.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-05-20do not call vhost_net_cleanup() on running net from char user eventDan Streetman1-1/+0
Buglink: https://launchpad.net/bugs/1823458 Currently, a user CHR_EVENT_CLOSED event will cause net_vhost_user_event() to call vhost_user_cleanup(), which calls vhost_net_cleanup() for all its queues. However, vhost_net_cleanup() must never be called like this for fully-initialized nets; when other code later calls vhost_net_stop() - such as from virtio_net_vhost_status() - it will try to access the already-cleaned-up fields and fail with assertion errors or segfaults. The vhost_net_cleanup() will eventually be called from qemu_cleanup_net_client(). Signed-off-by: Dan Streetman <ddstreet@canonical.com> Message-Id: <20190416184624.15397-3-dan.streetman@canonical.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>