aboutsummaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)Author
2014-09-01sclp-s390: Add memory hotplug SCLPsMatthew Rosato
Add memory information to read SCP info and add handlers for Read Storage Element Information, Attach Storage Element, Assign Storage and Unassign Storage. Signed-off-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
2014-09-01s390-virtio: Apply same memory boundaries as virtio-ccwMatthew Rosato
Although s390-virtio won't support memory hotplug, it should enforce the same memory boundaries so that it can use shared codepaths (like read_SCP_info). Signed-off-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
2014-09-01virtio-ccw: Include standby memory when calculating storage incrementMatthew Rosato
When determining the memory increment size, use the maxmem size if it was specified. Signed-off-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
2014-09-01sclp-s390: Add device to manage s390 memory hotplugMatthew Rosato
Add sclpMemoryHotplugDev to contain associated data structures, etc. Signed-off-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
2014-08-29hw/intc/arm_gic: honor target mask in gic_update()Sergey Fedorov
Take IRQ target mask into account when determining the highest priority pending interrupt. Signed-off-by: Sergey Fedorov <serge.fdrv@gmail.com> Acked-by: Christoffer Dall <christoffer.dall@linaro.org> Message-id: 1407947471-26981-1-git-send-email-serge.fdrv@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-29aarch64: raise max_cpus to 8Joel Schopp
I'm running on a system with 8 cpus and it would be nice to have qemu support all of them. The attached patch does that and has been tested. That said, I'm not sure if 8 is enough or if we want to bump this even higher now before systems with many more cpus come along. 255 anyone? Cc: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Joel Schopp <joel.schopp@amd.com> Message-id: 20140819213304.19537.2834.stgit@joelaarch64.amd.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-29arm_gic: Use GIC_NR_SGIS constantAdam Lackorzynski
Use constant rather than a plain number. Acked-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Message-id: 1408372255-12358-5-git-send-email-adam@os.inf.tu-dresden.de Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-29arm_gic: Do not force PPIs to edge-triggered modeAdam Lackorzynski
Only SGIs must be WI, done by forcing them to their default (edge-triggered). Acked-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Message-id: 1408372255-12358-4-git-send-email-adam@os.inf.tu-dresden.de Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-29arm_gic: GICD_ICFGR: Write model only for pre v1 GICsAdam Lackorzynski
Setting the model is only available in pre-v1 GIC models. Acked-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Message-id: 1408372255-12358-3-git-send-email-adam@os.inf.tu-dresden.de Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-29arm_gic: Fix read of GICD_ICFGRAdam Lackorzynski
The GICD_ICFGR register covers 4 interrupts per byte. Acked-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Message-id: 1408372255-12358-2-git-send-email-adam@os.inf.tu-dresden.de Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-29Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20140829-1' into ↵Peter Maydell
staging usb: bugfix collection. usb: add cleanup functions for host adapters, in preparation for hotplug support. usb: add simple qtests for uhci,ohci,xhci. # gpg: Signature made Fri 29 Aug 2014 12:56:20 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-usb-20140829-1: tests: add xHCI qtest tests: add UHCI qtest tests: add OHCI qtest usb: add usb host adapters exit trace usb-xhci: add exit function usb-ehci: add ehci-pci device exit function usb-ehci: add ehci unrealize funciton usb-ehci: add vmstate properity for EHCIState usb-uhci: clean up uhci resource when pci-uhci exit usb-ohci: add exit function usb-ohci: Fix memory leak for ohci timer usb: add usb_bus_release function Revert "xhci: Fix number of streams allocated when using streams" xhci: use (1u << i) Fix OHCI ISO TD state never being written back. xhci: fix debug print compiling error usb: Fix bootindex for portnr > 9 Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-29usb: add usb host adapters exit traceGonglei
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-08-29usb-xhci: add exit functionGonglei
clean up xhci resource when xhci pci device exit. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-08-29usb-ehci: add ehci-pci device exit functionGonglei
clean up ehci resource when ehci pci device exit. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-08-29usb-ehci: add ehci unrealize funcitonGonglei
cleanup ehci controller resource, both pci and sysbus if they're necessary. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-08-29usb-ehci: add vmstate properity for EHCIStateGonglei
since hotunplug the ehci host adapter, we should delete vm_change_state_handler also, so the VMChangeStateEntry should be saved in EHCIState. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-08-29usb-uhci: clean up uhci resource when pci-uhci exitGonglei
clean up uhci resource when uhci pci device exit. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-08-29usb-ohci: add exit functionGonglei
clean up ohci resource when ohci pci device exit. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-08-29usb-ohci: Fix memory leak for ohci timerGonglei
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-08-29usb: add usb_bus_release functionGonglei
add global variables releasing logic when the usb buses were removed or hot-unpluged. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-08-29Revert "xhci: Fix number of streams allocated when using streams"Gerd Hoffmann
This reverts commit d063c3112c4cd23a479ee18720c2bd119da2d315. "2 << x" is the same as "2 ^ (x + 1)", so the old code is correct. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-08-29xhci: use (1u << i)Gerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-29Fix OHCI ISO TD state never being written back.Jack Un
There appears to be typo in OHCI with isochronous transfers resulting in isoch. transfer descriptor state never being written back. The'put_words' function is in a OR statement hence it is never called. Signed-off-by: Jack Un <jack.un@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-08-29xhci: fix debug print compiling errorGonglei
after commit 003e15a180373048f0c1f4df0bfe303746eb2676 the DPRINTF will broke compiling, adjust its location. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-08-29usb: Fix bootindex for portnr > 9Markus Armbruster
We identify devices by their Open Firmware device paths. The encoding of the host controller and hub port numbers is incorrect: usb_get_fw_dev_path() formats them in decimal, while SeaBIOS uses hexadecimal. When some port number > 9, SeaBIOS will miss the bootindex (lucky case), or apply it to another device (unlucky case). The relevant spec[*] agrees with SeaBIOS (and OVMF, for that matter). Change %d to %x. Bug can bite only with host controllers or hubs sporting more than ten ports. I'm not aware of any. [*] Open Firmware Recommended Practice: Universal Serial Bus, Version 1, Section 3.2.1 Device Node Address Representation http://www.openfirmware.org/1275/bindings/usb/usb-1_0.ps Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Note: xhci can be configured with up to 15 ports (default is 4 ports). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-08-28Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell
SCSI patches include bug fixes from Fam and Peter, improved error reporting from Fam and a fix for DPRINTF bitrot. Memory patches try again to initialize name from the QOM name. # gpg: Signature made Thu 28 Aug 2014 15:10:31 BST using RSA key ID 9B4D86F2 # gpg: Good signature from "Paolo Bonzini <pbonzini@redhat.com>" # gpg: aka "Paolo Bonzini <bonzini@gnu.org>" * remotes/bonzini/tags/for-upstream: memory: Lazy init name from QOM name as needed xen: hvm: Abstract away memory region name ref xen-hvm: Constify string virtio-scsi: Report error if num_queues is 0 or too large scsi-generic: remove superfluous DPRINTF avoid to break compiling block/iscsi: fix memory corruption on iscsi resize scsi-bus: Convert DeviceClass init to realize block: Pass errp in blkconf_geometry Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-28Merge remote-tracking branch 'remotes/kvm/tags/for-upstream' into stagingPeter Maydell
Mostly bugfixes + Alexey's interface-based implementation of the NMI monitor command. # gpg: Signature made Thu 28 Aug 2014 15:07:22 BST using RSA key ID 9B4D86F2 # gpg: Good signature from "Paolo Bonzini <pbonzini@redhat.com>" # gpg: aka "Paolo Bonzini <bonzini@gnu.org>" * remotes/kvm/tags/for-upstream: mc146818rtc: reinitialize irq_reinject_on_ack_count on reset target-i386: Add "tsc_adjust" CPU feature name target-i386: Add "mpx" CPU feature name vl: process -object after other backend options checkpatch.pl: adjust typedef definition to QEMU coding style x86: Clear MTRRs on vCPU reset x86: kvm: Add MTRR support for kvm_get|put_msrs() x86: Use common variable range MTRR counts target-i386: Don't forbid NX bit on PAE PDEs and PTEs spapr: Add support for new NMI interface s390x: Migrate to new NMI interface s390x: Convert QEMUMachine to MachineClass cpus: Define callback for QEMU "nmi" command kvm: run cpu state synchronization on target vcpu thread Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-27mc146818rtc: reinitialize irq_reinject_on_ack_count on resetPaolo Bonzini
This field was forgotten, and it makes the state after reset non-deterministic. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-08-26virtio-scsi: Report error if num_queues is 0 or too largeFam Zheng
No cmd vq surprises guest (Linux panics in virtscsi_probe), too many queues abort qemu (in the following virtio_add_queue). Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-08-26scsi-generic: remove superfluous DPRINTF avoid to break compilingGonglei
variables lun and tag had been eliminated, break compiling when enable debug switch. Meanwhile traces provide the same information with this DPRINTF, so remove it. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-08-26scsi-bus: Convert DeviceClass init to realizeFam Zheng
Replace "init/destroy" with "realize/unrealize" in SCSIDeviceClass, which has errp as a parameter. So all the implementations now use error_setg instead of error_report for reporting error. Also in scsi_bus_legacy_handle_cmdline, report the error when initializing the if=scsi devices, before returning it, because in the callee, error_report is changed to error_setg. And the callers don't have the right locations (e.g. "-drive if=scsi"). Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-08-26block: Pass errp in blkconf_geometryFam Zheng
This allows us to pass error information to caller. Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-08-26Merge remote-tracking branch ↵Peter Maydell
'remotes/awilliam/tags/vfio-pci-for-qemu-20140825.0' into staging VFIO: Enable primary NVIDIA quirk regardless of VGA support # gpg: Signature made Mon 25 Aug 2014 20:29:37 BST using RSA key ID 3BB08B22 # gpg: Can't check signature: public key not found * remotes/awilliam/tags/vfio-pci-for-qemu-20140825.0: vfio: Enable NVIDIA 88000 region quirk regardless of VGA Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-25vfio: Enable NVIDIA 88000 region quirk regardless of VGAAlex Williamson
If we make use of OVMF for the BIOS then we can use GPUs without VGA space access, but we still need this quirk. Disassociate it from the x-vga option and enable it on all NVIDIA VGA display class devices. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2014-08-25Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into stagingPeter Maydell
pci, pc fixes, features A bunch of bugfixes - these will make sense for 2.1.1 ACPI support for TPM and partial ARI support for PCIE. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Sun 24 Aug 2014 23:16:35 BST using RSA key ID D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" * remotes/mst/tags/for_upstream: pcie: fix trailing whitespace ioh3420: Enable ARI forwarding ioh3420: Remove obsoleted, unused ioh3420_init function pcie: Rename the pcie_cap_ari_* functions to pcie_cap_arifwd_* pcie: Fix incorrect write to the ari capability next function field ssdt-tpm: add generated hex file to git Add ACPI tables for TPM pc: reserve more memory for ACPI for new machine types pcihp: fix possible array out of bounds pci_bridge: manually destroy memory regions within PCIBridgeWindows hostmem: set MPOL_MF_MOVE Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-25spapr: Add support for new NMI interfaceAlexey Kardashevskiy
This implements an NMI interface POWERPC SPAPR machine. This enables an "nmi" HMP/QMP command supported on SPAPR. This calls POWERPC_EXCP_RESET (vector 0x100) in the guest to deliver NMI to every CPU. The expected result is XMON (in-kernel debugger) invocation. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-08-25s390x: Migrate to new NMI interfaceAlexey Kardashevskiy
This implements an NMI interface for s390 and s390-ccw machines. This removes #ifdef s390 branch in qmp_inject_nmi so new s390's nmi_monitor_handler() callback is going to be used for NMI. Since nmi_monitor_handler()-calling code is platform independent, CPUState::cpu_index is used instead of S390CPU::env.cpu_num. There should not be any change in behaviour as both @cpu_index and @cpu_num are global CPU numbers. Note that s390_cpu_restart() already takes care of the specified cpu, so we don't need to schedule via async_run_on_cpu(). Since the only error s390_cpu_restart() can return is ENOSYS, convert it to QERR_UNSUPPORTED. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Alexander Graf <agraf@suse.de> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-08-25s390x: Convert QEMUMachine to MachineClassAlexey Kardashevskiy
This converts s390-virtio and s390-ccw-virtio machines to QOM MachineClass. This brings ability to add interfaces to the machine classes. The first interface for addition will be NMI. The patch is mechanical so no change in behavior is expected. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-08-25cpus: Define callback for QEMU "nmi" commandAlexey Kardashevskiy
This introduces an NMI (Non Maskable Interrupt) interface with a single nmi_monitor_handler() method. A machine or a device can implement it. This searches for an QOM object with this interface and if it is implemented, calls it. The callback implements an action required to cause debug crash dump on in-kernel debugger invocation. The callback returns Error**. This adds a nmi_monitor_handle() helper which walks through all objects to find the interface. The interface method is called for all found instances. This adds support for it in qmp_inject_nmi(). Since no architecture supports it at the moment, there is no change in behaviour. This changes inject-nmi command description for HMP and QMP. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-08-25pcie: fix trailing whitespaceMichael S. Tsirkin
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-08-25ioh3420: Enable ARI forwardingKnut Omang
Signed-off-by: Knut Omang <knut.omang@oracle.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-08-25ioh3420: Remove obsoleted, unused ioh3420_init functionKnut Omang
Signed-off-by: Knut Omang <knut.omang@oracle.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-08-25pcie: Rename the pcie_cap_ari_* functions to pcie_cap_arifwd_*Knut Omang
Rename helper functions to make a clearer distinction between the PCIe capability/control register feature ARI forwarding and a device that supports the ARI feature via an ARI extended PCIe capability. Signed-off-by: Knut Omang <knut.omang@oracle.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-08-25pcie: Fix incorrect write to the ari capability next function fieldKnut Omang
PCI_ARI_CAP_NFN, a macro for reading next function was used instead of the intended write. Signed-off-by: Knut Omang <knut.omang@oracle.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-08-25ssdt-tpm: add generated hex file to gitMichael S. Tsirkin
Needed for systems without IASL. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-08-25Add ACPI tables for TPMStefan Berger
Add an SSDT ACPI table for the TPM device. Add a TCPA table for BIOS logging area when a TPM is being used. The latter follows this spec here: http://www.trustedcomputinggroup.org/files/static_page_files/DCD4188E-1A4B-B294-D050A155FB6F7385/TCG_ACPIGeneralSpecification_PublicReview.pdf This patch has Michael Tsirkin's patches folded in. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
2014-08-25pc: reserve more memory for ACPI for new machine typesMichael S. Tsirkin
commit 868270f23d8db2cce83e4f082fe75e8625a5fbf9 acpi-build: tweak acpi migration limits broke kernel loading with -kernel/-initrd: it doubled the size of ACPI tables but did not reserve enough memory. As a result, issues on boot and halt are observed. Fix this up by doubling reserved memory for new machine types. Cc: qemu-stable@nongnu.org Reported-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-08-25pcihp: fix possible array out of boundsGonglei
Prevent out-of-bounds array access on acpi_pcihp_pci_status. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Cc: qemu-stable@nongnu.org Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
2014-08-25pci_bridge: manually destroy memory regions within PCIBridgeWindowsPaolo Bonzini
The regions are destroyed and recreated on configuration space accesses. We need to destroy them before the containing PCIBridgeWindows object is freed. Reported-by: Gonglei <arei.gonglei@huawei.com> Reported-by: Knut Omang <knut.omang@oracle.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-08-24vmxnet3: Pad short frames to minimum size (60 bytes)Ben Draper
When running VMware ESXi under qemu-kvm the guest discards frames that are too short. Short ARP Requests will be dropped, this prevents guests on the same bridge as VMware ESXi from communicating. This patch simply adds the padding on the network device itself. Signed-off-by: Ben Draper <ben@xrsa.net> Reviewed-by: Dmitry Fleytman <dmitry@daynix.com> Cc: qemu-stable@nongnu.org Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>