summaryrefslogtreecommitdiffstats
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
* virtio-serial: report frontend connection state via monitorLaszlo Ersek2014-06-271-3/+9
| | | | | | | | | | | | Libvirt wants to know about the guest-side connection state of some virtio-serial ports (in particular the one(s) assigned to guest agent(s)). Report such states with a new monitor event. RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1080376 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi event: clean up in callersWenchao Xia2014-06-271-1/+1
| | | | | | | | | This patch improves docs and address small issues in event callers. Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* hw/moxie/moxiesim.c: Remove unused moxie_intc_create()Peter Maydell2014-06-241-13/+0
| | | | | | | The function moxie_intc_create() is unused; remove it. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* Fix new typos (found by codespell)Stefan Weil2014-06-241-1/+1
| | | | | | | | | | | | * accomodate -> accommodate * aquiring -> acquiring * beacuse -> because * loosing -> losing * prefering -> preferring * threshhold -> threshold Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* virtio-serial: remove useless set_config functionPaolo Bonzini2014-06-241-8/+0
| | | | | | | | Its only contents are a dead memcpy. Since it is optional, drop the function altogether. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20140623' ↵Peter Maydell2014-06-241-5/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging migration/next for 20140623 # gpg: Signature made Mon 23 Jun 2014 18:18:57 BST using RSA key ID 5872D723 # gpg: Can't check signature: public key not found * remotes/juanquintela/tags/migration/20140623: (22 commits) vmstate: Refactor & increase tests for primitive types vmstate: Return error in case of error migration: Remove unneeded minimum_version_id_old tests: vmstate static checker: add size mismatch inside substructure tests: vmstate static checker: add substructure for usb-kbd for hid section tests: vmstate static checker: remove Subsections tests: vmstate static checker: remove a subsection tests: vmstate static checker: remove Description inside Fields tests: vmstate static checker: remove Description tests: vmstate static checker: remove Fields tests: vmstate static checker: change description name tests: vmstate static checker: remove last field in a struct tests: vmstate static checker: remove a field tests: vmstate static checker: remove a section tests: vmstate static checker: minimum_version_id check tests: vmstate static checker: version mismatch inside a Description tests: vmstate static checker: add version error in main section tests: vmstate static checker: incompat machine types tests: vmstate static checker: add dump1 and dump2 files vmstate-static-checker: script to validate vmstate changes ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * migration: Remove unneeded minimum_version_id_oldJuan Quintela2014-06-231-5/+2
| | | | | | | | | | | | | | Once there, make checkpatch happy. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* | Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into stagingPeter Maydell2014-06-2413-106/+54
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remotes/qmp-unstable/queue/qmp: (43 commits) monitor: protect event emission monitor: protect outbuf and mux_out with mutex qemu-char: make writes thread-safe qemu-char: move pty_chr_update_read_handler around qemu-char: do not call chr_write directly qemu-char: introduce qemu_chr_alloc qapi event: clean up qapi event: convert QUORUM events qapi event: convert GUEST_PANICKED qapi event: convert BALLOON_CHANGE qmp: convert ACPI_DEVICE_OST event qapi event: convert SPICE events qapi event: convert VNC events qapi event: convert NIC_RX_FILTER_CHANGED qapi event: convert other BLOCK_JOB events qapi event: convert BLOCK_IMAGE_CORRUPTED qapi event: convert BLOCK_IO_ERROR and BLOCK_JOB_ERROR qapi event: convert DEVICE_TRAY_MOVED qapi event: convert DEVICE_DELETED qapi event: convert WATCHDOG ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | qapi event: convert GUEST_PANICKEDWenchao Xia2014-06-231-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'monitor.h' is still included in target-s390x/kvm.c, since I have no good way to verify whether other code need it on my x86 host. Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi event: convert BALLOON_CHANGEWenchao Xia2014-06-231-2/+4
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qmp: convert ACPI_DEVICE_OST eventIgor Mammedov2014-06-231-28/+6
| | | | | | | | | | | | | | | | | | | | | ... using new QAPI event infrastructure Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi event: convert NIC_RX_FILTER_CHANGEDWenchao Xia2014-06-231-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Param name is declared as optional, since in code it is an optional one. Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi event: convert DEVICE_DELETEDWenchao Xia2014-06-231-10/+2
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi event: convert WATCHDOGWenchao Xia2014-06-231-16/+7
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi event: convert RTC_CHANGEWenchao Xia2014-06-232-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch also eliminates build time warning caused by no caller of monitor_qapi_event_throttle(). Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi event: convert SUSPEND_DISKWenchao Xia2014-06-231-2/+2
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi: adjust existing definesWenchao Xia2014-06-233-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to let event defines use existing types later, instead of redefine new ones, some old type defines for spice and vnc are changed, and BlockErrorAction is moved from block.h to qapi schema. Note that BlockErrorAction is not merged with BlockdevOnError. At this point, VncInfo is not made a child of VncBasicInfo, because VncBasicInfo has mandatory fields where VncInfo makes them optional. Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | audio: fmopl: drop INLINE macroLuiz Capitulino2014-06-231-16/+15
| |/ | | | | | | | | | | | | | | | | | | This commit expands all uses of the INLINE macro and drop it. The reason for this is to avoid clashes with external libraries with bad name conventions and also because renaming keywords is not a good practice. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* | pc & q35: Add new machine opt max-ram-below-4gDon Slutz2014-06-233-2/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a pc & q35 only machine opt. If you add enough PCI devices then all mmio for them will not fit below 4G which may not be the layout the user wanted. This allows you to increase the below 4G address space that PCI devices can use (aka decrease ram below 4G) and therefore in more cases not have any mmio that is above 4G. For example using "-machine pc,max-ram-below-4g=2G" on the command line will limit the amount of ram that is below 4G to 2G. Note: this machine option cannot be used to increase the amount of ram below 4G. Signed-off-by: Don Slutz <dslutz@verizon.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> MST: fix 32 bit
* | xen-hvm: Fix xen_hvm_init() to adjust pc memory layoutDon Slutz2014-06-232-29/+31
| | | | | | | | | | | | | | | | | | This is just below_4g_mem_size and above_4g_mem_size which is used later in QEMU. Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Don Slutz <dslutz@verizon.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | pcie: coding style tweakMichael S. Tsirkin2014-06-231-5/+3
| | | | | | | | | | | | | | | | - whitespace fix - unnecessary != 0 in a condition Cc: Marcel Apfelbaum <marcel.a@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | hw/pcie: better hotplug/hotunplug supportMarcel Apfelbaum2014-06-231-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code is broken: it does surprise removal which crashes guests. Reimplemented the steps: - Hotplug triggers both 'present detect change' and 'attention button pressed'. - Hotunplug starts by triggering 'attention button pressed', then waits for the OS to power off the device and only then detaches it. Fixes CVE-2014-3471. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | hw/pcie: implement power controller functionalityMarcel Apfelbaum2014-06-233-1/+46
| | | | | | | | | | | | | | | | | | It is needed by hot-unplug in order to get an indication from the OS when the device can be physically detached. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | hw/pcie: correct debug messageMarcel Apfelbaum2014-06-231-1/+1
| | | | | | | | | | | | | | | | Trivial issue, discovered while debugging. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | q35: Use PC_Q35_COMPAT_1_4 on pc-q35-1.4 compat_propsEduardo Habkost2014-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pc-q35-1.4 was incorrectly using PC_COMPAT_1_4 instead of PC_Q35_COMPAT_1_4. The only side-effect was that the hpet compat property (inherited from PC_Q35_COMPAT_1_7) was missing. Without this patch, pc-q35-1.4 inicorrectly initializes hpet-intcap to 0xff0104 (behavior introduced in QEMU 2.0, by commit 7a10ef51c2397ac4323bc786af02c58b413b5cd2). Signed-off-by: Eduardo Habkost <ehabkost@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>
* | virtio-pci: Report an error when msix vectors init failsFam Zheng2014-06-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | Currently vectors silently cleared to 0 if the initialization is failed, but user should at least have one way to notice this. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | e1000: factor out checking for auto-negotiation availabilityGabriel L. Somlo2014-06-231-12/+14
| | | | | | | | | | | | | | | | | | | | | | Also fix minor indentation issues in the surrounding code. Suggested-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Gabriel Somlo <somlo@cmu.edu> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | e1000: move e1000_autoneg_timer() to after set_ics()Gabriel L. Somlo2014-06-231-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | Enable calling set_ics() from within e1000_autoneg_timer() without the need for a forward declaration. This patch contains no functional changes. Signed-off-by: Gabriel Somlo <somlo@cmu.edu> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | e1000: signal guest on successful link auto-negotiationGabriel L. Somlo2014-06-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generate a link status change interrupt once link auto-netotiation is successfully completed. This does not affect Linux and Windows (XP and 7 tested) in any way, but is needed by the stock OS X driver (AppleIntel8254XEthernet.kext), which would otherwise fail to notice the link status change event. Signed-off-by: Gabriel Somlo <somlo@cmu.edu> Reviewed-by: Alexander Graf <agraf@suse.de> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | e1000: improve auto-negotiation reporting via mii-toolGabriel L. Somlo2014-06-232-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using mii-tool (on F20-live), the following output is produced: SIOCGMIIREG on ens3 failed: Input/output error ens3: no autonegotiation, 1000baseT-FD flow-control, link ok The first line (SIOCGMIIREG error) is due to mii-tool's inability to read the PHY auto-negotiation expansion register. On the second line, "no autonegotiation" is wrong, and caused by the absence of a flag in the link partner ability register which would indicate that our link partner has acked us. This flag is listed as "reserved" in the Intel e1000 manual, but mii-tool uses it as LPA_LPACK from /usr/include/linux/mii.h. This patch adds read access to PHY_AUTONEG_EXP and defines the link partner ack flag, allowing mii-tool to generate output as normally expected: ens3: negotiated 1000baseT-FD flow-control, link ok Signed-off-by: Gabriel Somlo <somlo@cmu.edu> Reviewed-by: Alexander Graf <agraf@suse.de> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | e1000: emulate auto-negotiation during external link status changeGabriel L. Somlo2014-06-231-16/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch emulates auto-negotiation when the network link status is modified externally (i.e. via "set_link <id> off/on"). Also, a couple of cleanup items: - unset PHY status reg. AUTONEG_COMPLETE during link_down() - set PHY status reg. AUTONEG_COMPLETE during autoneg_timer() only if we actually brought the link up. - group all checks for "can we, and should we autonegotiate?" together for more clarity. Signed-off-by: Gabriel Somlo <somlo@cmu.edu> Reviewed-by: Alexander Graf <agraf@suse.de> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | vhost: fix resource leak in error handlingMichael S. Tsirkin2014-06-231-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | vhost_verify_ring_mappings leaks mappings on error. Fix this up. Cc: qemu-stable@nongnu.org Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | vhost: block migration if backend does not log memoryMichael S. Tsirkin2014-06-231-0/+11
|/ | | | | | | | | | | | | | | | | vhost user does not support LOG_ALL feature bit. Generally, we should not try to set this bit without checking that backend can support it first. Detect and block migration. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into ↵Peter Maydell2014-06-231-16/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging Block pull request # gpg: Signature made Mon 23 Jun 2014 09:53:49 BST using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" * remotes/stefanha/tags/block-pull-request: block: asynchronously stop the VM on I/O errors vl: allow other threads to do qemu_system_vmstop_request sheepdog: fix NULL dereference in sd_create QemuOpts: check NULL opts in qemu_opt_get functions block: m25p80: Support read only bdrvs. block: m25p80: sync_page(): Deindent function body. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * block: m25p80: Support read only bdrvs.Peter Crosthwaite2014-06-211-6/+2
| | | | | | | | | | | | | | | | | | By just never doing write-backs. This is completely invisible to the guest, as the entire storage area is implemented as device state (at realize time the entire drive is read in). Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * block: m25p80: sync_page(): Deindent function body.Peter Crosthwaite2014-06-211-11/+13
| | | | | | | | | | | | | | | | | | | | | | sync_page() was conditionalizing it's whole fn body on the bdrv being non-null. Just return for the function immediately on NULL brdv and get rid of the big if. Makes implementation consistent with flash_zynq_area(). Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | apb: Fix out-of-bounds array write accessStefan Weil2014-06-201-2/+2
|/ | | | | | | | | | | | | | The array regs is declared with IOMMU_NREGS (3) elements and accessed using IOMMU_CTRL (0) and IOMMU_BASE (8). In most cases, those values are right shifted before being used as an index which results in indices 0 and 1. In one case, this right shift was missing for IOMMU_BASE which results in an out-of-bounds write access with index 8. The patch adds the missing shift operation also for IOMMU_CTRL where it is needed only for cosmetic reasons. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
* gt64xxx_pci: Add VMStateDescriptionSanjay Lal2014-06-201-0/+23
| | | | | | | | | | | | | | | Add VMStateDescription for GT64120 PCI emulation used by the Malta platform, to allow it to work with savevm/loadvm and live migration. The entire register array is saved/restored using VMSTATE_UINT32_ARRAY (fixed length GT_REGS = 1024). Signed-off-by: Sanjay Lal <sanjayl@kymasys.com> [james.hogan@imgtec.com: Convert to VMState] Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Andreas Färber <afaerber@suse.de> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* Merge remote-tracking branch 'remotes/kvm/uq/master' into stagingPeter Maydell2014-06-204-25/+90
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remotes/kvm/uq/master: hw/mips: malta: Don't boot from flash with KVM T&E MAINTAINERS: Add entry for MIPS KVM target-mips: Enable KVM support in build system hw/mips: malta: Add KVM support hw/mips: In KVM mode, inject IRQ2 (I/O) interrupts via ioctls target-mips: Call kvm_mips_reset_vcpu() from mips_cpu_reset() target-mips: kvm: Add main KVM support for MIPS kvm: Allow arch to set sigmask length target-mips: get_physical_address: Add KVM awareness target-mips: get_physical_address: Add defines for segment bases hw/mips: Add API to convert KVM guest KSEG0 <-> GPA hw/mips/cputimer: Don't start periodic timer in KVM mode target-mips: Reset CPU timer consistently KVM: Fix GSI number space limit Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * hw/mips: malta: Don't boot from flash with KVM T&EJames Hogan2014-06-201-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In KVM trap & emulate (T&E) mode the flash reset region at 0xbfc00000 isn't executable, which is why the minimal kernel bootloader is loaded and executed from the last 1MB of DRAM instead. Therefore if no kernel is provided on the command line and KVM is enabled, exit with an error since booting from flash will fail. Reported-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * hw/mips: malta: Add KVM supportJames Hogan2014-06-181-20/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In KVM mode the bootrom is loaded and executed from the last 1MB of DRAM. Based on "[PATCH 12/12] KVM/MIPS: General KVM support and support for SMP Guests" by Sanjay Lal <sanjayl@kymasys.com>. Signed-off-by: James Hogan <james.hogan@imgtec.com> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Cc: Peter Maydell <peter.maydell@linaro.org> Cc: Sanjay Lal <sanjayl@kymasys.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * hw/mips: In KVM mode, inject IRQ2 (I/O) interrupts via ioctlsSanjay Lal2014-06-181-0/+11
| | | | | | | | | | | | | | | | | | | | | | COP0 emulation is in-kernel for KVM, so inject IRQ2 (I/O) interrupts via ioctls. Signed-off-by: Sanjay Lal <sanjayl@kymasys.com> Signed-off-by: James Hogan <james.hogan@imgtec.com> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * hw/mips: Add API to convert KVM guest KSEG0 <-> GPASanjay Lal2014-06-181-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add API for converting physical addresses to KVM guest KSEG0 addresses, and fix the existing API for converting KSEG0 addresses to physical addresses to work in the KVM case. Both have the same sized KSEG0, so it's just a case of fixing the mask. In KVM trap and emulate mode both the guest kernel and guest userspace execute in useg: Guest User address space: 0x00000000..0x3fffffff Guest Kernel Unmapped: 0x40000000..0x5fffffff Guest Kernel Mapped: 0x60000000..0x7fffffff Signed-off-by: Sanjay Lal <sanjayl@kymasys.com> Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * hw/mips/cputimer: Don't start periodic timer in KVM modeSanjay Lal2014-06-181-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compare/Count timer interrupts are handled in-kernel for KVM. Therefore don't bother creating the timer at init time if KVM is enabled. This will conveniently avoid attempts to set the timeout when cpu_mips_store_count() is called at reset with KVM enabled, treating the timer as stopped so that CP0_Count is modified directly. Signed-off-by: Sanjay Lal <sanjayl@kymasys.com> [james.hogan@imgtec.com: Update after "target-mips: Reset CPU timer consistently" which moves timer start to reset time] Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * target-mips: Reset CPU timer consistentlyJames Hogan2014-06-181-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MIPS CPU timer (CP0 Count/Compare registers & QEMU timer) is reset at machine initialisation, including starting the timeout. Both registers however are placed before mvp in CPUMIPSState so they will both be zeroed on reset by the memset in mips_cpu_reset() including soon after init. This doesn't take into account that the timer may be running, in which case env->CP0_Count will represent the delta against the VM clock and the timeout will need updating. At init time (cpu_mips_clock_init()), lets only create the timer. Setting Count = 1 and starting the timer (cpu_mips_store_count()) can be done at reset time from cpu_state_reset(), which is after the memset. There is also no need to set CP0_Compare = 0 as that is already handled by the memset. Note that a reset occurs from mips_cpu_realizefn() which is before the machine init callback has had a chance to set up the CPU interrupts and the CPU timer, so env->timer will be NULL. This case is handled explicitly in cpu_mips_store_count(), treating the timer as disabled (which will also be the right thing to do when KVM support is added). Reported-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into stagingPeter Maydell2014-06-2036-293/+3183
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pc,pci,virtio,hotplug fixes, enhancements numa work by Hu Tao and others memory hotplug by Igor vhost-user by Nikolay, Antonios and others guest virtio announcements by Jason qtest fixes by Sergey qdev hotplug fixes by Paolo misc other fixes mostly by myself Signed-off-by: Michael S. Tsirkin <mst@redhat.com> * remotes/mst/tags/for_upstream: (109 commits) numa: use RAM_ADDR_FMT with ram_addr_t qapi/string-output-visitor: fix bugs tests: simplify code qapi: fix input visitor bugs acpi: rephrase comment qmp: add ACPI_DEVICE_OST event handling qmp: add query-acpi-ospm-status command acpi: implement ospm_status() method for PIIX4/ICH9_LPC devices acpi: introduce TYPE_ACPI_DEVICE_IF interface qmp: add query-memory-devices command numa: handle mmaped memory allocation failure correctly pc: acpi: do not hardcode preprocessor qmp: clean out whitespace qdev: recursively unrealize devices when unrealizing bus qdev: reorganize error reporting in bus_set_realized qapi: fix build on glib < 2.28 qapi: make string output visitor parse int list qapi: make string input visitor parse int list tests: fix memory leak in test of string input visitor hmp: add info memdev ... Conflicts: include/hw/i386/pc.h [PMM: fixed minor conflict in pc.h] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | qmp: add ACPI_DEVICE_OST event handlingIgor Mammedov2014-06-191-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | emits event when ACPI OSPM evaluates _OST method of ACPI device. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | acpi: implement ospm_status() method for PIIX4/ICH9_LPC devicesIgor Mammedov2014-06-194-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... using TYPE_ACPI_DEVICE_IF interface. Which provides status reporting of ACPI declared memory devices Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | acpi: introduce TYPE_ACPI_DEVICE_IF interfaceIgor Mammedov2014-06-192-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... it will be used to abstract generic ACPI bits from device that implements ACPI interface. ACPIOSTInfo type is used for passing-through raw _OST event/status codes reported by guest OS to a management layer. It lets management tools interpret values as specified by ACPI spec if it is interested in it. QEMU doesn't encode these values as enum, since it doesn't need to handle them and it allows interface to scale well without any changes in QEMU while guest OS and management evolves in time. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | qmp: add query-memory-devices commandIgor Mammedov2014-06-191-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... allowing to get state of present memory devices. Currently implemented only for PCDIMMDevice. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
OpenPOWER on IntegriCloud