aboutsummaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2019-05-21Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20190521-3' into stagingPeter Maydell2-6/+19
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-20pci: Simplify pci_bus_is_root()David Gibson3-18/+3
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-20hw/arm/virt-acpi-build: pass AcpiMcfgInfo to build_mcfg()Wei Yang2-12/+12
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-20q35: acpi: do not create dummy MCFG tableIgor Mammedov1-14/+4
Dummy table (with signature "QEMU") creation came from original SeaBIOS codebase. And QEMU would have to keep it around if there were Q35 machine that depended on keeping ACPI tables blob constant size. Luckily there were no versioned Q35 machine types before commit: (since 2.3) a1666142db acpi-build: make ROMs RAM blocks resizeable which obsoleted need to keep ACPI tables blob the same size on source/destination. Considering the 1st versioned machine is pc-q35-2.4, the dummy table is not really necessary and it's safe to drop it without breaking cross version migration in both directions unconditionally. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <1554822037-329838-1-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> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-05-20acpi/pcihp: Add a few more trace points related to unplugMarkus Armbruster2-0/+10
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190402161900.7374-4-armbru@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-05-20acpi/pcihp: Convert debug printf()s to trace eventsMarkus Armbruster2-17/+17
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190402161900.7374-3-armbru@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-05-20acpi/piix4: Convert debug printf()s to trace eventsMarkus Armbruster2-11/+7
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190402161900.7374-2-armbru@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-05-20vhost-user-blk: Add support to reconnect backendXie Yongji1-23/+136
Since we now support the message VHOST_USER_GET_INFLIGHT_FD and VHOST_USER_SET_INFLIGHT_FD. The backend is able to restart safely because it can track inflight I/O in shared memory. This patch allows qemu to reconnect the backend after connection closed. Signed-off-by: Xie Yongji <xieyongji@baidu.com> Signed-off-by: Ni Xun <nixun@baidu.com> Signed-off-by: Zhang Yu <zhangyu31@baidu.com> Message-Id: <20190320112646.3712-7-xieyongji@baidu.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-05-20vhost-user-blk: Add return value for vhost_user_blk_start()Xie Yongji1-4/+5
Add a return value for vhost_user_blk_start() to check whether we start vhost-user backend successfully or not. Signed-off-by: Xie Yongji <xieyongji@baidu.com> Signed-off-by: Zhang Yu <zhangyu31@baidu.com> Message-Id: <20190320112646.3712-6-xieyongji@baidu.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-05-20vhost-user-blk: Only start vhost-user backend with the first kickXie Yongji1-2/+1
We should only start vhost-user backend at the first kick for virtio 1.0 transitional devices. Signed-off-by: Xie Yongji <xieyongji@baidu.com> Signed-off-by: Zhang Yu <zhangyu31@baidu.com> Message-Id: <20190320112646.3712-5-xieyongji@baidu.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-05-20vhost-user-blk: Use started flag in vhost_user_blk_set_status()Xie Yongji1-2/+2
Use started flag in vhost_user_blk_set_status() to decide if starting vhost-user backend or not. Signed-off-by: Xie Yongji <xieyongji@baidu.com> Signed-off-by: Zhang Yu <zhangyu31@baidu.com> Message-Id: <20190320112646.3712-4-xieyongji@baidu.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-05-20virtio: Use started flag in virtio_vmstate_change()Xie Yongji1-1/+1
Currently, we use DRIVER_OK status bit to check whether guest driver has started the device in virtio_vmstate_change(). But it's not the case for virtio 1.0 transitional devices. If migration completes between kicking virtqueue and setting VIRTIO_CONFIG_S_DRIVER_OK, guest may be hung. So here we use started flag to check guest state instead. Signed-off-by: Xie Yongji <xieyongji@baidu.com> Signed-off-by: Zhang Yu <zhangyu31@baidu.com> Message-Id: <20190320112646.3712-3-xieyongji@baidu.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-05-20virtio: Introduce started flag to VirtioDeviceXie Yongji1-2/+50
The virtio 1.0 transitional devices support driver uses the device before setting the DRIVER_OK status bit. So we introduce a started flag to indicate whether driver has started the device or not. Signed-off-by: Xie Yongji <xieyongji@baidu.com> Signed-off-by: Zhang Yu <zhangyu31@baidu.com> Message-Id: <20190320112646.3712-2-xieyongji@baidu.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-05-20hw: report invalid disable-legacy|modern usage for virtio-1-only devsDaniel P. Berrangé7-23/+73
A number of virtio devices (gpu, crypto, mouse, keyboard, tablet) only support the virtio-1 (aka modern) mode. Currently if the user launches QEMU, setting those devices to enable legacy mode, QEMU will silently create them in modern mode, ignoring the user's (mistaken) request. This patch introduces proper data validation so that an attempt to configure a virtio-1-only devices in legacy mode gets reported as an error to the user. Checking this required introduction of a new field to explicitly track what operating model is to be used for a device, separately from the disable_modern and disable_legacy fields that record the user's requested configuration. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20190215103239.28640-2-berrange@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-05-20nvme: fix copy direction in DMA reads going to CMBKlaus Birkelund Jensen1-1/+1
`nvme_dma_read_prp` erronously used `qemu_iovec_*to*_buf` instead of `qemu_iovec_*from*_buf` when the request involved the controller memory buffer. Signed-off-by: Klaus Birkelund Jensen <klaus.jensen@cnexlabs.com> Reviewed-by: Kenneth Heitke <kenneth.heitke@intel.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-05-17Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell19-322/+440
Mostly bugfixes and cleanups, the most important being "megasas: fix mapped frame size" from Peter Lieven. In addition, -realtime is marked as deprecated. # gpg: Signature made Fri 17 May 2019 14:25:11 BST # gpg: using RSA key BFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # 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 * remotes/bonzini/tags/for-upstream: (21 commits) hw/net/ne2000: Extract the PCI device from the chipset common code hw/char: Move multi-serial devices into separate file ioapic: allow buggy guests mishandling level-triggered interrupts to make progress build: don't build hardware objects with linux-user build: chardev is only needed for softmmu targets configure: qemu-ga is only needed with softmmu targets build: replace GENERATED_FILES by generated-files-y trace: only include trace-event-subdirs when they are needed sun4m: obey -vga none mips-fulong2e: obey -vga none hw/i386/acpi: Assert a pointer is not null BEFORE using it hw/i386/acpi: Add object_resolve_type_unambiguous to improve modularity hw/acpi/piix4: Move TYPE_PIIX4_PM to a public header memory: correct the comment to DIRTY_MEMORY_MIGRATION vl: fix -sandbox parsing crash when seccomp support is disabled hvf: Add missing break statement megasas: fix mapped frame size vl: Add missing descriptions to the VGA adapters list Declare -realtime as deprecated roms: assert if max rom size is less than the used size ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-05-17Merge remote-tracking branch 'remotes/mcayland/tags/qemu-sparc-20190517' ↵Peter Maydell7-22/+424
into staging qemu-sparc queue # gpg: Signature made Fri 17 May 2019 10:30:54 BST # gpg: using RSA key CC621AB98E82200D915CC9C45BC2C56FAE0F321F # gpg: issuer "mark.cave-ayland@ilande.co.uk" # gpg: Good signature from "Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>" [full] # Primary key fingerprint: CC62 1AB9 8E82 200D 915C C9C4 5BC2 C56F AE0F 321F * remotes/mcayland/tags/qemu-sparc-20190517: MAINTAINERS: add myself for leon3 leon3: introduce the plug and play mechanism leon3: add a little bootloader grlib, apbuart: get rid of the old-style create function grlib, gptimer: get rid of the old-style create function grlib, irqmp: get rid of the old-style create function leon3: fix the error message when no bios are provided hw/char/escc: Lower irq when transmit buffer is filled Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-05-17hw/net/ne2000: Extract the PCI device from the chipset common codePhilippe Mathieu-Daudé4-108/+139
The ne2000.c file contains functions common the the ISA and PCI devices. To allow to build with one or another, extract the PCI specific part into a new file. This fix an issue where the NE2000_ISA Kconfig had to pull the full PCI core objects. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190504123538.14952-1-philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-05-17hw/char: Move multi-serial devices into separate fileThomas Huth4-170/+215
In our downstream distribution of QEMU, we'd like to ship the binary without the multi-serial PCI devices. To make this disablement easier, let's move the devices into a separate file and add a proper Kconfig- switch for these devices. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1554036028-31410-1-git-send-email-thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-05-17ioapic: allow buggy guests mishandling level-triggered interrupts to make ↵Vitaly Kuznetsov2-5/+53
progress It was found that Hyper-V 2016 on KVM in some configurations (q35 machine + piix4-usb-uhci) hangs on boot. Root-cause was that one of Hyper-V level-triggered interrupt handler performs EOI before fixing the cause of the interrupt. This results in IOAPIC keep re-raising the level-triggered interrupt after EOI because irq-line remains asserted. Gory details: https://www.spinics.net/lists/kvm/msg184484.html (the whole thread). Turns out we were dealing with similar issues before; in-kernel IOAPIC implementation has commit 184564efae4d ("kvm: ioapic: conditionally delay irq delivery duringeoi broadcast") which describes a very similar issue. Steal the idea from the above mentioned commit for IOAPIC implementation in QEMU. SUCCESSIVE_IRQ_MAX_COUNT, delay and the comment are borrowed as well. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Message-Id: <20190402080215.10747-1-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-05-17sun4m: obey -vga nonePaolo Bonzini1-4/+2
Do not create a TCX if "-vga none" was passed on the command line. Remove some dead code along the way to avoid big reindentation. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-05-17mips-fulong2e: obey -vga nonePaolo Bonzini1-4/+6
Do not create an ATI VGA if "-vga none" was passed on the command line. Cc: BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-05-17hw/i386/acpi: Assert a pointer is not null BEFORE using itPhilippe Mathieu-Daudé1-1/+1
Commit 72c194f7e75c added a non-null check on the 'obj' pointer. Later, commit 500b11ea5095 added code which uses the 'obj' pointer _before_ the assertion check. Move the assertion _before_ the pointer use. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190427144025.22880-4-philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-05-17hw/i386/acpi: Add object_resolve_type_unambiguous to improve modularityPhilippe Mathieu-Daudé3-26/+16
When building with CONFIG_Q35=n, we get: LINK x86_64-softmmu/qemu-system-x86_64 /usr/bin/ld: hw/i386/acpi-build.o: in function `acpi_get_misc_info': /source/qemu/hw/i386/acpi-build.c:243: undefined reference to `ich9_lpc_find' collect2: error: ld returned 1 exit status make[1]: *** [Makefile:204: qemu-system-x86_64] Error 1 This is due to a dependency in acpi-build.c on the ICH9_LPC (via ich9_lpc_find) and PIIX4_PM (via piix4_pm_find) devices. To allow better modularity (compile acpi-build.c with only Q35/ICH9 or ISAPC/PIIX4), refactor the similar helper as object_resolve_type_unambiguous(). This way we relax the linker dependencies and can build the x86 targets with a selection of machines (instead of all of them). Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190427144025.22880-3-philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-05-17hw/acpi/piix4: Move TYPE_PIIX4_PM to a public headerPhilippe Mathieu-Daudé1-2/+0
Move the TYPE_PIIX4_PM definition to the corresponding header, so other files can use it. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190427144025.22880-2-philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-05-17e1000: Never increment the RX undersize count registerChris Kenna1-1/+0
In situations where e1000 receives an undersized Ethernet frame, QEMU increments the emulated "Receive Undersize Count (RUC)" register when padding the frame. This is incorrect because this an expected scenario (e.g. with VLAN tag stripping) and not an error. As such, QEMU should not increment the emulated RUC. Fixes: 3b2743017749 ("e1000: Implementing various counters") Reviewed-by: Mark Kanda <mark.kanda@oracle.com> Reviewed-by: Bhavesh Davda <bhavesh.davda@oracle.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Chris Kenna <chris.kenna@oracle.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
2019-05-17vhost_net: don't set backend for the uninitialized virtqueueJason Wang2-0/+15
We used to set backend unconditionally, this won't work for some guests (e.g windows driver) who may not initialize all virtqueues. For kernel backend, this will fail since it may try to validate the rings during setting backend. Fixing this by simply skipping the backend set when we find desc is not ready. Reviewed-by: Michael S. Tsirkin<mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
2019-05-17leon3: introduce the plug and play mechanismKONRAD Frederic3-0/+301
This adds the AHB and APB plug and play devices. They are scanned during the linux boot to discover the various peripheral. Reviewed-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: KONRAD Frederic <frederic.konrad@adacore.com> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-05-17leon3: add a little bootloaderKONRAD Frederic1-8/+71
This adds a little bootloader to the leon3_machine when a ram image is given through the kernel parameter and no bios are provided: * The UART transmiter is enabled. * The TIMER is initialized. Reviewed-by: Fabien Chouteau <chouteau@adacore.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: KONRAD Frederic <frederic.konrad@adacore.com> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-05-17grlib, apbuart: get rid of the old-style create functionKONRAD Frederic2-3/+10
Suggested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: KONRAD Frederic <frederic.konrad@adacore.com> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-05-17grlib, gptimer: get rid of the old-style create functionKONRAD Frederic2-3/+18
Suggested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: KONRAD Frederic <frederic.konrad@adacore.com> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-05-17grlib, irqmp: get rid of the old-style create functionKONRAD Frederic2-4/+11
Suggested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: KONRAD Frederic <frederic.konrad@adacore.com> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-05-17leon3: fix the error message when no bios are providedKONRAD Frederic1-4/+6
The leon3 board is looking for u-boot.bin by default (LEON3_PROM_FILENAME).. But in the case this file is not found and no other file are given on the command line we get the following error: $ ./qemu-system-sparc -M leon3_generic qemu-system-sparc: Can't read bios image (null) So use LEON3_PROM_FILENAME instead of filename in case it is NULL to get a less cryptic message: $ ./qemu-system-sparc -M leon3_generic qemu-system-sparc: Can't read bios image 'u-boot.bin' Suggested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: KONRAD Frederic <frederic.konrad@adacore.com> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-05-17hw/char/escc: Lower irq when transmit buffer is filledStephen Checkoway1-0/+7
The SCC/ESCC will briefly stop asserting an interrupt when the transmit FIFO is filled. This code doesn't model the transmit FIFO/shift register so the pending transmit interrupt is never deasserted which means that an edge-triggered interrupt controller will never see the low-to-high transition it needs to raise another interrupt. The practical consequence of this is that guest firmware with an interrupt service routine for the ESCC that does not send all of the data it has immediately will stop sending data if the following sequence of events occurs: 1. Disable processor interrupts 2. Write a character to the ESCC 3. Add additional characters to a buffer which is drained by the ISR 4. Enable processor interrupts In this case, the first character will be sent, the interrupt will fire and the ISR will output the second character. Since the pending transmit interrupt remains asserted, no additional interrupts will ever fire. This behavior was triggered by firmware for an embedded system with a Z85C30 which necessitated this patch. This patch fixes that situation by explicitly lowering the IRQ when a character is written to the buffer and no other interrupts are currently pending. Signed-off-by: Stephen Checkoway <stephen.checkoway@oberlin.edu> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2019-05-17s390/css: handle CCW_FLAG_SKIPCornelia Huck1-4/+18
If a ccw has CCW_FLAG_SKIP set, and the command is of type read, read backwards, or sense, no data should be written to the guest for that command. Reviewed-by: Eric Farman <farman@linux.ibm.com> Message-Id: <20190516133327.11430-1-cohuck@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2019-05-17s390/ipl: cast to SCSIDevice directlyCornelia Huck1-2/+1
Coverity notes that the result of object_dynamic_cast() to SCSIDevice is not checked in s390_gen_initial_iplp(); as we know that we always have a SCSIDevice in that branch, we can instead cast via SCSI_DEVICE directly. Coverity: CID 1401098 Fixes: 44445d8668f4 ("s390 vfio-ccw: Add bootindex property and IPLB data") Message-Id: <20190502155516.12415-1-cohuck@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2019-05-15megasas: fix mapped frame sizePeter Lieven1-1/+1
the current value of 1024 bytes (16 * MFI_FRAME_SIZE) we map is not enough to hold the maximum number of scatter gather elements we advertise. We actually need a maximum of 2048 bytes. This is 128 max sg elements * 16 bytes (sizeof (union mfi_sgl)). Cc: qemu-stable@nongnu.org Signed-off-by: Peter Lieven <pl@kamp.de> Message-Id: <20190404121015.28634-1-pl@kamp.de> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-05-15roms: assert if max rom size is less than the used sizeIgor Mammedov1-0/+1
It would ensure that we would notice attempt to write beyond the allocated buffer. In case of MemoryRegion backed ROM it's the host buffer and the guest RAM otherwise. assert can be triggered with: dd if=/dev/zero of=/tmp/blob bs=63k count=1 qemu-system-x86_64 `for i in {1..33}; do echo -n " -acpitable /tmp/blob"; done` Fixes: (a1666142db acpi-build: make ROMs RAM blocks resizeable) Reported-by: Wei Yang <richardw.yang@linux.intel.com> Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <1554982098-336210-1-git-send-email-imammedo@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-05-15hw/input: Add a CONFIG_PS2 switch for the ps2.c fileThomas Huth2-1/+6
ps2.c only needs to be compiled if we are building pckbd.c or pl050.c. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <20190411182240.5957-1-thuth@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-05-13Merge remote-tracking branch ↵Peter Maydell9-15/+355
'remotes/huth-gitlab/tags/pull-request-2019-05-13' into staging Kconfig settings for the Arm machines # gpg: Signature made Mon 13 May 2019 09:19:43 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-13: (29 commits) hw/arm: Remove hard-enablement of the remaining PCI devices hw/arm: Express dependencies of the musca machines with Kconfig hw/arm: Express dependencies of the xlnx-versal-virt machine with Kconfig hw/arm: Express dependencies of the ZynqMP zcu102 machine with Kconfig hw/arm: Express dependencies of the microbit / nrf51 machine with Kconfig hw/arm: Express dependencies of the remaining IMX boards with Kconfig hw/arm: Express dependencies of the MSF2 / EMCRAFT_SF2 machine with Kconfig hw/arm: Express dependencies of sabrelite with Kconfig hw/arm: Express dependencies of canon-a1100 with Kconfig hw/arm: Express dependencies of the raspi machines with Kconfig hw/arm: Express dependencies of the MPS2 boards with Kconfig hw/arm: Express dependencies of allwinner / cubieboard with Kconfig hw/arm: Express dependencies of netduino / stm32f2xx with Kconfig hw/arm: Express dependencies of the virt machine with Kconfig hw/arm: Express dependencies of the aspeed boards with Kconfig hw/arm: Express dependencies of collie with Kconfig hw/arm: Express dependencies of xilinx-zynq with Kconfig hw/arm: Express dependencies of the PXA2xx machines with Kconfig hw/arm: Express dependencies of realview, versatile and vexpress with Kconfig hw/arm: Express dependencies of stellaris with Kconfig ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-05-13Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2019-05-13' into ↵Peter Maydell14-20/+24
staging Miscellaneous patches for 2019-05-13 # gpg: Signature made Mon 13 May 2019 08:04:02 BST # gpg: using RSA key 3870B400EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-misc-2019-05-13: Clean up decorations and whitespace around header guards Normalize header guard symbol definition. Clean up ill-advised or unusual header guards Clean up header guards that don't match their file name target/xtensa: Clean up core-isa.h header guards linux-user/nios2 linux-user/riscv: Clean up header guards authz: Normalize #include "authz/trace.h" to "trace.h" Use #include "..." for our own headers, <...> for others Clean up includes Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-05-13hw/arm: Express dependencies of the musca machines with KconfigThomas Huth1-3/+6
Dependencies have been determined with trial-and-error and by looking at the musca.c source file. Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-05-13hw/arm: Express dependencies of the xlnx-versal-virt machine with KconfigThomas Huth1-0/+4
Dependencies have been determined with trial-and-error and by looking at the xlnx-versal.c source file. Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-05-13hw/arm: Express dependencies of the ZynqMP zcu102 machine with KconfigThomas Huth2-0/+12
This cleans up most settings in default-configs/aarch64-softmmu.mak. Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-05-13hw/arm: Express dependencies of the microbit / nrf51 machine with KconfigThomas Huth2-1/+8
Add Kconfig dependencies for the NRF51 / microbit machine. Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-05-13hw/arm: Express dependencies of the remaining IMX boards with KconfigThomas Huth1-0/+19
IMX25, IMX7 and IMX6UL were still missing the Kconfig dependencies. Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-05-13hw/arm: Express dependencies of the MSF2 / EMCRAFT_SF2 machine with KconfigThomas Huth2-1/+10
Add Kconfig dependencies for the emcraft-sf2 machine - we also distinguish between the machine (CONFIG_EMCRAFT_SF2) and the SoC (CONFIG_MSF2) now. Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>