summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2013-05-07Merge remote-tracking branch 'kraxel/usb.82' into stagingAnthony Liguori3-16/+104
# By Gerd Hoffmann (3) and Hans de Goede (1) # Via Gerd Hoffmann * kraxel/usb.82: xhci: handle USB_RET_BABBLE uhci: Use an intermediate buffer for usb packet data usb-host: add usb_host_full_speed_compat usb-host: live migration support for the libusb version Message-id: 1367920207-1404-1-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-07virtio-net: properly check the vhost status during status setJason Wang1-2/+2
Commit 32993698 (vhost: disable on tap link down) tries to disable the vhost also when the peer's link is down. But the check was not done properly, the vhost were only started when: 1) peer's link is not down 2) virtio-net has already been started. Since == have a higher precedence than &&, place a brace to make sure both the conditions were met then does the check. This fixes the crash when doing a savem after set the link off which let qemu crash and complains: virtio_net_save: Assertion `!n->vhost_started' failed. Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Message-id: 1366972060-21606-1-git-send-email-jasowang@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-07Merge remote-tracking branch 'afaerber/qom-cpu' into stagingAnthony Liguori4-21/+39
# By Eduardo Habkost (6) and others # Via Andreas Färber * afaerber/qom-cpu: target-i386: n270 can MOVBE target-i386: Introduce generic CPUID feature compat function target-i386: Change CPUID model of 486 to 8 target-i386: Emulate X86CPU subclasses for global properties qdev: Introduce qdev_prop_set_globals_for_type() qdev: Let qdev_prop_parse() pass through Error target-i386: Add "filtered-features" property to X86CPU target-i386: Introduce X86CPU::filtered_features field target-i386: Add "feature-words" property to X86CPU target-i386: Use FeatureWord loop on filter_features_for_kvm() target-i386: Add ECX information to FeatureWordInfo
2013-05-07xhci: handle USB_RET_BABBLEGerd Hoffmann1-0/+5
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-05-07uhci: Use an intermediate buffer for usb packet dataHans de Goede1-8/+13
Due to various unfortunate reasons we cannot reliable detect a guest cancelling a packet as soon as it happens, instead we detect cancels with some delay. When packets are handled async, and we directly pass the guest memory for the packet to the usb-device as iovec, this means that the usb-device can write to guest-memory which the guest has already re-used for other purposes -> not good! This patch fixes this by adding an intermediate buffer and writing back not only the result, but also the data, of async completed packets when scanning the schedule. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-05-07usb-host: add usb_host_full_speed_compatGerd Hoffmann1-3/+37
Alloes to pass through usb2 devices on usb1 host controllers if possible. Brings the libusb implementation to feature-parity with the linux usbfs code, so the usb-host implementation in 1.5 (libusb) doesn't regress compared to 1.4 (usbfs). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-05-07usb-host: live migration support for the libusb versionGerd Hoffmann1-5/+49
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-05-06Merge remote-tracking branch 'qemu-kvm/uq/master' into stagingAnthony Liguori1-0/+6
# By Marcelo Tosatti # Via Gleb Natapov * qemu-kvm/uq/master: kvmvapic: add ioport read accessor Message-id: cover.1367844188.git.gleb@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-06target-i386: n270 can MOVBEBorislav Petkov2-0/+2
The Atom core (cpu name "n270" in QEMU speak) supports MOVBE. This is needed when booting 3.8 and later linux kernels built with the MATOM target because we require MOVBE in order to boot properly now. Signed-off-by: Borislav Petkov <bp@suse.de> [ehabkost: added compat code to disable MOVBE on pc-*-1.4 and older] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-05-06Merge branch 's390-for-upstream' of git://github.com/agraf/qemuAurelien Jarno1-11/+27
* 's390-for-upstream' of git://github.com/agraf/qemu: s390: update s390-ccw.img S390: BIOS boot from given device S390: Add virtio-blk boot S390: Merging s390_ipl_cpu and s390_ipl_reset S390: BIOS create link to src folder for .img file S390: BIOS check for file
2013-05-06qdev: Introduce qdev_prop_set_globals_for_type()Andreas Färber1-11/+25
Reuse it in qdev_prop_set_globals(). Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> [AF: Renamed from qdev_prop_set_custom_globals()] Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-05-06qdev: Let qdev_prop_parse() pass through ErrorAndreas Färber2-15/+17
Move error reporting to callers. Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-05-06S390: Add virtio-blk bootDominik Dingel1-0/+18
If no kernel IPL entry is specified, boot the bios and pass if available device information for the first boot device (as given by the boot index). The provided information will be used in the next commit from the BIOS. Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-06S390: Merging s390_ipl_cpu and s390_ipl_resetDominik Dingel1-11/+5
There is no use in have this splitted in two functions. Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-06S390: BIOS check for fileDominik Dingel1-0/+4
Add a check if the BIOS blob exists before trying to load. Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-06spapr_llan: fix device reenablingAlexey Kardashevskiy1-0/+2
Normally, the "tap" device is polled by QEMU if a guest NIC can receive packets. If a guest NIC is stopped during transfer (rmmod or ifdown), it may still have packets in a queue which have to be send to the guest before QEMU enables polling of a "tap" interface via tap_update_fd_handler(). However the spapr_llan device was missing the qemu_flush_queued_packets() call so the tap_send_completed() callback was never called and therefore "tap" interface polling was not enabled ever. The patch fixes this problem. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-06PPC: e500: correct params->ram_size with ram_sizeTiejun Chen1-0/+1
We should sync params->ram_size after we fixup memory size on a alignment boundary. Otherwise Guest would exceed the actual memory region. Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-06PPC: e500: initialize GPRs as per epaprBharat Bhushan1-3/+27
ePAPR defines the initial values of cpu registers. This patch initialize the GPRs as per ePAPR specification. This resolves the issue of guest reboot/reset (guest hang on reboot). Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com> [agraf: add whitespace line] Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-06pseries: Fix debug message for out-of-bounds address in H_PUT_TCEDavid Gibson1-1/+1
Due to a brain outage, this message says "out-of-boards" instead of "out-of-bounds". Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-06pseries: Factor out check for out-of-bounds LIOBNDavid Gibson1-6/+6
PAPR defines LIOBNs (Logical IO Bus Numbers) to be 32-bit, and we check for values that aren't in the code for H_PUT_TCE. This patch factors the check into spapr_tce_find_by_liobn(), which already checks if a 32-bit LIOBN actually exists. This will become more important as future patches add other hypercalls which need to look up a LIOBN. At the same time we fix the typo in the message. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-05-06kvmvapic: add ioport read accessorMarcelo Tosatti1-0/+6
Necessary since memory region accessor assumes read and write methods are registered. Otherwise reading I/O port 0x7e segfaults. https://bugzilla.redhat.com/show_bug.cgi?id=954306 Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Gleb Natapov <gleb@redhat.com>
2013-05-06Merge remote-tracking branch 'afaerber-or/prep-up' into stagingAnthony Liguori1-10/+26
# By Andreas Färber (1) and others # Via Andreas Färber * afaerber-or/prep-up: prep: Make System I/O port 0092 read/write prep: Add ELF support for -bios prep: Fix NIP reset value
2013-05-06Merge remote-tracking branch 'pmaydell/arm-devs.next' into stagingAnthony Liguori1-64/+198
# By Jean-Christophe DUBOIS # Via Peter Maydell * pmaydell/arm-devs.next: i.MX: implement a more correct version of EPIT timer. Message-id: 1367603215-5120-1-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-06prep: Make System I/O port 0092 read/writeJulio Guerra1-1/+1
Port 0x0092 is documented as read/write, so for now return the endianness state instead of hardcoded 0x00. Signed-off-by: Julio Guerra <guerr@julio.in> [AF: Extracted from larger port 0092 patch] Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2013-05-05prep: Add ELF support for -biosAndreas Färber1-9/+22
This prepares for switching from OpenHack'Ware to OpenBIOS. While touching the error handling code, switch from aborting hw_error() to fprintf()+exit() and suppress failing without -bios for qtest. Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2013-05-05prep: Fix NIP reset valueFabien Chouteau1-0/+3
The value was changed by commit 09d9828ace37ead29d510a7e24e63c2f15cd4b1c "PPC: fix hreset_vector for 60x, ...". Change it back for prep machine to unbreak OpenHack'Ware. Signed-off-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2013-05-03i.MX: implement a more correct version of EPIT timer.Jean-Christophe DUBOIS1-64/+198
This patch is providing a complete version of the EPIT timer. Note, however that the GPT timer in the same file is still not complete. Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net> Message-id: 1365624982-15647-1-git-send-email-jcd@tribudubois.net Reviewed-by: Peter Chubb <peter.chubb@nicta.com.au> [PMM: wrapped an overly long line] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-05-03qdev: skip bus check for bus-less devices in qdev_unplug()Igor Mammedov1-1/+1
Since commit 2f7bd829db "qdev: Fix device_add bus assumptions" it's possible to device_add bus-less device, but if such device is unplugged it will dereference NULL parent_bus in qdev_unplug(). Fix it by taking in account that parent_bus might be NULL and skipping bus check. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-id: 1367587536-14964-1-git-send-email-imammedo@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-03virtio-scsi: fix the command line compatibility.KONRAD Frederic4-1/+38
The bus name is wrong since the refactoring. This keeps the behaviour of the command line. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1367330931-12994-6-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-03virtio-serial: fix command line compatibility.KONRAD Frederic4-1/+37
The bus name is wrong since the refactoring. This keeps the behaviour of the command line. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1367330931-12994-5-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-03scsi: add bus_name parameter to scsi_bus_new.KONRAD Frederic10-12/+13
This adds the possibility to create a scsi-bus with a specified name. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1367330931-12994-4-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-03virtio: add virtio_device_set_child_bus_name.KONRAD Frederic1-0/+24
Add virtio_device_set_child_bus_name function. It will be used with virtio-serial-x and virtio-scsi-x to set the child bus name before calling virtio-x-device's init. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1367330931-12994-3-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-03virtio-x-bus: force bus name to virtio-bus.KONRAD Frederic3-3/+11
When the proxy id is set, this bus takes the name "id.0" which is expected to be the virtio-device's first bus. So force this name to "virtio-bus" as it is an internal bus. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1367330931-12994-2-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-02Merge remote-tracking branch 'afaerber/qom-cpu' into stagingAnthony Liguori13-16/+336
# By Igor Mammedov (21) and others # Via Andreas Färber * afaerber/qom-cpu: (29 commits) Drop redundant resume_all_vcpus() from main() cpus: Fix pausing TCG CPUs while in vCPU thread target-i386: Replace cpuid_*features fields with a feature word array target-i386: Break CPUID feature definition lines target-i386/kvm.c: Code formatting changes target-i386: Group together level, xlevel, xlevel2 fields pc: Implement QEMUMachine::hot_add_cpu hook QMP: Add cpu-add command Add hot_add_cpu hook to QEMUMachine target-i386: Move APIC to ICC bus target-i386: Attach ICC bus to CPU on its creation target-i386: Introduce ICC bus/device/bridge cpu: Move cpu_write_elfXX_note() functions to CPUState kvmvapic: Make dependency on sysbus.h explicit target-i386: Replace MSI_SPACE_SIZE with APIC_SPACE_SIZE target-i386: Do not allow to set apic-id once CPU is realized target-i386: Introduce apic-id CPU property target-i386: Introduce feat2prop() for CPU properties acpi_piix4: Add infrastructure to send CPU hot-plug GPE to guest cpu: Add helper cpu_exists(), to check if CPU with specified id exists ...
2013-05-02target-i386: Replace cpuid_*features fields with a feature word arrayEduardo Habkost1-1/+1
This replaces the feature-bit fields on both X86CPU and x86_def_t structs with an array. With this, we will be able to simplify code that simply does the same operation on all feature words (e.g. kvm_check_features_against_host(), filter_features_for_kvm(), add_flagname_to_bitmaps(), CPU feature-bit property lookup/registration, and the proposed "feature-words" property) The following field replacements were made on X86CPU and x86_def_t: (cpuid_)features -> features[FEAT_1_EDX] (cpuid_)ext_features -> features[FEAT_1_ECX] (cpuid_)ext2_features -> features[FEAT_8000_0001_EDX] (cpuid_)ext3_features -> features[FEAT_8000_0001_ECX] (cpuid_)ext4_features -> features[FEAT_C000_0001_EDX] (cpuid_)kvm_features -> features[FEAT_KVM] (cpuid_)svm_features -> features[FEAT_SVM] (cpuid_)7_0_ebx_features -> features[FEAT_7_0_EBX] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-05-01Trivial grammar and spelling fixesStefan Weil1-1/+1
similiar -> similar recieve -> receive transfered -> transferred preperation -> preparation Most changes are in comments, one modifies a parameter name in a function prototype. The spelling fixes were made using codespell. Signed-off-by: Stefan Weil <sw@weilnetz.de> Acked-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-05-01pc: Implement QEMUMachine::hot_add_cpu hookIgor Mammedov3-0/+28
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-05-01target-i386: Move APIC to ICC busIgor Mammedov3-8/+33
It allows APIC to be hotplugged. * map APIC's mmio at board level if it is present * do not register mmio region for each APIC, since only one is used/mapped Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-05-01target-i386: Attach ICC bus to CPU on its creationIgor Mammedov3-6/+8
X86CPU should have parent bus so it could provide bus for child APIC. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-05-01target-i386: Introduce ICC bus/device/bridgeIgor Mammedov4-0/+124
Provides a hotpluggable bus for APIC and CPU. * icc-bridge will serve as a parent for icc-bus and provide mmio mapping services to child icc-devices. * icc-device will replace SysBusDevice as a parent of APIC and IOAPIC devices. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-05-01kvmvapic: Make dependency on sysbus.h explicitIgor Mammedov1-0/+1
Allows kvmvapic to compile if sysbus.h is removed from apic_internal.h, from which it is indirectly included. sysbus.h will be removed from apic_internal.h after converting APICs to ICCDevice. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-05-01target-i386: Replace MSI_SPACE_SIZE with APIC_SPACE_SIZEIgor Mammedov3-3/+3
Put APIC_SPACE_SIZE in a public header so that it can be reused elsewhere later. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-05-01target-i386: Introduce apic-id CPU propertyIgor Mammedov1-1/+28
The property is used from board level to set APIC ID for CPUs it creates. Do so in a new pc_new_cpu() helper, to be reused for hot-plug. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-05-01acpi_piix4: Add infrastructure to send CPU hot-plug GPE to guestIgor Mammedov1-2/+88
* introduce processor status bitmask visible to guest at 0xaf00 addr, where ACPI asl code expects it * set bit corresponding to APIC ID in processor status bitmask on receiving CPU hot-plug notification * trigger CPU hot-plug SCI, to notify guest about CPU hot-plug event Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-05-01pc: Update rtc_cmos on CPU hot-plugIgor Mammedov2-0/+27
It provides updated currently available CPUs count to BIOS on reboot. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-04-30virtio-net: count VIRTIO_NET_F_MAC when calculating config_lenJason Wang1-0/+1
Commit 14f9b664 (hw/virtio-net.c: set config size using host features) tries to calculate config size based on the host features. But it forgets the VIRTIO_NET_F_MAC were always set for qemu later. This will lead a zero config len for virtio-net device when both VIRTIO_NET_F_STATUS and VIRTIO_NET_F_MQ were disabled form command line. Then qemu will crash when user tries to read the config of virtio-net. Fix this by counting VIRTIO_NET_F_MAC and make sure the config at least contains the mac address. Cc: Jesse Larrew <jlarrew@linux.vnet.ibm.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Message-id: 1366874814-2658-1-git-send-email-jasowang@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-30pvpanic: create pvpanic by default for machine 1.5Hu Tao3-0/+26
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: f840042f0e1205041f8feaf0d39ca639884f3a00.1366945969.git.hutao@cn.fujitsu.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-30pvpanic: pass configurable ioport to seabiosHu Tao2-1/+21
This lets seabios patch the corresponding SSDT entry. Also add fw_cfg object to /machine/fw_cfg so we can reference it elsewhere. Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: 60c65d95fe2b23b12bea67099126566010a11a1a.1366945969.git.hutao@cn.fujitsu.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-30introduce a new qom device to deal with panicked eventHu Tao2-0/+125
pvpanic device is used to send guest panic event from guest to qemu. When guest panic happens, pvpanic device driver will write a event number to IO port 0x505(which is the IO port occupied by pvpanic device, by default). On receiving the event, pvpanic device will pause guest cpu(s), and send a qmp event QEVENT_GUEST_PANICKED. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: b66077a40235b3531632a05a6ff373850afc7d2e.1366945969.git.hutao@cn.fujitsu.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-30qdev: Report errors collected during device realizationJan Kiszka1-0/+1
Better than just releasing the error object silently. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Message-id: 517E68FC.6030400@siemens.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>