aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-05-23e1000x: Share more Rx filtering logicAkihiko Odaki6-119/+56
This saves some code and enables tracepoint for e1000's VLAN filtering. Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech> Signed-off-by: Jason Wang <jasowang@redhat.com>
2023-05-23net/eth: Rename eth_setup_vlan_headers_exAkihiko Odaki3-10/+3
The old eth_setup_vlan_headers has no user so remove it and rename eth_setup_vlan_headers_ex. Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Jason Wang <jasowang@redhat.com>
2023-05-23hw/net/net_tx_pkt: Remove net_rx_pkt_get_l4_infoAkihiko Odaki2-14/+0
This function is not used. Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
2023-05-23tests/avocado: Remove test_igb_nomsi_kvmAkihiko Odaki1-11/+1
It is unlikely to find more bugs with KVM so remove test_igb_nomsi_kvm to save time to run it. Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Acked-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Jason Wang <jasowang@redhat.com>
2023-05-23tests/avocado: Remove unused importsAkihiko Odaki1-1/+0
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
2023-05-23Fix references to igb Avocado testAkihiko Odaki3-3/+3
Fixes: 9f95111474 ("tests/avocado: re-factor igb test to avoid timeouts") Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Jason Wang <jasowang@redhat.com>
2023-05-23igb: Always copy ethernet headerAkihiko Odaki1-20/+23
igb_receive_internal() used to check the iov length to determine copy the iovs to a contiguous buffer, but the check is flawed in two ways: - It does not ensure that iovcnt > 0. - It does not take virtio-net header into consideration. The size of this copy is just 22 octets, which can be even less than the code size required for checks. This (wrong) optimization is probably not worth so just remove it. Removing this also allows igb to assume aligned accesses for the ethernet header. Fixes: 3a977deebe ("Intrdocue igb device emulation") Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech> Signed-off-by: Jason Wang <jasowang@redhat.com>
2023-05-23e1000e: Always copy ethernet headerAkihiko Odaki1-16/+10
e1000e_receive_internal() used to check the iov length to determine copy the iovs to a contiguous buffer, but the check is flawed in two ways: - It does not ensure that iovcnt > 0. - It does not take virtio-net header into consideration. The size of this copy is just 18 octets, which can be even less than the code size required for checks. This (wrong) optimization is probably not worth so just remove it. Fixes: 6f3fbe4ed0 ("net: Introduce e1000e device emulation") Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
2023-05-23net/net_rx_pkt: Use iovec for net_rx_pkt_set_protocols()Akihiko Odaki7-30/+34
igb does not properly ensure the buffer passed to net_rx_pkt_set_protocols() is contiguous for the entire L2/L3/L4 header. Allow it to pass scattered data to net_rx_pkt_set_protocols(). Fixes: 3a977deebe ("Intrdocue igb device emulation") Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech> Signed-off-by: Jason Wang <jasowang@redhat.com>
2023-05-23igb: Clear IMS bits when committing ICR accessAkihiko Odaki1-4/+4
The datasheet says contradicting statements regarding ICR accesses so it is not reliable to determine the behavior of ICR accesses. However, e1000e does clear IMS bits when reading ICR accesses and Linux also expects ICR accesses will clear IMS bits according to: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/intel/igb/igb_main.c?h=v6.2#n8048 Fixes: 3a977deebe ("Intrdocue igb device emulation") Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech> Signed-off-by: Jason Wang <jasowang@redhat.com>
2023-05-23igb: Do not require CTRL.VME for tx VLAN taggingAkihiko Odaki1-1/+1
While the datasheet of e1000e says it checks CTRL.VME for tx VLAN tagging, igb's datasheet has no such statements. It also says for "CTRL.VLE": > This register only affects the VLAN Strip in Rx it does not have any > influence in the Tx path in the 82576. (Appendix A. Changes from the 82575) There is no "CTRL.VLE" so it is more likely that it is a mistake of CTRL.VME. Fixes: fba7c3b788 ("igb: respect VMVIR and VMOLR for VLAN") Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech> Signed-off-by: Jason Wang <jasowang@redhat.com>
2023-05-23igb: Fix Rx packet type encodingAkihiko Odaki2-19/+24
igb's advanced descriptor uses a packet type encoding different from one used in e1000e's extended descriptor. Fix the logic to encode Rx packet type accordingly. Fixes: 3a977deebe ("Intrdocue igb device emulation") Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech> Signed-off-by: Jason Wang <jasowang@redhat.com>
2023-05-23e1000x: Fix BPRC and MPRCAkihiko Odaki5-45/+33
Before this change, e1000 and the common code updated BPRC and MPRC depending on the matched filter, but e1000e and igb decided to update those counters by deriving the packet type independently. This inconsistency caused a multicast packet to be counted twice. Updating BPRC and MPRC depending on are fundamentally flawed anyway as a filter can be used for different types of packets. For example, it is possible to filter broadcast packets with MTA. Always determine what counters to update by inspecting the packets. Fixes: 3b27430177 ("e1000: Implementing various counters") Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech> Signed-off-by: Jason Wang <jasowang@redhat.com>
2023-05-23hw/net/net_tx_pkt: Decouple interface from PCIAkihiko Odaki5-53/+54
This allows to use the network packet abstractions even if PCI is not used. Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
2023-05-23hw/net/net_tx_pkt: Decouple implementation from PCIAkihiko Odaki2-20/+42
This is intended to be followed by another change for the interface. It also fixes the leak of memory mapping when the specified memory is partially mapped. Fixes: e263cd49c7 ("Packet abstraction for VMWARE network devices") Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
2023-05-23e1000e: Fix tx/rx counterstimothee.cocault@gmail.com4-12/+8
The bytes and packets counter registers are cleared on read. Copying the "total counter" registers to the "good counter" registers has side effects. If the "total" register is never read by the OS, it only gets incremented. This leads to exponential growth of the "good" register. This commit increments the counters individually to avoid this. Signed-off-by: Timothée Cocault <timothee.cocault@gmail.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
2023-05-22Merge tag 'pull-qapi-2023-05-17-v2' of https://repo.or.cz/qemu/armbru into ↵Richard Henderson12-258/+222
staging QAPI patches patches for 2023-05-17 # -----BEGIN PGP SIGNATURE----- # # iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmRrTcgSHGFybWJydUBy # ZWRoYXQuY29tAAoJEDhwtADrkYZTMycP/3sP6/U4kwOKMGGcB+n2pHJeioQS4xgF # 94NCW+KpewxApP0XzIC2nDGjUe/rPcUfQmBNUumvYbqHO91tq91wFwkllBv2UR0q # 6qfRji+e8+9H9hMDeVzzSNjlZZg/tSdIJlhkJDw1u4/3fpjfAmzVx6DO3wepSQ9Q # m5Af/+uhVZWyUXMZqcKr2Zq8qur6ZFEBNpXpPvT60Tvy2heuQ+vcoE3tl2ZRQbmj # b/jhtCu+NPjgOHtg9Gr2BPXqQiZBR4vFA7WBsB8wCf2xxULfTwHJvFz/e0vx5fUC # q0Fsyybf4USo2PRMsRFv2v4dEuVGHb3E1RIJY4NTAxQMqqm4zfOyK0BzOGNDkxCn # owNP4vKly0e/CfYDY74FHaPId295xyeo6S4Cj5ib9W23AAWUNt6f6vbjlDOLCLON # c7yXP/aJwhTb2w1t0mLTmsKum3DpLlrudPudTylVlmYfwchkvUGsWYbaxu6H6XWk # 49Ox/QPVwqG6elXNn3kTY4QqTAppXhE7QcPbioX9WOThVPf6aJCLdZSHEHu4HXkZ # 4FRu73Z2wcPNB789xOrQoXs24GdKmWXQ6K01KC4v7WNJQBXccec52yGxvktQRZBm # GL3zYdOOJEL+Y/8JrXTIo26M8HP/4kxV2VqB6KOuaGygMsW9w9jbG+ygLyjqUDQg # 3APV3hdmVOht # =6anf # -----END PGP SIGNATURE----- # gpg: Signature made Mon 22 May 2023 04:11:04 AM PDT # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [undefined] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [undefined] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * tag 'pull-qapi-2023-05-17-v2' of https://repo.or.cz/qemu/armbru: docs/interop: Delete qmp-intro.txt docs/interop/qmp-spec: Update error description for parsing errors docs/interop: Convert qmp-spec.txt to rST qapi: Improve error message for description following section Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2023-05-22Merge tag 'pull-request-2023-05-22' of https://gitlab.com/thuth/qemu into ↵Richard Henderson31-71/+125
staging * First batch of fixes to allow "make check" with "--without-default-devices" * Enable the "bios bits" avocado test in the gitlab-CI * Another minor fix for the redundancy DMA blocker code # -----BEGIN PGP SIGNATURE----- # # iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmRrVhoRHHRodXRoQHJl # ZGhhdC5jb20ACgkQLtnXdP5wLbUaiRAApPVveet6WPQ7Ag1448LtqHTGiwl8x2Ba # jQ7FTKhqdTC5O+/BU7IQkvGmErPxCc8WPB7eoowwBVA/4dr8YIIBLKqO4RtP6LXs # rtUkzsPI9ExW+iJjIMVOmHsp/shlRhuf+Tmlr8OsTObecCeA4Vbxc+RlvYXfCPhM # 8tOuLO8n6LQY/62fgXSzI5WlLQSzIo3aDSmCeWa1QHkPLf6itvGkwsNBytMJLoUT # pXZnBNqlXiuyPtloLp+DMfRRkpq8AHB04+Sri7TVPxi7bJL28RMZiaAXpvHSFLz8 # JR2ApRrzBthiLMK1I6A0c2ZGCbVOAi1dhNDNqWCyx8ZBASEJj0XuT/+Qse81sKmG # zNXr57x0CzWAJ59/taBM2hjUks10rJOmxHJYxS6i1JJR7u1zTuvii7toPMmf35zX # bM7TYjKpYGa2HneHpw1eOjpTgUYZpgla/pVXZhKqoGdfmseBMlFU424MNl/xDRng # bxuam3Ku+ClOeQlzXt8aceL/gTApJfvy5FAIAK5yUOQDTs6HjJJL2AfcOzss8kXb # k6IMHgV1tnLed8B7K4iml2rzvk+RT3CPGvmaNwSAkdh8SnE5/bv1I6s4fHiXMlvC # mmfvFSoWwdhcsD5r+XOFxfke8sGrOeQIXKefp6UL3hYVV7o2NUe89BytXZCzut/Y # 6ulR25HHtmI= # =m1Px # -----END PGP SIGNATURE----- # gpg: Signature made Mon 22 May 2023 04:46:34 AM PDT # gpg: using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5 # gpg: issuer "thuth@redhat.com" # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [undefined] # gpg: aka "Thomas Huth <thuth@redhat.com>" [undefined] # gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown] # gpg: aka "Thomas Huth <huth@tuxfamily.org>" [undefined] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * tag 'pull-request-2023-05-22' of https://gitlab.com/thuth/qemu: memory: stricter checks prior to unsetting engaged_in_io acpi/tests/avocado/bits: enable bios bits avocado tests on gitlab CI pipeline .gitlab-ci.d/buildtest.yml: Run full "make check" with --without-default-devices tests/qemu-iotests/172: Run QEMU with -vga none and -nic none tests/qtest/meson.build: Run the net filter tests only with default devices tests/qtest: Check for the availability of virtio-ccw devices before using them tests/qtest/virtio-ccw-test: Remove superfluous tests tests/qtest/cdrom-test: Fix the test to also work without optional devices tests/qtest/usb-hcd-uhci-test: Skip test if UHCI controller is not available tests/qtest/readconfig-test: Check for the availability of USB controllers hw/sparc64/sun4u: Use MachineClass->default_nic and MachineClass->no_parallel hw/i386: Ignore the default parallel port if it has not been compiled into QEMU hw/char/parallel: Move TYPE_ISA_PARALLEL to the header file hw/sh4: Use MachineClass->default_nic in the sh4 r2d machine hw/s390x: Use MachineClass->default_nic in the s390x machine hw/ppc: Use MachineClass->default_nic in the ppc machines softmmu/vl.c: Disable default NIC if it has not been compiled into the binary hw: Move the default NIC machine class setting from the x86 to the generic one softmmu/vl.c: Check for the availability of the VGA device before using it hw/i386/Kconfig: ISAPC works fine without VGA_ISA Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2023-05-22Merge tag 'for-upstream' of https://repo.or.cz/qemu/kevin into stagingRichard Henderson36-502/+664
Block layer patches - qcow2 spec: Rename "zlib" compression to "deflate" - Honour graph read lock even in the main thread + prerequisite fixes - aio-posix: do not nest poll handlers (fixes infinite recursion) - Refactor QMP blockdev transactions - graph-lock: Disable locking for now - iotests/245: Check if 'compress' driver is available # -----BEGIN PGP SIGNATURE----- # # iQJFBAABCAAvFiEE3D3rFZqa+V09dFb+fwmycsiPL9YFAmRnrxURHGt3b2xmQHJl # ZGhhdC5jb20ACgkQfwmycsiPL9aHyw/9H0xpceVb0kcC5CStOWCcq4PJHzkl/8/m # c6ABFe0fgEuN2FCiKiCKOt6+V7qaIAw0+YLgPr/LGIsbIBzdxF3Xgd2UyIH6o4dK # bSaIAaes6ZLTcYGIYEVJtHuwNgvzhjyBlW5qqwTpN0YArKS411eHyQ3wlUkCEVwK # ZNmDY/MC8jq8r1xfwpPi7CaH6k1I6HhDmyl1PdURW9hmoAKZQZMhEdA5reJrUwZ9 # EhfgbLIaK0kkLLsufJ9YIkd+b/P3mUbH30kekNMOiA0XlnhWm1Djol5pxlnNiflg # CGh6CAyhJKdXzwV567cSF11NYCsFmiY+c/l0xRIGscujwvO4iD7wFT5xk2geUAKV # yaox8JA7Le36g7lO2CRadlS24/Ekqnle6q09g2i8s2tZwB4fS286vaZz6QDPmf7W # VSQp9vuDj6ZcVjMsuo2+LzF3yA2Vqvgd9s032iBAjRDSGLAoOdQZjBJrreypJ0Oi # pVFwgK+9QNCZBsqVhwVOgElSoK/3Vbl1kqpi30Ikgc0epAn0suM1g2QQPJ2Zt/MJ # xqMlTv+48OW3vq3ebr8GXqkhvG/u0ku6I1G6ZyCrjOce89osK8QUaovERyi1eOmo # ouoZ8UJJa6VfEkkmdhq2vF6u/MP4PeZ8MW3pYQy6qEnSOPDKpLnR30Z/s/HZCZcm # H4QIbfQnzic= # =edNP # -----END PGP SIGNATURE----- # gpg: Signature made Fri 19 May 2023 10:17:09 AM PDT # gpg: using RSA key DC3DEB159A9AF95D3D7456FE7F09B272C88F2FD6 # gpg: issuer "kwolf@redhat.com" # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [full] * tag 'for-upstream' of https://repo.or.cz/qemu/kevin: (21 commits) iotests: Test commit with iothreads and ongoing I/O nbd/server: Fix drained_poll to wake coroutine in right AioContext graph-lock: Disable locking for now tested: add test for nested aio_poll() in poll handlers aio-posix: do not nest poll handlers iotests/245: Check if 'compress' driver is available graph-lock: Honour read locks even in the main thread blockjob: Adhere to rate limit even when reentered early test-bdrv-drain: Call bdrv_co_unref() in coroutine context test-bdrv-drain: Take graph lock more selectively qemu-img: Take graph lock more selectively qcow2: Unlock the graph in qcow2_do_open() where necessary block/export: Fix null pointer dereference in error path block: Call .bdrv_co_create(_opts) unlocked docs/interop/qcow2.txt: fix description about "zlib" clusters blockdev: qmp_transaction: drop extra generic layer blockdev: use state.bitmap in block-dirty-bitmap-add action blockdev: transaction: refactor handling transaction properties blockdev: qmp_transaction: refactor loop to classic for blockdev: transactions: rename some things ... Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2023-05-22memory: stricter checks prior to unsetting engaged_in_ioAlexander Bulekov1-1/+3
engaged_in_io could be unset by an MR with re-entrancy checks disabled. Ensure that only MRs that can set the engaged_in_io flag can unset it. Signed-off-by: Alexander Bulekov <alxndr@bu.edu> Message-Id: <20230516084002.3813836-1-alxndr@bu.edu> Reviewed-by: Darren Kenny <darren.kenny@oracle.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-05-22acpi/tests/avocado/bits: enable bios bits avocado tests on gitlab CI pipelineAni Sinha1-4/+4
Biosbits avocado tests on gitlab has thus far been disabled because some packages needed by this test was missing in the container images used by gitlab CI. These packages have now been added with the commit: da9000784c90d ("tests/lcitool: Add mtools and xorriso and remove genisoimage as dependencies") Therefore, this change enables bits avocado test on gitlab. At the same time, the bits cleanup code has also been made more robust with this change. Signed-off-by: Ani Sinha <anisinha@redhat.com> Message-Id: <20230517065357.5614-1-anisinha@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-05-22docs/interop: Delete qmp-intro.txtPeter Maydell2-94/+22
qmp-intro.txt is quite small and provides very little information that isn't already in the documentation elsewhere. Fold the example command lines into qemu-options.hx, and delete the now-unneeded plain text document. While we're touching the qemu-options.hx documentation text, wordsmith it a little bit and improve the rST formatting. Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20230515162245.3964307-4-peter.maydell@linaro.org> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2023-05-22docs/interop/qmp-spec: Update error description for parsing errorsPeter Maydell1-1/+1
The description text for a parsing error has changed since the spec doc was first written; update the example in the docs. Suggested-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20230515162245.3964307-3-peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2023-05-22docs/interop: Convert qmp-spec.txt to rSTPeter Maydell8-161/+197
Convert the qmp-spec.txt document to restructuredText. Notable points about the conversion: * numbers at the start of section headings are removed, to match the style of the rest of the manual * cross-references to other sections or documents are hyperlinked * various formatting tweaks (notably the examples, which need the -> and <- prefixed so the QMP code-block lexer will accept them) * English prose fixed in a few places Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20230515162245.3964307-2-peter.maydell@linaro.org> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> [.. code-block:: dumbed down to :: to work around CI failure]
2023-05-22qapi: Improve error message for description following sectionMarkus Armbruster2-3/+3
The error message is bad when the section is untagged. For instance, test case doc-interleaved-section produces "'@foobar:' can't follow 'Note' section", which is okay, but if we drop the "Note:" tag, we get "'@foobar:' can't follow 'None' section, which is bad. Change the error message to "description of '@foobar:' follows a section". Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230510141637.3685080-1-armbru@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> [Conflict with commit 3e32dca3f0d resolved]
2023-05-22.gitlab-ci.d/buildtest.yml: Run full "make check" with --without-default-devicesThomas Huth1-1/+1
Thanks to the fixes from the previous patches, we can now run the full set of "make check" with all targets here. Message-Id: <20230512124033.502654-19-thuth@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-05-22tests/qemu-iotests/172: Run QEMU with -vga none and -nic noneThomas Huth1-1/+1
This way QEMU won't complain in case the VGA card or the NIC device are not available in the binary, thus it won't spoil the output and the test then passes with such QEMU binaries that have a limited configuration, too. Message-Id: <20230512124033.502654-18-thuth@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-05-22tests/qtest/meson.build: Run the net filter tests only with default devicesThomas Huth1-6/+6
These tests rely on a default NIC to be available. Skip them if we used the "--without-default-devices" configure option. Message-Id: <20230512124033.502654-17-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-05-22tests/qtest: Check for the availability of virtio-ccw devices before using themThomas Huth2-8/+21
The devices might not have been compiled into the QEMU binary, so we have to check before we can use them. Message-Id: <20230512124033.502654-16-thuth@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-05-22tests/qtest/virtio-ccw-test: Remove superfluous testsThomas Huth1-23/+0
virtio-balloon-ccw is already tested in the device-plug-test, virtio-blk-ccw is already tested in cdrom-test, and virtio-net-ccw is already tested in the pxe-test, so there is not much point in doing "nop" tests here again. Message-Id: <20230512124033.502654-15-thuth@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-05-22tests/qtest/cdrom-test: Fix the test to also work without optional devicesThomas Huth1-3/+13
It's possible to disable virtio-scsi and virtio-blk in the binaries, so we must not run the corresponding tests if these devices are missing. Message-Id: <20230512124033.502654-14-thuth@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-05-22tests/qtest/usb-hcd-uhci-test: Skip test if UHCI controller is not availableThomas Huth1-0/+5
The test is already fenced with CONFIG_USB_UHCI in meson.build, but in case we build the ppc or mips targets in parallel, this config switch is still set in "config_all_devices" and thus the test is still run. Thus we need an explicit additional check here before adding the tests to the test plan. Message-Id: <20230512124033.502654-13-thuth@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-05-22tests/qtest/readconfig-test: Check for the availability of USB controllersThomas Huth1-1/+4
The USB controllers might not be available in the QEMU binary (e.g. when using the "--without-default-devices" configure switch), so we have to check whether the devices can be used before running the related test. Message-Id: <20230512124033.502654-12-thuth@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-05-22hw/sparc64/sun4u: Use MachineClass->default_nic and MachineClass->no_parallelThomas Huth1-3/+8
Announce the default NIC via MachineClass->default_nic and set up MachineClass->no_parallel according to the availability of the "isa-parallel" device, so that the Sun machines also work when QEMU has been configured with "--without-default-devices". Message-Id: <20230512124033.502654-11-thuth@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-05-22hw/i386: Ignore the default parallel port if it has not been compiled into QEMUThomas Huth2-0/+5
Don't try to instantiate the parallel port if it has not been enabled in the build configuration. Message-Id: <20230512124033.502654-10-thuth@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-05-22hw/char/parallel: Move TYPE_ISA_PARALLEL to the header fileThomas Huth4-3/+5
We are going to require the macro from other files, too, so move this #define to the header file. Message-Id: <20230512124033.502654-9-thuth@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-05-22hw/sh4: Use MachineClass->default_nic in the sh4 r2d machineThomas Huth1-1/+3
Mark the default NIC via the new MachineClass->default_nic setting so that the machine-defaults code in vl.c can decide whether the default NIC is usable or not (for example when compiling with the "--without-default-devices" configure switch). Message-Id: <20230512124033.502654-8-thuth@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-05-22hw/s390x: Use MachineClass->default_nic in the s390x machineThomas Huth1-1/+3
Mark the default NIC via the new MachineClass->default_nic setting so that the machine-defaults code in vl.c can decide whether the default NIC is usable or not (for example when compiling with the "--without-default-devices" configure switch). Message-Id: <20230512124033.502654-7-thuth@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-05-22hw/ppc: Use MachineClass->default_nic in the ppc machinesThomas Huth7-5/+16
Mark the default NIC via the new MachineClass->default_nic setting so that the machine-defaults code in vl.c can decide whether the default NIC is usable or not (for example when compiling with the "--without-default-devices" configure switch). Message-Id: <20230512124033.502654-6-thuth@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-05-22softmmu/vl.c: Disable default NIC if it has not been compiled into the binaryThomas Huth1-0/+7
Don't try to instantiate a default NIC if it is not available (since this will cause QEMU to abort). Emit a warning instead. Message-Id: <20230512124033.502654-5-thuth@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-05-22hw: Move the default NIC machine class setting from the x86 to the generic oneThomas Huth5-8/+7
We are going to re-use this setting for other targets, so let's move this to the main MachineClass. Message-Id: <20230512124033.502654-4-thuth@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-05-22softmmu/vl.c: Check for the availability of the VGA device before using itThomas Huth1-1/+12
In case the user disabled the default VGA device in the binary (e.g. with the "--without-default-devices" configure switch), we should not try to use it by default if QEMU is running with the default devices, otherwise it aborts when trying to use it. Simply emit a warning instead. Message-Id: <20230512124033.502654-3-thuth@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-05-22hw/i386/Kconfig: ISAPC works fine without VGA_ISAThomas Huth1-1/+1
The "isapc" machine can also be run without VGA card, so there is no need for a hard requirement with a "select" here - "imply" is enough. Message-Id: <20230512124033.502654-2-thuth@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-05-21Merge tag 'for-upstream-urgent' of https://gitlab.com/bonzini/qemu into stagingRichard Henderson11-76/+106
Fixes for Python venv changes # -----BEGIN PGP SIGNATURE----- # # iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmRn7D4UHHBib256aW5p # QHJlZGhhdC5jb20ACgkQv/vSX3jHroOHbQgAiQW824iL2Iw+wjYckp0rwLxe53+z # P4kCdQePrfKW3sPglbeDArPr4gzuo7bdj75dscZmco+nBU40qGqEpRHBqjQol5pE # kcQsmqx+0Udbsc6kJe47fgSsBLD2KbT1QQCVBgScNuDviogQ0/PCLNWjk9V4OhgL # 0ZlK8QFnuv0qNthS+oNjkNi6SYGYNOw+4LQ/WcLWnowwhNRGUvYoq9QdOCocfyxD # t+1xQvF4Pxqnhbkni51JRoXv/Np8U/yDHMgonvw8BLxTMNAes4nV7ifzyW2pltnf # YEHGUKYPtrPR9dKLr/Au9ktr7n3O5ikOEpPIPSi4BwFqzv6hdE4DDAMXDA== # =Auyq # -----END PGP SIGNATURE----- # gpg: Signature made Fri 19 May 2023 02:38:06 PM PDT # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [undefined] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [undefined] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * tag 'for-upstream-urgent' of https://gitlab.com/bonzini/qemu: scripts: make sure scripts are invoked via $(PYTHON) gitlab: custom-runners: preserve more artifacts for debugging mkvenv: pass first missing package to diagnose() configure: fix backwards-compatibility for meson sphinx_build option build: rebuild build.ninja using "meson setup --reconfigure" mkvenv: replace distlib.database with importlib.metadata/pkg_resources remove remaining traces of meson submodule Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2023-05-19Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu ↵Richard Henderson57-340/+899
into staging virtio,pc,pci: fixes, features, cleanups CXL volatile memory support More memslots for vhost-user on x86 and ARM. vIOMMU support for vhost-vdpa pcie-to-pci bridge can now be compiled out MADT revision bumped to 3 Fixes, cleanups all over the place. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # -----BEGIN PGP SIGNATURE----- # # iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmRniWoPHG1zdEByZWRo # YXQuY29tAAoJECgfDbjSjVRpN4MH/RqdvHmujrjvjzXbbN/gq87Njp+kQLKEooIE # ZkqdNaVUE6vjCH8iU+chjsxt4VSquSjOL9CWWrYefEIeqCFLWsuXSAY0VDAbY67x # +aes51tTYILVsx7fbb+T5mJKRgVuWW4C5KaGeQ1djSexy42nvplZUJdIJUhZr0t9 # dzzOsD+mezHS7Xu2QOzSfl5QQRuOVVJnjJXkqJG/yRvHrZM5aTolatr/X7jNGedm # 4oyMsVMaAcQ+dnEQigRJodf/MpFfs9DfNZAH55VwwQWsNT0t0ueD0xigR203jjaE # mJJJipAqetFax2JjC7QMXWf+LR36BnL/0/xH+x/BWb0FI42wr0I= # =ajmR # -----END PGP SIGNATURE----- # gpg: Signature made Fri 19 May 2023 07:36:26 AM PDT # gpg: using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469 # gpg: issuer "mst@redhat.com" # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [undefined] # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" [undefined] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # 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 * tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu: (40 commits) hw/i386/pc: No need for rtc_state to be an out-parameter hw/i386/pc: Create RTC controllers in south bridges hw/cxl: Introduce cxl_device_get_timestamp() utility function hw/cxl: rename mailbox return code type from ret_code to CXLRetCode hw/pci-bridge: make building pcie-to-pci bridge configurable virtio-pci: add handling of PCI ATS and Device-TLB enable/disable hw/pci-host/pam: Make init_pam() usage more readable hw/i386/pc: Initialize ram_memory variable directly hw/i386/pc_{q35,piix}: Minimize usage of get_system_memory() hw/i386/pc_{q35,piix}: Reuse MachineClass::desc as SMB product name hw/i386/pc_q35: Reuse machine parameter hw/pci-host/q35: Inline sysbus_add_io() hw/pci-host/i440fx: Inline sysbus_add_io() vhost-vdpa: Add support for vIOMMU. vhost-vdpa: Add check for full 64-bit in region delete vhost_vdpa: fix the input in trace_vhost_vdpa_listener_region_del() vhost: expose function vhost_dev_has_iommu() virtio-crypto: fix NULL pointer dereference in virtio_crypto_free_request virtio-net: not enable vq reset feature unconditionally vhost-user: Remove acpi-specific memslot limit ... Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2023-05-19Revert last two patchesRichard Henderson5-27/+8
Unintentionally pushed. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2023-05-19Raise crash-test-debian timeout to 90 minutesCamilla Conte1-0/+1
When running on the Kubernetes runner, this CI job is timing out. Raise the limit to give the job enough time to run. Signed-off-by: Camilla Conte <cconte@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20230407145252.32955-2-cconte@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2023-05-19Add CI configuration for KubernetesCamilla Conte4-8/+26
Configure Gitlab CI to run on Kubernetes according to the official documentation. https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#docker-in-docker-with-tls-enabled-in-kubernetes These changes are needed because of the CI jobs using Docker-in-Docker (dind). As soon as Docker-in-Docker is replaced with Kaniko, these changes can be reverted. I documented what I did to set up the Kubernetes runner on the wiki: https://wiki.qemu.org/Testing/CI/KubernetesRunners Signed-off-by: Camilla Conte <cconte@redhat.com> Message-Id: <20230407145252.32955-1-cconte@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2023-05-19scripts: make sure scripts are invoked via $(PYTHON)Paolo Bonzini5-1/+1
Some scripts are invoked via the first "python3" binary in the PATH, because they are executable and their shebang line is "#! /usr/bin/env python3". To enforce usage of $(PYTHON), make them nonexecutable. Scripts invoked via meson need nothing else, and meson-buildoptions.py is already using $(PYTHON). For probe-gdb-support.py however the invocation in the configure script has to be adjusted. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2023-05-19gitlab: custom-runners: preserve more artifacts for debuggingPaolo Bonzini1-1/+3
Since custom runners are not generally available, make it possible to debug the differences between a successful and a failing build by comparing the logs and the build.ninja rules. Acked-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>