aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-08-19target/arm: Add missing space in commentetsPeter Maydell
Fix a missing space before a comment terminator. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-08-19target/arm: Advertise FEAT_ETS for '-cpu max'Peter Maydell
The architectural feature FEAT_ETS (Enhanced Translation Synchronization) is a set of tightened guarantees about memory ordering involving translation table walks: * if memory access RW1 is ordered-before memory access RW2 then it is also ordered-before any translation table walk generated by RW2 that generates a translation fault, address size fault or access fault * TLB maintenance on non-exec-permission translations is guaranteed complete after a DSB (ie it does not need the context synchronization event that you have to have if you don’t have FEAT_ETS) For QEMU’s implementation we don’t reorder translation table walk accesses, and we guarantee to finish the TLB maintenance as soon as the TLB op is done (the tlb_flush functions will complete at the end of the TLB, and TLB ops always end the TB because they’re sysreg writes). So we’re already compliant and all we need to do is say so in the ID registers for the 'max' CPU. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-08-19target/arm: Implement ID_DFR1Peter Maydell
In Armv8.6, a new AArch32 ID register ID_DFR1 is defined; implement it. We don't have any CPUs with features that they need to advertise here yet, but plumbing in the ID register gives it the right name when debugging and will help in future when we do add a CPU that has non-zero ID_DFR1 fields. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-08-19target/arm: Implement ID_MMFR5Peter Maydell
In Armv8.6 a new AArch32 ID register ID_MMFR5 is defined. Implement this; we want to be able to use it to report to the guest that we implement FEAT_ETS. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-08-19target/arm: Sort KVM reads of AArch32 ID registers into encoding orderPeter Maydell
The code that reads the AArch32 ID registers from KVM in kvm_arm_get_host_cpu_features() does so almost but not quite in encoding order. Move the read of ID_PFR2 down so it's really in encoding order. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-08-19target/arm: Make cpregs 0, c0, c{3-15}, {0-7} correctly RAZ in v8Peter Maydell
In the AArch32 ID register scheme, coprocessor registers with encoding cp15, 0, c0, c{0-7}, {0-7} are all in the space covered by what in v6 and v7 was called the "CPUID scheme", and are supposed to RAZ if they're not allocated to a specific ID register. For our pre-v8 CPUs we get this right, because the regdefs in id_pre_v8_midr_cp_reginfo[] cover these RAZ requirements. However for v8 we failed to put in the necessary patterns to cover this, so we end up UNDEFing on everything we didn't have an ID register for. This is a problem because in Armv8 some encodings in 0, c0, c3, {0-7} are now being used for new ID registers, and guests might thus start trying to read them. (We already have one of these: ID_PFR2.) For v8 CPUs, we already have regdefs for 0, c0, c{0-2}, {0-7} (that is, the space is completely allocated with no reserved spaces). Add entries to v8_idregs[] covering 0, c0, c3, {0-7}: * c3, {0-2} is the reserved AArch32 space corresponding to the AArch64 MVFR[012]_EL1 * c3, {3,5,6,7} are reserved RAZ for both AArch32 and AArch64 (in fact some of these are given defined meanings in Armv8.6, but we don't implement them yet) * c3, 4 is ID_PFR2 (already defined) We then programmatically add RAZ patterns for AArch32 for 0, c0, c{4..15}, {0-7}: * c4-c7 are unused, and not shared with AArch64 (these are the encodings corresponding to where the AArch64 specific ID registers live in the system register space) * c8-c15 weren't required to RAZ in v6/v7, but v8 extends the AArch32 reserved-should-RAZ space to cover these; the equivalent area of the AArch64 sysreg space is not defined as must-RAZ Note that the architecture allows some registers in this space to return an UNKNOWN value; we always return 0. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-08-18Merge tag 'for_upstream' of git://git.kernel.org/pub/scm/virt/kvm/mst/qemu ↵Richard Henderson
into staging pc,virtio: fixes Several bugfixes, they all look very safe to me. Revert seed support since we aren't any closer to a proper fix. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # -----BEGIN PGP SIGNATURE----- # # iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmL9IIQPHG1zdEByZWRo # YXQuY29tAAoJECgfDbjSjVRpKCkH/2KjgmgG2BpeSm5WHm2ySMZ8aNactDhjc/zg # S2iFMPRx6at4fagErT0h4hdI2SunbWz+dH8v6wdPmiIX//HNRUiZPW6vItib3aaN # b6IxG+yWasRxFhLMZ41634vCUmnISkCsbMwJYTUMZjUV3iuEVnK8rQpIuGIkmvYK # nt3Y3TLospn19ZrTbV00flghHnmU4WIZkyJv7T64bvvlgxITIw/02XxAI5QvhWb9 # qANmT+T9IPsZXdXOGj9W2d23Ejl9fRfvJSgRJsmxcOH24ozDUNGfia/ZDuq7J9rB # NZ+g29j27oU5hdazOZR5e9q5SaFfaNZ3uYsU/A+lZkt/9+7G1u0= # =soZc # -----END PGP SIGNATURE----- # gpg: Signature made Wed 17 Aug 2022 10:08:20 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 git://git.kernel.org/pub/scm/virt/kvm/mst/qemu: virtio-pci: don't touch pci on virtio reset tests: acpi: silence applesmc warning about invalid key hw/cxl: Correctly handle variable sized mailbox input payloads. hw/cxl: Fix Get LSA input payload size which should be 8 bytes. hw/cxl: Add stub write function for RO MemoryRegionOps entries. hw/cxl: Fix wrong query of target ports hw/cxl: Fix memory leak in error paths x86: disable rng seeding via setup_data hw/virtio: fix vhost_user_read tracepoint hw/virtio: handle un-configured shutdown in virtio-pci hw/virtio: gracefully handle unset vhost_dev vdev virtio-scsi: fix race in virtio_scsi_dataplane_start() Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-08-17virtio-pci: don't touch pci on virtio resetMichael S. Tsirkin
virtio level reset should not affect pci express registers such as PM, error or link. Fixes: 27ce0f3afc ("hw/virtio: fix Power Management Control Register for PCI Express virtio devices") Fixes: d584f1b9ca ("hw/virtio: fix Link Control Register for PCI Express virtio devices") Fixes: c2cabb3422 ("hw/virtio: fix error enabling flags in Device Control register") Cc: "Marcel Apfelbaum" <marcel@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-17tests: acpi: silence applesmc warning about invalid keyIgor Mammedov
OSK value is irrelevant for ACPI test case. Supply fake OSK explicitly to prevent QEMU complaining about invalid key when it fallbacks to default_osk. Suggested-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <20220728133713.1369596-1-imammedo@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-17hw/cxl: Correctly handle variable sized mailbox input payloads.Jonathan Cameron
A placeholder of ~0 is used to indicate variable payload size. Whilst the checks for output payload correctly took this into account, those for input payload did not. This results in failure of the Set LSA command. Fixes: 464e14ac43 ("hw/cxl/device: Implement basic mailbox (8.2.8.4)") Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Message-Id: <20220817145759.32603-4-Jonathan.Cameron@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-17hw/cxl: Fix Get LSA input payload size which should be 8 bytes.Jonathan Cameron
Get LSA needs 4 byte offset and 4 byte length arguments. CXL rev 2.0 Table 178. Fixes: 3ebe676a34 ("hw/cxl/device: Implement get/set Label Storage Area (LSA)") Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Message-Id: <20220817145759.32603-3-Jonathan.Cameron@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-17hw/cxl: Add stub write function for RO MemoryRegionOps entries.Jonathan Cameron
There is no checking on the availability of a write callback. Hence QEMU crashes if a write does occur to one of these regions. Discovered whilst chasing a Linux kernel bug that incorrectly wrote into one of these regions. Fixes: 6364adacdf ("hw/cxl/device: Implement the CAP array (8.2.8.1-2)") Reported-by: Bobo WL <lmw.bobo@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Message-Id: <20220817145759.32603-2-Jonathan.Cameron@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-17hw/cxl: Fix wrong query of target portsJonathan Cameron
Two issues were present in this code: 1) Check on which register to look in was inverted. 2) Both branches use the _LO register. Whilst here moved to extract32() rather than hand rolling the field extraction as simpler and hopefully less error prone. Fixes Coverity CID: 1488873 Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Message-Id: <20220808122051.14822-3-Jonathan.Cameron@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-17hw/cxl: Fix memory leak in error pathsJonathan Cameron
Use g_autofree to free the CXLFixedWindow structure if an error occurs in configuration before we have added to the list (via g_steal_pointer()) Fix Coverity CID: 1488872 Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Message-Id: <20220808122051.14822-2-Jonathan.Cameron@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-17x86: disable rng seeding via setup_dataGerd Hoffmann
Causes regressions when doing direct kernel boots with OVMF. At this point in the release cycle the only sensible action is to just disable this for 7.1 and sort it properly in the 7.2 devel cycle. Cc: Jason A. Donenfeld <Jason@zx2c4.com> Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Richard Henderson <richard.henderson@linaro.org> Cc: Eduardo Habkost <eduardo@habkost.net> Cc: Peter Maydell <peter.maydell@linaro.org> Cc: Philippe Mathieu-Daudé <f4bug@amsat.org> Cc: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-Id: <20220817083940.3174933-1-kraxel@redhat.com> Cc: Jason A. Donenfeld <Jason@zx2c4.com> Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Richard Henderson <richard.henderson@linaro.org> Cc: Eduardo Habkost <eduardo@habkost.net> Cc: Peter Maydell <peter.maydell@linaro.org> Cc: Philippe Mathieu-Daudé <f4bug@amsat.org> Cc: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2022-08-17hw/virtio: fix vhost_user_read tracepointAlex Bennée
As reads happen in the callback we were never seeing them. We only really care about the header so move the tracepoint to when the header is complete. Fixes: 6ca6d8ee9d (hw/virtio: add vhost_user_[read|write] trace points) Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Acked-by: Jason Wang <jasowang@redhat.com> Message-Id: <20220728135503.1060062-5-alex.bennee@linaro.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-17hw/virtio: handle un-configured shutdown in virtio-pciAlex Bennée
The assert() protecting against leakage is a little aggressive and causes needless crashes if a device is shutdown without having been configured. In this case no descriptors are lost because none have been assigned. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220728135503.1060062-4-alex.bennee@linaro.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-17hw/virtio: gracefully handle unset vhost_dev vdevAlex Bennée
I've noticed asserts firing because we query the status of vdev after a vhost connection is closed down. Rather than faulting on the NULL indirect just quietly reply false. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220728135503.1060062-3-alex.bennee@linaro.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-17virtio-scsi: fix race in virtio_scsi_dataplane_start()Stefan Hajnoczi
As soon as virtio_scsi_data_plane_start() attaches host notifiers the IOThread may start virtqueue processing. There is a race between IOThread virtqueue processing and virtio_scsi_data_plane_start() because it only assigns s->dataplane_started after attaching host notifiers. When a virtqueue handler function in the IOThread calls virtio_scsi_defer_to_dataplane() it may see !s->dataplane_started and attempt to start dataplane even though we're already in the IOThread: #0 0x00007f67b360857c __pthread_kill_implementation (libc.so.6 + 0xa257c) #1 0x00007f67b35bbd56 raise (libc.so.6 + 0x55d56) #2 0x00007f67b358e833 abort (libc.so.6 + 0x28833) #3 0x00007f67b358e75b __assert_fail_base.cold (libc.so.6 + 0x2875b) #4 0x00007f67b35b4cd6 __assert_fail (libc.so.6 + 0x4ecd6) #5 0x000055ca87fd411b memory_region_transaction_commit (qemu-kvm + 0x67511b) #6 0x000055ca87e17811 virtio_pci_ioeventfd_assign (qemu-kvm + 0x4b8811) #7 0x000055ca87e14836 virtio_bus_set_host_notifier (qemu-kvm + 0x4b5836) #8 0x000055ca87f8e14e virtio_scsi_set_host_notifier (qemu-kvm + 0x62f14e) #9 0x000055ca87f8dd62 virtio_scsi_dataplane_start (qemu-kvm + 0x62ed62) #10 0x000055ca87e14610 virtio_bus_start_ioeventfd (qemu-kvm + 0x4b5610) #11 0x000055ca87f8c29a virtio_scsi_handle_ctrl (qemu-kvm + 0x62d29a) #12 0x000055ca87fa5902 virtio_queue_host_notifier_read (qemu-kvm + 0x646902) #13 0x000055ca882c099e aio_dispatch_handler (qemu-kvm + 0x96199e) #14 0x000055ca882c1761 aio_poll (qemu-kvm + 0x962761) #15 0x000055ca880e1052 iothread_run (qemu-kvm + 0x782052) #16 0x000055ca882c562a qemu_thread_start (qemu-kvm + 0x96662a) This patch assigns s->dataplane_started before attaching host notifiers so that virtqueue handler functions that run in the IOThread before virtio_scsi_data_plane_start() returns correctly identify that dataplane does not need to be started. This fix is taken from the virtio-blk dataplane code and it's worth adding a comment in virtio-blk as well to explain why it works. Note that s->dataplane_started does not need the AioContext lock because it is set before attaching host notifiers and cleared after detaching host notifiers. In other words, the IOThread always sees the value true and the main loop thread does not modify it while the IOThread is active. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2099541 Reported-by: Qing Wang <qinwang@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20220808162134.240405-1-stefanha@redhat.com> Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-16Update version for v7.1.0-rc3 releaseRichard Henderson
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-08-16Merge tag 'pull-request-2022-08-16' of https://gitlab.com/thuth/qemu into ↵Richard Henderson
staging * Fix a possible endless loop in USB XHCI code * Minor fixes for the new readconfig test # -----BEGIN PGP SIGNATURE----- # # iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmL7aT8RHHRodXRoQHJl # ZGhhdC5jb20ACgkQLtnXdP5wLbXm6w//TzGqEkzN6VeYqCgbI5ZuCcu3uL/X7KcO # vsljTTYeJgE3IuT4RARk4d2/K8xD/mzyxMTHP5SrbCIYSOBY4OusJN55fytX46mb # cdy3dHWbwaT7y8J+BLpwOg7om+oDp1Q2o1JxPY39BEi5T2C6PBHveDf9XxNv2n2j # 9kwF0la7EmhmNoUgWyvf3dVoOFS3G4BTP1ZSvjcUNRuAxGLGZ8XOhZYw5zQ4MMTF # OrNdVPmMDyLjAxpdO5dKItvTs8l0ioSXsbrNK+w2o58U1Wmczkn3BYcel2m+J14v # XY9jtq9qUHjTmFRCCop0LYitkDvW+mAmptFsc94Y0ulc3JQ1KNvvjBIgNKZGRCkv # Fw7xdArifc1TMpRdgNP1Gr88LXtSPEaPsHYMRy7AHcv2Abd9zrRm7JMa45mburzp # jhUvFYCLN2iDgd78HClDAGuRLWAEaJDLkbvxHtJxGW8m9lHHwkrUeLm6uJMrSwu6 # 880O0/ayEz0jw5yDEDC/ooTbcWKgbpZ7KPREciSLTAPsC2orBrBIjlioY1YxfAMZ # rrP7KvGggP7yWrOn4BKUWRo7NC2WPQ69nJQCTsXij4NlKsWAaJ3EgldKDcFgungk # DsEm+FQhcDDfeOWN03dNxRxz8bFm1/HbSHgna5C5xnbQbQMiSPYVYWPjzK6E8kKO # NgjewJS4E7E= # =5xZ9 # -----END PGP SIGNATURE----- # gpg: Signature made Tue 16 Aug 2022 04:54:07 AM CDT # 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-2022-08-16' of https://gitlab.com/thuth/qemu: hw/usb/hcd-xhci: Fix unbounded loop in xhci_ring_chain_length() (CVE-2020-14394) tests/qtest: misc tweaks to readconfig Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-08-16Merge tag 'pull-for-7.1-fixes-160822-1' of https://github.com/stsquad/qemu ↵Richard Henderson
into staging A few small fixes: - properly un-parent OBJECT(cpu) when closing -user thread - add missing timeout to aspeed tests - reduce raciness of login: prompt handling for aspeed tests # -----BEGIN PGP SIGNATURE----- # # iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmL7XG0ACgkQ+9DbCVqe # KkRDAAf9EfolGONaDKRaBkzdASuIadVGDr3EUDFe+Ho7cyJjnrOu8XjbOuB9Ayc4 # Vg4ccTSWYtCQdh4HhPOuCSmCoDmvCgnzze+eLS1E/PDNAMH0puPYikacpdp09Nng # qtPqb9QfaJNy7imrtg43kXWDbUHU21YlgGIguBYCJV5EKBFlNH84iyf5wYjXjQkp # OXpSGcSdNBJ569g1tksrBZrrSMEMMFHnpDmMxRbNnDlJ/yDKbLI8t0CXLR1hU6le # IjKWV7ZChEYiTRn+tlVrRdiFJjqhKtOoc9VXlVG67MW9orEQwk0gYVrnhxmC+N0t # hMcbncw8CgxS270cEqccxxYDF5Uxng== # =9IHQ # -----END PGP SIGNATURE----- # gpg: Signature made Tue 16 Aug 2022 03:59:25 AM CDT # gpg: using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44 # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.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: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44 * tag 'pull-for-7.1-fixes-160822-1' of https://github.com/stsquad/qemu: tests/avocado: apply a band aid to aspeed-evb login tests/avocado: add timeout to the aspeed tests linux-user: un-parent OBJECT(cpu) when closing thread Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-08-16hw/usb/hcd-xhci: Fix unbounded loop in xhci_ring_chain_length() (CVE-2020-14394)Thomas Huth
The loop condition in xhci_ring_chain_length() is under control of the guest, and additionally the code does not check for failed DMA transfers (e.g. if reaching the end of the RAM), so the loop there could run for a very long time or even forever. Fix it by checking the return value of dma_memory_read() and by introducing a maximum loop length. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/646 Message-Id: <20220804131300.96368-1-thuth@redhat.com> Reviewed-by: Mauro Matteo Cascella <mcascell@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2022-08-16tests/qtest: misc tweaks to readconfigDaniel P. Berrangé
The property name parameter is ignored when visiting a top level type, but the obvious typo should be fixed to avoid confusion. A few indentation issues were tidied up. We can break out of the loop when finding the RNG device. Finally, close the temp FD immediately when no longer needed. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20220809093854.168438-1-berrange@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
2022-08-16tests/avocado: apply a band aid to aspeed-evb loginAlex Bennée
This is really a limitation of the underlying console code which doesn't allow us to detect the login: and following "#" prompts because it reads input line wise. By adding a small delay we ensure that the login prompt has appeared so we don't accidentally spaff the shell commands to a confused getty in the guest. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Cédric Le Goater <clg@kaod.org> Acked-by: John Snow <jsnow@redhat.com> Message-Id: <20220811151413.3350684-8-alex.bennee@linaro.org>
2022-08-16tests/avocado: add timeout to the aspeed testsAlex Bennée
On some systems the test can hang. At least defining a timeout stops it from hanging forever. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220811151413.3350684-7-alex.bennee@linaro.org>
2022-08-16linux-user: un-parent OBJECT(cpu) when closing threadAlex Bennée
While forcing the CPU to unrealize by hand does trigger the clean-up code we never fully free resources because refcount never reaches zero. This is because QOM automatically added objects without an explicit parent to /unattached/, incrementing the refcount. Instead of manually triggering unrealization just unparent the object and let the device machinery deal with that for us. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/866 Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20220811151413.3350684-2-alex.bennee@linaro.org>
2022-08-14Merge tag 'pull-la-20220814' of https://gitlab.com/rth7680/qemu into stagingRichard Henderson
Loongarch docs update # -----BEGIN PGP SIGNATURE----- # # iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmL4/I8dHHJpY2hhcmQu # aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV/kCQf9HTiK6VSrbJXdOLQi # iGfXwZTcRDxG4brzj+GQ2/nuag2Dg9McADUxs1/3zlb965+CuQdfqtjSzgfxCjzX # iVvHq3wtCoOQZ5/T+XrFCaew0djkT6N/hBsa33oORXg5o5mAzCIFObuTMnusvjTu # VPXWe65fxTv3dsHZgjWekRZLu8Bn/anLypJxHzzFbXL3+RTKJ5u6GGVMn0DEcvEq # ooHYhETBEXmdKCbj2QpRmG1sldiKSMEcBQ6OXPM6ehOgWoucR00/LyKi1ucQq5JP # gJIEhV4iCKfPHykoTiBcMlz8zqphcn6GgU71Ekv1GGmYxBWBLAj3tfmX4yiFh33p # x25afA== # =gfY0 # -----END PGP SIGNATURE----- # gpg: Signature made Sun 14 Aug 2022 08:45:51 AM CDT # gpg: using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F # gpg: issuer "richard.henderson@linaro.org" # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [ultimate] * tag 'pull-la-20220814' of https://gitlab.com/rth7680/qemu: docs/system/loongarch: Update the LoongArch document Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-08-13docs/system/loongarch: Update the LoongArch documentXiaojuan Yang
1. Add some information about how to boot the LoongArch virt machine by uefi bios and linux kernel and how to access the source code or binary file. 2. Move the explanation of LoongArch system emulation in the target/loongarch/README to docs/system/loongarch/loongson3.rst Signed-off-by: Xiaojuan Yang <yangxiaojuan@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn> Message-Id: <20220812091957.3338126-1-yangxiaojuan@loongson.cn> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-08-12Merge tag 'pull-target-arm-20220812' of ↵Richard Henderson
https://git.linaro.org/people/pmaydell/qemu-arm into staging target-arm queue: * Don't report Statistical Profiling Extension in ID registers * virt ACPI tables: Present the GICR structure properly for GICv4 * Fix some typos in documentation * tests/unit: fix a -Wformat-truncation warning * cutils: Add missing dyld(3) include on macOS # -----BEGIN PGP SIGNATURE----- # # iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmL2PP4ZHHBldGVyLm1h # eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3qLKD/964d9vRe9b1Upv5mTxM7+y # JxgwvsgVe7HeWBTOIIHsP7y1F+5MduiDDf2BC5XBiwtkVNSeJB1J1QQWkas6baVr # DiRPiP/D6gG3B9naujCWsI5QbnSlONeunE0R+gYfNK6J/Odidzu6DtNa4PZJ1tcP # vmZA5eLSAjaCIVmzQYF/Ae7nSoFz/sVR+li+tLSb/ynC+3H+rCry4TrQ7HgGyhjO # nz4hIOtiYdAqp6hklMeLl6yAPMwZrxCtq51LE+Oj90uh7xt3gs0d29Zlbdc/vQFw # dSZM/Cm0X+TMV6HHjpKrHnoUH+o+yv/O1q7VFccC4UpLSj7jbB8o/fbCASsBV+Jg # /Y87G9WjtS6EO5SEqnDTSw5cAEKAqpgzQe8HhEGFa3MymuzkrnBagj59TNa5t4hV # +maoR2vRb8hnhYDtFsWDPbfhFSCP3MSHki6sP7IMFNQsaUxFDNu2mRn0TOtSx0NB # n5a/JOby7AeYI5JWyAwQ2T5Hxgh8EeBrPsXDxyy1jA+t67nrlrqdYwyLL5564jU4 # ESuMnuRTWjUnXaF9yhKbe6g1QdVV3OAC6jikzMuYLEHmKC/1MUJT1W4MECzjx1FM # b0tQ2Q+0mfSfm5YrJqbAIdDg3Cie88pvl/i0POtFBiwoOhPRH6QBzd/b6q6B6zw6 # MPV6QAwBfdQYxJId93shTQ== # =/sV7 # -----END PGP SIGNATURE----- # gpg: Signature made Fri 12 Aug 2022 04:43:58 AM PDT # gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE # gpg: issuer "peter.maydell@linaro.org" # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [full] # gpg: aka "Peter Maydell <pmaydell@gmail.com>" [full] # gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [full] * tag 'pull-target-arm-20220812' of https://git.linaro.org/people/pmaydell/qemu-arm: cutils: Add missing dyld(3) include on macOS hw/arm/virt-acpi-build: Present the GICR structure properly for GICv4 tests/unit: fix a -Wformat-truncation warning Fix some typos in documentation (most of them found by codespell) target/arm: Don't report Statistical Profiling Extension in ID registers Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-08-12Merge tag 'linux-user-for-7.1-pull-request' of ↵Richard Henderson
https://gitlab.com/laurent_vivier/qemu into staging Pull request linux-user 20220812 # -----BEGIN PGP SIGNATURE----- # # iQJGBAABCAAwFiEEzS913cjjpNwuT1Fz8ww4vT8vvjwFAmL2LIUSHGxhdXJlbnRA # dml2aWVyLmV1AAoJEPMMOL0/L748L8QP/iHtv9fsHZe7ANCMd2UjpPo5CZTJxMEa # T8muaNasIJPoZbQR5WJRsCT8j5lNriWYA/xEBYGYlzvn/ZBK+NnUlBYrRFUX3LwQ # Oim9gBYReW7nkv2m1Vr5mYXeC1bth4GMqycHSjwJtosYJsp/oTpcQE22/iG3MFBW # azu+yM/QV7yuoi6EFyuUq5hefQE139W333x01c3qsekVY4cr4Bc81cpsQhWw/4Y4 # e32byrT39vtBvRlC/CuikZXyMqbD+nK+hESkJ9oqI73raC4PaCg10WNHMr1m/pw1 # ITPeH6iphVmyOckidHsbBLDkC4FQEVNo9R4j13Nk2gqU3VyLk73Say2GGvXrUEBJ # a50XvV897N1M8ZiRUifYnNgawtO7sIOuQViofQtCcIfal9h2AV5Zjnm/5tJXGpnB # F0U7hi5bootHtJFMLCBOWLhWVT7SNrzi1ijCFs2irj6grSyvJ9LU7yRHj0pOVC43 # WopdzPuxBWye8jRo2YgDQx5BZkBtlmWJgfbhYL3QVFX5wp8vqAgdXl0dXqdid5RN # 5RCdBj9HAFwEUqL8n4LVI0EbrjI/IQlVwhZmBjQx3lBh4o08d7AUGUSQnZHDcy3C # W6dTkfqPleqdOw5xS9Rw3rHJPHcuGWQNA4MMyvztbMivU/TYN7fwBdXouI9KeeBk # wfYTi+n/bkeR # =4v8b # -----END PGP SIGNATURE----- # gpg: Signature made Fri 12 Aug 2022 03:33:41 AM PDT # gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C # gpg: issuer "laurent@vivier.eu" # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [undefined] # gpg: aka "Laurent Vivier <laurent@vivier.eu>" [undefined] # gpg: aka "Laurent Vivier (Red Hat) <lvivier@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: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * tag 'linux-user-for-7.1-pull-request' of https://gitlab.com/laurent_vivier/qemu: linux-user/aarch64: Reset target data on MADV_DONTNEED Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-08-12cutils: Add missing dyld(3) include on macOSpull-target-arm-20220812Philippe Mathieu-Daudé
Commit 06680b15b4 moved qemu_*_exec_dir() to cutils but forgot to move the macOS dyld(3) include, resulting in the following error (when building with Homebrew GCC on macOS Monterey 12.4): [313/1197] Compiling C object libqemuutil.a.p/util_cutils.c.o FAILED: libqemuutil.a.p/util_cutils.c.o ../../util/cutils.c:1039:13: error: implicit declaration of function '_NSGetExecutablePath' [-Werror=implicit-function-declaration] 1039 | if (_NSGetExecutablePath(fpath, &len) == 0) { | ^~~~~~~~~~~~~~~~~~~~ ../../util/cutils.c:1039:13: error: nested extern declaration of '_NSGetExecutablePath' [-Werror=nested-externs] Fix by moving the include line to cutils. Fixes: 06680b15b4 ("include: move qemu_*_exec_dir() to cutils") Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20220809222046.30812-1-f4bug@amsat.org Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-08-12hw/arm/virt-acpi-build: Present the GICR structure properly for GICv4Zenghui Yu
With the introduction of the new TCG GICv4, build_madt() is badly broken as we do not present any GIC Redistributor structure in MADT for GICv4 guests, so that they have no idea about where the Redistributor register frames are. This fixes a Linux guest crash at boot time with ACPI enabled and '-machine gic-version=4'. While at it, let's convert the remaining hard coded gic_version into enumeration VIRT_GIC_VERSION_2 for consistency. Signed-off-by: Zenghui Yu <yuzenghui@huawei.com> Message-id: 20220812022018.1069-1-yuzenghui@huawei.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-08-12tests/unit: fix a -Wformat-truncation warningMarc-André Lureau
../tests/test-qobject-input-visitor.c: In function ‘test_visitor_in_list’: ../tests/test-qobject-input-visitor.c:454:49: warning: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 6 [-Wformat-truncation=] 454 | snprintf(string, sizeof(string), "string%d", i); | ^~ ../tests/test-qobject-input-visitor.c:454:42: note: directive argument in the range [0, 2147483606] 454 | snprintf(string, sizeof(string), "string%d", i); | ^~~~~~~~~~ ../tests/test-qobject-input-visitor.c:454:9: note: ‘snprintf’ output between 8 and 17 bytes into a destination of size 12 454 | snprintf(string, sizeof(string), "string%d", i); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rather than trying to be clever, since this is called 3 times during tests, let's simply use g_strdup_printf(). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: 20220810121513.1356081-1-marcandre.lureau@redhat.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> [PMM: fixed commit message typos] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-08-12Fix some typos in documentation (most of them found by codespell)Stefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Hongren (Zenithal) Zheng <i@zenithal.me> Message-id: 20220812075642.1200578-1-sw@weilnetz.de Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-08-12target/arm: Don't report Statistical Profiling Extension in ID registersPeter Maydell
The newly added neoverse-n1 CPU has ID register values which indicate the presence of the Statistical Profiling Extension, because the real hardware has this feature. QEMU's TCG emulation does not yet implement SPE, though (not even as a minimal stub implementation), so guests will crash if they try to use it because the SPE system registers don't exist. Force ID_AA64DFR0_EL1.PMSVer to 0 in CPU realize for TCG, so that we don't advertise to the guest a feature that doesn't exist. (We could alternatively do this by editing the value that aarch64_neoverse_n1_initfn() sets for this ID register, but suppressing the field in realize means we won't re-introduce this bug when we add other CPUs that have SPE in hardware, such as the Neoverse-V1.) An example of a non-booting guest is current mainline Linux (5.19), when booting in EL2 on the virt board (ie with -machine virtualization=on). Reported-by: Zenghui Yu <yuzenghui@huawei.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Zenghui Yu <yuzenghui@huawei.com> Message-id: 20220811131127.947334-1-peter.maydell@linaro.org
2022-08-11linux-user/aarch64: Reset target data on MADV_DONTNEEDVitaly Buka
aarch64 stores MTE tags in target_date, and they should be reset by MADV_DONTNEED. Signed-off-by: Vitaly Buka <vitalybuka@google.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220711220028.2467290-1-vitalybuka@google.com> [lv: fix code style issues] Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2022-08-10Merge tag 'linux-user-for-7.1-pull-request' of ↵Richard Henderson
https://gitlab.com/laurent_vivier/qemu into staging Pull request linux-user 20220810 fix compat with glibc >= 2.36 sys/mount.h # -----BEGIN PGP SIGNATURE----- # # iQJGBAABCAAwFiEEzS913cjjpNwuT1Fz8ww4vT8vvjwFAmLz4coSHGxhdXJlbnRA # dml2aWVyLmV1AAoJEPMMOL0/L7487vMP/RjW8WI+0SliCfLPUcRvymeu9Feyzlit # fj/s1sONL3TDZYWV2AhIM5mKYPPWDh7z8aNnIgOc5pnIMOw9MDX33ynTWvh0ZhPb # EMSRqPDUFDaC4JMnlw3rSZpUj5PdZjDrlK4RGLqS+vPjd+xo5fETcYTA+zEovLJ3 # RfNk0QVvfYX5V0aLDlNBQQSxWb+Sq4Nlp00oUAwGsIZ3+GHBr83+4NQ0/oUIDq3F # 6SpZ4tsZpPvIDNZihP7yNQVWFiIiCIEY6naYDSKxDgKb1HP/6pYxFFn2pmXSrD21 # ew9FxHzGNrqwlTxRbgjxNHvG33Y03NygNrXxI5sp00r6KnXXd05pIAtOLhJUjREY # ErdJgNFDBeCujBmmNE5zD/dnaUoPdsSjGljPXiyjsMPSAHe2uEkmT6P0ZMGXTeTT # eHbfTKQXs7cFhMtYPGDrKwREYKnEZz+zqfgx0+BWfShVSZr+tMpeXZ4TCgYNO2Ur # s2budJJy3fkbz809l4weIHhF7iuPAzEbCV4TY+t/wm0W/nJnQ4WSy5bXGfqH+Pk5 # e20nUhiiuvXGo5CwefSKWQ2Fz9RHOZ1LszI8rZkVbYdfAxcWs3oG/1jDNgTcZLXu # RJq0uMj+JPW3DPk61qRW5jp0UFwOCaanOf1jVNvlSXF/tu0ufeII6gyUElwpEUOt # DDXrqodv7ZkX # =G/l+ # -----END PGP SIGNATURE----- # gpg: Signature made Wed 10 Aug 2022 09:50:18 AM PDT # gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C # gpg: issuer "laurent@vivier.eu" # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [undefined] # gpg: aka "Laurent Vivier <laurent@vivier.eu>" [undefined] # gpg: aka "Laurent Vivier (Red Hat) <lvivier@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: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * tag 'linux-user-for-7.1-pull-request' of https://gitlab.com/laurent_vivier/qemu: linux-user: fix compat with glibc >= 2.36 sys/mount.h Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-08-10linux-user: fix compat with glibc >= 2.36 sys/mount.hDaniel P. Berrangé
The latest glibc 2.36 has extended sys/mount.h so that it defines the FSCONFIG_* enum constants. These are historically defined in linux/mount.h, and thus if you include both headers the compiler complains: In file included from /usr/include/linux/fs.h:19, from ../linux-user/syscall.c:98: /usr/include/linux/mount.h:95:6: error: redeclaration of 'enum fsconfig_command' 95 | enum fsconfig_command { | ^~~~~~~~~~~~~~~~ In file included from ../linux-user/syscall.c:31: /usr/include/sys/mount.h:189:6: note: originally defined here 189 | enum fsconfig_command | ^~~~~~~~~~~~~~~~ /usr/include/linux/mount.h:96:9: error: redeclaration of enumerator 'FSCONFIG_SET_FLAG' 96 | FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */ | ^~~~~~~~~~~~~~~~~ /usr/include/sys/mount.h:191:3: note: previous definition of 'FSCONFIG_SET_FLAG' with type 'enum fsconfig_command' 191 | FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */ | ^~~~~~~~~~~~~~~~~ ...snip... QEMU doesn't include linux/mount.h, but it does use linux/fs.h and thus gets linux/mount.h indirectly. glibc acknowledges this problem but does not appear to be intending to fix it in the forseeable future, simply documenting it as a known incompatibility with no workaround: https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E https://sourceware.org/glibc/wiki/Synchronizing_Headers To address this requires either removing use of sys/mount.h or linux/fs.h, despite QEMU needing declarations from both. This patch removes linux/fs.h, meaning we have to define various FS_IOC constants that are now unavailable. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Tested-by: Richard W.M. Jones <rjones@redhat.com> Message-Id: <20220802164134.1851910-1-berrange@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2022-08-09Update version for v7.1.0-rc2 releaseRichard Henderson
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-08-09Merge tag 'trivial-branch-for-7.1-pull-request' of ↵Richard Henderson
https://gitlab.com/laurent_vivier/qemu into staging Pull request trivial branch 20220809 # -----BEGIN PGP SIGNATURE----- # # iQJGBAABCAAwFiEEzS913cjjpNwuT1Fz8ww4vT8vvjwFAmLykYgSHGxhdXJlbnRA # dml2aWVyLmV1AAoJEPMMOL0/L74881MP/1UL3bfp1/tzxeN5wvT0mAdrKcj8obPE # 5BB0QPD48NL8JqWq9HLLhX2vmAi2ibhPptpJkn+kXsqj8OW4Qp1JyWggZgD7O3mz # S2OjVcpWrClhugoGhRUBm6G6kPsYjIBU0dLAINsyL6ETBZpIdkU/axLUJ6b2Wrm0 # eIQm6xNkGRhFAuya7MOX5ObzNylix2t1+QLxJMbA3XOCwl9PQRh7Wb/0oRhFMWZ9 # xCjraG9Jv1IxG28gGxMbUa2Ic7VTcVs+X+iu98AP7P3HBe/I31aXAmAf47MbMirk # NJEYI9nDLZJyQmLgmBmyrQ+FIidDVhG7FURzIYeOoREv+xotQt6CTBNLKOcc4ccO # YRy05JeUNeCJ015r8MZdiTwAwsbY0XPMijgqngqaWCw1BJO/luCdvUX6D4ehC5aZ # zJPr7jJdqyhIZJjvPawoJSRsvWU495BCtyORtnU1T3uunEEu9vHLQKEy8gWtyitJ # 7R6E/Mj4IzB9T0Kvz2acGBtxmtTshonjXaYgb11QRI5SWEUUhDNN64839opDPAW8 # PSmRZwfwkhIUlb9eRIEPMFScEEbQVgU+dAngSZva9un9ED2adPMreWHQrinMxQM4 # jtGAfG3RMQUh7b3VBlS87y0N+b2FSIrL9x0ujcozwuh0JMeiWxx+9AUq4dH8m2HU # YZb3LXjm8i/P # =o5gT # -----END PGP SIGNATURE----- # gpg: Signature made Tue 09 Aug 2022 09:55:36 AM PDT # gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C # gpg: issuer "laurent@vivier.eu" # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [undefined] # gpg: aka "Laurent Vivier <laurent@vivier.eu>" [undefined] # gpg: aka "Laurent Vivier (Red Hat) <lvivier@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: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * tag 'trivial-branch-for-7.1-pull-request' of https://gitlab.com/laurent_vivier/qemu: xlnx_dp: drop unsupported AUXCommand in xlnx_dp_aux_set_command contrib/vhost-user-blk: Clean up deallocation of VuVirtqElement Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-08-09Merge tag 'pull-target-arm-20220809' of ↵Richard Henderson
https://git.linaro.org/people/pmaydell/qemu-arm into staging target-arm queue: * icount: Take iothread lock when running QEMU timers # -----BEGIN PGP SIGNATURE----- # # iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmLyTy0ZHHBldGVyLm1h # eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3o2MEACpdpgpJd+OObHRSLZqQJbL # 83X/aSSnBIFTeV1IlGC6sHbARffcKsEDQ/ktpmwvrABAJwEzTfaddSQADwlUefLJ # 1L6Co1MpcOXnYZUIeaWAmN0POKKExB3gjrF19d9Dz9zHvm8Vu0CH/c/3iHsCVfd0 # +v00Pudd11ePWFn+BL6xjDN31OfZexqHVDbhKxoTAjj5BK0AJJAObBQUrp28UrbE # 1qfg+BZMo/fPPLxRelmGIQLLr8UPEIyNoWZKRcuarJHbqhxqcPe1qIezMHPhMpzn # vSzjiaYJVOxqj1gzj0Z+J7MSd0jNXVDQn0p7A0nEg7vT4mMt8+hhAuYqW0qAFCmQ # 1rxiiGGKp5fmK7K+WfraaXqqXqi2P1078moVyg1rGdL5wYfZHyQoldDDNQwHoJkz # DG6da5hiZjQn1nmL3OyyS0peyLzIE7DmFLP6xw+Op5Hrx/alVBrhpN1qPMzd7wG0 # TmrG//BtIIF5EiZw8oZqrvjcL//lzPvtM1EYmw/jTraV+KSO5anl2vjEi+VN5ngr # zXPfvgupVoSqr/nCtitp+H71yogOWYp/FkE2xBgIS8qW4bQycPpX+qoi/0I1upTw # 5FZYTTh6t5IBF8emc/1jQDUi8VlcT7Nz7Kma8fCdHI11xm8m5JI0+hfVkHEs2HQV # lB+1HhMoJJ3pCzqJiWeINA== # =xyyN # -----END PGP SIGNATURE----- # gpg: Signature made Tue 09 Aug 2022 05:12:29 AM PDT # gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE # gpg: issuer "peter.maydell@linaro.org" # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [full] # gpg: aka "Peter Maydell <pmaydell@gmail.com>" [full] # gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [full] * tag 'pull-target-arm-20220809' of https://git.linaro.org/people/pmaydell/qemu-arm: icount: Take iothread lock when running QEMU timers Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-08-09Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into stagingRichard Henderson
# -----BEGIN PGP SIGNATURE----- # Version: GnuPG v1 # # iQEcBAABAgAGBQJi8iLAAAoJEO8Ells5jWIRrdMIAI1T5lgOhv2DfHXA6bElokIx # 10NQ0dG5IBhO6l56p6Um95+tMDMfYBDjc8YOI1qv3L1PZOXdeHjs2ldUg8f0cmFP # asvY1EJJW4SlCI0hk/Jb6oXf8BoVnNEnMmNGg8qRmVyEw2sFYkNhhA9dXH+537GN # K0ZFOmfsYpn3EzKyqooln8XLT9lPsXX9LC1Oh0Jz1YmRn6y8/rngR1DWAEyr6MnL # 5iGIyv5VEdeU1sQJRrH9DyCCGLlILCCUa2yo1RkV+Ac/qPdKWfkyE6K6kUelzGbp # qqP9+rDpF3LwokqAI+8tJCwc6WqLL3Y/Ddb1J6gzydh8WcszjlXPjcBn8FeKXzk= # =hAhp # -----END PGP SIGNATURE----- # gpg: Signature made Tue 09 Aug 2022 02:02:56 AM PDT # gpg: using RSA key EF04965B398D6211 # gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@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: 215D 46F4 8246 689E C77F 3562 EF04 965B 398D 6211 * tag 'net-pull-request' of https://github.com/jasowang/qemu: hw/net/rocker: Avoid undefined shifts with more than 31 ports Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-08-09icount: Take iothread lock when running QEMU timerspull-target-arm-20220809Peter Maydell
The function icount_prepare_for_run() is called with the iothread unlocked, but it can call icount_notify_aio_contexts() which will run qemu timer handlers. Those are supposed to be run only with the iothread lock held, so take the lock while we do that. Since icount mode runs everything on a single thread anyway, not holding the lock is likely mostly not going to introduce races, but it can cause us to trip over assertions that we do hold the lock, such as the one reported in issue 1130. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1130 Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru> Message-id: 20220801164527.3134765-1-peter.maydell@linaro.org
2022-08-09hw/net/rocker: Avoid undefined shifts with more than 31 portsPeter Maydell
In rocker_port_phys_link_status() and rocker_port_phys_enable_read() we construct a 64-bit value with one bit per front-panel port. However we accidentally do the shift as 32-bit arithmetic, which means that if there are more than 31 front-panel ports this is undefined behaviour. Fix the problem by ensuring we use 64-bit arithmetic for the whole calculation. (We won't ever shift off the 64-bit value because ROCKER_FP_PORTS_MAX is 62.) Resolves: Coverity CID 1487121, 1487160 Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Jason Wang <jasowang@redhat.com>
2022-08-08Merge tag 'pull-la-20220808' of https://gitlab.com/rth7680/qemu into stagingRichard Henderson
loongarch: fix emulation of fcsr register # -----BEGIN PGP SIGNATURE----- # # iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmLxy0UdHHJpY2hhcmQu # aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV91ZggAjgUGqrFRZFR72C5m # cNkgB6f5rzc6hgnqwstsQpvKOXKu8WH9+6xJHoQKau1NY2KNdLnt1itpThL3K2+c # nh0E/w/DrTiaq4NsbWu3SrkTSGW+zcdhljQff6gyyLZyLQAY34Ej2hBhKfva3sRZ # Y/Lm8euq6d559LWvN/Nyo11RBPdSq+KPtfGcGdOynY+OBFsDmXDTjdjGDFHQESh2 # +WnXcjlXq46vLOuZ6LLiNIHRbvFdfjcr5pqKKlESedA+wikgxP+ZeoIx+7HxlZe3 # CpYTzbmhoz5n3seRRAl5CouxGsEfL7plUn3BS+InabthE+qE6xvgvS9vcd1YMkg1 # eoKefQ== # =Sk/5 # -----END PGP SIGNATURE----- # gpg: Signature made Mon 08 Aug 2022 07:49:41 PM PDT # gpg: using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F # gpg: issuer "richard.henderson@linaro.org" # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [ultimate] * tag 'pull-la-20220808' of https://gitlab.com/rth7680/qemu: target/loongarch: Remove cpu_fcsr0 Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-08-08target/loongarch: Remove cpu_fcsr0Richard Henderson
All of the fpu operations are defined with TCG_CALL_NO_WG, but they all modify FCSR0. The most efficient way to fix this is to remove cpu_fcsr0, and instead use explicit load and store operations for the two instructions that manipulate that value. Acked-by: Qi Hu <huqi@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn> Reported-by: Feiyang Chen <chenfeiyang@loongson.cn> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-08-08Merge tag 'mips-20220809' of https://github.com/philmd/qemu into stagingRichard Henderson
MIPS/SPARC patches queue - target/mips: Handle lock_user failure in UHI_plog semihosting (Peter Maydell) - hw/mips/malta: Turn off x86 specific features of PIIX4 PM (Igor Mammedov) - hw/misc/grlib_ahb_apb_pnp: Support 8 and 16 bit accesses (Peter Maydell) # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmLxjkMACgkQ4+MsLN6t # wN4DhQ/+L/lcVmz/hoIDsjyqMBpBYMYEftlytyuXUDqp9+1CGQpXXzf6cmXwiMK5 # DDP/q0PR508tevljDuc7A01ThkN5Vx8FcEpCaD54AjZ5n0BxSLl0Yw9Leftq8doD # Nk0YonVEY1tNXYV/KGWsiA7Xhkm3pL66Jzc0fyotNhzsI/dGxTVO9vLTgLl4/Hxv # iMj0AxPIOrKEsom61k6QKLgE5ZC3yIPZb+6upSwrQfx6oMtIac5NofEjNCuR0Uy5 # PgM6ZJKAM376JlP4hdJ91K04Wg8ql+ze/x2jpjbR0S3QRz4TbH57hJ00nNRLxDep # 5hHE7FIg6xf7sJv8ukwLK31zOiT46Azkr1wG97mZ7NyxxT7VTXtKgje6IENLGCgy # sCMWIEnrOh03seMShaCRqPcguYUR+XaMc+Hpv9XCu3ZvniI2CUpmVlm8M0t3hqVK # XCMwSsXJZ2w4522lUAJio2a10dsHJDg8U81n1KozTRUEZ8QBVlkqNLAIsROKl1Fr # LMsv9408nQLkAhYCBeZArw8ayITLTPqlE/S7fiLwwa6e8lPpkMyz/RlN16QsCSHr # zQO0iwY4kldn7QekKPTMQE73sW5ziBIOe7P6F5jtexbeaY0vJ5ph8Kfrq6hUVuqN # ieQVSi4psz43fpIjNodTk0nnsqAJXZ/7vy0sS38DvwQjBZojWIk= # =RIZd # -----END PGP SIGNATURE----- # gpg: Signature made Mon 08 Aug 2022 03:29:23 PM PDT # gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full] * tag 'mips-20220809' of https://github.com/philmd/qemu: hw/misc/grlib_ahb_apb_pnp: Support 8 and 16 bit accesses hw/mips/malta: turn off x86 specific features of PIIX4_PM target/mips: Handle lock_user() failure in UHI_plog semihosting call Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-08-08hw/misc/grlib_ahb_apb_pnp: Support 8 and 16 bit accessesPeter Maydell
In real hardware, the APB and AHB PNP data tables can be accessed with byte and halfword reads as well as word reads. Our implementation currently only handles word reads. Add support for the 8 and 16 bit accesses. Note that we only need to handle aligned accesses -- unaligned accesses should continue to trap, as happens on hardware. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1132 Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Frederic Konrad <fkonrad@amd.com> Message-Id: <20220802131925.3380923-1-peter.maydell@linaro.org> Tested-by: Tomasz Martyniak <gitlab.com/tom4r> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2022-08-08hw/mips/malta: turn off x86 specific features of PIIX4_PMIgor Mammedov
QEMU crashes trying to save VMSTATE when only MIPS target are compiled in $ qemu-system-mips -monitor stdio (qemu) migrate "exec:gzip -c > STATEFILE.gz" Segmentation fault (core dumped) It happens due to PIIX4_PM trying to parse hotplug vmstate structures which are valid only for x86 and not for MIPS (as it requires ACPI tables support which is not existent for ithe later) Issue was probably exposed by trying to cleanup/compile out unused ACPI bits from MIPS target (but forgetting about migration bits). Disable compiled out features using compat properties as the least risky way to deal with issue. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/995 Reviewed-by: Ani Sinha <ani@anisinha.ca> Acked-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <20220728115034.1327988-1-imammedo@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>